The List Objects: 3.1 GenItemGroups: GenItemGroup Instance Data

Up: GEOS SDK TechDocs | Up | Prev: 3 GenItemGroups | Next: 3.2 GenItem Instance Data

GenItemGroup and GenItem objects contain a variety of information. The bulk of the functionality of the list is contained in the GenItemGroup; the items themselves only contain identifying information that the list uses.

The GenItemGroup contains instance fields relating to the state of its children GenItems. These instance fields are listed in GenItemGroup Instance Data . Any objects of GenItemGroupClass or one of its subclasses will contain these instance fields, along with the instance fields of GenClass .

Code Display 11-1 GenItemGroup Instance Data

    @instance GenItemGroupBehaviorType					GIGI_behaviorType = GIGBT_EXCLUSIVE;
/* The GenItemGroupBehaviorType enumerations are used in the GIGI_behaviorType
 * instance field. */
typedef ByteEnum GenItemGroupBehaviorType;
#define GIGBT_EXCLUSIVE 0
#define GIGBT_EXCLUSIVE_NONE 1
#define GIGBT_EXTENDED_SELECTION 2
#define GIGBT_NON_EXCLUSIVE 3
    @instance GenItemGroupStateFlags					GIGI_stateFlags = 0;
/* The GenItemGroupStateFlags are used in the GIGI_stateFlags instance field. */
typedef ByteFlags GenItemGroupStateFlags;
#define GIGSF_INDETERMINATE 				0x80
#define GIGSF_MODIFIED				0x40
    @instance word					GIGI_selection = GIGS_NONE;
/* The GIGS_NONE constant is used with the GIGI_selection instance field and may
 * also be returned by MSG_GEN_ITEM_GROUP_GET_SELECTION. */
#define GIGS_NONE (0xffff)
    @instance word					GIGI_numSelections = 0;
    @instance optr					GIGI_destination;
    @instance Message					GIGI_applyMsg = 0;

GIGI_ behaviorType describes the selection behavior of the list. The default type is GIGBT_EXCLUSIVE, which creates an exclusive list. A full description of each type is provided in GenItemGroup Behavior .

GIGI_ stateFlags contains flags that affect the state of the GenItemGroup. These flags indicate whether a GenItemGroup is in an indeterminate or a modified state.

GIGI_ selection contains the name of the current GenItem child that is selected. GenItemGroups use the identifying keywords stored in each GenItem's GII_ identifier instance field to reference those selections. If more than one item may be selected at a time (if GIGI_ numSelections is greater than one), this instance field will point to a list of GenItem identifiers rather than store a single identifier.

GIGI_ numSelections contains the number of GenItems currently selected. For exclusive or exclusive-none lists, this number will be either one or zero. For multiple selection lists, this number may be greater than zero. Unless you have an item group that initially appears with more than one selection, you will not need to set this up in your object declaration.

GIGI_ destination contains the optr of the object or process to handle messages sent out by this GenItemGroup. This destination object will receive the notification message in the GIGI_ applyMsg instance field whenever state changes are applied within the GenItemGroup.

GIGI_ applyMsg stores the apply action for the GenItemGroup to send out whenever state changes should be applied, either through an immediate state change or through a delayed mode activation.

The GenItemGroup also has several vardata fields.

Code Display 11-2 GenItemGroup Vardata Instance Fields

@vardata Message 			ATTR_GEN_ITEM_GROUP_STATUS_MSG;
@vardata void			ATTR_GEN_ITEM_GROUP_SET_MODIFIED_ON_REDUNDANT_SELECTION;
@vardata Message			ATTR_GEN_ITEM_GROUP_CUSTOM_DOUBLE_PRESS;
@vardata optr			ATTR_GEN_ITEM_GROUP_LINK;
    @reloc ATTR_GEN_ITEM_GROUP_LINK, 0, optr;
@vardata void			ATTR_GEN_ITEM_GROUP_INIT_FILE_BOOLEAN;
/* Hints */
@vardata void		HINT_ITEM_GROUP_RADIO_BUTTON_STYLE;
@vardata void		HINT_ITEM_GROUP_TOOLBOX_STYLE;
@vardata void		HINT_ITEM_GROUP_SCROLLABLE;
@vardata void		HINT_ITEM_GROUP_MINIMIZE_SIZE;
@vardata void		HINT_ITEM_GROUP_DISPLAY_CURRENT_SELECTION;
@vardata void		HINT_ITEM_GROUP_MINIMIZE_SIZE_IF_VERTICAL_SCREEN;

ATTR_GEN_ITEM_GROUP_STATUS_MSG assigns a status message to your GenItemGroup. A status message allows objects to receive notice of a change in the GenItemGroup's current state without forcing an apply action. This attribute is useful for cases where the state of your GenItemGroup may reflect information in other user interface objects, and should therefore be updated whenever its state changes, regardless of the need to apply those changes.

In exclusive or extended-selection lists, selecting an already-select item will not change the state of the GenItemGroup and will not mark it modified. ATTR_GEN_ITEM_GROUP_SET_MODIFIED_ON_REDUNDANT_SELECTION alters this default behavior for a GenItemGroup. Including this attribute in the object's instance data will cause the group to be marked modified whenever the user makes a redundant selection, thereby forcing an apply action to later take place. Use this attribute for operations you may wish to repeat even if the state of the GenItemGroup has not changed.

ATTR_GEN_ITEM_GROUP_LINK allows two or more GenItemGroups to be linked together and act as one GenItemGroup. Each GenItemGroup may contain one or more items with identifiers unique to all other items within the linked GenItemGroups. The links should be circular, with the last group pointing back to the first. All of these GenItemGroups should have identical states and behavior types so they will work correctly. Use this attribute to circumvent undesirable geometry constraints. For more information, see GenItemGroup Links .

ATTR_GEN_ITEM_GROUP_CUSTOM_DOUBLE_PRESS allows a special activation message to be sent out on double press events; it is used only in exclusive GenItemGroup lists.

ATTR_GEN_ITEM_GROUP_INIT_FILE_BOOLEAN forces the GenItemGroup to use "true" and "false" in the .INI file rather than numerical values.

HINT_ITEM_GROUP_RADIO_BUTTON_STYLE indicates that the Item Group should appear as "radio buttons" if the Specific UI allows such behavior. OSF/Motif does this by default. HINT_ITEM_GROUP_TOOLBOX_STYLE indicates that the item's should be drawn in toolbox style, with a simple box around the visual moniker.

HINT_ITEM_GROUP_MINIMIZE_SIZE and HINT_ITEM_GROUP_MINIMIZE_SIZE_IF_VERTICAL_SCREEN force the item group to use only the smallest space available. In OSF/Motif, for example, this would cause the item group to be a popup menu. The latter of the two hints takes effect only on screens that are taller than they are wide. HINT_ITEM_GROUP_DISPLAY_CURRENT_SELECTION signals that a minimized list should display the currently seleted item's moniker when said list is in its minimized state.


Up: GEOS SDK TechDocs | Up | Prev: 3 GenItemGroups | Next: 3.2 GenItem Instance Data