GUI Model reference
The GUI model reference describes GUI resource classes (complex data types). Many GUI resource elements are defined as resource element and as context element. Two main groups of GUI resource data types can be described:
- Visual elements
- Action elements
A resource element (e.g. ADK_FieldControl ) describes relevant resource properties and are subject of design and development. Context elements (e.g. ADK_Field ) are implementing a resource element in a certain context, e.g. a field in a form. Context elements usually allow overwriting appearance properties as size, label and others. The essential definition (usually the 'inner' part of a resource element and specific implemented behavior) typically belong to the resource element.
The distinction between resource and context elements allows reusing resource elements (e.g. controls) in different contexts (controls, forms).
Visual elements are those, which are displayed in a GUI application. Typical visual elements are windows or dialogs and controls or fields within a window. Field controls ( ADK_FieldControl ) and windows ( ADK_Window ) are considered as class methods, i.e. windows and field controls are members of design classes, which inherit from complex data types. Thus, data types may implement functions in an ODC_ImpClass and windows and controls in an ADK_Class .
A dialog or window simply refers to a field control, which describes the content of the window. The window definition just defines the window type and several frame options ( ADK_FrameStyle ). The field control is a style action ( ADK_StyleAction ), which combines style and action definition.
Each style action may get a number of subordinated elements, which are arranged within the field control or outside. Thus, also simple controls as line edits may get menus, toolbars, buttons or subordinated fields. Style actions may also refer to subordinated data elements as regions or columns, which allow defining hierarchical data sources for complex style actions as list or tree controls.
Action elements can be arranged inside or outside the style element ( ADK_StyleElement ) area, which is defined in the context style ( ADK_ContextStyle ). Thus, action elements cannot only be defined for dialogs, but also for simple field controls, e.g. a single line edit control may show an edit button on the outer right.
The appearance of the style action depends on the assigned control style ( ADK_Style ). Font and layout ( ADK_Font , ADK_Layout ) might be defined. An image resource ( ADK_Bitmap ) might be linked with the element style.
ADK_Class Person --> Person
ODC_ImpClass Person --> Person
An event action element defines one or more events and the action to be executed in case that an event has been fired. Action elements are mainly defined as action controls ( ADK_EventActionControl ). Thus, each field control is an action element at the same time, which may define several control specific actions. Action elements are, usually, not visible as such, but for starting or activating an action, action controls are connected with visible resources as menus, buttons or tool bars.
Event actions may get a number of group or sub actions ( ADK_EventAction ). Group actions are, typically, displayed as group (in a menu or tool bar). Sub actions are displayed in a sub-menu of the menu or tool bar. Each event action may define the action to be executed completely or refer to an event action control, which defines the event action to be executed.
Event action controls ( ADK_EventActionControl ) are defined in a global scope and can be reused in any context. This supports standardization of application development, but requires, that action control names are defined carefully in order to recognize them later on.
Most ADK resource objects inherit from ADK_Resource . Style objects ( ADK_Style ) are provided in order to define different control types referring to simple or complex data sources (attributes, complex instances or collections). Style elements ( ADK_StyleElement ) define the way a control with a given style will be displayed.
Style actions are event action controls ( ADK_StyleAction ), which contain several style elements ( ADK_StyleElement ) that are aranged inside or outside the style action area. Style elements are linked to event action controls, which define the standard appearance for an event action control in a certain context. Style elements may overload the context style defined for the linked event action control in order to modify the appearance of a control in a specific context (e.g. in a window or dialog).