[Contents] [index] [Help] [Retrace] [browse <] [Browse >]

The various GadTools gadget types require certain classes of IDCMP
messages in order to work.  Applications specify these IDCMP classes when
the window is opened or later with modifyidcmp() (see "intuition windows"
chapter for more on this).  Each kind of GadTools gadget requires
one or more of these IDCMP classes: idcmp_gadgetup, idcmp_gadgetdown,
idcmp_mousemove, idcmp_mousebuttons and idcmp_intuiticks.  as a
convenience, the IDCMP classes required by each kind of gadget are defined
in <libraries/gadtools.h>.  for example, slideridcmp is defined to be:

    #define SLIDERIDCMP (IDCMP_GADGETUP | IDCMP_GADGETDOWN |
                                          IDCMP_MOUSEMOVE)


    Always OR the IDCMP Flag Bits.
    ------------------------------
    When specifying the IDCMP classes for a window, never add the
    flags together, always OR the bits together.  Since many of the
    GadTools IDCMP constants have multiple bits set, adding the values
    will not lead to the proper flag combination.

If a certain kind of GadTools gadget is used, the window must use all
IDCMP classes required by that kind of gadget.  Do not omit any that are
given for that class, even if the application does require the message
type.

Because of the way GadTools gadgets are implemented, programs that use
them always require notification about window refresh events.  Even if the
application performs no rendering of its own, it may not use the
wflg_nocarerefresh window flag and must always set idcmp_refreshwindow.
See the section on "gadget refresh functions" later in this chapter for
more on this.