company logo

ControlContext - GUI control context

GUI control context class provides basic functionality for GUI controls. Each GUI control in an ODE application is associated with a GUI control context class. The context class for a GUI control is defined in the field control definition (general context) or in the field definition (specific context). A context class in the field definition will replace the context class definition in the control.

All application control context classes inherits from the GUI control context class GUIBaseContext .

The class provides several functions for manipulating layout and content of a control. Moreover, the data source for the control (property()) can be provided. When changing data in the control's data source, this may influence the data displayed in the application immediately. In order to avoid displaying changes especially when changing the selection in the data source, one may us a cursor copy of the property handle (property().cursorCopy()).

Action items associated with the control may be managed by ActionItem class. Creating an action for a control (context) allows reading or updating (e.g. changing action state) by position or name.

  ActionItem      action(this);

  if ( action.count() > 0 ) // returns the number of actions associated with the control/button

    action.get(0);          // get default action, e.g. for a button control

Function Groups
Functions