Unit 'intuition' Package
[Overview][Constants][Types][Procedures and functions][Variables][Index] [#amunits]

GADGETCLASS

Class identifier. This is a base class for Intuition compatible gadget objects.

Declaration

Source position: intuition.pas line 2788

const GADGETCLASS: PChar = 'gadgetclass';

Description

SuperClass:rootclass

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.

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 (IS)

GA_Top (IS)

GA_Width (IS)

GA_Height (IS)

GA_RelRight (IS)

GA_RelBottom (IS)

GA_RelWidth (IS)

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 (IS)

GA_Text (IS)

GA_LabelImage (IS)

GA_Image (IS)

GA_Border (IS)

GA_SelectRender (IS)

GA_ID (IS)

GA_UserData (IS)

GA_SpecialInfo (IS)

GA_GZZGadget (IS)

GA_SysGadget (IS)

GA_Disabled (IS)

GA_Selected (IS)

GA_EndGadget (IS)

GA_Immediate (IS)

GA_RelVerify (IS)

GA_FollowMouse (IS)

GA_RightBorder (IS)

GA_LeftBorder (IS)

GA_TopBorder (IS)

GA_BottomBorder (IS)

GA_ToggleSelect (IS)

GA_TabCycle (IS)

GA_Highlight (IS)

GA_SysGType (IS)

See also

ClassID

  

Name of the Object class

TIClass

  

This structure is READ-ONLY, and allocated only by Intuition

MakeClass

  

Create and initialize a boopsi class.

NewObjectA

  

Create an object from a class.


Documentation generated on: 2021-07-30