Chapter 9. Controls, Groups, and Models Reference Pages
Prev |  | Next

## Chapter 9. Controls, Groups, and Models Reference Pages

This chapter presents detailed information about components, user interface models, and concepts in reference format. Each topic starts on a new page and is organized alphabetically. Details on user interface models and concepts are provided in the earlier chapters of this guide. The model and concepts reference pages are provided here only as a quick reference to information provided earlier and are not complete in every detail. Therefore, they should not be used as the definitive source for information about user interface models and concepts. This chapter includes the following model and concepts reference pages:

Table 9-1.

Accelerators | Focus | Navigation
Activation | Framing Groups | Pointer Shapes
Basic Controls | Help Menu | Popup Menus
Basic Groups | Icon Menu | Primary Selection
Default Activation | IconBox | Quick Transfer
Drag and Drop | Icons | Selection
Edit Menu | Input Devices | Window Menu
Field Controls | Layout Groups |
File Menu | Mnemonics |

The reference pages for components are provided for designers to use when implementing the components described in this guide or when creating new components. Remember, when designing new components, you should follow the same rules that application designers follow. As such, you should be familiar with all the chapters of this guide, not just this reference-page section. New components must follow the guidelines for designing applications. This chapter contains the following control and group reference pages:

Table 9-2.

Canvas | List | Scale
CascadeButton | MainWindow | ScrollBar
CheckButton | MenuBar | ScrolledWindow
CommandBox | Menus | SelectionBox
CommandDialog | MessageDialog | SelectionDialog
Composition | OptionButton | Separator
DialogBox | PanedWindow | TearOffButton
ErrorDialog | Panel | ToggleButton
FileSelectionBox | PromptDialog | WarningDialog
FileSelectionDialog | PushButton | WorkingDialog
Frame | QuestionDialog | Label
InformationDialog | RadioButton |

When designing a new component, compare its features with those of other components. If the new component has a feature that is the same as another component, the mechanisms for using the feature, layout, key bindings, graphics, and so on, must be similar to the existing component.

Each component reference page may contain the following information about the component:

Description |  | A description of the use and appearance of each component, group, or model.
Illustration |  | An illustration of a typical component. The illustrations in this guide use the OSF/Motif reference appearance with 3-dimensional beveled edges. Although it is important to be consistent in the placement of the elements in a component, the appearance, or rendering, of the component is not an issue of OSF/Motif Style Guide compliance.
Navigation |  | A description of the methods for navigating within a component.
Other Operations |  | A description of other operations available within the component.
Common Bindings |  | A list of the virtual keys used by this component and the common substitutions for each virtual key.
Related Information |  | A list of sections and related reference pages in this OSF/Motif Style Guide with additional information.

## Accelerators

### Description

An accelerator is a key or key combination that invokes the action of some component without the location cursor being on the component when the accelerator is pressed. Accelerators are most commonly used to activate Menu items without first posting the Menu. You should provide accelerators primarily as a matter of utility, not for design conformity.

If the button with the accelerator is within a primary or secondary window, or within a Pulldown Menu system from its MenuBar, it must be activatable whenever the input focus is in the window or the MenuBar system. If the button with the accelerator is within a Popup Menu system, it must be activatable whenever the focus is in the Popup Menu system or the component with the Popup Menu.

Applications can provide accelerators for any button component. Implementations must support accelerators in PushButtons and ToggleButtons that are in Menus. If a button has an accelerator, the accelerator must be shown following the label of the button.

## Activation

### Description

This reference page only provides a short description of the various types of activation. Chapter 5, "Component Activation" describes each type in detail.

Basic Activation |  | The basic activation model mimics real-life button activation in that pressing on a button activates it. Clicking BSelect on the button must activate the button. `<Select>` or `<Space>` on a button with the focus must activate the button. `<Enter>` or `<Return>` on an activatable Menu entry with the focus must activate the entry. In explicit mode, clicking `<Ctrl>` BSelect on a traversable component should move the focus to it. In activatable components, it should have no other effect. In collections, it can change the cursored element or the selection as described in Section 4.1, "Selection Models."
Accelerators |  | An accelerator is a key or key combination that invokes the action of some component without the location cursor on the component when the accelerator is pressed. Accelerators are most commonly used to activate Menu items without first posting the Menu.
Mnemonics |  | A mnemonic is a single character that can be associated with any component that contains a text label. When the location cursor is on a component within a Menu, a MenuBar, or the same field as a component with a mnemonic, typing the mnemonic character must move the location cursor to the component and activate it. If a mnemonic is used for an OptionButton, for a CascadeButton in a MenuBar, or a PushButton that is not in a basic group (that is, not in a Panel, a Menu, or a MenuBar), pressing `<Alt>` and the mnemonic anywhere in the window or its Menus must move the cursor to the component with that mnemonic and must activate it.
TearOff Activation |  | Some Menus have TearOffButtons as their first elements. A TearOffButton is like a PushButton with the special interaction of converting a Menu into a DialogBox; that is, tearing off the Menu from its CascadeButton. TearOffButtons must follow the basic activation model. TearOffButtons have a second activation mechanism. Once a Menu with a TearOffButton is posted, pressing BTransfer in the TearOffButton must start a tear-off action. As long as BTransfer is held, a representation of the Menu must follow the movements of the pointer. Releasing BTransfer must end the tear-off action by unposting the Menu system, creating a new window at the current pointer location with the contents of the Menu, and in explicit pointer mode give focus to the new window.
Help Activation |  | Pressing `<Help>` on a component must invoke any context-sensitive help for the component or its nearest ancestor with context-sensitive help available. Within DialogBoxes, context-sensitive help should provide help information on the DialogBox as a whole. `<Shift> <Help>` should invoke the context-sensitive help mode if it is available.
Popup Menu Activation |  | If the pointer is in an element with an inactive Popup Menu and the context of the element allows a Popup Menu to be displayed, BMenu Press must post (activate) the Menu in a spring-loaded manner, and clicking BMenu must post (activate) the Menu.
Default Activation |  | In a DialogBox, pressing `<Enter>` or `<Return>` (except in Text), or double-clicking BSelect must activate the default PushButton in the DialogBox. If the double-click is in a component used for making selections or choices, such as List or RadioBox, the element under the pointer must be selected or should be chosen before the default PushButton is activated.
Expert Activation |  | Some elements, usually PushButtons and ToggleButtons, can have expert actions associated with them. BSelect Click 2 must activate any expert action for the element. Expert action should only be available in a Panel, and the expert action of all the buttons should be similar. The expert action should include the regular action of the component in a more global manner.
Cancel Activation |  | `<Cancel>` is available in most context to stop the current interaction, including canceling drag and drop operations, unposting TearOff Menus, canceling DialogBoxes, unposting Menu systems, and canceling scrolling operations.

### Related Information

See Chapter 5, "Component Activation" for more information about the activation model.

## Basic Controls

### Description

Basic controls are components that only take simple input. They are distinct from field controls in that they are usually elements of navigation fields rather than fields themselves. Basic controls must have no internal navigation. The following text describes the basic controls:

Separator |  | Draws a separating line within windows, between Menu items, and between Panes of a PanedWindow. A Separator allows no application interaction.
Label |  | Displays static text and images. A Label presents application information to users.
PushButton |  | A button used to activate an operation. A PushButton contains a Label that indicates the operation of the button. The Label can contain text or an image.
CascadeButton |  | A button used to display a Pulldown Menu. A CascadeButton contains a Label that indicates the Menu displayed. CascadeButtons can also contain an arrow graphic after the Label to distinguish it from PushButtons and to indicate the direction of the cascading Menu.
OptionButton |  | A button used to display an Option Menu. An Option Menu allows for a one-of-many selection. An OptionButton contains a Label that indicates the current state of the Option Menu, and a bar graphic to distinguish it from a PushButton.
ToggleButton |  | A button with two states: on and off. A ToggleButton contains a Label that indicates the state of the ToggleButton when it is set. Normally, preceding the Label is a graphic indicator of the state of the ToggleButton.
CheckButton |  | A ToggleButton in a group of ToggleButtons where any number of the ToggleButtons can be on at a time. The graphic indicator for a CheckButton is usually a filled square to indicate the on state or an empty square to indicate the off state.
RadioButton |  | A ToggleButton in a group of ToggleButtons where only one of the ToggleButtons can be on at a time. The graphic indicator for a RadioButton is usually a filled diamond or circle to indicate the on state or an empty diamond or circle to indicate the off state.
TearOffButton |  | A button used for tearing off a Menu to create a dialog representation of the Menu contents. A TearOffButton tears off a Menu in place when activated, or is dragged to tear off and move in one action. A TearOffButton usually contains a dashed line graphic representing perforations.

A single-line Text control can be configured to act like a basic control.

### Navigation

Basic controls must have no internal navigation.

### Other Operations

Activatable basic controls follow the basic activation model described in Section 5.1, "Basic Activation."

### Related Information

For more information, see the reference pages for each basic control.

## Basic Groups

### Description

Basic groups of controls are used to organize groups of basic controls. The following text describes the basic groups:

Panel |  | Organizes a collection of basic controls in a horizontal, vertical, or 2-dimensional layout. A Panel is usually composed of just one type of control.
Menu |  | Organizes a collection of buttons, labels, and separators in a horizontal, vertical, or 2-dimensional layout within a separate Menu window. There are three types of Menus: Pulldown, Popup, and Option. A Menu is only available while it is popped up or pulled down.
MenuBar |  | Organizes a collection of CascadeButtons in a horizontal layout at the top of a MainWindow.

### Navigation

The `<Down arrow>`,`<Left arrow>`,`<Right arrow>`,and `<Up arrow>` direction keys must navigate within a basic group according to the navigation model described in Chapter 3, "Navigation."

### Related Information

For more information, see the reference pages for each basic group.

## Canvas

### Description

A Canvas is used to present and edit graphics.

### Navigation

Canvas navigation is unspecified.

### Other Operations

Most Canvas operations are unspecified. A description of the specified Canvas operations follows:

`<Help>` |  | Must provide any available help for the Canvas.

## CascadeButton

### Description

A CascadeButton should be used to post a Pulldown Menu. This component must be composed of a button, with either a text or graphics Label. Following the Label, this component should also include an arrow graphic, pointing in the direction that the Menu will be posted to distinguish it from a PushButton. The graphic is usually not shown in a MenuBar.

### Illustration

Figure 9-1. A CascadeButton

### Navigation

A CascadeButton must have no internal navigation.

### Other Operations

CascadeButtons follow the Menu activation model described in Section 3.3, "Menu Traversal." The following text describes the other operations of this component:

`<Help>` |  | Must provide any available help for the CascadeButton.

### Related Information

For more information, see the reference pages in Section 9.34, "Menus."

## CheckButton

### Description

A CheckButton should be used to set options in the application. A CheckButton is a special case of a ToggleButton. Any number of CheckButtons can be set at the same time.

This component must be composed of a text or graphic Label, and a graphic that indicates the state of the CheckButton. The graphic indicator for a CheckButton is usually a filled square to indicate the on state or an empty square to indicate the off state. On color systems, the on state color can be distinct from general application colors to visually distinguish the on state.

### Illustration

Figure 9-2. A CheckButton

### Navigation

CheckButtons must have no internal navigation.

### Other Operations

The following text describes the CheckButton operations:

BSelect Press |  | Must arm the CheckButton. If the CheckButton was previously unset, it must show the CheckButton in the set state. If the CheckButton was previously set, it must show the CheckButton in the unset state.
BSelect Release |  | If the release happens in the same CheckButton that the press occurred in: If the CheckButton was previously unset, it must be set. If the CheckButton was previously set, it must be unset. In all cases the CheckButton must be disarmed, and, if the CheckButton is in a Menu, the Menu must be unposted.
BSelect Release 2 |  | If the CheckButton was previously unset, it should be set. If the CheckButton was previously set, it should be unset. If the CheckButton is in a window, the default action of the window should be activated.
`<Enter>` or `<Return>` |  | If the CheckButton is in a window with a default action, the default action must be activated. If the CheckButton is in a Menu: If the CheckButton was previously unset, it must be set. If the CheckButton was previously set, it must be unset. In both cases, the CheckButton must be disarmed, and the Menu must be unposted.
`<Select>` or `<Space>` |  | If the CheckButton was previously unset, it must be set. If the CheckButton was previously set, it must be unset. In both cases, the CheckButton must be disarmed, and, if the CheckButton is in a Menu, the Menu must be unposted.
`<Help>` |  | Must provide any available help for the CheckButton.

### Related Information

For more information, see the reference pages in Section 9.48, "RadioButton" and Section 9.59, "ToggleButton."

## CommandBox

### Description

A CommandBox is a special-purpose composite component for command entry that provides a built-in command history mechanism. The CommandBox must be composed of a Text component with a command line prompt for command input, and a List component above the Text component for a command history area. The List must use either the single or browse selection model. When a List element is selected, its contents must be placed in the Text area. The default action of the CommandBox must be to pass the command in the Text area to the application for execution and to add the command to the end of the List. The List component can be scrollable.

The List navigation actions `<Up arrow>`,`<Down arrow>`,`<Ctrl> <Begin>`,and `<Ctrl> <End>` must be available from the Text component for moving the cursored element within the List and thus changing the contents of the Text. The List navigation actions `<PageUp>` and `<PageDown>` should also be available from the Text component for moving the cursored element within the List.

### Illustration

Figure 9-3. A CommandBox

### Related Information

For more information, see the reference page in Section 9.9, "CommandDialog."

## CommandDialog

### Description

A CommandDialog should be used to enter commands for processing. It should not interrupt the user's interaction with the application. It should include a CommandBox.

### Illustration

