Skip to main content

Module toggle

Module toggle 

Source
Expand description

Check boxes and radio buttons: the two controls whose value is a state name rather than text.

They share a machine and differ in one line. A check box toggles; a radio button sets, unconditionally, and there is no way to un-select one by clicking it.

Two rules that look like bugs and are not: a read-only control consumes the keystroke and does nothing (consumption and effect are independent), and neither control handles arrow keys at all.

Structs§

ToggleState
A check box or radio button’s interaction state.

Enums§

ToggleKind
Which of the two controls a widget is, for the one line where they differ.

Constants§

OFF_STATE
The off state’s appearance name, which every check box and radio button shares.

Functions§

activate
Activates a control — what a click or a Return or Space does.