company logo

Action reference

The action reference lists several groups of actions and action items. Typically, an action the referenced by a name and denotes the action to be executed within a certain context. An action item refers to a GUI element used for activating the action.

Actions

An action defines a function, dialog or other type of action, which can be executed from within a GUI application. Typically, actions are called via action items, but might also be called directly from the application.

Actions with the same name might mean slightly different things depending on the context in which they are called. E.g. an 'insert' action may act differently for a collection and for a text field.

Since one may set states for all action items referring to an action (e.g. disabling action 'insert' will disable insert actions for text fields, but also for collections and any other context, which has implemented an 'insert' action.

Several actions are provided as default actions by the GUI frame work. Default actions can be referenced in any ODE GUI application. Besides, an application may overload default actions are define application specific actions.

Action items

Action items are, typically, GUI elements, that visualize an action in an application. The action item is associated with an action that is called when activating the action item (pressing a button or selecting a menu item).

Action items are provided as GUI resources by defining action controls (ADK_EventActionControl), which might be referenced in buttons, menu and context menu items, toolbar buttons or hidden reactions. Action items get unique names and might be referenced from different GUI elements. Thus, the same action item might be referenced from a toolbar button, menu item and button.

Changing the state for an action item (e.g. to 'hidden') will change the state for all related GUI elements (toolbar button, menu item and button will disappear), which are referring to this action item in the same control context. In some cases, this may turn out to be a disadvantage. Then, it is better to use different action items.

When creating a new GUI project, several default action items are provided, which might be used in the application. Other action items might be defined in the application.

Action item properties

Action properties are set when designing action items. Typical action properties are the action to be executed, visibility and shortcuts or other related events activating an action.

In order to increase flexibility of using actions, some action item properties might be overloaded within application option settings. This allows the user setting its own short cuts or hiding and disabling events, he/she is not interested in.

In the Options.GUI.Actions option section one may overload action item properties by defining corresponding options for an action or action item. This will change action item properties for all actions referring to this action item. In order to overload a single action item, one should refer to the action and the action item name (action.item).

// overload shortcut for all action items referring to the 'Delete' action

Options.GUI.Actions.Delete=Ctrl+D

// define different shortcut

Options.GUI.Actions.Delete.DeleteItem=Ctrl+D