GenClass: 2.1 GenClass Instance Data: Instance Fields

Up: GEOS SDK TechDocs | Up | Prev: 2 GenClass Instance Data | Next: 2.2 Vardata

GenClass provides a set of instance fields common to all subclasses. These instance fields are listed in GenClass Instance Data Fields .

Code Display 2-1 GenClass Instance Data Fields

    @instance @link				GI_link;
    @instance @visMoniker				GI_visMoniker;
    @instance @composite				GI_comp;
    @instance @kbdAccelerator				GI_kbdAccelerator;
    @instance GenAttrs				GI_attrs = 0;
    @instance GenStates GI_states = GS_USABLE | GS_ENABLED;
/* GenAttrs store attributes of a generic object. */
typedef ByteFlags GenAttrs;
#define GA_SIGNAL_INTERACTION_COMPLETE					0x80
#define GA_INITIATES_BUSY_STATE					0x40
#define GA_INITIATES_INPUT_HOLD_UP					0x20
#define GA_INITIATES_INPUT_IGNORE					0x10
#define GA_READ_ONLY					0x08
#define GA_KBD_SEARCH_PATH					0x04
#define GA_TARGETABLE					0x02
#define GA_NOTIFY_VISIBILITY					0x01
/* GenStates store the usability states of a generic object. */
typedef ByteFlags GenStates;
#define GS_USABLE			0x80
#define GS_ENABLED			0x40*

GI_visMoniker chooses the title for the generic object, usually added in an appropriate location within the object by the specific UI. The moniker can be text, in the form of a null-terminated text string, or as a graphics string, usually set up separately. For more information on visual monikers, see Visual Monikers .

GI_comp assigns child objects to the current object (the parent). GI_comp takes a list of generic objects separated by commas as arguments in its instance field. It then sets each of those arguments as children of the current object. In the Goc preprocessor, the GI_comp arguments will be used to create a generic tree structure, reassigning present links using both the GI_comp instance field and an internal instance field, GI_link . The GI_link instance field is therefore an elemental instance field for every generic object but is rarely, if ever, accessed directly. For more information, see Composite Links .

GI_kbdAccelerator sets a given keystroke as a keyboard accelerator for the object. Usually, an object is activated in a manner relating to its specific UI implementation. Pressing the accelerator keystroke will activate the object in the same manner as if its default activation action had occurred. The instance field takes a modifier ( alt , shift , ctrl , or combinations of these) and a character (a valid keyboard character) as its arguments. You can further specify the specific keyboard set to use. For more information, see Keyboard Accelerators .

GI_attrs defines how actions performed by the generic object will affect user interface input and output. You may set any, all, or none of these attributes within your object declaration. For more information, see Attributes .

GI_states defines in what state a generic object will be represented. Default states are GS_USABLE and GS_ENABLED. You may set any, all, or none of these states within your object declaration. For more information, see States .


Up: GEOS SDK TechDocs | Up | Prev: 2 GenClass Instance Data | Next: 2.2 Vardata