Rhombus

|
class gui.Slider(): | implements WindowChildView | constructor ( | ~label: label :: ObsOrValue.of(maybe(View.LabelString)) = #false, | ~value: value :: ObsOrValue.of(View.PositionInt) = 0, | ~min_value: min_value :: ObsOrValue.of(View.PositionInt) = 0, | ~max_value: max_value :: ObsOrValue.of(View.PositionInt) = 100, | ~action: action :: View.PositionInt -> ~any = values, | ~enable: enable :: ObsOrValue.of(Boolean) = #true, | ~margin: margin :: ObsOrValue.of(View.Margin) = [2, 2], | ~min_size: min_size :: ObsOrValue.of(View.Size) = [#false, #false], | ~stretch: stretch :: ObsOrValue.of(View.Stretch) = [#true, #true], | ~styles: styles :: List.of(Slider.Style) = [#'horizontal], | ~window_callbacks: window_callbacks :: maybe(WindowCallbacks) = #false | ) |
|
|
|
|
Creates a slider. When rendered, the function call
action(now_val) is performed when the
slider is changed, where now_val indicates the value of
the slider.
The Slider.at_value property returns an observable that
is updated whenever the slider’s value changes through an action
(as also reported via action) or via value as an
observable.
The styles list must include one of #'horiziontal
and #'vertical.
A slider style option.