Menus and the Menu Bar

Menus contain a list of commands, states, and submenus that can be chosen with the mouse. The Mac OS X menu bar stretches across the top of the screen and is always visible, except when a slide show, full-screen video, or some other display application takes over the entire screen. The Apple menu , which drops down when the Apple icon (

Menus and the Menu Bar

) at the top left of the screen is clicked, is always available, even during application and document modal periods. The Apple menu, shown in Figure 1-13, is controlled by the operating system, not by any one application or by the user.

The Apple menu is always available and is controlled by the operating system

Figure 1-13. The Apple menu is always available and is controlled by the operating system

To the immediate right of the Apple menu is the application menu . The application menu changes depending on the active application, and it displays the active (or current) application’s name in bold text. By convention, the application menu contains commands that affect the entire application, such as Preferences, Hide Others, and Quit. The application menu for the TextEdit application is shown at the left in Figure 1-14.

Menu bar for TextEdit (top), with Application, File, Edit, and Window menus

Figure 1-14. Menu bar for TextEdit (top), with Application, File, Edit, and Window menus

Each application has its own set of menus, and we’ve exploded four of TextEdit’s six menus in Figure 1-14. In addition to the application menu, the File and Window menus should be present for all applications. Edit, Format, and Help menus are common but are not required by the Apple interface guidelines. Other application-specific menus (e.g., the Go menu in the Finder) may also be present.

A dark gray disclosure triangle (

Menu bar for TextEdit (top), with Application, File, Edit, and Window menus

) at the right side of a menu cell is a submenu indicator . A key combination containing the cloverleaf symbol (

Menu bar for TextEdit (top), with Application, File, Edit, and Window menus

) — also known as the Command key — in combination with a character key and possibly modifier keys (e.g., Shift, Option) is called a keyboard equivalent , or key equivalent, to the mouse. Key equivalents are used in combination with the Command (Apple, cloverleaf ) key (or keys) at the bottom of the keyboard. Menu commands that bring up dialogs are usually followed by three dots (an ellipsis ), indicating that additional information must be provided to complete the command. Grayed-out (or dimmed ) menu commands are disabled in the application’s current context. Menus and submenus float on top of all other windows and are visible only when the associated application is active.

Get Building Cocoa Applications: A Step by Step Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.