Figure 9-4. A CommandDialog

### Related Information

For more information, see the reference page in Section 9.12, "DialogBox."

## Composition

### Description

The Composition group should be used to organize components in an arbitrary layout. The layout style can be either arbitrary, in even rows and columns, or so that the position of components is relative to the Composition component and the components it contains. This component is composed of an area for organizing components.

### Navigation

This group must follow the navigation model as described in Chapter 3, "Navigation."

### Related Information

For more information, see the reference pages for each layout group.

## Default Activation

### Description

Any window can have a default action, although default actions are most frequently used in DialogBoxes. A DialogBox should have a default action associated with it. The default action in a window can change depending upon which component has the focus. The current default action should correspond to the action of some PushButton, called the current default PushButton of the window.

The current default PushButton must be highlighted in some way, usually by displaying a border around it. When the focus is on a PushButton, its action must be the default action, and the PushButton must show default highlighting. If the default action in a window varies, some PushButton must always have default highlighting, except when there is no current default action.

In a DialogBox, default PushButtons should be in the bottom area of PushButtons of the DialogBox. However, if a particular default action is associated with a cluster of controls in a window, the corresponding default PushButton can be located adjacent to the cluster.

When an explicit focus policy is in use, and the focus is outside the window, default highlighting should be placed on the PushButton whose action corresponds to the default action that would result from moving the focus to the window by using keyboard navigation among windows.

The default action of a DialogBox is activated according to the following rules:

- If the focus is in a window, `<Enter>` and `<Ctrl> <Return>` must invoke the default action, and, if the focus is in a component in a window other than multiline Text, `<Return>` must invoke the default action. These actions must have no other effect on the component with the focus, unless the default action has some effect.

- In list-like and graphics-like collections, when the location cursor is not on an activatable element, BSelect Click 2 should act like BSelect Click, followed by invocation of the default action.

- When the focus is on a ToggleButton not used for expert activation, BSelect Click 2 should activate the ToggleButton and then perform the default action.

Except in the middle of a button motion operation, `<Cancel>` anywhere in a DialogBox must be equivalent to activating the Cancel PushButton in the DialogBox.

### Related Information

See Chapter 5, "Component Activation" for general information about the activation model and default activation.

## DialogBox

### Description

A DialogBox should be used to group components in a window secondary to the main tasks of the application. Although a DialogBox can contain any components, a simple DialogBox is composed of a Label and PushButtons for supplying a response to the DialogBox. The OSF/Motif toolkit provides a number of ready-designed DialogBoxes for common uses: CommandDialog, FileSelectionDialog, MessageDialog, PromptDialog, and SelectionDialog. There are also a number of different types of MessageDialogs: ErrorDialog, InformationDialog, QuestionDialog, WorkingDialog, and WarningDialog. The illustration on this reference page shows a typical DialogBox.

DialogBox PushButtons should use the following common labels and actions. The actions are in the approximate sequence in which they should appear in DialogBoxes.

Yes |  | Must indicate an affirmative response to a question posed in the DialogBox and then close the window. While Yes is not an active-voice label, it implies a positive response to a question in a QuestionDialog or a WarningDialog. Only use Yes if it is a clear answer to the question.
No |  | Must indicate a negative response to a question posed in the DialogBox and then close the window. While No is not an active-voice label, it implies a negative response to a question in a QuestionDialog. Only use No if it is a clear answer to the question.
OK |  | Must cause the application to apply any changes and perform related actions specified by components in the DialogBox, and then dismiss the DialogBox. While OK is not an active-voice label, its usage is too common to change.
Close |  | Should cause the current DialogBox to be closed without performing any of the actions specified by components in the DialogBox. This action is usually only available in DialogBoxes that provide status information such as a Working DialogBox. This label can also be used if the actions in the DialogBox cannot be reversed, in which case this label replaces Cancel after the first irreversible action is performed.
Apply |  | Must apply any changes and perform the related actions specified by the components in the DialogBox.
Retry |  | Must cause the task in progress to be attempted again. This action is commonly found in message boxes that report an error.
Stop |  | Must end the task in progress at the next possible breaking point. This action is commonly found in a Working DialogBox.
Pause |  | Must cause the task in progress to be paused. This action is commonly found in a Working DialogBox and should be used in combination with Resume.
Resume |  | Must cause a previously paused task to resume. This action is commonly found in a Working DialogBox and should be used in combination with Pause.
Reset |  | Must cancel any user changes that have not been applied to the application. It must also reset the status of the DialogBox to the state since the last time the DialogBox action was applied or to the initial state of the DialogBox.
Cancel |  | Must close the DialogBox without performing any DialogBox actions not yet applied to the application. Pressing `<Cancel>` anywhere in the DialogBox, except during a cancelable drag operation, must perform the action of this button.
Help |  | Must provide any help for the DialogBox.

You should arrange PushButton actions in DialogBoxes like other PushButtons, according to order and frequency of use. The common action PushButtons should be ordered as presented in the previous list. Positive responses to the DialogBox should be presented first, followed by negative responses and canceling responses. Help should always be the last action on the right.

### Illustration

Figure 9-5. A DialogBox

### Navigation

A DialogBox must follow the navigation model described in Chapter 3, "Navigation."

### Related Information

For more information, see the reference pages in Section 9.9, "CommandDialog," Section 9.15, "ErrorDialog," Section 9.19, "FileSelectionDialog," Section 9.27, "InformationDialog," Section 9.35, "MessageDialogs," Section 9.44, "PromptDialog," Section 9.46, "QuestionDialog," Section 9.55, "SelectionDialog," Section 9.60, "WarningDialog," and Section 9.62, "WorkingDialog."

## Drag and Drop

### Description

Drag and drop provides a quick and simple model for transferring data within and between applications. A drag and drop interaction is accomplished in four steps:

1. The user selects elements to drag and grabs them with the pointer, or grabs an unselected element.

2. The user drags elements to the drop location.

3. The user drops the elements on the drop location.

4. The component dropped on processes the drop action.

Pressing Transfer in a draggable element and moving the pointer must start a drag and drop interaction. If a drag is initiated in an unselected region and the pointer is over two possible draggable elements, the drag must occur on the highest draggable element in the stacking order. This also implies that in nested draggable elements the drag occurs from the smallest draggable element under the pointer.

When BSelect is used for dragging operations, its use must supersede the use of BSelect Motion in the selection models described in Section 4.1, "Selection Models."

Any successful drag and drop transfer from a read-only component should by default result in a copy of the data, but it can result in a link. Transfers from writable components can by default result in a copy, a link, or a move. `<Shift>` BTransfer Release must force a move operation if possible; otherwise, the operation must fail. `<Ctrl>` BTransfer Release must force a copy operation if possible; otherwise, the operation must fail. `<Ctrl> <Shift>` BTransfer Release must force a link operation if possible; otherwise, the operation must fail.

If a system provides drag and drop help, pressing `<Help>` during a drag and drop operation should allow the posting of a DialogBox with the help information and the possible choices for continuing the drag and drop operation. Pressing `<Cancel>` during a drag operation must cancel the current drag operation and return the system to the state prior to the start of the drag operation.

Releasing BTransfer must end a drag and drop operation. When a user releases BTransfer, the drop operation must occur at the location of the hotspot of the drag icon pointer. The drop must occur into the highest drop site in the stacking order. This also implies that in a group of nested drop sites the drop occurs into the smallest drop site under the pointer.

### Related Information

See Section 4.3, "Transfer Models." for more information on the drag and drop model, and for information on quick transfer and the selection models.

## Edit Menu

### Description

The common Edit Menu contents are described as follows. Note that you should only include those functions actually supported by your application. The Edit Menu can contain a TearOffButton. The illustration on this reference page shows an Edit Menu.

Undo Alt+Backspace |  | Must reverse the most recently executed action. To provide a visual cue to the user, the Undo selection title should be dynamically modified to indicate what is being undone. For example, if the most recently executed action was a paste, the action name would be Undo paste. Your application should be able to undo all of the actions in the Edit Menu. This action must have the mnemonic U.
Cut Shift+Del |  | Must remove the selected portion of data from the client area to the clipboard. This action must choose the component to act on by following the rules in Section 4.2.2, "Operation Targets" for operations that act on selections. This action must have the mnemonic T.
Copy Ctrl+Ins |  | Must copy the selected portion of data to the clipboard without removing the original data from the client area. This action must choose the component to act on by following the rules in Section 4.2.2, "Operation Targets" for operations that act on selections. This action must have the mnemonic C.
Copy Link |  | Must copy a link of the selected portion of data to the clipboard without removing the original data from the client area. This action must choose the component to act on by following the rules in Section 4.2.2, "Operation Targets" for operations that act on selections. This action must have the mnemonic K.
Paste Shift+Ins |  | Must paste the contents of the clipboard into a client area. This action must choose the component to act on by following the rules in Section 4.2.2, "Operation Targets" for operations that do not act on selections. This action must have the mnemonic P.
Paste Link |  | Must paste a link of the data represented by the contents of the clipboard into a client area. This action must choose the component to act on by following the rules in Section 4.2.2, "Operation Targets" for operations that do not act on selections. This action must have the mnemonic L.
Clear |  | Must remove a selected portion of data from the client area without copying it to the clipboard. The remaining data is not compressed to fill the space that was occupied by the cleared data. This action must choose the component to act on by following the rules in Section 4.2.2, "Operation Targets" for operations that act on selections. This action must have the mnemonic E.
Delete |  | Must remove a selected portion of data from the client area without copying it to the clipboard. This action must choose the component to act on by following the rules in Section 4.2.2, "Operation Targets" for operations that act on selections. This action must have the mnemonic D.
Select All Ctrl+/ |  | Must make the primary selection consist of all the elements in a component of the client area. This action must choose the component to act on by following the rules in Section 4.2.2, "Operation Targets" for operations that do not act on selections. If the action uses an accelerator, it should be `<Ctrl> </>`.
Deselect All Ctrl+\ |  | Must remove from the primary selection all the elements in a component of the client area. This action must choose the component to act on by following the rules in Section 4.2.2, "Operation Targets" for operations that do not act on selections. If the action uses an accelerator, it should be `<Ctrl> <\>`.
Select Pasted |  | Must make the primary selection consist of the last element or elements pasted into a component of the client area. This action must choose the component to act on by following the rules in Section 4.2.2, "Operation Targets" for operations that do not act on selections.
Reselect Alt+Insert |  | Must make the primary selection consist of the last selected element or elements in a component of the client area. This action must choose the component to act on by following the rules in Section 4.2.2, "Operation Targets" for operations that do not act on selections. The action must be available only in components that do not support persistent selections and only when the current selection is empty. If the action uses an accelerator, it should be `<Alt> <Insert>`.
Promote Alt+Insert |  | Must promote to the primary selection the current selection of a component of the client area. This action must choose the component to act on by following the rules in Section 4.2.2, "Operation Targets" for operations that act on selections. This action must only be available for components that support persistent selections. If the action uses an accelerator, it should be `<Alt> <Insert>`.

You should include Menu items in the order described. If you add new Menu items, you should insert them near similar elements.

If you use accelerators for Undo, Cut, Copy, and Paste, you must use either one or both of the models presented in the following two tables.

Table 9-3. Edit Menu Accelerators, Model 1

Edit Menu Item | Accelerator
--- | ---
Undo | `<Alt>` `<BackSpace>`
Cut | `<Shift>` `<Delete>`
Copy | `<Ctrl>` `<Insert>`
Paste | `<Shift>` `<Insert>`

Table 9-4. Edit Menu Accelerators, Model 2

Edit Menu Item | Accelerator
--- | ---
Undo | `<Ctrl>` `<Z>`
Cut | `<Ctrl>` `<X>`
Copy | `<Ctrl>` `<C>`
Paste | `<Ctrl>` `<V>`

In addition, if your keyboard has `<Undo>`,`<Cut>`,`<Copy>`,and `<Paste>` keys, these should be supported as accelerators for the corresponding Menu items as well.

### Illustration

Figure 9-6. An Edit Menu

### Related Information

See Chapter 6, "Application Design Principles" for more information on the MenuBar system and for general information about Menu design.

## ErrorDialog

### Description

An ErrorDialog should be used to convey a message about a user error. It should stop user interaction with the application until it is dismissed. It should include an error symbol, a message, and one of the following button arrangements:

    OK Cancel
    OK Cancel Help

### Illustration

Figure 9-7. An ErrorDialog

### Related Information

For more information, see the reference page in Section 9.12, "DialogBox."

## Field Controls

### Description

Field controls are components that use internal navigation controls. Field controls should be navigation fields. The following text describes the field controls:

Sash |  | Used to set the boundary between two components. A Sash is usually a small square on the boundary between two components. The separated components are called Panes, and a group of Panes, Separators, and Sashes is called a PanedWindow.
Scale |  | Used to set or display a value in a range. A Scale is usually composed of a slider, moving within an element that indicates the size of the range, and a Label that indicates the current value. The position of the slider indicates the value relative to the range. The slider is moved directly by using the mouse pointer or by using the arrow keys. A Scale can also have buttons with arrow graphics for moving the slider with the mouse.
ScrollBar |  | Used to scroll the visible area of a component. A ScrollBar is usually composed of a slider, moving within an element that indicates the full size of the component, and buttons with arrow graphics for moving the slider with the mouse. The slider indicates the relative position and size of the visible area of the component. The slider is moved directly by using the mouse pointer or by using the arrow keys.
List |  | Used for selecting elements from a list of elements. A List can allow multiple items to be selected or can be constrained to allow only one item to be selected at a time. A List is usually composed of a vertical list of items. A List can also have both horizontal and vertical ScrollBars for scrolling the visible portion of the list of items.
Text |  | Used for displaying, entering, and modifying text. There are single-line and multiple-line variants. Multiline Text can have both horizontal and vertical ScrollBars for scrolling the visible portion of the text area.
Canvas |  | Used for displaying, entering, and modifying graphics. A Canvas can have both horizontal and vertical ScrollBars for scrolling the visible portion of the drawing area.

