Common Desktop Environment: Style Guide and Certification Checklist
5 Window and Session Control
Contents of Chapter:
- Window Control Guidelines
-
- Window Management Actions
-
- Window Decorations
-
- Window Menus
-
- Window Icons
-
- Window Placement
-
- Workspace Management Guidelines
-
- Session Management Support
-
Your application is presented to the user as a series of windows. Some of these windows present the main portion of the application. Others are dynamic, only appearing to the user when needed to accomplish certain tasks. All of these windows should contain menus, border decorations, and behavior styles appropriate to their function. The following chapter describes the guidelines that should be applied when designing the windows in your application.
Window Control Guidelines
The specifics of the appropriate window borders and decorations are outlined in "Window Decorations"
, and the different window management behaviors are specified in "Window Management Actions"
.
The fundamental user-visible characteristic of primary windows is that stacking, workspace placement, and minimization can be independent of other primary windows. Secondary window stacking, workspace placement, and minimization must be tied to the associated primary window.
Required
aa:
- Application windows should be clearly distinguishable as primary or secondary windows based on appearance and behavior. See link.
Required
aq:
- Windows should follow Common Desktop Environment window management functionality conventions, as shown in Table 10_2
. See link
.
Primary windows should provide Close, Move, Lower, and Minimize as the minimum set of capabilities. They should allow Resize and Maximize as appropriate. Secondary windows should be designed so that resizing and maximizing are neither necessary nor appropriate. Most secondary windows should only include the Close, Move, and Lower capabilities. In extraordinary cases, a secondary window may provide the Resize and Maximize capabilities. Secondary windows do not provide Minimize capability - they are minimized with the associated primary window.
Required
as:
- Windows that have form factor constraints need to set Window Manager hints for minimum size, maximum size, aspect ratio, and resize increment as appropriate. See link
.
Recommended
at:
- Maximizing a window should show more content (objects or controls) if appropriate (as opposed to scaling up the sizes of objects and controls). See link.
Required
au:
- Windows that have Close or Exit functionality need to support the window management protocol for Close if there is a window menu. In the case of dialog boxes, the Close item on the window menu corresponds to the Cancel functionality or dialog box dismissal with no further action taken. See link
.
Window decorations are the user-visible controls in the frame of an application window. The Figure 5-1 shows some sample decorations typically associated with a primary window.
Required
ab:
- Windows that support particular window management functionality must request the corresponding window decoration (for example, a window that can be minimized should request the minimize button). See link
.
Figure 5-1 Example primary window decorations
.
In addition, windows that support any window management functionality (move, resize, minimize, maximize, close, and others) must have a window menu with the appropriate items for that functionality.
Required
ad:
- Follow Common Desktop Environment window decoration conventions, as shown in Table 10_1. See link.
Primary windows should have the following window decorations: Border, Title, Menu, and Minimize. If appropriate, primary windows should also include Maximize and Resize decorations.
Secondary windows should be designed so that resizing and maximizing are neither necessary nor appropriate. Most secondary windows should only include the Border, Title, and Menu decorations. If your secondary window allows resizing or maximizing, however, it must also include the appropriate decoration. The Figure 5-2
shows a typical secondary window decoration.
Figure 5-2 Example secondary window decorations
Window Menus
Windows have a menu that allows the user to perform various operations that affect the size and placement of the application window. Developers should use the following standard window menu items in their applications.
Required
ae:
- Follow Common Desktop Environment window menu conventions. Items should appear in the window menu if they are applicable to the window or its minimized window icon. See link
.
Figure 5-3 Sample window menu
The following items are valid English-language choices in the window menu (the mnemonics for each choice are listed in parentheses). They should be added to the menu in the order listed. Unless otherwise noted, the functionality of these menu items is as described in the OSF/Motif Style Guide, Revision 1.2
.
- Restore (R)
- Move (M)
- Size (S)
- Minimize (n)
- Maximize (x)
- Lower (L)
- separator
- Occupy Workspace ... (O)
Allows a user to specify which workspaces the application occupies.
- Occupy All Workspaces (A)
Enables the user to place the application in all available workspaces.
- Unoccupy Workspace (U)
Removes the application from the current workspace. If the application is only occupying one workspace, the item should be made insensitive.
- separator
- Close (C)
Optional
af:
- Applications should not add items to the window menu. If an extraordinary requirement has an application add items to the window menu, the items should be appended to the end of the menu with a separator between Close and the application items. See link
.
Optional
ag:
- Accelerators, aside from Alt+F4 for Close, should not be used in the window menu (to minimize conflict with other uses of the Alt key for application accelerators, localization, and others). See link
.
Window Icons
Applications should use icons to represent themselves to the user when minimized on the desktop.
Optional
ah:
- Applications should provide unique window icons for their primary windows. The window icon image should have a similar appearance to the associated file or Front Panel icon image. See link
.
Optional
ai:
- The window icon label should contain the same text as the title of the corresponding primary window, or an abbreviated form of it. Refer to "Layout"
for window title guidelines. See link
.
Optional
aj:
- The window icon image should have a similar appearance to the associated file or Front Panel icon image. Refer to "Design Philosophy and Helpful Hints"
. See link
.
Window Placement
Window positioning should be left to the Window Manager or to user control.
Recommended
ak:
- Applications should not require or force windows or window icons to be positioned at a particular screen location. See link.
Recommended
al:
- A secondary window is placed by the application relative to the associated primary window. It should be placed close to, but not obscuring, the component that caused it to be displayed and the information that is necessary to interact with the dialog box. See link
.
Recommended
an:
- If a secondary window is allowed to be stacked below its associated primary window (not constrained to stay on top of the primary window), it should be placed such that it is not completely covered by the primary window. This recommendation takes precedence over other placement recommendations. See link
.
Recommended
ao:
- If a menu or dialog box is already on display, reinvoking the command that caused it to be displayed automatically brings that window or menu to the front of the window stack without changing its position on the screen. See link
.
Workspace Management Guidelines
Desktop applications appear in one of several work areas called workspaces. A user may have several workspaces active on the desktop. The application should behave in certains ways in relation to those workspaces.
Recommended
av:
- When your application creates a new window, it should come up in the user's current workspace and only occupy that single workspace. See link.
Recommended
aw:
- Application windows that are related to a particular task should move together between workspaces. See link.
For example, a spreadsheet application may have one or more secondary windows open that allow the user to change the properties of data cells in the main window. If the user moves the main window to a different workspace, the properties windows should move with it.
On the other hand, a word processor may have several windows open, where each is used to edit a different document. In this case, when a user moves one of the windows to a different workspace, the other windows may remain where they are.
Session Management Support
When you design a desktop application, you must consider the following guidelines for session management.
Required
ax:
- Applications should support Interclient Communications Conventions Manual
(ICCCM) mechanisms for session management of their primary windows and key properties. See link
.
The ICCCM defines important relationships and behaviors between applications and the window manager, including protocols for saving and restoring application state across invocations.
Required
ay:
- Applications should support ICCCM mechanisms for session management of all associated windows (that is, secondary windows that may include help windows). See link
.
Associated windows include multiple primary windows and secondary windows, such as online help windows.
Optional
az:
- Applications should accept messages from the Common Desktop Environment Session Manager that inform them the user is logging out and should save their state at that time. See link
.
Optional
ba:
- Applications that have a single primary window that is open at the time the user logs out should restore the primary window, in the workspace last occupied, when the user logs in again. See link
.
Optional
bb:
- Save user context wherever possible. For example, applications that support the editing of files should save the state of the file at logout and should restore the file in the application window when users log in again. See link
.
Optional
bc:
- Applications that have multiple primary windows that are open at the time the user logs out should restore all primary windows, in their respective workspaces, when the user logs in again. See link
.
Generated with CERN WebMaker