[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

A boolean gadget gets yes/no or on/off responses from the user.  To make a
boolean gadget set the GadgetType field to GTYP_BOOLGADGET in the Gadget
structure.

Boolean gadgets come in two types: hit-select and toggle-select.
Hit-select gadgets are only active while the user holds down the mouse
select button.  When the button is released, the gadget is unhighlighted.
Action buttons, such as "OK" and "Cancel", are hit-select.

Toggle-select gadgets become selected when the user clicks them.  To
"unselect" the gadget, the user has to click the gadget again.  Switches,
such as a checkbox, are toggle-select.

Set the GACT_TOGGLESELECT flag in the Activation field of the Gadget
structure to create a toggle-select gadget.

The GFLG_SELECTED flag in Gadget structure Flags field determines the
initial and current on/off selected state of a toggle-select gadget.  If
GFLG_SELECTED is set, the gadget will be highlighted.  The application can
set the GFLG_SELECTED flag before submitting the gadget to Intuition.  The
program may examine this flag at any time to determine the current state
of this gadget.

Try to make the imagery for toggle-select gadgets visually distinct from
hit-select gadgets so that their operation can be determined by the user
through visual inspection.

 Masked Boolean Gadgets    BoolInfo Structure    Mutual Exclude