
|
class gui.Checkbox(): | implements WindowChildView | constructor ( | label :: ObsOrValue.of(View.LabelString), | ~is_checked: is_checked :: ObsOrValue.of(Boolean) = #false, | ~action: action :: Boolean -> ~any = values, | ~enable: enable :: ObsOrValue.of(Boolean) = #true, | ~styles: styles :: List.of(Checkbox.Style) = [], | ~margin: margin :: ObsOrValue.of(View.Margin) = [2, 2], | ~min_size: min_size :: ObsOrValue.of(View.Size) = [#false, #false], | ~stretch: stretch :: ObsOrValue.of(View.Stretch) = [#false, #false], | ~window_callbacks: window_callbacks :: maybe(WindowCallbacks) = #false | ) |
|
|
|
|
Creates a checkbox. When rendered, the function call
action(now_checked) is performed when the
checkbox is clicked, where now_checked indicates the
state of the checkbox.
The Checkbox.at_is_checked property returns an observable that
is updated whenever the checkbox’s state changes through an action (as
also reported via action) or via is_checked as an
observable.
A checkbox style option. No options are supported, currently.