Menus and Dialog Boxes: 2.1 GenInteraction Instance Data: GenInteraction Visibility

Up: GEOS SDK TechDocs | Up | Prev: 2 GenInteraction Instance Data | Next: 2.2 Standard Interactions (Menus)
GII_visibility, MSG_GEN_INTERACTION_GET_VISIBILITY, MSG_GEN_INTERACTION_SET_VISIBILITY

The GII _visibility instance field describes in what manner the user interface will display the Interaction. This is important for GenInteractions because of the wide variety of ways they may appear within an application. In most cases, this attribute will not directly affect the functionality of the children of the Interaction but only the visual implementation and specific UI activations of the objects.

Certain GII_types (see below) may only be meaningful under certain GII_ visibility types, however. For example, GIT_NOTIFICATION, GIT_AFFIRMATION, and GIT_MULTIPLE_RESPONSE gain most of their significant functionality within dialog boxes (visibility GIV_DIALOG). In these cases the visibility will affect the functionality of the Interaction.

Each of the following visibilities is an enumeration of type GenInteractionVisibility ; therefore, you may select one and only one of the following types for your Interaction. By default, a GenInteraction is GIV_SUB_GROUP.

GIV_SUB_GROUP
This specifies that the Interaction serves as a visual grouping of objects within a larger window. This visibility creates an Interaction within the parent window and is therefore not independently displayable. This visibility is the default case.
GIV_POPUP
This specifies that this Interaction is temporary and only appears on-screen for the duration of a single selection. In most specific UIs, the popup will stay up until either an object in the Interaction is activated or until the user clicks somewhere else. Some specific UIs allow a menu to be pinned, however. The most common manifestation of a popup is a menu. Popups typically appear within appropriate "menu bars" of an application but may be independently displayable under different specific UIs.
GIV_DIALOG
This specifies that this Interaction should appear as a dialog box. A dialog box is a temporary window used to display controls or request information from the user. A dialog box can typically contain any number or variety of other generic objects. A dialog box may be either modal or non-modal.
GIV_CONTROL_GROUP
This specifies that this Interaction contains controls and therefore should not appear as a popup Interaction. This prevents the Interaction from disappearing before the user can select an entry in the control group. A control group Interaction may appear as either a sub-group or dialog, depending on the specific UI and its position within the application's generic object tree.
GIV_POPOUT
This specifies that the GenInteraction may act as either a sub-group or as a dialog box, depending on its state. Usually, popouts act as normal sub-group Interactions until the user or the application "pops" them out into a dialog box. Popouts are normally "popped out" into their dialog box state by double-clicking within the confines of the GenInteraction. This popout state is reflected with either the presence or absence of the ATTR_GEN_INTERACTION_POPPED_OUT vardata entry.
GIV_NO_PREFERENCE
This specifies that there is no visual preference for this Interaction. The specific UI will create the Interaction based on hints, the types of children it contains, and its location in the generic tree.

You may also retrieve or set the visibility of any Interaction at run-time. To retrieve the GenInteractionVisibility stored in GII_visibility , send the Interaction a MSG_GEN_INTERACTION_GET_VISIBILITY . You can set the visibility of any Interaction by sending it a MSG_GEN_INTERACTION_SET_VISIBILITY . Make sure that any Interaction you set the visibility for is not currently GS_USABLE or an error will result.

MSG_GEN_INTERACTION_GET_VISIBILITY

byte	MSG_GEN_INTERACTION_GET_VISIBILITY();

This message retrieves the current GenInteractionVisibility stored in the GII_visibility instance field of an Interaction.

Source: Unrestricted.

Destination: Any GenInteraction object.

Parameters: None.

Return: GenInteractionVisibility of the Interaction object.

Interception: Generally not intercepted.

MSG_GEN_INTERACTION_SET_VISIBILITY

void	MSG_GEN_INTERACTION_SET_VISIBILITY(
        byte	visibility);

This message sets the GII_visibility instance data for the GenInteraction. This message must pass a valid GenInteractionVisibility type to the Interaction object. The Interaction must not be GS_USABLE when receiving this message. The new visibility will take effect when the Interaction is next made GS_USABLE.

Source: Unrestricted.

Destination: Any non-usable GenInteraction object.

Parameters: visibility GenInteractionVisibility for interaction.

Return: Nothing.

Interception: Generally not intercepted.

Warnings: Make sure that the object sent this message is not GS_USABLE.


Up: GEOS SDK TechDocs | Up | Prev: 2 GenInteraction Instance Data | Next: 2.2 Standard Interactions (Menus)