2 Arrow Toggle Snip
(require mrlib/arrow-toggle-snip) | package: gui-lib |
|
superclass: snip% |
Represents a toggle control, displayed as a right-facing arrow (off or
“closed”) or a downward-facing arrow (on or “open”).
The size of the arrow is determined by the style (and font) applied to
the snip. The arrow is drawn inscribed in a square resting on the
baseline, but the snip reports its size (usually) as the same as a
capital X; this means that the snip should look good next to
text (in the same style) no matter whether base-aligned or
top-aligned.
constructor
(new arrow-toggle-snip% [[callback callback]])
→ (is-a?/c arrow-toggle-snip%) callback : (-> boolean? any) = void The on-up and on-down callbacks are called when the snip is toggled.
method
(send an-arrow-toggle-snip get-toggle-state) → boolean?
Get the control’s state.
method
(send an-arrow-toggle-snip set-toggle-state v) → void?
v : boolean? Sets the control’s state. If the new state is different from the previous state, the appropriate callback is called.