Chapter 2. Preliminary Concepts

Table of Contents
Interaction Between Display Engine and Widget
Auxillery Helper Classes
X Window concepts
Using Color in edm Widgets
Using Fonts in edm Widgets
Process variable access concepts
Display manager event processing

Interaction Between Display Engine and Widget

The edm display engine provides an environment in which individual widgets are created, edited, executed, and finally destroyed. This environment currently depends on X Windows and includes an application context in which all windows on a given display exist and a window context in which an individual widget exists. A widget therefore utilizes resources from both an application context (e.g. colors) and a window (e.g. a graphics context). At this point, the reader should simply appreciate the natural hierarchy that exists between these different objects. Specific X Window related details are discussed in a later portion of this document.

During the operation of the edm display engine, individual widgets are expected to implement various functions and to conform to a particular set of stylistic and performance norms. For example, when a user interactively creates a widget, the edm engine calls the widget constructor and the createInteractive method which should present a widget property dialog box to the user. After populating this property box with the desired information, the user presses the OK button and the engine calls the draw method which draws an edit mode widget image.

An edm widget is thus simply the implementation of a derived C++ class that includes a number of functions (around 30) and behaves in an expected manner. The following senario illustrates the life of a widget and introduces these functions in the context of the edm display engine. Specific widget method names are displayed in italics.

The Life of a Widget

Senario 1 - User interactively creates widget, executes, saves and then closes the display.