Window Objects: 1.1 A First Look at GenDisplay: GenDisplay Object Structure

Up: GEOS SDK TechDocs | Up | Prev: 1 A First Look at GenDisplay | Next: 1.2 Minimizing and Maximizing

The GenDisplay object is a subclass of GenClass and therefore inherits all the data fields and attributes of that class. It has few data fields that are set by the application; these fields are listed in Instance Data of GenDisplayClass .

Code Display 4-1 Instance Data of GenDisplayClass

/* There are only two instance fields specifically defined for GenDisplayClass.
 * Also, an instance field for GenClass, GI_attrs, has different defaults in
 * GenDisplayClass. */
/* GDI_attributes is a one-byte field for attributes flags. There is only one flag
 * defined for this field, namely GDA_USER_DISMISSABLE, which is on by default. */
    @instance GenDisplayAttrs				GDI_attributes = GDA_USER_DISMISSABLE;
/* The GenDisplay object has a datum for an optr to a document object. If a
 * Document Control is used to create display objects, it will associate each
 * display with a document object; each will have an optr to the other. */
    @instance optr				GDI_document;
/* The default setting of GI_attrs is different in GenDisplayClass than it is in 
 * GenClass: */
    @default GI_attrs = 			(@default 
			 | GA_TARGETABLE
			 | GA_KBD_SEARCH_PATH);
/* The following hints specify whether the display should be minimized or
 * maximized when it is built, and its appearance when minimized. */
    @vardata void  HINT_DISPLAY_MINIMIZED_ON_STARTUP;
    @vardata void HINT_DISPLAY_NOT_MINIMIZED_ON_STARTUP;
    @vardata void HINT_DISPLAY_MAXIMIZED_ON_STARTUP;
    @vardata void HINT_DISPLAY_NOT_MAXIMIZED_ON_STARTUP;
    @vardata void HINT_DISPLAY_USE_APPLICATION_MONIKER_WHEN_MINIMIZED;
/* The following hints and attributes indicate whether the user should be able to
 * minimize, maximize, or resize the window. */
    @vardata void  ATTR_GEN_DISPLAY_NOT_MINIMIZABLE;
    @vardata void ATTR_GEN_DISPLAY_NOT_MAXIMIZABLE;
    @vardata void HINT_DISPLAY_NOT_RESIZABLE;
/* ATTR_GEN_DISPLAY_NOT_RESTORABLE indicates that the user should not be able to
 * de-maximize the display once it is maximized. */
    @vardata void ATTR_GEN_DISPLAY_NOT_RESTORABLE;
/* ATTR_GEN_DISPLAY_TRAVELING_OBJECTS is the ChunkHandle of a list of "traveling
 * objects;" these objects are made the children of whichever GenDisplay is on top
 * in a given display region (see  Traveling Objects).*/
    @vardata ChunkHandle ATTR_GEN_DISPLAY_TRAVELING_OBJECTS;
/* The following hints and attributes specify whether the display's menu bar 
 * appears and whether it appears as a "popped out" floating menu. */
    @vardata void HINT_DISPLAY_MENU_BAR_HIDDEN_ON_STARTUP;
    @vardata void  TEMP_GEN_DISPLAY_MENU_BAR_HIDDEN;
    @vardata void ATTR_GEN_DISPLAY_MENU_BAR_POPPED_OUT;
    @vardata void HINT_DISPLAY_USE_APPLICATION_MONIKER_WHEN_MENU_BAR_POPPED_OUT;
/* The GenDisplay uses the following vardata fields to store its
 * minimized/maximized state across a shutdown. You should not access these
 * fields. If you want to find out if a GenDisplay is minimized or maximized, send
 * it MSG_GEN_DISPLAY_GET_MINIMIZED or MSG_GEN_DISPLAY_GET_MAXIMIZED. */
    @vardata		void ATTR_GEN_DISPLAY_MINIMIZED_STATE;
    @vardata		void ATTR_GEN_DISPLAY_MAXIMIZED_STATE;
/* HINT_DISPLAY_DEFAULT_ACTION_IS_NAVIGATE_TO_NEXT_FIELD specifies the default 
 * action for the GenDisplay. */
    @vardata void HINT_DISPLAY_DEFAULT_ACTION_IS_NAVIGATE_TO_NEXT_FIELD;

The GDI_attributes Field

MSG_GEN_DISPLAY_GET_ATTRS, MSG_GEN_DISPLAY_SET_ATTRS

The GenDisplay object has a one-byte record called GDI_attributes to store attribute flags. There is only one attribute flag, namely GDA_USER_DISMISSABLE . If this attribute is set, the user can dismiss a display through the UI (without choosing a command in the application). Details of this depend on the specific UI; for example, in OSF/Motif, the user could dismiss a display by double-clicking the "Control button."

MSG_GEN_DISPLAY_GET_ATTRS

GenDisplayAttrs 	MSG_GEN_DISPLAY_GET_ATTRS();

This message retrieves the GDI _attributes field from the destination object.

Source: Unrestricted.

Destination: Any GenDisplay or GenPrimary object.

Return: A GenDisplayAttrs record. The only flag defined is GDA_USER_DISMISSABLE.

Interception: This message is not normally intercepted.

MSG_GEN_DISPLAY_SET_ATTRS

void	MSG_GEN_DISPLAY_SET_ATTRS(
        GenDisplayAttrs		attrs);

This message changes the GenDisplayAttrs field of the destination object.

Source: Unrestricted.

Destination: Any GenDisplay or GenPrimary object .

Parameters: attrs Field of GenDisplayAttrs flags. There is only one flag defined, namely GDA_USER_DISMISSABLE.

Interception: This message is not normally intercepted.

The GDI_document Field

Applications often use the Document Control objects to manage files. With this mechanism, every file is associated with a document object. Often, each file will have its own GenDisplay object as well. In this case, GDI _document will contain an optr to the GenDocument object associated with this GenDisplay. For more information on this, see Using Multiple Displays . The Document Control objects create and destroy the GenDisplays automatically, and set this field accordingly. The GenDisplay object uses this field only when the display is closed; see Closing GenDisplays . To retrieve the value of this field, send MSG_GEN_DISPLAY_GET_DOCUMENT to the display (see Messages sent to GenDisplays ).


Up: GEOS SDK TechDocs | Up | Prev: 1 A First Look at GenDisplay | Next: 1.2 Minimizing and Maximizing