GenTrigger: 3.2 Supplemental GenTrigger Usage: Interaction Commands

Up: GEOS SDK TechDocs | Up | Prev: 3.1 Passing Data with a GenTrigger | Next: 3.3 Interpreting Double-Clicks
ATTR_GEN_TRIGGER_INTERACTION_COMMAND

A GenTrigger may perform special actions within a GenInteraction object. The ATTR_GEN_TRIGGER_INTERACTION_COMMAND attribute sets the special activity for these types of triggers. This attribute indicates that the GenTrigger is an Interaction command trigger for the parent GenInteraction object. ATTR_GEN_TRIGGER_INTERACTION_COMMAND takes a word of data (of type InteractionCommand ) specifying the command type of the trigger. A trigger with an InteractionCommand can perform one of several standard actions. Most of these actions are specific to dialog boxes.

The InteractionCommand types are

IC_NULL
This command is special, alerting an application that the interaction containing the trigger has been closed because the system is about to shut down. You should never set any triggers to this InteractionCommand .
IC_DISMISS
This command instructs the UI to dismiss the parent GenInteraction. Set this if you want the trigger to dismiss an Interaction or provide a custom "Close" trigger.
IC_INTERACTION_COMPLETE
This command is special, indicating to the UI that a single interaction has been completed (the user has clicked on an InteractionCommand trigger marked with GA_SIGNAL_INTERACTION_COMPLETE). You should never set any triggers to this InteractionCommand . If you wish a trigger to exhibit this behavior, set its GI_ attrs field to include GA_SIGNAL_INTERACTION_COMPLETE. (See the GenClass chapter.)

IC_APPLY This command instructs the UI to apply any properties within a GIT_PROPERTIES Interaction. By default, this trigger will send out a MSG_GEN_APPLY .

IC_RESET This command instructs the UI that this is a "reset" trigger for a properties Interaction; the application is responsible for actual reset behavior. You should provide a method to handle the message sent out by this trigger, set up the state of items to reset, and call MSG_GEN_RESET within that handler.
IC_OK
This command instructs the UI that the user has acknowledged a GIT_NOTIFICATION and should take any appropriate measures.
IC_YES
This command instructs the UI that the user has signalled a positive response from a GIT_AFFIRMATION Interaction.
IC_NO
This command instructs the UI that the user has signalled a negative response from a GIT_AFFIRMATION Interaction.
IC_STOP
This command instructs the UI to halt a GIT_PROGRESS Interaction; (the application is responsible for halting any ongoing operations related to that Interaction).
IC_EXIT
This command is special, causing the trigger to exit the application. Typically, the File menu already has a trigger set to this command.
IC_HELP
This command indicates that this GenTrigger brings up help, searching for the proper help context (ATTR_GEN_HELP_CONTEXT) and bringing up the help dialog box with that context. Any contexts below the trigger's containing dialog are ignored, however; i.e. the lowest possible context is the that on the dialog box itself. For more information on Help, see the Help Library chapter.

In most cases, you should not provide a visual moniker for any triggers with an InteractionCommand ; the specific UI will select an appropriate moniker. (You may supply a moniker if you wish to override the specific UI's selection, however.)

Activating an ATTR_GEN_TRIGGER_INTERACTION_COMMAND trigger will cause the UI to send MSG_GEN_GUP_INTERACTION_COMMAND to the trigger itself. This message will travel up to the appropriate GenInteraction object, where it will be handled.

This activity only occurs if both the trigger's destination and its action message fields are null, however. If these fields are non-null (specifying your own action message and destination), the sending of the InteractionCommand will be overridden. You may want to do this to replace the default functionality of a Specific UI-supplied trigger. For complete usage of an InteractionCommand trigger within a GenInteraction object, see the GenInteractionClass chapter.


Up: GEOS SDK TechDocs | Up | Prev: 3.1 Passing Data with a GenTrigger | Next: 3.3 Interpreting Double-Clicks