### Navigation

Field controls have navigation that is specific to the component. See the reference pages for each field control for information about its navigation.

### Other Operations

Field controls have operations that are specific to the component. See the reference pages for each field control for information about its operations.

### Related Information

For more information, see the reference pages for each field control.

## File Menu

### Description

The common File Menu contents are described as follows. Note that you should only include those functions actually supported by your application. If the label File is not appropriate to the context of your application, you can choose a different, more appropriate label. The File Menu can contain a TearOffButton. The illustration on this reference page shows a File Menu.

New |  | Must create a new file. The New operation must clear existing data from the client area. If completion of the operation will obliterate current changes to the file, you must display a DialogBox, asking the user about saving changes. This action must have the mnemonic N.
Open . . . |  | Must open an existing file. The Open operation must prompt the user for the name of the file with a DialogBox. The title bar should be updated with the name of the newly opened file. If completion of the operation will obliterate current changes to the file, you must display a DialogBox, asking the user about saving changes. This DialogBox should be displayed after the user selects a new file. This action must have the mnemonic O.
Save |  | Must save the currently opened file without removing the existing contents of the client area. If the currently opened file has no name, Save must prompt for a filename with a DialogBox. This action must have the mnemonic S.
Save As . . . |  | Must save the currently opened file under a new name without removing the existing contents of the client area. The Save As operation must prompt for the name of the file with a DialogBox. If the user tries to save the new file under an existing name, Save As must alert the user with a DialogBox of a possible loss of data. This action must have the mnemonic A.
Print |  | Must schedule a file for printing. If your application requires specific printing information before printing, the operation must first request that information with a DialogBox, and the entry title must be followed by an ellipsis. Printing information can also be specified for the application in the Options Menu. This action must have the mnemonic P.
Close |  | Can be supplied in applications that have multiple independent primary windows. This action must not be supplied in applications with a single primary window or multiple dependent primary windows. This action must only close the current primary window and its associated secondary windows; that is, the window family. This action must have the mnemonic C. You can include this action even though it is similar to the Close action in the window Menu. This ensures that users have a way to close the primary window even if they are not running a compliant window manager. Applications should prompt the user to save any unsaved changes if the action would cause loss of data.
Exit |  | Must end the current application and all windows associated with it. This action is equivalent to closing all primary windows of the application. If completion of the operation will obliterate current changes to the file, you must display a DialogBox, asking the user about saving changes. This action must have the mnemonic X. You should include this action even though it is similar to the Close action in the window Menu. This ensures that users have a way to end the application even if they are not running a compliant window manager. Applications should prompt the user to save any unsaved changes if the action would cause loss of data. If your application does not have a File Menu, put Exit at the end of the first Pulldown Menu.

### Illustration

Figure 9-8. A File Menu

### Related Information

See Chapter 6, "Application Design Principles" for more information on the MenuBar system and for general information about Menu design.

## FileSelectionBox

### Description

A FileSelectionBox is a special-purpose composite component for file selection. It can be used to traverse through directories, view the files and subdirectories in them, and then select files. The FileSelectionBox must be composed of at least the following components:

- A Text component for displaying and editing a directory mask used to select the files to be displayed. The directory mask must be a string specifying the base directory to be examined and a search pattern.

- A List component for displaying filenames. The file list should display all files and subdirectories in the base directory that match the search pattern. The List must use either the single or browse selection model.

- A List component for displaying subdirectories. The directory list should display the subdirectories of the base directory, as well as the base directory itself and its parent directory. The List must use either the single or browse selection model.

- A Text component for displaying and editing a filename.

- A group of PushButtons, labeled OK, Filter, Cancel, and Help. If the FileSelectionBox is used to perform a specific action to the selected files, OK can be replaced by a label describing the action to be done.

- Additional elements can be added by an application.

The user must be able to select a new directory to examine by scrolling through the list of directories and selecting the desired directory or by editing the directory mask. Selecting a new directory from the directory list must not change the search pattern. A user must be able to select a new search pattern by editing the directory mask.

The List navigation actions `<Up arrow>`,`<Down arrow>`,`<Ctrl> <Begin>`,and `<Ctrl> <End>` must be available from the Text components for moving the cursored element within each List and thus changing the contents of the Text. The List navigation actions `<PageUp>` and `<PageDown>` should also be available from the Text components for moving the cursored element within each List. The contents of the directory Text must correspond to the contents of the directory List, and the contents of the filename Text must correspond to the contents of the filename List.

The user must be able to select a file by scrolling through the list of filenames and selecting the desired file or by entering the filename directly into the Text component. Selecting a file from the list causes that filename to appear in the file selection Text component.

The user can select a new file as many times as desired. The application must not be notified until one of the following events occurs:

- The user activates the OK PushButton.

- The user presses `<Enter>` or `<Return>` while the filename Text component has the keyboard focus.

- The user presses `<Enter>` or `<Return>` while the location cursor is on an item in the file List.

- The user double-clicks BSelect on an item in the file List.

The FileSelectionBox must initiate a directory and file search when any of the following occurs:

- The FileSelectionBox is initialized.

- The user activates the Filter PushButton.

- The user double-clicks or presses `<Enter>` or `<Return>` on an item in the directory List.

- The user presses `<Enter>` or `<Return>` while the directory mask Text edit area has the keyboard focus.

### Illustration

Figure 9-9. A FileSelectionBox

### Related Information

For more information, see the reference page in Section 9.19, "FileSelectionDialog."

## FileSelectionDialog

### Description

A FileSelectionDialog should be used to enter the name of a file for processing. It should not interrupt the user's interaction with the application. It should include a FileSelectionBox.

### Illustration

Figure 9-10. A FileSelectionDialog

### Related Information

For more information, see the reference page in Section 9.12, "DialogBox."

## Focus

### Description

The keyboard focus model is defined by a focus policy. A focus policy is a specific mechanism for moving the focus among windows and components. The implicit and explicit focus policies must be supported.

In the implicit focus policy, also called the pointer, real-estate driven, or point-to-type policy, the keyboard focus moves to the window or component into which a user moves the mouse pointer. No explicit action is performed to set the keyboard focus in the implicit focus model. Keyboard events are sent to the window or component that the mouse pointer is in, more specifically to the component that the mouse pointer is in. In implicit mode, the keyboard focus tracks the mouse pointer. Because of this, there is no way to move the keyboard focus from the keyboard using implicit mode. In this focus policy, the location cursor for keyboard events does not need to be shown; however, the application can show it.

The explicit focus policy requires the user to explicitly select which window or component receives the keyboard focus. In explicit focus mode at the window level, a user moves the keyboard focus to a window by pressing BSelect while the mouse pointer is over the window. Simply moving the mouse pointer over a window does not give the window the keyboard focus. Because of this, explicit mode is often called click-to-type. In explicit mode within a window, a user generally moves the keyboard focus to a specific component within a window by pressing BSelect over the component. Pressing BSelect must not move focus to a component that is not traversable or does not accept input. Pressing BSelect in a component that is used only to change the visible portion of another component, such as a ScrollBar or Sash, should act on that component but should not move focus to it. In this focus policy, the location of keyboard focus must be shown by a location cursor.

### Related Information

See Chapter 2, "Input Models" for more information about the focus model.

## Frame

### Description

A Frame should be used to frame other components. It simply provides a decorative border.

### Other Operations

This component can indicate the input focus.

## Framing Groups

### Description

Framing groups are used to frame groups of components as the following text describes:

Frame |  | Draws framing decorations around a component.
ScrolledWindow |  | Frames a component and adds ScrollBars for scrolling the visible area of the component.
MainWindow |  | Organizes the contents of a primary window. A MainWindow frames the client area and can optionally include ScrollBars, a MenuBar, a command area, and a message area.

### Navigation

These groups must follow the navigation model as described in Chapter 3, "Navigation."

### Related Information

For more information, see the reference pages for each framing group.

## Help Menu

### Description

There are two acceptable models for the contents of the Help Menu. The OSF/Motif Style Guide allows either model.

The common Menu contents for this model are described in the following text. Note that you should only include those functions actually supported by your application. The Help Menu can contain a TearOffButton. The illustration on this reference page shows this first model of a Help Menu.

On Context Shift+Help |  | Must initiate context-sensitive help by changing the shape of the pointer to the question pointer described in Section 2.2.2, "Pointer Shapes." When the user moves the pointer to the component help is wanted on and presses BSelect, any available context-sensitive help for the component must be presented, and the pointer reverts from the question pointer. This action must have the mnemonic C. If the action uses an accelerator, it should be `<Shift> <Help>`.
On Help |  | Must provide information on how to use the application's help facility. This action must have the mnemonic H.
On Window |  | Must provide general information about the window from which help was requested. This action must have the mnemonic W.
On Keys |  | Must provide information about the application's use of function keys, mnemonics, and keyboard accelerators. This action must have the mnemonic K.
Index |  | Must provide an index for all help information in the application. This action must have the mnemonic I. The index can provide search capabilities.
Tutorial |  | Must provide access to the application's tutorial. This action must have the mnemonic T.
On Version |  | Must provide the name and version of the application. This action must have the mnemonic V. It can provide other information as well.

The common Menu contents in the second model are described in the following text. Note that you should only include those functions actually supported by your application. The Help Menu can contain a TearOffButton.

Context-Sensitive Help Shift+Help |  | Must initiate context-sensitive help by changing the shape of the pointer to the question pointer described in Section 2.2.2, "Pointer Shapes." When the user moves the pointer to the component help is wanted on and presses BSelect, any available context-sensitive help for the component must be presented, and the pointer reverts from the question pointer. This action should be followed by a separator. This action must have the mnemonic C. If the action uses an accelerator, it should be `<Shift> <Help>`.
Overview |  | Must provide general information about the application window from which help was requested. This action must have the mnemonic O.
Index |  | Must provide an index for all help information in the application. This action must have the mnemonic I. The index can provide search capabilities.
Keyboard |  | Must provide information about the application's use of function keys, mnemonics, and keyboard accelerators. This action must have the mnemonic K.
Tutorial |  | Must provide access to the application's tutorial. This action must have the mnemonic T.
Using 'Help |  | Must provide information on how to use the application's help facility. This action must have the mnemonic H.
Product Information |  | Must provide the name and version of the application. This action must have the mnemonic P. It can provide other information as well.

Applications should place additional Help Menu items between Index and Using Help.

Help is usually provided in DialogBoxes but can also appear in the message area. You should include Menu items in the order described. If you add new Menu items, you should insert them near similar elements.

### Illustration

Figure 9-11. A Help Menu

### Related Information

See Chapter 6, "Application Design Principles" for more information on the MenuBar system and for general information about Menu design.

## Icon Menu

### Description

Clicking BSelect in an icon must give the icon the keyboard focus and post the icon Menu. The icon Menu must be the same Menu as the window Menu for the associated primary window. Size should not be available from the icon Menu. Navigating to the icon must also give the icon the keyboard focus and should post the icon Menu.

Double-clicking BSelect anywhere in the icon must restore the window family, just as the icon Menu item Restore does. If the window is currently minimized, but its previous state was maximized, double-clicking BSelect returns it to the maximized state. Selecting Maximize from the icon Menu always maximizes the corresponding window. If the window is minimized, Minimize must not be available in the icon Menu; otherwise, selecting it minimizes the window family. Pressing BSelect or BTransfer anywhere in the icon and dragging the mouse pointer must move the icon to track the pointer, just as the icon Menu item Move does.

If the window manager has been customized by the user so that the icon Menu does not pop up when the icon gets the focus, `<Shift> <Escape>`,`<Alt> <Space>`,`<Menu>`,and BMenu must pop up the icon Menu.

### Related Information

See Chapter 7, "Window Manager Design Principles" for more information on the icon Menu and the window manager in general. See Chapter 6, "Application Design Principles" for information about Menu design.

## IconBox

### Description

An icon box is a specialized window that acts as a storage location for icons. An icon box acts like a typical window in the sense that it has a window frame and frame components. The client area of an icon box must have an area for holding icons and can have horizontal and vertical scroll bars for moving around the icon area.

The icon box must have all the same components as any other primary window. Like other windows it can be sized, moved, minimized, maximized, restored, and lowered. However, the window manager must not allow the icon box to be closed. The system Menu action Close must be replaced with the system Menu action Pack Icons in an icon box. Double-clicking BSelect in the icon box system Menu must only open the icon box system Menu. It must not close the icon box. Pack Icons arranges the icons as close as possible together in the visible icon area if possible. Pack Icons must have the mnemonic P. If Pack Icons has an accelerator, it should be `<Alt> <F12>` if `<F12 >` is available. When the input focus is in the icon box, `<Shift> <Escape>` or `<Alt> <Space>` must pop up the icon box system Menu if the Menu is unposted. If the Menu is already posted, `<Shift> <Escape>` or `<Alt> <Space>` must unpost the Menu.

The icon box can contain an icon for each window family, even if it is active. The icon for minimized window families must be the same as the icon would be outside of the icon box. The icon for an active window family should be similar to the minimized icon, deemphasized somehow.

Clicking BSelect in an icon must give the icon keyboard focus and post the icon Menu. The icon Menu must be the same Menu as the window Menu for the associated primary window. If the icon represents an active window family, Restore and Size must not be available from the icon Menu. If the icon represents a minimized window family, Size must not be available from the icon Menu. If the window manager is customized so that the icon with the focus does not have its window Menu automatically posted, BMenu or `<Menu>` must post its Menu.

