Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Apple Human Interface Guidelines.pdf
Скачиваний:
14
Добавлен:
27.03.2015
Размер:
29.57 Mб
Скачать

C H A P T E R 1 3

Menus

Contextual Menus

A contextual menu provides convenient access to often-used commands associated with an item. You can think of a contextual menu as a shortcut to commands that make sense in the context of the current task. Contextual menus open when the user presses the Control key while clicking an appropriate interface element or selection. Alternately, a user can configure a multi-button mouse to use one button as the secondary button, which then behaves the same as Control-clicking a one-button mouse.

You can provide an application-wide contextual menu control in a toolbar or at the bottom of a list view or source list. See “Action Menus” (page 284) for examples and for more information on how to do this.

A contextual menu behaves like a standard pull-down menu, except that moving the pointer off a contextual menu and onto a standard pull-down menu doesn’t activate the second menu; the user must click once to close the contextual menu and click again or press to open the second menu.

Contextual menus that are too long to display fully use the scrolling indicator (a downward-pointing triangle) and scroll like standard menus. Use submenus in contextual menus with caution and be sure to keep them to one level.

Don’t set a default item. If the user opens the menu and closes it without selecting anything, no action should occur.

You define the items in your application’s contextual menus. Include a small subset of the most commonly used commands in the appropriate context. For example, Edit menu commands should appear in the contextual menu for highlighted text, but a Save or a Print command should not.

Always ensure that contextual menu items are also available as menu commands. A contextual menu is hidden by default and a user might not know it exists, so it should never be the only way to access a command. In particular, you should not use a contextual menu as the only way to access an advanced or power-user feature.

If a command has a keyboard shortcut, don't display the shortcut in the contextual menu (you should display the shortcut in the menu bar menu, as described in “The Menu Bar and Its Menus” (page 171)). Because a user uses a contextual menu as a shortcut to a set of task-specific commands, it's redundant to display the keyboard shortcuts for those commands.

184

Contextual Menus

2008-06-09 | © 1992, 2001-2003, 2008 Apple Inc. All Rights Reserved.

C H A P T E R 1 3

Menus

Figure 13-24 A contextual menu for an icon in the Finder and for a text selection in a document

Dock Menus

When a user presses and holds the mouse button on your application’s tile in the Dock, a menu appears. The menu lists the application’s open windows and contains the Show In Finder, Hide, and Quit commands. The Show In Finder command displays a Finder window for the folder containing your application. The Hide and Quit commands function as documented in “The Application Menu” (page 173). If the user presses the Option key, Hide changes to Hide Others and Quit changes to Force Quit. If the tile has not been permanently added to the Dock, the command Keep In Dock also appears.

Dock Menus

185

2008-06-09 | © 1992, 2001-2003, 2008 Apple Inc. All Rights Reserved.

C H A P T E R 1 3

Menus

Figure 13-25 The iTunes Dock menu

You can customize your application’s Dock menu by adding to the default items provided by the Dock. These additional items appear in the Dock menu only when the application is open. Potential additional items include:

Common commands to initiate actions in your application when it is not frontmost

Commands that are applicable when there is no open document window

Status and informational text

For example, a mail application could provide commands to initiate a new message or to check for new messages.

Any command you add to the Dock menu should also be available in your application’s pull-down menus. Application-specific items appear above the standard Dock menu items.

186

Dock Menus

2008-06-09 | © 1992, 2001-2003, 2008 Apple Inc. All Rights Reserved.

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]