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

A gadget may be disabled so that it cannot be chosen by the user.  When a
gadget is disabled, its image is ghosted.  A ghosted gadget is overlaid
with a pattern of dots, thereby making the imagery less distinct.  The
dots are drawn into the select box of the gadget and any imagery that
extends outside of the select box is not affected by the ghosting.

The application may initialize whether a gadget is disabled by setting the
GFLG_DISABLED flag in the Gadget structure's Flags field before a gadget
is submitted to Intuition.  Clear this flag to create an enabled gadget.

After a gadget is submitted to Intuition for display, its current enable
state may be changed by calling OnGadget() or OffGadget().  If the gadget
is in a requester, the requester must currently be displayed when calling
these functions.

    void OnGadget ( struct Gadget *gadget, struct Window *window,
                    struct Requester *requester );
    void OffGadget( struct Gadget *gadget, struct Window *window,
                    struct Requester *requester );

Depending on what sort of imagery you choose for your gadget, OnGadget()
may not be smart enough to correct the gadget's displayed imagery.  See
the section on "Updating a Gadget's Imagery" for more details.

Multiple gadgets may be enabled or disabled by calling OnGadget() or
OffGadget() for each gadget, or by removing the gadgets with
RemoveGList(), setting or clearing the GFLG_DISABLED flag on each,
replacing the gadgets with AddGList(), and refreshing with RefreshGList().