Double-clicking BSelect anywhere in an icon that represents a minimized window family must restore the window family, just as the icon Menu item Restore does. Double-clicking BSelect anywhere in an icon that represents an active window family must raise the window family to the top of the window hierarchy. If the window is currently minimized, but its previous state was maximized, double-clicking BSelect returns it to the maximized state. Selecting Maximize from the icon Menu always maximizes the corresponding window. If the window is minimized, Minimize must not be available in the icon Menu; otherwise, selecting it minimizes the window family. Pressing BSelect or BTransfer anywhere in the icon and dragging the mouse pointer must move the icon within the icon area to track the pointer, just as the icon Menu item Move does.

The `<Down arrow>`,`<Up arrow>`,`<Right arrow>`,and `<Left arrow>` directional keys must navigate among the icons in the icon box. Icon navigation must behave as described in the following text. Note that `<Down arrow>` and `<Right arrow>` do not need to traverse icons in the same order.

`<Down arrow>` |  | In a left-to-right language environment, this key must move the location cursor through the icons in the icon box, starting at the upper-left icon and ending at the lower-right icon, then wrapping back up to the upper left. In a right-to-left language environment, the location cursor can move, starting at the upper right and moving to the lower left.
`<Left arrow>` |  | This key must move the location cursor through the icons in the opposite direction of `<Right arrow>`.
`<Right arrow>` |  | In a left-to-right language environment, this key must move the location cursor through the icons in the icon box, starting at the upper-left icon and ending at the lower-right icon, then wrapping back up to the upper left. In a right-to-left language environment, the location cursor can move, starting at the upper right and moving to the lower left.
`<Up arrow>` |  | This key must move the location cursor through the icons in the opposite direction of `<Down arrow>`.

### Illustration

Figure 9-12. An IconBox

### Related Information

See Chapter 7, "Window Manager Design Principles" for more information about icons and the window manager.

## Icons

### Description

An icon is a stylized representation of an object. A window icon is a minimized representation of a window or window family that can help organize windows and tasks in the display. Iconifying a window is also known as minimizing a window. The window manager must iconify all windows of window family together. It must not iconify any single window, primary or secondary, from a window family without also iconifying all the other windows in the window family. The iconic representation of a window family should not change any state in the windows, except the visual representation of the window. The application running inside of a window must continue running even when the application is iconified. The application can adjust its own state when it is iconified.

An icon is made up of an image and a label. The illustration on this reference page shows a typical Motif icon.

The image should be surrounded by a border that indicates when the icon has the keyboard focus. The image area can contain text or a bitmap. The label should be located just below the image and its border. The label can also indicate when the icon has the keyboard focus by highlighting with the image area.

The label should contain the same text as the title area of the corresponding primary window, or an abbreviated form of it. When the icon does not have the keyboard focus, the width of the label must be the same as the width of the image area and its border, truncating text if necessary. When the icon has the keyboard focus, the width of the label can expand to display the entire text.

Clicking BSelect in an icon must give the icon keyboard focus and should post the icon Menu. Navigating to the icon must also give the icon the keyboard focus and should post the icon Menu.

Double-clicking BSelect anywhere in the icon must restore the window family, just as the icon Menu item Restore does. If the window is currently minimized, but its previous state was maximized, double-clicking BSelect returns it to the maximized state. Selecting Maximize from the icon Menu always maximizes the corresponding window. If the window is minimized, Minimize must not be available in the icon Menu; otherwise, selecting it minimizes the window family. Pressing BSelect or BTransfer anywhere in the icon and dragging the mouse pointer must move the icon to track the pointer, just as the icon Menu item Move does.

If the window manager has been customized by the user so that the icon Menu does not pop up when the icon gets the focus, `<Shift> <Escape>`,`<Alt> <Space>`,`<Menu>`,and BMenu must pop up the icon Menu.

### Illustration

Figure 9-13. An Icon

### Related Information

See Chapter 7, "Window Manager Design Principles" for more information about icons and the window manager.

## InformationDialog

### Description

An InformationDialog should be used to convey information to the user. It must not interrupt the user's interaction with the application. It should include an information symbol, a message, and one of the following button arrangements:

    OK
    OK Help

### Illustration

Figure 9-14. An InformationDialog

### Related Information

For more information, see the reference page in Section 9.12, "DialogBox."

## Input Devices

### Description

The most typical pointing device is a mouse, although a graphics tablet, track ball, joystick, and other tools also work as pointing devices. You can use any pointing device in place of a mouse. This guide assumes that a mouse, or any pointing device, has the following three buttons. Chapter 2, "Input Models" describes the button bindings for pointing devices that do not have three buttons.

BSelect |  | Used for selection, activation, and setting the location cursor. This button must be the leftmost button, except for left-handed users where it can be the rightmost button.
BTransfer |  | Used for moving and copying elements. This button must be the middle mouse button, unless dragging is integrated with selection. Details about the effects of integrating BTransfer with BSelect are described in Chapter 4, "Selection."
BMenu |  | Used for popping up Menus. This button must be the rightmost button, except for left-handed users where it can be the leftmost button.

Since not all keyboards are the same, it is difficult to give style guidelines that are correct for every manufacturer's keyboard. To solve this problem, this guide describes keys using a model keyboard mechanism. Wherever keyboard input is specified, the keys are indicated by the engraving they have on the OSF/Motif model keyboard. The model keyboard does not correspond directly to any existing keyboard; rather, it assumes a keyboard with an ideal set of keys.

In addition to the standard letter, number, and character keys, the OSF/Motif model keyboard is composed of the following special keys:

- The special printing characters `</>`,`<\>`,and `<!>`

- The standard modifier keys `<Ctrl>`,`<Alt>`,and `<Shift>`

- Ten function keys `<F1>` through `<F10>`

- The arrow keys `<Down arrow>`,`<Left arrow>`,`<Right arrow>`,and `<Up arrow>`

- `<BackSpace>`

- `<Cancel>`

- `<Delete>`

- `<End>`

- `<Escape>`

- `<Help>`

- `<Home>`

- `<Insert>`

- `<Menu>`

- `<PageDown>`

- `<PageUp>`

- `<Return>`

- `<Space>`

- `<Tab>`

The OSF/Motif model keyboard also contains the following optional keys, which although useful, either are not necessary or can be replaced by combinations of other keys:

- `<CapsLock>`

- `<Copy>`

- `<Cut>`

- `<Enter>`

- `<ModeSwitch>`

- `<NumLock>`

- `<PageLeft>`

- `<PageRight>`

- `<Paste>`

- `<ScrollLock>`

- `<Select>`

- `<Undo>`

Throughout this guide, behavior is described in terms of model keyboard keys. When a behavior takes advantage of an optional key from the model keyboard, it is also described in terms of the required special keys. Each of the nonoptional keys described on the OSF/Motif model keyboard must be available either as specified or by using other keys or key combinations if the specified key is unavailable.

### Related Information

See Chapter 2, "Input Models" for a more information about input devices.

## Label

### Description

A Label should be used to display text or graphics that label other components. This component must be composed of an area for displaying a text or graphics label.

### Illustration

Figure 9-15. A Label

### Navigation

A Label must have no internal navigation.

## Layout Groups

### Description

Layout groups are used for organizing components into groups as described in the following text:

Composition |  | Organizes a collection of components, including groups, in an arbitrary layout.
PanedWindow |  | A linear grouping of components and Sashes. Sashes are used to set the boundary between two components. The separated components are called Panes and can contain any components.

### Navigation

Layout groups must follow the navigation model as described in Chapter 3, "Navigation."

### Related Information

For more information, see the reference pages for each layout group.

## List

### Description

A List should be used to present a list of elements for selection. The List elements can be selected using either the single selection model, the browse selection model, the multiple selection model, or the discontiguous selection model. This component must be composed of an area for presenting a list of text or graphics elements. It can optionally have vertical and horizontal ScrollBars, which show different views of the List elements.

The location cursor in a List should differentiate between normal mode and add mode. The location cursor should be a solid box in normal mode and a dashed box in add mode.

### Illustration

Figure 9-16. A List

### Navigation

The following text describes the navigation actions of this component:

`<Ctrl>` `<Begin>` |  | Must move the location cursor to the first item in the List.
`<Ctrl>` `<End>` |  | Must move the location cursor to the last item in the List.
`<Up arrow>` |  | Must move the location cursor to the previous item in the List.
`<Down arrow>` |  | Must move the location cursor to the next item in the List.
`<PageDown>` |  | In a scrollable List, must move the location cursor to the item one page down in the List.
`<PageUp>` |  | In a scrollable List, must move the location cursor to the item one page up in the List.

### Other Operations

The following text describes the operations of this component:

BSelect Click 2 |  | Must select the current List item and cause any default action for the window to occur.
`<Begin>` |  | In a scrollable List, must move the horizontal scroll region so that the leftmost edge of the List is visible.
`<End>` |  | In a scrollable List, must move the horizontal scroll region so that the rightmost edge of the List is visible.
`<Left arrow>` |  | In a scrollable List, must scroll the List one character to the left.
`<PageLeft>` or `<Ctrl>` `<PageUp>` |  | In a scrollable List, must scroll the List one page to the left.
`<Right arrow>` |  | In a scrollable List, must scroll the List one character to the right.
`<PageRight>` or `<Ctrl>` `<PageDown>` |  | In a scrollable List, must scroll the List one page to the right.
`<Help>` |  | Must provide any available help for the List.

### Related Information

For more information on List element selection, see the description of the selection models in Chapter 4, "Selection." For more information about the ScrollBars, see the reference page in Section 9.51, "ScrollBar."

## MainWindow

### Description

A MainWindow should be used to organize the contents of a primary window. A MainWindow must frame the client area and can optionally include ScrollBars, a MenuBar, a command area, and a message area.

### Illustration

Figure 9-17. A MainWindow

### Navigation

A MainWindow must follow the navigation model described in Chapter 3, "Navigation."

### Related Information

For more information about the components of the MainWindow, see the reference pages in Section 9.33, "MenuBar," Section 9.51, "ScrollBar," and Section 9.58, "Text."

## MenuBar

### Description

A MenuBar is a basic group that organizes the most common features of an application. The MenuBar must be a horizontal bar at the top edge of the application just below the title area of the window frame. The MenuBar contains a list of Menu topics in CascadeButtons with Pulldown Menus connected to them. A MenuBar must contain only CascadeButtons, because other buttons inhibit Menu browsing. Each Menu topic should have a single-letter mnemonic indicated by underlining.

The following Pulldown Menus provide general functions common to most applications. Remember that these Menu guidelines, like all the guidelines in this OSF/Motif Style Guide, apply only in a left-to-right language environment in an English-language locale. You need to make the appropriate changes for other locales.

File |  | The File Menu should contain components for performing actions on the files, such as opening, saving, closing, and printing. It should also contain components for performing actions on the application as a whole, such as quitting. If the Label File is not appropriate to the context of your application, you can choose a different, more appropriate Label. The File Menu should have a mnemonic of F.
Selected |  | The Selected Menu should contain components for performing actions on the objects represented by the current selection of the application, such as opening or printing a selected item. This Menu is often similar to the File Menu, except that it acts on the objects denoted by the current selection. For example, in a directory browser, Open in the File Menu could (using a DialogBox) prompt the user for the name of a directory to open for browsing, while Open in the Selected Menu opens the file whose icon is currently selected in the browser. The Selected Menu should not contain editing functions normally found in the Edit Menu. The Selected Menu should have a mnemonic of S.
Edit |  | The Edit Menu should contain components for performing actions on the current data of the application, such as an undo action or making global substitutions in a block of text. It should also include components for interacting with the system clipboard, such as cut, copy, and paste. The Edit Menu should have a mnemonic of E.
View |  | The View Menu should contain components for changing the user's view on the data. Components in the View Menu should not actually change the data. The exact contents of the View Menu are application specific but can include components that change the appearance of the data, the amount of data that is displayed, or the order in which the data is displayed. The View Menu should have a mnemonic of V.
Options |  | The Options Menu should contain components for a user to customize the application. The exact contents of the Options Menu are application specific. The Options Menu should have a mnemonic of O.
Help |  | The Help Menu should contain components that provide user help facilities. The components in the Help Menu usually bring up a DialogBox with help information. Every application should have a Help Menu. The Help Menu should have a mnemonic of H.

While we recommend that you include the common Menus in the MenuBar of your application, your choice of Menu titles and items depends on the nature of your application. If your application requires it, you should design more relevant titles and selections, but do not change the meanings of items used in the common Menus.

If any of the common Menus are present, they must be arranged in the following order with respect to each other, ranging from left to right across the MenuBar in a left-to-right language environment:

    File Menu
    Selected Menu
    Edit Menu
    View Menu
    Options Menu
    Help Menu

You can omit any of these Menus if they are not relevant to the application. You can also intersperse other, application-specific, Menus among these Menus. However, if a File Menu is present, it must be the first Menu and must be placed at the far left of the MenuBar. If a Help Menu is present, it must be the last Menu and must be placed at the far right of the MenuBar.

The recommended contents of the File, Edit, and Help Menus are described on their own reference pages. The contents of the View and Options Menus are application specific and are not specified here. Each of these common Menus can contain a TearOffButton.

### Illustration

Figure 9-18. A MenuBar

### Navigation

The MenuBar follows the navigation model described in Chapter 3, "Navigation."

### Other Operations

The following text describes the operations of this component:

`<Help>` |  | Must provide any available help for the current CascadeButton.

### Related Information

For information about the suggested contents of these Menus, see the reference pages in Section 9.17, "File Menu," Section 9.14, "Edit Menu," and Section 9.23, "Help Menu."

