Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Примеры брендбуков / apple_osx-aqua-human-interface.pdf
Скачиваний:
17
Добавлен:
16.02.2016
Размер:
8.01 Mб
Скачать

C H A P T E R 7

Controls

Spacing: For buttons with rounded corners that contain a 24 x 24 (or larger) icon, leave at least 8 pixels between buttons, stacked vertically or aligned horizontally. Otherwise, buttons should butt up against each other.

Text: Label font (10-point Lucida Grande Regular)

If a bevel button has an icon and a label, you can put the text anywhere in relation to the icon. Carbon and Cocoa developers can specify the location in Interface Builder or programmatically. Cocoa developers can create square bevel buttons with the NSButton class. Carbon developers can use the CreateBevelButtonControl function or, in Appearance Manager, the DrawThemeButton function with the kThemeBevelButton constant.

In some situations—providing text-alignment options in a toolbar, for example—it is appropriate to use bevel buttons to graphically represent several mutually exclusive choices. You can also use bevel buttons for nonstandard-size push buttons.

Figure 7-15 Bevel buttons as radio buttons and push buttons

24

20

Toolbars

Toolbars are useful for giving users immediate access to the most frequently used commands. Any item in a toolbar should also be available as a menu command. An application-wide toolbar in its own window is also called a tool palette; for more information, see “Utility Windows” (page 91). This section focuses on toolbars that are part of a window with other content. Carbon developers can create a toolbar with the HIToolBarCreate function; Cocoa developers can use the NSToolbar class.

Control Behavior and Appearance

133

Apple Computer, Inc. June 2002

C H A P T E R 7

Controls

The set of toolbar items you provide should fit in the default window size; users should be able to customize which items appear in the toolbar, and in what order. As the default, a toolbar should display icons with text labels; users should be able to change the display to icons only or text only. You can provide these options with a Customize Toolbar command in the View menu.

If your application uses toolbars as part of a window with other content, include a control in the window’s title bar for showing and hiding the toolbar, as shown in Figure 7-16. You should also put commands for showing and hiding the toolbar in the View menu (see “The View Menu” (page 61)).

Figure 7-16 The toolbar control

Toolbar button

For information about designing icons for toolbars, see “Toolbar Icons” (page 211).

Pop-Up Icon Buttons and Pop-Up Bevel Buttons

An icon button does not have a rectangular edge around it; the clickable area is the graphic itself (for example, the toolbar buttons in Finder windows). An icon button or a bevel button containing a pop-up menu has a single downward-pointing arrow, as shown in Figure 7-17. The button can behave like a standard pop-up menu, in which the image on the button is the current selection, or the button can represent the menu title and always display the same image.

134Control Behavior and Appearance

Apple Computer, Inc. June 2002

C H A P T E R 7

Controls

The menu and the button (or the bounding rectangle around the icon) are left-aligned, with no space between the top of the menu window and the bottom of the button. The arrow is 7 pixels wide at the top. The tip of the arrow is positioned 1 pixel below the icon’s bottom edge. There should be 3 pixels from the tip of the arrow to the top of the menu window.

Figure 7-17 Pop-up icon button

1

Arrow is 7 pixels wide at the top.

Menu and icon left-aligned

Control Behavior and Appearance

135

Apple Computer, Inc. June 2002

C H A P T E R 7

Controls

Figure 7-18 Pop-up bevel button with square corners

7

7

Arrow is 7 pixels wide at the top and positioned 2 pixels to the right of the icon edge.

8

Menu and button are left-aligned, with no space between the bottom

of the button and the top of the menu.

Figure 7-19 Pop-up bevel button with rounded corners

7

7

8

136Control Behavior and Appearance

Apple Computer, Inc. June 2002

Соседние файлы в папке Примеры брендбуков