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
- 1. Administration - Administration functions and properties
- 2. Services - Services
- 2.1. Properties - Control state properties
- 2.2. Common functions - Control data functions
- 2.3. Drag and drop - Drag and drop functions
- 2.4. Text controls - Text functions
- 2.5. Tables and trees - Table and tree features
- 2.6. Input help - Input help
- 3. Datasource - Control data source
- ControlContext - Constructor
- acceptDrops - Accept drop events
- activated - Activated property
- activeControl - Get context for active control
- addColumn - Add column to control
- addInputHelp - Add a Input help for a Multiline edit
- addRegion - Add/Create Region
- associateData - Associate data/instance from base collection
- baseProperty - Get base property handle
- button - Get button context by button name
- buttonExist - Check whether button exists or not
- changeDefaultOrder - Change order
- changeOrderColumn - Change order column
- closeControl - Close control
- colorSelection - Define color by means of color dialog
- control - Get control contect
- controlCount - Get number of subordinated controles
- controlExist - Check whether control exists or not
- controlPath - Complete control path
- controlProperty - Generic control properties
- createButton - Create Button
- createConstant - Create constant
- createControl - Create dynamical Control
- createField - Create field
- currentProperty - Get property handle for currently selected line
- defaultOrder - Get default order key name
- descending - Order direction
- directoryPath - Get directory path
- displayLevel - Display level property
- dragProperty - Drag property handle (source)
- dropIndex - Drop index in list or tree
- dropPosition - Current drop position
- dropProperty - Target property handle in a drag and drop action
- dropText - Get text from drag and drop object
- dropType - Get kind of drop action
- enabled - Enabled property
- expandAll - Expand all items in tree
- expandToItem - Expand tree for selected item
- field - Get context by field or button name
- fieldExist - Check whether field exists or not
- fieldPath - Complete field path
- filePath - Provide a FileOpen dialog
- fill - Fill control
- getString - Get text from text dialog
- hasBaseProperty - Is a base collection available for the control data?
- hasData - Exists valid data source for the control?
- hasFocus - Has control got focus?
- inputHelpActivated - Input help activation state
- insertHTMLText - Insert formatted text
- insertText - Insert text in text field
- itemKey - Get key value for selected item in list
- keyEvent - Key event handler
- layout - Layout property
- line - Get currently selected line
- loadControl - Load control
- localDrop - Local drop property
- manyFilePath - Call multiple files dialog
- mousePosition - Current mouse position
- newInstance - Get property handle for initialized instance
- orderColumn - Order column
- processAction - Execute standard action
- property - Get property handle
- readOnly - Read-only property
- refresh - Refresh data displayed in control
- refreshRegions - Refresh region layout
- removeButton - Remove button
- removeField - Remove Field
- removeInputHelp - Remove input help control
- removeRegion - Remove region and columns
- removeText - Remove text from current position
- resetProperty - Deactivate data source for the control
- resourceName - Get the name of the control resource
- resourcePath - Complete resource path
- rowCount - Number of rows
- searchKey - Search key in control data area
- selectedHTMLText - Return html text selected in an edit control
- selectedText - Return text selected in an edit control
- selectedTextPosition - Get position of currently selected text
- setContextMenu - Set context menu
- setControlProperty - Change value for generic control property
- setDatabaseHandle - Set database handle for data source
- setDisplayLevel - Change the display level
- setFilter - Activate instance filter
- setFocus - Set focus to control
- setMaximizeControl - Redefine Zoom-out control
- setProperty - Set property handle for control
- setSize - Set control size
- setText - Set control value
- setTextSelection - Set a selection in a Multiline edit
- setVirtualType - Set type for virtual control
- showLevel - Show level
- size - Control size
- startTimer - Start timer
- stopTimer - Stop timer
- submitMessage - Submit message to user control
- text - Text property
- textPosition - Text position
- title - Title property
- updateActionStates - Update action states for referencing actions
- value - Get Value handle
- visible - Control's visibility
- window - Get window context
- wordUnderMouse - - internal feature (not documented)
- ~ControlContext - Destructor