[Contents]
[Index]
[Next]
[Previous]
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
Navigation
The MenuBar follows the navigation model described in 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 for File Menu, Edit Menu, and Help Menu.