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

Class:                  gadgetclass
Superclass:             rootclass
Include File:           <intuition/gadgetclass.h>

This is a base class for Intuition compatible gadget objects.  The
dispatcher for this class takes care of creating an Intuition gadget
structure as part of its local instance data.  All of the standard Boopsi
gadget classes build on this class.  Normally there are no direct
instances of this class, only instances of subclasses of gadgetclass.

The behavior of a Boopsi gadget depends on how it handles the five Boopsi
gadget methods: GM_HITTEST, GM_RENDER, GM_GOACTIVE, GM_HANDLEINPUT, and
GM_GOINACTIVE.  Intuition controls a Boopsi gadget by sending it these
types of messages.  The structures that these methods use for their
messages begin with the method's ID followed by a pointer to a gadgetinfo
structure (defined in <intuition/cghooks.h>).  the gadgetinfo structure is
a read-only structure that contains information about the gadget's
rendering environment.  The gadget uses this to find things like its
window, screen, or pen array.  Although this structure does contain a
pointer to a rastport for the gadget, the gadget must not use this
RastPort for rendering.  The gadget can obtain a RastPort for rendering by
calling the Intuition function obtaingirport() using the gadgetinfo
structure.  See the intuition.library Autodocs for more details on this
function.

These methods are not defined directly by gadgetclass.  It is up to
subclasses of gadgetclass to implement them.

Like all Boopsi methods, these methods run on the context of the task that
called the method.  Normally, Intuition is the only entity that calls
these methods, so these normally operate in the input.device's task.
Because a gadget may have to process a large number of input events, poor
implementations of gadget methods (especially the GM_HANDLEINPUT method)
can degrade system performance.

New Methods:
------------
 gm_hittest    gm_goactive       gm_goinactive 
 gm_render     gm_handleinput 

Changed Methods:
----------------
 om_new    om_notify 

Attributes:
-----------
 ga_previous (i) 
 ica_target (is) 
 ica_map (is) 
 ga_left, ga_top, ga_width, ga_height (is) 
 ga_relright, ga_relbottom, ga_relwidth, ga_relheight (is) 

The remaining attributes defined by gadgetclass are used to set the fields
in the gadget structure of the boopsi gadget.  some boopsi gadgets do not
pay attention to many of the fields in its Gadget structure, so most
applications will not have to worry about the majority of these
attributes.  Some gadget classes assign special meanings to these
attributes.  See the documentation of the specific gadget classes for more
details.

 ga_intuitext, ga_text, ga_labelimage (is) 
 ga_image (is) 
 ga_border, ga_selectrender, ga_id, ga_userdata, ga_specialinfo (is) 
 ga_gzzgadget, ga_sysgadget (is) 
 ga_disabled, ga_selected (is) 
 ga_endgadget, ga_immediate, ga_relverify, ga_followmouse, (is)     
 ga_rightborder, ga_leftborder, ga_topborder, ga_bottomborder, (is) 
 ga_toggleselect, ga_tabcycle (is)                                  
 ga_highlight (is) 
 ga_sysgtype (is)