## Menus

### Description

Menus should be used to organize a collection of basic controls in a horizontal, vertical, or 2-dimensional layout within a separate Menu window. There are three types of Menus: Pulldown, Popup, and Option. A Menu is only available while it is posted.

### Illustration

Figure 9-19. A Menu

### Navigation

Menus follow the navigation model described in Chapter 3, "Navigation."

### Other Operations

The following text describes the operations of this component:

`<Help>` |  | Must provide any available help for the Menu.

### Related Information

For more information, see the reference pages in Section 9.6, "CascadeButton," Section 9.38, "OptionButton," and Section 9.33, "MenuBar."

## MessageDialogs

### Description

MessageDialogs should be used to convey a message to the user. They must not interrupt the user's interaction with the application. They should include a message and one of the following button arrangements:

    OK
    OK Help
    OK Cancel
    OK Cancel Help
    Yes No
    Yes No Help
    Yes No Cancel
    Yes No Cancel Help
    Cancel
    Cancel Help
    Retry Cancel
    Retry Cancel Help

There are a number of different types of MessageDialogs: ErrorDialog, InformationDialog, QuestionDialog, WorkingDialog, and WarningDialog.

### Related Information

For more information, see the reference pages in Section 9.12, "DialogBox," Section 9.15, "ErrorDialog," Section 9.27, "InformationDialog," Section 9.46, "QuestionDialog," Section 9.62, "WorkingDialog," and Section 9.60, "WarningDialog."

## Mnemonics

### Description

A mnemonic is a single character that can be associated with any component that contains a text label. The label must contain the character, and the character must be underlined within the label. The mnemonic should be the first character of the label. If a label does not naturally contain the character of the mnemonic, the mnemonic must be placed in parentheses following the label. Labels can also be sequentially numbered, and the number can serve as the mnemonic. Labels that are duplicated within an application should be given the same mnemonic. Mnemonics must be case insensitive for activation. Either an uppercase or lowercase letter can be underlined in the label.

When the location cursor is within a Menu, or a MenuBar, typing the mnemonic character of a component within that Menu or MenuBar must move the location cursor to the component and activate it. If a mnemonic is used for an OptionButton or for a CascadeButton in a MenuBar, pressing `<Alt>` and the mnemonic anywhere in the window or its Menus must move the cursor to the component with that mnemonic and must activate it.

Collections can also support mnemonics associated with its elements. Pressing a mnemonic key while the collection has the keyboard focus must be equivalent to moving the location cursor to the element and pressing `<Select>` or `<Space>`.

## Navigation

### Description

Using a mouse, navigation is a simple matter of moving the mouse pointer. Using the keyboard, the following component navigation actions must be available:

`<Tab>` or `<Ctrl>` `<Tab>` |  | `<Tab>` (if not used for internal navigation) and `<Ctrl> <Tab>` must move the location cursor forward through fields. If the next field is a control, `<Tab>` (if not used for internal navigation) and `<Ctrl> <Tab>` must move the location cursor to that control. If the next field is a group, `<Tab>` (if not used for internal navigation) and `<Ctrl> <Tab>` must move the location cursor to a traversable component within the group. If the field contains a button that currently shows default highlighting, the location cursor should be placed on that button; otherwise, the first control in the field (the top-leftmost one in a left-to-right language environment) should get focus. If the next field contains no traversable components, `<Tab>` (if not used for internal navigation) and `<Ctrl> <Tab>` must skip the field.
`<Shift>` `<Tab>` or `<Ctrl>` `<Shift>` `<Tab>` |  | `<Shift> <Tab>` (if not used for internal navigation) and `<Ctrl> <Shift> <Tab>` must move the location cursor backward through fields in the order opposite to that of `<Tab>` (if not used for internal navigation) and `<Ctrl> <Tab>`.
`<Down arrow>` |  | When used for component navigation within a field, in a left-to-right language environment, `<Down arrow>` must move the location cursor through all traversable controls in the field, starting at the upper left and ending at the lower right, then wrapping to the upper left. If the controls are aligned in a matrix-like arrangement, `<Down arrow>` must first traverse one column from top to bottom, then traverse the column to its right, and so on. In a right-to-left language environment, `<Down arrow>` must move the location cursor through all traversable controls, starting at the upper right and ending at the lower left. This key can also be used for internal purposes within a component.
`<Up arrow>` |  | When used for component navigation within a field, `<Up arrow>` must move the location cursor through all traversable components or elements in the order opposite to that of `<Down arrow>`. This key can also be used for internal purposes within a component.
`<Right arrow>` |  | When used for component navigation within a field, in a left-to-right language environment, `<Right arrow>` must move the location cursor through all traversable controls in the field, starting at the upper left and ending at the lower right, then wrapping to the upper left. If the controls are aligned in a matrix-like arrangement, `<Right arrow>` must first traverse one row from left to right, then traverse the row below it, and so on. In a right-to-left language environment, `<Right arrow>` must move the location cursor through all traversable controls, starting at the lower left and ending at the upper right. This key can also be used for internal purposes within a component.
`<Left arrow>` |  | When used for component navigation within a field, `<Left arrow>` must move the location cursor through all traversable components or elements in the order opposite to that of `<Right arrow>`. This key can also be used for internal purposes within a component.
`<Ctrl>` `<Down arrow>` |  | This key can be used for component navigation within a field, following the same rules as `<Down arrow>`.It can also be used for internal purposes within a component. When `<Down arrow>` causes a change that is based on some unit, `<Ctrl> <Down arrow>` can cause a change based on a larger unit.
`<Ctrl>` `<Up arrow>` |  | This key can be used for component navigation within a field, following the same rules as `<Up arrow>`.It can also be used for internal purposes within a component. When `<Up arrow>` causes a change that is based on some unit, `<Ctrl> <Up arrow>` can cause a change based on a larger unit.
`<Ctrl>` `<Right arrow>` |  | This key can be used for component navigation within a field, following the same rules as `<Right arrow>`.It can also be used for internal purposes within a component. When `<Right arrow>` causes a change that is based on some unit, `<Ctrl> <Right arrow>` can cause a change based on a larger unit.
`<Ctrl>` `<Left arrow>` |  | This key can be used for component navigation within a field, following the same rules as `<Left arrow>`.It can also be used for internal purposes within a component. When `<Left arrow>` causes a change that is based on some unit, `<Ctrl> <Left arrow>` can cause a change based on a larger unit.
`<Begin>` |  | If a control uses `<Right arrow>` and `<Left arrow>` for internal navigation, `<Begin>` must behave as follows: In a left-to-right language environment, this action must move the location cursor to the leftmost edge of the data or the leftmost element. In a right-to-left language environment, this action must move the location cursor to the rightmost edge of the data or the rightmost element. In a group that is a field, this key can move the location cursor to an appropriate control within the group.
`<End>` |  | If a control uses `<Right arrow>` and `<Left arrow>` for internal navigation, `<End>` must behave as follows: In a left-to-right language environment, this action must move the location cursor to the rightmost edge of the data or the rightmost element. In a right-to-left language environment, this action must move the location cursor to the leftmost edge of the data or the leftmost element. In a group that is a field, this key can move the location cursor to an appropriate control within the group.
`<Ctrl>` `<Begin>` |  | If a control uses `<Up arrow>` and `<Down arrow>` for internal navigation, `<Ctrl> <Begin>` must move the location cursor to one of the following: The first element The topmost edge of the data In a left-to-right language environment, the topmost left edge of the data; in a right-to-left language environment, the topmost right edge of the data In a group that is a field, this key can move the location cursor to an appropriate control within the group.
`<Ctrl>` `<End>` |  | If a control uses `<Up arrow>` and `<Down arrow>` for internal navigation, `<Ctrl> <End>` must move the location cursor to one of the following: The last element The bottommost edge of the data In a left-to-right language environment, the bottommost right edge of the data; in a right-to-left language environment, the bottommost left edge of the data In a group that is a field, this key can move the location cursor to an appropriate control within the group.
`<PageDown>` |  | In a vertically scrollable component, `<PageDown>` must scroll the visible region down by one page increment.
`<PageUp>` |  | In a vertically scrollable component, `<PageUp>` must scroll the visible region up by one page increment.
`<PageRight>` or `<Ctrl>` `<PageDown>` |  | In a horizontally scrollable component, `<PageRight>` or `<Ctrl> <PageDown>` must scroll the visible region to the right by one page increment.
`<PageLeft>` or `<Ctrl>` `<PageUp>` |  | In a horizontally scrollable component, `<PageLeft>` or `<Ctrl> <PageUp>` must scroll the visible region to the left by one page increment.
`<F10>` |  | If the MenuBar is inactive, `<F10>` must traverse to the MenuBar system. The location cursor must be placed on the first traversable CascadeButton in the MenuBar. If there are no traversable CascadeButtons in the MenuBar, `<F10>` must do nothing. If the MenuBar system is active, `<F10>` should unpost all Menus in the MenuBar system. If `<F10>` is used to unpost all Menus in the MenuBar system and if the focus policy is explicit, the location cursor must be moved back to the component that had it before the Menu system was posted. `<Shift> <Menu>` must replace `<F10>` if `<F10>` is not available.
`<Menu>` |  | If the keyboard focus is on an element with an inactive Popup Menu and the context of the element allows a Popup Menu to be displayed, `<Menu>` must post (activate) the Popup Menu. The location cursor must be placed on the default item of the Menu, or the first traversable item if there is no default item. Note that the availability of the Popup Menu can depend on the location of the cursor within the element, the contents of the element, or the selection state of the element. If there are no traversable items in the Popup Menu, it is up to the system and the application whether to post the Menu or not. If there is an active Popup Menu, `<Menu>` should unpost all Menus in the Popup Menu system. If `<Menu>` is used to unpost all Menus in the Popup Menu system and if the focus policy is explicit, the location cursor must be moved back to the component that had it before the Menu system was posted. `<Shift> <F10>` must replace `<Menu>` if `<Menu>` is not available.
`<Alt>` `<F6>` |  | Must move the focus to the next window in the window family.
`<Alt>` `<Shift>` `<F6>` |  | Can move the focus to the previous window in the window family.
`<Alt>` `<Tab>` |  | Must move the focus to the last window that had the input focus in the next window family in the window hierarchy.
`<Alt>` `<Shift>` `<Tab>` |  | Can move the focus to the previous window that had the input focus in the next window family in the window hierarchy.

### Related Information

See Chapter 3, "Navigation" for more information about internal window navigation. See Chapter 7, "Window Manager Design Principles" for more information about navigation among windows.

## OptionButton

### Description

An OptionButton should be used to post an Option Menu.

This component must be composed of a button, with either a text or graphics Label. Following the Label, this component should also include a bar graphic to distinguish it from a PushButton. The Label must be the last selection made from the OptionButton.

### Illustration

Figure 9-20. An OptionButton

### Navigation

An OptionButton must have no internal navigation.

### Other Operations

The following text describes the operations of this component:

BSelect Press |  | Must post the associated Option Menu.
BSelect Release |  | If the release is within the same OptionButton as the press: If the associated Option Menu was posted at the time of the press, it should be unposted. If the associated Option Menu was not posted at the time of the press, it must be posted. If the release is outside of the OptionButton, the associated Option Menu must be unposted.
`<Select>` or `<Space>` |  | Must post the associated Option Menu.
`<Cancel>` |  | Must unpost the last posted Menu in the Menu system without changing the value of the OptionButton.
`<Help>` |  | Must provide any available help for the OptionButton.

### Related Information

For more information, see the reference page in Section 9.34, "Menus."

## PanedWindow

### Description

A PanedWindow should be used to group components into Panes separated by Sashes and Separators for adjusting the relative size of each Pane. This component must be composed of any number of groups of components, called Panes, each separated by a Sash and a Separator. The Panes, Sashes, and Separators must be grouped linearly, either horizontally or vertically. A Sash must be composed of a handle on the Separator between two Panes for adjusting the position of the Separator, and therefore the size of the Panes next to it.

As a Sash is moved, the Pane in the direction of the Sash movement must get smaller and the other Pane must get larger by an equal amount. If a Pane is adjusted to its minimum size, adjustment should continue with the next Pane in the direction of the Sash movement.

### Illustration

Figure 9-21. A PanedWindow

### Navigation

This component must follow the navigation model described in Chapter 3, "Navigation."

### Related Information

For information about activating a Sash, see the reference page for Sash.

## Panel

### Description

A Panel group should be used to organize a collection of basic controls in a horizontal, vertical, or 2-dimensional layout. This component is usually composed of just one type of basic control. This component is composed of an area for organizing basic controls.

### Illustration

Figure 9-22. A Panel

### Navigation

The `<Down arrow>`,`<Left arrow>`,`<Right arrow>`,and `<Up arrow>` direction keys must navigate among components in the Panel according to the navigation model described in Chapter 3, "Navigation."

## Pointer Shapes

### Description

You should not create new mouse pointer shapes for functions that already have mouse pointer shapes associated with them, except for localization; however, you can create new mouse pointer shapes for functions not already associated with a pointer shape. You should not use a predefined shape to symbolize a function it was not designed to represent.

A list of the defined pointer shapes follows, along with their usage and hotspots. The hotspot of a pointer is the actual position on the pointer that tracks the movements of the mouse. As the pointer changes from one shape to another, the location of the hotspot must not move on the screen. The hotspot is the precise location on the pointer where mouse actions occur.

Figure 9-23. The upper-left pointing arrow

The upper-left pointing arrow pointer is a general-purpose pointer. It is used in most window areas for single-object selection and activation. The hotspot for the arrow pointer should be in the point of the arrow.

Figure 9-24. The I-beam pointer

