47 lines
1.2 KiB
Text
47 lines
1.2 KiB
Text
.section Widgets
|
|
.topic widget.checkbox
|
|
.title Checkbox
|
|
.toc 0 Checkbox
|
|
.index Checkbox
|
|
.index wgtCheckbox
|
|
.index wgtCheckboxIsChecked
|
|
.index wgtCheckboxSetChecked
|
|
|
|
.h2 Checkbox
|
|
|
|
A toggle control with a text label. Clicking toggles between checked and unchecked states.
|
|
|
|
Header: widgets/widgetCheckbox.h
|
|
|
|
.h3 Creation
|
|
|
|
.code
|
|
WidgetT *cb = wgtCheckbox(parent, "Enable logging");
|
|
.endcode
|
|
|
|
.h3 Macros
|
|
|
|
.table
|
|
Macro Description
|
|
----- -----------
|
|
wgtCheckbox(parent, text) Create a checkbox with the given label text.
|
|
wgtCheckboxIsChecked(w) Returns true if the checkbox is checked.
|
|
wgtCheckboxSetChecked(w, checked) Set the checked state programmatically.
|
|
.endtable
|
|
|
|
.h3 Events
|
|
|
|
.table
|
|
Callback Description
|
|
-------- -----------
|
|
onClick Fires when clicked (after toggle).
|
|
onChange Fires when the checked state changes.
|
|
.endtable
|
|
|
|
.h3 Properties (BASIC Interface)
|
|
|
|
.table
|
|
Property Type Access Description
|
|
-------- ---- ------ -----------
|
|
Value Boolean Read/Write Whether the checkbox is checked.
|
|
.endtable
|