Module: reefvision.widgets.slider
Source: ./reefvision/widgets/slider.reef
Overview
reefvision.widgets.slider — stepped value control:
- ########## + [ 500]
Minus/plus change by step. The bar is click/drag. The bracketed
field is an InputLine; Enter (or commit()) parses, snaps to step,
and moves the bar.
Objects
Slider
Extends: view.Group
Fields:
| Name | Type |
|---|---|
min_val |
int |
max_val |
int |
value |
int |
step_val |
int |
dragging |
bool |
input |
inputline.InputLine |
proc init(bounds: cell.Rect, min_val: int, max_val: int, value: int, step_val: int)
Methods:
override shared fn wants_focus(): bool
override shared fn captures_mouse(): bool
exclusive proc set_step(step_val: int)
exclusive proc set_value(value: int)
exclusive proc set_range(min_val: int, max_val: int)
exclusive proc commit()
exclusive proc sync_input()
exclusive proc nudge(dir: int)
override exclusive proc draw(buf: cell.CellBuffer, abs: cell.Rect, clip: cell.Rect, focused: bool, th: theme.Theme)
override exclusive fn handle_event(e: event.Event): view.EventResult
exclusive proc relayout()
exclusive proc apply_bar_x(local_x: int)
Functions
fn plus_col(w: int): int
fn box_col(w: int): int
fn bar_width(w: int): int
fn field_rect(w: int): cell.Rect
fn in_bar(local_x: int, w: int): bool
fn snap_val(lo: int, hi: int, step_val: int, v: int): int
Procedures
proc put_ch(buf: cell.CellBuffer, x: int, y: int, ch: int, st: cell.Style, clip: cell.Rect)
Generated by reefc doc