You can optionally use an I-beam pointer in any Text component. It is used to change the location of the text insertion cursor and to perform actions on text. If the I-beam is used, it can be hidden during the time between any keyboard action and a mouse movement. This helps the user distinguish the I-beam pointer from the text insertion cursor, which can also be an I-beam. The hotspot for the I-beam pointer should be on the vertical bar of the I-beam about one-third up from the bottom.

Figure 9-25. The X pointer

The X pointer can indicate when the pointer is outside of any application area. The hotspot for the X pointer should be where the lines intersect.

Figure 9-26. The resize pointers

The resize pointers indicate positions for area resize, and they remain during a resize operation. The direction of the arrow in the pointer indicates the direction of increasing size. The horizontal and vertical pointers indicate resize in either the horizontal or vertical direction. The diagonal pointers indicate resize in both the horizontal and vertical directions simultaneously. The hotspot for the resizing pointers should be on the elbow or the line at the position pointed to by the arrow.

Figure 9-27. The hourglass pointer

The hourglass pointer, a working pointer, indicates that an action is in progress in the area, and that the pointer has no effect in the area. While the hourglass pointer is active, all mouse button and keyboard events are ignored in the area. The hotspot for the hourglass pointer should be located at the center of the hourglass, although it should not be used for activation. The hourglass pointer can be used interchangeably with the watch pointer.

Figure 9-28. The watch pointer

The watch pointer, a working pointer, indicates that an action is in progress in the area, and that the pointer has no effect in the area. While the watch pointer is active, all mouse button and keyboard events are ignored in the area. The hotspot for the watch pointer should be located at the top of the watch, although it should not be used for activation. The watch pointer can be used interchangeably with the hourglass pointer.

Figure 9-29. The 4-directional arrow pointer

The 4-directional arrow pointer indicates a move operation is in progress, or a resize operation before the resize direction has been determined. During a move operation, the object, or an outline of the object should move to track the location of the pointer. During a resize operation, the pointer is used to indicate a direction for resizing. The 4-directional arrow pointer should change to the appropriate resize arrow when the resize direction is determined, either by crossing an object boundary with the pointer or by pressing a keyboard direction key. The hotspot for the 4-directional arrow pointer should be at the spot where the arrows intersect.

Figure 9-30. The sighting ponter

The sighting pointer is used to make fine position selections. For example, in a drawing program it can be used to indicate a pixel to fill or the connecting points of lines. The hotspot for the sighting pointer should be at the spot where the lines intersect.

Figure 9-31. The caution pointer

The caution pointer is used to indicate that action is expected in another area before input can be given to the current area, and that the pointer has no effect in the area. While the caution pointer is active, all mouse button and keyboard events are ignored in the area. The hotspot for the caution pointer should be located at the center of the caution symbol, although it should not be used for activation.

Figure 9-32. The question pointer

The question pointer is used to request an input position or component from the user. This is often used to input an object for interactive help. The user requests interactive help, then the question pointer is displayed to allow the user to indicate what position or component help is requested for. The hotspot for the question pointer should be at the bottom of the question mark.

Figure 9-33. The upper-right arrow pointer

You can optionally use an arrow pointing to the upper-right corner to indicate a pending Menu action. This shape indicates that a Menu is popped up or pulled down and waiting for a Menu item to be activated or the Menu to be removed. The hotspot for this arrow pointer should be in the point of the arrow.

### Related Information

See Chapter 2, "Input Models" for information on the input device model and designing new pointer shapes.

## Popup Menus

### Description

The common Popup Menu contents are described as follows. Note that you should only include those functions actually supported by your application. The illustration on this reference page shows a Popup Menu.

Properties |  | Must display a properties DialogBox that the user can use to set the properties of the component. If the Menu is popped up over a selection, it can display the properties of the selection. If the Menu is popped up over an unselected item, it can display the properties of that item. If the Menu is popped up over the background, it should display the properties of the collection, except over a part of the background considered to be in the selection. This action should have the mnemonic S.
Undo Alt+Backspace |  | Must reverse the most recently executed action. To provide a visual cue to the user, the Undo selection title should be dynamically modified to indicate what is being undone. For example, if the most recently executed action was a paste, the action name would be Undo paste. This action should have the mnemonic U. This action should have the same accelerator as the corresponding entry in the Edit Menu.
Primary Move Alt+Shift+Delete |  | Must move the contents of the primary selection to the component. This action must only be used in an editable component. If the action uses an accelerator, it should be `<Alt> <Shift> <Delete>`,`<Alt> <Ctrl> <X>`,or both. In addition, if the keyboard has a `<Cut>` key, this action should support `<Alt> <Cut>` as an accelerator. If more than one format can be moved from the primary selection, Primary Copy can cascade a Menu of possible transfer formats, in which case it should not have an accelerator.
Primary Copy Alt+Ctrl+Insert |  | Must copy the contents of the primary selection to the component. This action must only be used in an editable component. If the action uses an accelerator, it should be `<Alt> <Ctrl> <Insert>`,`<Alt> <Ctrl> <C>`,or both. In addition, if the keyboard has a `<Copy>` key, this action should support `<Alt> <Copy>` as an accelerator. If more than one format can be copied from the primary selection, Primary Copy can cascade a Menu of possible transfer formats, in which case it should not have an accelerator.
Primary Link |  | Must place a link to the primary selection in the component. This action must only be used in an editable component. If the link can be viewed in more than one way, Primary Link can cascade a Menu of possible viewing representations.
Cut |  | Must cut elements to the clipboard and can mark them for use in a subsequent Paste Link operation. If the Menu is popped up in a selection, the entire selection must be cut. If the Menu is popped up over an unselected element, just that element should be cut. If the Menu is popped up in the background, the entire collection can be cut. This action should have the mnemonic T.
Copy |  | Must copy elements to the clipboard and can mark them for use in a subsequent Paste Link operation. If the Menu is popped up in a selection, the entire selection must be copied. If the Menu is popped up over an unselected element, just that element should be copied. If the Menu is popped up in the background, the entire collection can be copied. This action should have the mnemonic C.
Copy Link |  | Must copy a link of elements to the clipboard and can mark them for use in a subsequent Paste Link operation. If the Menu is popped up in a selection, a link to the entire selection must be copied. If the Menu is popped up over an unselected element, a link to just that element should be copied. If the Menu is popped up in the background, a link to the entire collection can be copied. This action should have the mnemonic K.
Paste Shift+Insert |  | Must paste the contents of the clipboard to the component. This action must only be used in an editable component. This action should have the mnemonic P. This action should have the same accelerator as the corresponding entry in the Edit Menu.
Paste Link |  | Must paste a link of the contents of the clipboard to the component. This action must only be used in an editable component. This action should have the mnemonic L.
Clear |  | Must remove a selected portion of data from the client area without copying it to the clipboard. If the Menu is popped up in a selection, it must delete the selection. If the Menu is popped up over an unselected element, it should delete that element. If the Menu is popped up over the background, except over a part of the background considered to be in the selection, it can delete all the elements. The remaining data is not compressed to fill the space that was occupied by the cleared data. This action should have the mnemonic E.
Delete |  | Must remove a selected portion of data from the client area without copying it to the clipboard. If the Menu is popped up in a selection, it must delete the selection. If the Menu is popped up over an unselected element, it should delete that element. If the Menu is popped up over the background, except over a part of the background considered to be in the selection, it can delete all the elements. This action should have the mnemonic D.
Select All Ctrl+/ |  | Must make the primary selection consist of all the elements in the collection with the Popup Menu. If the action uses an accelerator, it should be `<Ctrl> </>`.
Deselect All Ctrl+\ |  | Must deselect the current selection in the collection with the Popup Menu. If the action uses an accelerator, it should be `<Ctrl> <\>`.
Select Pasted |  | Must make the primary selection consist of the last element or elements pasted into the collection with the Popup Menu.
Reselect Alt+Insert |  | Must make the primary selection consist of the last selected element or elements in the component with the Popup Menu. The action must be available only in components that do not support persistent selections and only when the current selection is empty. If the action uses an accelerator, it should be `<Alt> <Insert>`.
Promote Alt+Insert |  | Must promote the current selection to the primary selection. This action must only be available in components that support persistent selections. If the action uses an accelerator, it should be `<Alt> <Insert>`.

Appropriate words, such as Selection or words denoting the type of a single element of the collection as a whole, should be added to a Label to specify which elements are affected. For example, if a Popup Menu contains the entry Copy Selection, the current selection is copied to the clipboard regardless of where in the collection the Menu is popped up.

A Popup Menu item should only have an accelerator if the result of typing the accelerator would be equivalent to popping up the Menu by typing `<Menu>`,and then selecting the Menu item. If Cut Selection is included in a Popup Menu, it should use the same accelerators as Cut in the Edit Menu. If Copy Selection is included in a Popup Menu, it should use the same accelerators as Copy in the Edit Menu.

### Illustration

Figure 9-34. A Popup Menu

### Related Information

See Chapter 6, "Application Design Principles" for more information on Popup Menus and for general information about Menu design.

## Primary Selection

### Description

Each collection maintains its own selection. A selection need not contain any elements, in which case it is said to be an empty selection. At any time, there is one selection called the primary selection, which is the last selection explicitly started by the user.

Clicking BSelect or `<Ctrl>` BSelect only moves the primary selection to a collection when it results in making a selection that is not empty. When `<Shift>` BSelect is clicked, an implementation can move the primary selection to the component even if the resulting selection is empty. Dragging BSelect, `<Shift>` BSelect, or `<Ctrl>` BSelect must move the primary selection to the component if a button release during the pointer motion could have potentially selected any element.

A selection is said to be persistent if it is highlighted even when it is not the primary selection.

Persistent |  | There are two variants of persistent selections: persistent always, in which the current selection is always highlighted, and persistent on focus, in which the current selection is only highlighted when it is the primary selection or when the collection has the keyboard focus. In either case, stronger highlighting should be used when the current selection is also the primary selection. When focus is in the collection, `<Alt> <Insert>` can be used to promote the current selection to the primary selection.
Nonpersistent |  | The collection only highlights a primary selection. When the primary selection is lost to another collection, the current selection is set to empty. When focus is in the collection, and it does not have the primary selection, `<Alt> <Insert>` can be used to restore the previous selection and make it the primary selection.

Collections that are never editable (such as noneditable Lists) should always use persistent selections. Collections that are editable can either use persistent or nonpersistent selections.

Primary transfer can be invoked by clicking BTransfer or through standard keyboard bindings. There are three primary transfer operations:

Primary Copy |  | In an editable collection, BTransfer Click, `<Ctrl>` BTransfer Click, `<Alt> <Copy>`,and `<Alt> <Ctrl> <Insert>` must copy the primary selection to the insertion position, as defined in Section 4.3, "Transfer Models." (Note that the insertion position is usually different for mouse and keyboard operations.)
Primary Move |  | In an editable collection, `<Shift>` BTransfer Click, `<Alt> <Cut>`,and `<Alt> <Shift> <Delete>` must move the primary selection to the insertion position, as defined in Section 4.3, "Transfer Models." (Note that the insertion position is usually different for mouse and keyboard operations.)
Primary Link |  | In an editable collection, `<Ctrl> <Shift>` BTransfer Click must place a link to the primary selection at the insertion position, as defined in Section 4.3, "Transfer Models."

### Related Information

See Section 4.2, "Selection Actions" and Section 4.3, "Transfer Models" for more information about the primary selection.

## PromptDialog

### Description

A PrompDialog should be used to prompt the user for input. It can interrupt the user's interaction with the application. It should include a message, a text input area, and one of the following button arrangements:

    OK Cancel
    OK Cancel Help
    OK Apply Cancel
    OK Apply Cancel Help
    OK Apply Reset Cancel
    OK Apply Reset Cancel Help

### Illustration

Figure 9-35. A PromptDialog

### Related Information

For more information, see the reference page in Section 9.12, "DialogBox."

## PushButton

### Description

A PushButton should be used to start an operation. A PushButton must contain either a text or graphic Label that indicates the operation of the button.

### Illustration

Figure 9-36. A PushButton

### Navigation

A PushButton must have no internal navigation.

### Other Operations

The following text describes the operations of this component:

BSelect Press |  | Must arm the PushButton.
BSelect Release |  | If the release is within the same PushButton as the press, BSelect Release must disarm the PushButton and activate it. If the release is outside of the PushButton, BSelect Release must disarm the PushButton without activating it.
`<Enter>` or `<Return>` |  | If the PushButton is in a window with a default action, the PushButton must be activated. If the PushButton is in a Menu, this action must activate the PushButton and unpost the Menu.
`<Select>` or `<Space>` |  | Must activate the PushButton. If the PushButton is in a Menu, the Menu must be unposted.
`<Help>` |  | Must provide any available help for the PushButton.

## QuestionDialog

### Description

A QuestionDialog should be used to get a user response to a question. It should interrupt the user's interaction with the application. It should include a question symbol, a message, and one of the following button arrangements:

    Yes No
    Yes No Help

It is possible that both the Yes and No actions of a Question DialogBox will perform an action. If this is the case, the Question DialogBox should use one of the following button arrangements:

    Yes No Cancel
    Yes No Cancel Help

### Illustration

Figure 9-37. A QuestionDialog

### Related Information

For more information, see the reference page in Section 9.12, "DialogBox."

## Quick Transfer

### Description

Quick transfer is used to make a temporary (or secondary) selection and then immediately copy, move, or link that selection to the insertion position of the destination component. Quick transfer is implemented using `<Alt>` BTransfer Motion, with the standard modifiers used to force the various transfer operations.

Text components must support quick transfer.

There are three quick transfer operations:

