Window Objects: 1.2 A First Look at GenDisplay: Minimizing and Maximizing

Up: GEOS SDK TechDocs | Up | Prev: 1.1 GenDisplay Object Structure | Next: 2 Using the GenPrimary
MSG_GEN_DISPLAY_SET_MINIMIZED, MSG_GEN_DISPLAY_SET_NOT_MINIMIZED, MSG_GEN_DISPLAY_GET_MINIMIZED, MSG_GEN_DISPLAY_SET_MAXIMIZED, MSG_GEN_DISPLAY_SET_NOT_MAXIMIZED, MSG_GEN_DISPLAY_GET_MAXIMIZED, HINT_DISPLAY_MINIMIZED_ON_STARTUP, HINT_DISPLAY_NOT_MINIMIZED_ON_STARTUP, HINT_DISPLAY_MAXIMIZED_ON_STARTUP, HINT_DISPLAY_NOT_MAXIMIZED_ON_STARTUP, ATTR_GEN_DISPLAY_NOT_MINIMIZABLE, HINT_DISPLAY_NOT_MAXIMIZABLE, ATTR_GEN_DISPLAY_NOT_RESTORABLE,
HINT_DISPLAY_DEFAULT_ACTION_IS_NAVIGATE_TO_NEXT_FIELD

Windows (i.e. displays and "primary" windows) can be resized by the user. How resizing is done depends on the specific UI; for example, in OSF/Motif, a user resizes a window by dragging its edge. Most specific UIs also allow the user to "minimize" or "maximize" a window. When a window is maximized, it is expanded to fill all available space; that is, a primary window will fill the screen, while a GenDisplay will fill the display area. Windows can also be "minimized." A window's behavior when it is minimized depends on the specific UI. For example, in OSF/Motif, a minimized Primary is displayed as an icon at the bottom of the screen; a minimized Display is removed from the display area, but stays in the display control's display list.

Most of the mechanics of minimizing and maximizing windows is taken care of by the specific UI. For example, OSF/Motif provides minimize and maximize buttons on all Displays and Primaries which do not specifically disable the functionality. However, an application can send messages to Primary and Display objects to change their minimized/maximized state, or to find out what the current state is.

If you do not wish to have a window be minimizable, you can set the vardata flag ATTR_GEN_DISPLAY_NOT_MINIMIZABLE. Similarly, if you do not wish the window to be maximizable, you can set the flag ATTR_GEN_DISPLAY_NOT_MAXIMIZABLE. These instruct the specific UI not to provide the controls for minimizing and maximizing.

You can find out whether a window is currently minimized by sending it MSG_GEN_DISPLAY_GET_MINIMIZED. Similarly, you can find out whether the window is maximized by sending MSG_GEN_DISPLAY_GET_MAXIMIZED.

If a GenDisplay or GenPrimary has the vardata HINT_DISPLAY_MINIMIZED_ON_STARTUP , the object will be created in its minimized state. Similarly, if you set HINT_DISPLAY_NOT_MINIMIZED_ON_STARTUP, the display will be created in its non-minimized form. If you set HINT_DISPLAY_MAXIMIZED_ON_STARTUP, the specific UI will create the object in its maximized state; correspondingly, if you set HINT_DISPLAY_NOT_MAXIMIZED_ON_STARTUP, the specific UI will create the display in a non-maximized state. As with all hints, the specific UI may ignore these directives. If you set conflicting hints (for example, both HINT_DISPLAY_MINIMIZED_ON_STARTUP and HINT_DISPLAY_MAXIMIZED_ON_STARTUP), the results are undefined.

Most displays which can be maximized can also be "restored"; that is, a control is provided which de-maximizes the object, restoring it to the size it was before it was maximized. If the object has the attribute ATTR_GEN_DISPLAY_NOT_RESTORABLE, this control will not be provided; once a display is maximized, the user will not be able to un-maximize it. This hint is generally set only for GenDisplay objects that are maximized on startup.

If you do not want a user to be able to resize a GenDisplay or GenPrimary, set the vardata HINT_DISPLAY_NOT_RESIZABLE. The specific UI will not provide the means for the user to resize the window. This hint will not prevent the user from minimizing or maximizing the display.

If you want the user to be able to navigate from GenDisplays using TAB navigation, add HINT_DISPLAY_DEFAULT_ACTION_IS_NAVIGATE_TO_NEXT_FIELD to the object's instance data.

MSG_GEN_DISPLAY_SET_MINIMIZED

void	MSG_GEN_DISPLAY_SET_MINIMIZED();

This message instructs a display or primary object to minimize itself. The result depends on the specific UI. Primary windows are usually iconified; display windows might be iconified or temporarily removed. If the window is already minimized, the message has no effect.

Source: Unrestricted.

Destination: Any GenDisplay or GenPrimary object .

Interception: You should not change the behavior of this message. You may intercept this message to find out when a window is being minimized; however, you should make sure to pass this message on to the superclass.

MSG_GEN_DISPLAY_SET_MAXIMIZED

void	MSG_GEN_DISPLAY_SET_MAXIMIZED();

This message instructs a display or primary object to maximize itself. If the window is already maximized, the message has no effect.

Source: Unrestricted.

Destination: Any GenDisplay or GenPrimary object .

Interception: You should not change the behavior of this message. You may intercept this message to find out when a window is being maximized; however, you should make sure to pass this message on to the superclass.

MSG_GEN_DISPLAY_SET_NOT_MINIMIZED

void	MSG_GEN_DISPLAY_SET_NOT_MINIMIZED();

This message instructs a display or primary object to de-minimize itself. It will generally be restored to its position and configuration as of the time it was minimized. If the window is not minimized, the message has no effect.

Source: Unrestricted.

Destination: Any GenDisplay or GenPrimary object .

Interception: You should not change the behavior of this message. You may intercept this message to find out when a window is being de-minimized; however, you should make sure to pass this message on to the superclass.

MSG_GEN_DISPLAY_SET_NOT_MAXIMIZED

void	MSG_GEN_DISPLAY_SET_NOT_MAXIMIZED();

This message instructs a display or primary object to de-maximize itself. It will generally be restored to its position and configuration as of the time it was maximized. If the window is not maximized, the message has no effect.

Source: Unrestricted.

Destination: Any GenDisplay or GenPrimary object .

Interception: You should not change the behavior of this message. You may intercept this message to find out when a window is being de-maximized; however, you should make sure to pass this message on to the superclass.

MSG_GEN_DISPLAY_GET_MINIMIZED

Boolean	MSG_GEN_DISPLAY_GET_MINIMIZED();

This message indicates whether the recipient is minimized.

Source: Unrestricted.

Destination: Any GenDisplay or GenPrimary object .

Return: Returns true (i.e. non-zero) if recipient is minimized; otherwise, it returns false (i.e. zero).

Interception: You should not intercept this message.

MSG_GEN_DISPLAY_GET_MAXIMIZED

Boolean	MSG_GEN_DISPLAY_GET_MAXIMIZED();

This message indicates whether the recipient is maximized.

Source: Unrestricted.

Destination: Any GenDisplay or GenPrimary object .

Return: Returns true (i.e. non-zero) if recipient is maximized; otherwise, it returns false (i.e. zero).

Interception: You should not intercept this message.


Up: GEOS SDK TechDocs | Up | Prev: 1.1 GenDisplay Object Structure | Next: 2 Using the GenPrimary