|[Overview][Constants][Types][Procedures and functions][Variables][Index]||Reference for unit 'Intuition' (#aros)|
Class identifier. This is a base class for Intuition compatible gadget objects.
Source position: intuition.pas line 1742
const GADGETCLASS: ClassID = 'gadgetclass';
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 TGadgetInfo structure . 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.
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.
GM_HITTEST, GM_GOACTIVE, GM_GOINACTIVE, GM_RENDER, GM_HANDLEINPUT
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.
Name of the Object class
This structure is READ-ONLY, and allocated only by Intuition
Find a registered class
Create and initialize a boopsi class.
Create an object from a class.