Quick Copy |  | If a component supports quick transfer, `<Alt>` BTransfer Motion or `<Alt> <Ctrl>` BTransfer Motion must temporarily select elements in the specified range and, on release, must copy them to the insertion position of the destination component.
Quick Cut |  | If a component supports quick transfer, `<Alt> <Shift>` BTransfer Motion must temporarily select elements in the specified range and, on release, must move them to the insertion position of the destination component.
Quick Link |  | If a component supports quick transfer, `<Alt> <Ctrl> <Shift>` BTransfer Motion must temporarily select elements in the specified range and, on release, must place a link to them at the insertion position of the destination component.

The range of the temporary selection must be determined by using exactly the same model used when BSelect Motion determines the range of a primary selection.

### Related Information

Section 4.3, "Transfer Models" for more information about quick transfer.

## RadioButton

### Description

A RadioButton should be used to select one option from a number of options. A RadioButton is a special case of a ToggleButton. Only one RadioButton can be set at a time. This component must be composed of a text or graphic label, and a graphic that indicates the state of the RadioButton. The graphic indicator for a RadioButton is usually a filled diamond or circle to indicate the on state or an empty diamond or circle to indicate the off state. On color systems, the on state color can be distinct from general application colors to visually distinguish the on state.

### Illustration

Figure 9-38. A RadioButton

### Navigation

RadioButtons must have no internal navigation.

### Other Operations

The following text describes the operations of this component:

BSelect Press |  | Must arm the RadioButton. If the RadioButton was previously unset, it must show the RadioButton in the set state.
BSelect Release |  | If the release happens in the same RadioButton that the press occurred in and if the RadioButton was previously unset, it must be set, and any other RadioButton in the same Panel that was previously set must be unset. The RadioButton must be disarmed, and, if the RadioButton is in a Menu, the Menu must be unposted.
BSelect Release 2 |  | If the RadioButton was previously unset, it should be set, and any other RadioButton in the same Panel that was previously set should be unset. If the RadioButton is in a window, the default action of the window should be activated.
`<Enter>` or `<Return>` |  | If the RadioButton is in a window with a default action, the default action must be activated. If the RadioButton is in a Menu: If the RadioButton was previously unset, it must be set, and any other RadioButton in the same Panel that was previously set must be unset. The RadioButton must be disarmed, and the Menu must be unposted.
`<Select>` or `<Space>` |  | If the RadioButton was previously unset, it must be set, and any other RadioButton in the same Panel that was previously set must be unset. The RadioButton must be disarmed, and, if the RadioButton is in a Menu, the Menu must be unposted.
`<Help>` |  | Must provide any available help for the RadioButton.

### Related Information

For more information, see the reference pages in Section 9.7, "CheckButton" and Section 9.59, "ToggleButton."

## Sash

### Description

A Sash should be used to adjust the border between groups of components in a PanedWindow. A Sash must be composed of a handle on the Separator between two Panes for adjusting the position of the Separator, and therefore the size of the Panes next to it.

As a Sash is moved, the Pane in the direction of the Sash movement must get smaller and the other Pane must get larger by an equal amount. If a Pane is adjusted to its minimum size, adjustment should continue with the next Pane in the direction of the Sash movement. The PanedWindow can optionally support movement of the Pane in the initial direction of mouse movement with the modifier `<Shift>` on button events, rather than resizing the Pane.

### Illustration

Figure 9-39. A Sash

### Navigation

A Sash must have no internal navigation.

### Other Operations

The following text describes the operations of this component:

BSelect or BTransfer Motion |  | Must cause the Sash to track the movement of the pointer. In a vertically oriented PanedWindow, the Sash must track the vertical position of the pointer. In a horizontally oriented PanedWindow, the Sash must track the horizontal position of the pointer.
BSelect or BTransfer Motion |  | Can cause the Pane in the initial direction of movement to track the movement of the pointer. In a vertically oriented PanedWindow, the Pane must track the vertical position of the pointer. In a horizontally oriented PanedWindow, the Pane must track the horizontal position of the pointer.
`<Up arrow>` and `<Down arrow>` |  | For a Sash that can move vertically, must cause the Sash to move in the specified direction one increment.
`<Right arrow>` and `<Left arrow>` |  | For a Sash that can move horizontally, must cause the Sash to move in the specified direction one increment.
`<Shift>` `<Up arrow>` and `<Shift>` `<Down arrow>` |  | For a Sash that can move vertically, can cause the Pane in the initial direction to move one increment in the specified direction.
`<Shift>` `<Right arrow>` and `<Shift>` `<Left arrow>` |  | For a Sash that can move horizontally, can cause the Pane in the initial direction to move one increment in the specified direction.
`<Ctrl>` `<Up arrow>` and `<Ctrl>` `<Down arrow>` |  | For a Sash that can move vertically, must cause the Sash to move in the specified direction one large increment.
`<Ctrl>` `<Right arrow>` and `<Ctrl>` `<Left arrow>` |  | For a Sash that can move horizontally, must cause the Sash to move in the specified direction one large increment.
`<Ctrl>` `<Shift>` `<Up arrow>` and `<Ctrl>` `<Shift>` `<Down arrow>` |  | For a Sash that can move vertically, can cause the Pane in the initial direction to move one large increment in the specified direction.
`<Ctrl>` `<Shift>` `<Right arrow>` and `<Ctrl>` `<Shift>` `<Left arrow>` |  | For a Sash that can move horizontally, can cause the Pane in the initial direction to move one large increment in the specified direction.
`<Help>` |  | Must provide any available help for the Sash.

### Related Information

For more information, see the reference page in Section 9.39, "PanedWindow."

## Scale

### Description

A Scale should be used to select a value from a range. This component should be composed of a slider, moving within an element that indicates the size of the range, called the trough, and a Label that indicates the current value. The position of the slider indicates the value relative to the range. A Scale can also have buttons with arrow graphics for moving the slider.

### Illustration

Figure 9-40. A Scale

### Other Operations

The following text describes the operations of this component:

BSelect Press |  | In an arrow button, this action must move the slider one increment in the direction of the side of the slider on which the button was pressed, and autorepeat until the button is released. In the trough, if the Scale has tick marks, BSelect Press must move the slider one major tick mark in the direction of the side of the slider on which the trough was pressed, and autorepeat until the button is released. It can stop when the slider reaches the position of the pointer. If the Scale does not have tick marks, BSelect Press in the trough must move the slider one large increment in the direction of the side of the slider on which the trough was pressed, and autorepeat until the button is released. It can stop when the slider reaches the position of the pointer.
BSelect Motion |  | If the button is pressed in the slider, must cause the slider to track the position of the pointer. In a vertical Scale, the slider must track the vertical position of the pointer. In a horizontal Scale, the slider must track the horizontal position of the pointer.
`<Ctrl>` BSelect Press |  | In the slider trough or an arrow button, this action should move the slider to the end of the Scale on which the button was pressed.
BTransfer Press |  | In the trough, this action should directly position the slider to the position of the button press.
BTransfer Motion |  | If the button is pressed in the slider or the trough, must directly position the slider to the point of the button press and then cause the slider to track the position of the pointer. In a vertical Scale, the slider must track the vertical position of the pointer. In a horizontal Scale, the slider must track the horizontal position of the pointer.
`<Cancel>` |  | If a mouse-based sliding action is in progress, `<Cancel>` must cancel the sliding action and return the slider to its position prior to the start of the sliding operation.
`<Down arrow>` |  | For vertical Scales, this action must move the slider one increment down.
`<Up arrow>` |  | For vertical Scales, this action must move the slider one increment up.
`<Left arrow>` |  | For horizontal Scales, this action must move the slider one increment left.
`<Right arrow>` |  | For horizontal Scales, this action must move the slider one increment right.
`<Ctrl>` `<Down arrow>` |  | For vertical Scales, this action must move the slider one large increment down.
`<Ctrl>` `<Up arrow>` |  | For vertical Scales, this action must move the slider one large increment up.
`<Ctrl>` `<Left arrow>` |  | For horizontal Scales, this action must move the slider one large increment left.
`<Ctrl>` `<Right arrow>` |  | For horizontal Scales, this action must move the slider one large increment right.
`<Begin>` or `<Ctrl>` `<Begin>` |  | Must move the slider to the minimum value.
`<End>` or `<Ctrl>` `<End>` |  | Must move the slider to the maximum value.
`<Help>` |  | Must provide any available help for the Scale.

## ScrollBar

### Description

A ScrollBar should be used to scroll the visible area of another component. A ScrollBar should be composed of a slider, moving within an element that indicates the full size of the scrolled component, and two buttons with arrow graphics for moving the slider. The slider indicates the relative position and size of the visible area of the scrolled component.

### Illustration

Figure 9-41. A ScrollBar

### Other Operations

The following text describes the operations of this component:

BSelect Press |  | In an arrow button, this action must move the slider one increment in the direction of the side of the slider on which the button was pressed, and autorepeat until the button is released. In the trough, this action must move the slider one page in the direction of the side of the slider on which the trough was pressed, and autorepeat until the button is released. It can stop when the slider reaches the position of the pointer.
BSelect Motion |  | If the button is pressed in the slider, must cause the slider to track the position of the pointer. In a vertical ScrollBar, the slider must track the vertical position of the pointer. In a horizontal ScrollBar, the slider must track the horizontal position of the pointer.
`<Ctrl>` BSelect Press |  | In the slider trough or an arrow button, this action should move the slider to the end of the ScrollBar on which the button was pressed.
`<Shift>` BSelect Press |  | Can scroll the view so that the cursor within that view is positioned at the edge of the view region on the side of the ScrollBar on which the button was pressed.
BTransfer Press |  | In the trough, this action can directly position the slider to the position of the button press.
BTransfer Motion |  | If the button is pressed in the slider or the trough, must directly position the slider to the point of the button press and then cause the slider to track the position of the pointer. In a vertical ScrollBar, the slider must track the vertical position of the pointer. In a horizontal ScrollBar, the slider must track the horizontal position of the pointer.
`<Cancel>` |  | If a mouse-based scrolling action is in progress, `<Cancel>` must cancel the scrolling action and return the slider to its position prior to the start of the scrolling operation.
`<Down arrow>` |  | For vertical ScrollBars, this action must move the slider one increment down.
`<Up arrow>` |  | For vertical ScrollBars, this action must move the slider one increment up.
`<Left arrow>` |  | For horizontal ScrollBars, this action must move the slider one increment left.
`<Right arrow>` |  | For horizontal ScrollBars, this action must move the slider one increment right.
`<Ctrl>` `<Down arrow>` |  | For vertical ScrollBars, this action must move the slider one large increment down.
`<Ctrl>` `<Up arrow>` |  | For vertical ScrollBars, this action must move the slider one large increment up.
`<Ctrl>` `<Left arrow>` |  | For horizontal ScrollBars, this action must move the slider one large increment left.
`<Ctrl>` `<Right arrow>` |  | For horizontal ScrollBars, this action must move the slider one large increment right.
`<PageDown>` |  | For vertical ScrollBars, this action must move the slider one page down.
`<PageUp>` |  | For vertical ScrollBars, this action must move the slider one page up.
`<PageLeft>` or `<Ctrl>` `<PageUp>` |  | For horizontal ScrollBars, this action must move the slider one page left.
`<PageRight>` or `<Ctrl>` `<PageDown>` |  | For horizontal ScrollBars, this action must move the slider one page right.
`<Begin>` or `<Ctrl>` `<Begin>` |  | Must move the slider to the minimum value.
`<End>` or `<Ctrl>` `<End>` |  | Must move the slider to the maximum value.
`<Help>` |  | Must provide any available help for the ScrollBar.

## ScrolledWindow

### Description

A ScrolledWindow should be used to frame other components and to provide ScrollBars as necessary to scroll the visible area of the framed components. When the area framed by the ScrolledWindow is completely displayed, the ScrollBars need not be displayed. When the area provided in the ScrolledWindow is too small to display the entire component area, the ScrollBars must be displayed and must then allow scrolling of the visible area.

### Illustration

Figure 9-42. A ScrolledWindow

### Navigation

A ScrolledWindow must follow the navigation model that is described in Chapter 3, "Navigation."

### Related Information

For information about the activation of the ScrollBars, see the reference page for ScrollBar. For more information about navigation within general scrollable components, see Section 3.4, "Scrollable Component Navigation."

## Selection

### Description

The selection model determines how elements are selected from a group of elements. OSF/Motif compliant systems must support the five different selection models. The five selection models are as follows:

Single Selection |  | Used to select a single element in a collection. Clicking BSelect on a deselected element selects it and deselects the previously selected element in the collection. Single selection is described in Section 4.1.1, "Mouse-Based Single Selection."
Browse Selection |  | Used to allow browsing through single selection collections. Browse selection is also used to select a single element of a collection. Browse selection works just like single selection, but additionally allows the user to browse through the elements by dragging BSelect through the elements in the collection. Browse select highlights each element as it is traversed, and gives the application an opportunity to provide information about each element as it is highlighted. Releasing BSelect on an element selects it and deselects the previously selected element. Browse selection is described in Section 4.1.2, "Mouse-Based Browse Selection."
Multiple Selection |  | Used to select or deselect multiple elements of a collection. Clicking BSelect on an unselected element adds that element to the current selection. Clicking BSelect on a selected element removes that element from the current selection. Multiple selection is described in Section 4.1.3, "Mouse-Based Multiple Selection."
Range Selection |  | Used to select a contiguous range of elements in a collection. Clicking BSelect on an element selects the single element and deselects any previous selection. BSelect Motion over a range of elements selects all the elements within the range and deselects any previous selection. Range selection is described in Section 4.1.4, "Mouse-Based Range Selection."
Discontiguous Selection |  | Used for selecting multiple discontiguous ranges of elements in a collection. Clicking or dragging BSelect operates the same as for range selection. Discontiguous selection also allows `<Ctrl>` BSelect to be used to add new selection ranges to or remove selection ranges from the selection. Discontiguous selection is described in Section 4.1.5, "Mouse-Based Discontiguous Selection."

### Related Information

See Chapter 4, "Selection" for more information about the selection models.

## SelectionBox

### Description

A SelectionBox is a special-purpose composite component for making selections from a list of choices. The SelectionBox must be composed of at least a Text component for the selected alternative and a List component above the Text component for presenting the alternatives. Both the List and Text components should have a Label above them. The List component can be scrollable. The SelectionBox should also include one of the following button arrangements:

    OK Cancel Help
    OK Cancel Apply Help

The List must use either the single or browse selection model. Selecting an element from the list must place the selected element in the Text component. Entering an item name into the Text component should make that element visible in the List component. The List navigation actions `<Up arrow>`,`<Down arrow>`,`<Ctrl> <Begin>`,and `<Ctrl> <End>` must be available from the Text component for moving the cursored element within the List and thus changing the contents of the Text. The List navigation actions `<PageUp>` and `<PageDown>` should also be available from the Text component for moving the cursored element within the List.

### Illustration

Figure 9-43. A SelectionBox

### Related Information

For more information, see the reference page in Section 9.55, "SelectionDialog."

## SelectionDialog

### Description

A SelectionDialog should be used to allow a user to make a selection from a list of choices. It can interrupt the user's interaction with the application. It should contain a SelectionBox.

### Illustration

Figure 9-44. A SelectionDialog

### Related Information

For more information, see the reference page in Section 9.12, "DialogBox."

## Separator

### Description

A Separator should be used to separate elements of the application. It should be composed of a vertical or horizontal line.

### Illustration

Figure 9-45. A Separator

### Navigation

A Separator must have no internal navigation.

## TearOffButton

### Description

A TearOffButton should be used to tear off a Menu to create a dialog representation of the Menu contents. A TearOffButton tears off a Menu in place when activated, or it is dragged to tear off and move in one action. This component must be composed of a button with a graphic that indicates the tear-off action. The graphic should be a dashed line representing perforations.

### Illustration

Figure 9-46. A TearOffButton

### Navigation

A TearOffButton must have no internal navigation.

### Other Operations

The following text describes the operations of this component:

BSelect Press |  | Must arm the TearOffButton.
BSelect Release |  | If the release is within the same TearOffButton as the press, BSelect Release must disarm the TearOffButton and activate it. If the release is outside of the TearOffButton, BSelect Release must disarm the TearOffButton without activating it.
BTransfer Press |  | Must activate the TearOffButton and cause the newly torn off Menu or its representation to start to track the position of the pointer.
BTransfer Motion |  | Must cause the newly torn off Menu or its representation to track the position of the pointer.
BTransfer Release |  | Must cause the newly torn off Menu or its representation to stop tracking the position of the pointer and become a torn off Menu.
`<Enter>` or `<Return>` |  | Must activate the TearOffButton.
`<Select>` or `<Space>` |  | Must activate the TearOffButton.
`<Help>` |  | Must provide any available help for the TearOffButton.

### Related Information

See Chapter 6, "Application Design Principles" for more information on TearOff Menus and for general information about Menu design.

## Text

### Description

A Text component should be used to display and enter text. A Text component must be composed of an area for displaying and entering text. The text can be either a single line or multiple lines. Text must support the range selection model as described in Chapter 4, "Selection" and can support the discontiguous selection model.

### Illustration

Figure 9-47. Text

### Navigation

The following text describes the navigation actions of this component:

`<Up arrow>` |  | In multiline Text components, `<Up arrow>` must move the location cursor up one line. In single-line Text components, `<Up arrow>` must navigate upward to the previous component if the Text component is designed to act like a basic control.
`<Down arrow>` |  | In multiline Text components, `<Down arrow>` must move the location cursor down one line. In single-line Text components, `<Down arrow>` must navigate downward to the next component if the Text component is designed to act like a basic control.
`<Left arrow>` |  | Must move the location cursor left one character.
`<Right arrow>` |  | Must move the location cursor right one character.
`<PageUp>` |  | In multiline Text components, `<PageUp>` must move the location cursor up one page.
`<PageDown>` |  | In multiline Text components, `<PageDown>` must move the location cursor down one page.
`<PageLeft>` or `<Ctrl>` `<PageUp>` |  | Must move the location cursor left one page.
`<PageRight>` or `<Ctrl>` `<PageDown>` |  | Must move the location cursor right one page.
`<Ctrl>` `<Right arrow>` |  | In a Text component used generally to hold multiple words, must move the location cursor to the right by a word. That is, `<Ctrl> <Right arrow>` must place the location cursor before the first character that is not a space, tab, or newline character after the next space, tab, or newline character. In short single-line Text controls, `<Ctrl> <Right arrow>` can navigate rightward to the next component if the Text is designed to act like a basic control.
`<Ctrl>` `<Left arrow>` |  | In a Text component used generally to hold multiple words, must move the location cursor to the left by a word. That is, `<Ctrl> <Left arrow>` must place the location cursor after the first space, tab, or newline character preceding the first previous character that is not a space, tab, or newline. In short single-line Text controls, `<Ctrl> <Left arrow>` can navigate leftward to the next component if the Text is designed to act like a basic control.
`<Ctrl>` `<Down arrow>` |  | In multiline Text components, `<Ctrl> <Down arrow>` can optionally move the location cursor to the beginning of the next paragraph.
`<Ctrl>` `<Up arrow>` |  | In multiline Text components, `<Ctrl> <Up arrow>` can optionally move the location cursor to the beginning of the previous paragraph.
`<Begin>` |  | In a Text component used generally to hold multiple words, must move the location cursor to the beginning of the line.
`<End>` |  | In a Text component used generally to hold multiple words, must move the location cursor to the end of the line.
`<Ctrl>` `<Begin>` |  | In multiline Text components, `<Ctrl> <Begin>` must move the location cursor to the beginning of the file.
`<Ctrl>` `<End>` |  | In multiline Text components, `<Ctrl> <End>` must move the location cursor to the end of the file.

### Other Operations

The following text describes the operations of this component:

`<Space>` or `<Shift>` `<Space>` |  | Must insert a space. Modifying these with `<Ctrl>` must evoke its normal selection function.
`<Return>` |  | In multiline Text components, `<Return>` must insert a carriage return.
`<Ctrl>` `<Return>` and `<Enter>` |  | Must invoke the default action.
`<Tab>` and `<Shift>` `<Tab>` |  | In multiline Text, `<Tab>` must be used for tabbing (either inserting a tab or moving to the next tab stop). In single-line Text, `<Tab>` must be used either for tabbing or to move to the next field. If `<Tab>` is used for tabbing and the location cursor is at the end of the text, `<Tab>` can optionally move to the next field. `<Shift> <Tab>` must be used to move to the previous field if `<Tab>` is used to move to the next field. Otherwise, `<Shift> <Tab>` should be used for tabbing backward. If `<Shift> <Tab>` is used for tabbing backward and the location cursor is at the beginning of the text, `<Shift> <Tab>` can optionally move to the previous field. Modifying `<Tab>` or `<Shift> <Tab>` with `<Ctrl>` must evoke the same field navigation function as `<Tab>` or `<Shift> <Tab>`.
`<BackSpace>` |  | When the selection is empty or when the component is in add mode with the cursor disjoint from the selection, `<BackSpace>` must delete one character backward. Otherwise, `<BackSpace>` must delete the selection.
`<Delete>` |  | When the selection is empty or when the component is in add mode with the cursor disjoint from the selection, `<Delete>` must delete one character forward. Otherwise, `<Delete>` must delete the selection.
`<Ctrl>` `<Delete>` |  | When the selection is empty or when the component is in add mode with the cursor disjoint from the selection, `<Ctrl> <Delete>` can delete the character following the location cursor to the end of the line. Otherwise, `<Ctrl> <Delete>` can delete the selection.
`<Insert>` |  | If the Text component supports replace mode, must toggle between insert mode and replace mode. By default, Text components must start in insert mode, where the location cursor is between two characters. In insert mode, typing a character must insert the character at the position of the location cursor. Text components can also implement replace mode, where the location cursor is on a character. In replace mode, typing a character must replace the current character with that newly entered character and move the location cursor to the next character, selecting it. Many of the requirements for a text-like collection in this guide assume that the collection is in insert mode and do not apply in replace mode.
BSelect Click 2+ |  | Selects text a block at a time. A double-click must select text a word at a time. A triple-click can optionally select text a line or sentence at a time. Larger numbers of clicks can optionally select increasingly larger blocks of text.
BSelect Motion 2+ |  | Can drag out a new selection by blocks as described for BSelect Click 2+.
`<Shift>` BSelect Click 2+ |  | Can extend the selection to a block boundary as described for BSelect Click 2+
`<Shift>` BSelect Motion 2+ |  | Can extend the selection by blocks as described for BSelect Click 2+.
`<Ctrl>` BSelect Click 2+ |  | If the Text component supports discontiguous selection, this can extend the discontiguous selection by blocks as described for BSelect Click 2+.
`<Ctrl>` BSelect Motion 2+ |  | If the Text component supports discontiguous selection, this can drag out the discontiguous selection by blocks as described for BSelect Click 2+.
`<Help>` |  | Must provide any available help for the Text control.

### Related Information

For more information on Text selection, see the description of the selection models in Chapter 4, "Selection."

## ToggleButton

### Description

A ToggleButton should be used to select options in an application. When the choice is one of many, the ToggleButton is called a RadioButton. When the choice is any of many, the ToggleButton is called a CheckButton. The ToggleButton must be composed of a text or graphic label, and it can contain a graphic that indicates the state of the ToggleButton. The graphic should precede the label and should have two distinctive states that indicate the set and unset states of the ToggleButton.

### Illustration

Figure 9-48. A ToggleButton

### Navigation

ToggleButtons must have no internal navigation.

### Related Information

For a description of the activation of the two types of ToggleButtons, see the reference pages in Section 9.7, "CheckButton" andSection 9.48, "RadioButton."

## WarningDialog

### Description

A WarningDialog should be used to alert the user to a possible danger. It should interrupt the user's interaction with the application. It should contain a warning symbol, a message, and one of the following button arrangements:

    Yes No
    Yes No Help
    OK Cancel
    OK Cancel Help

### Illustration

Figure 9-49. A WarningDialog

### Related Information

For more information, see the reference page in Section 9.12, "DialogBox."

## Window Menu

### Description

The window Menu, sometimes called the system Menu, is used to display the list of window actions. All actions possible for a window should be displayed in the window Menu, since keyboard-only users interact with the window manager through this Menu.

The window Menu button must be located in the upper-left corner of the window. Double-clicking the window Menu button must close the window. Pressing `<Shift> <Escape>` or `<Alt> <Space>` must activate the window Menu button for the window with the focus. The illustration on this reference page shows a posted window Menu.

A primary window Menu must have the following selections in the order listed:

Restore Alt+F5 |  | Restores a minimized or maximized window to the previous size and location of the window. This selection must be deemphasized (grayed out) when the window is in its normal state. This action must have the mnemonic R. If this action has an accelerator, it must be `<Alt> <F5>` if `<F5>` is available.
Move Alt+F7 |  | Moves a window around the workspace. This action must have the mnemonic M. If this action has an accelerator, it must be `<Alt> <F7>` if `<F7>` is available.
Size Alt+F8 |  | Changes the height and width of the window in the direction indicated by the pointer. This action must have the mnemonic S. If this action has an accelerator, it must be `<Alt> <F8>` if `<F8>` is available.
Minimize Alt+F9 |  | Changes a window into an icon. This action must have the mnemonic N. If this action has an accelerator, it must be `<Alt> <F9>` if `<F9>` is available.
Maximize Alt+F10 |  | Enlarges a window to its maximum size. This action must have the mnemonic X. If this action has an accelerator, it must be `<Alt> <F10>` if `<F10>` is available.
Lower Alt+F3 |  | Moves a window to the bottom of the window hierarchy. This action can be omitted. This action must have the mnemonic L. If this action has an accelerator, it must be `<Alt> <F3>` if `<F3>` is available.
Close Alt+F4 |  | Closes a window and removes it from the workspace. This action must have the mnemonic C. If this action has an accelerator, it must be `<Alt> <F4>` if `<F4>` is available.

A secondary window Menu must have the following selections in the order listed: Move, Size, and Close. A secondary window Menu can include Restore above Move, Maximize below Size, and Lower above Close, but the lower option on a secondary window lowers all the windows secondary to that window's primary window. A secondary window Menu should not include Restore if it does not include Maximize. A secondary window must not include an entry for Minimize.

A secondary window resulting from a Menu being torn off must have the following entries in the order listed: Move, Lower, and Close. It must not include entries for Restore, Size, Minimize, or Maximize.

### Illustration

Figure 9-50. A Window Menu

### Related Information

See Chapter 7, "Window Manager Design Principles" for more information on the window Menu and the window manager in general. See Chapter 6, "Application Design Principles" for information about Menu design.

## WorkingDialog

### Description

A WorkingDialog should be used to show work in progress and give the user an opportunity to cancel the operation. It should not interrupt the user's interaction with the application. It should contain a working symbol, a message, and one of the following button arrangements:

    OK Cancel
    OK Cancel Help

### Illustration

Figure 9-51. A WorkingDialog

### Related Information

For more information, see the reference page in Section 9.12, "DialogBox."

Prev | Table of Contents | Next
Chapter 8. Designing for International Markets |  | Appendix A. OSF/Motif Widgets and Components Correspondence