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

C H A P T E R 1 5

Controls

If you choose to use icons in a segmented control, be sure to consider using the images that are available in Mac OS X v10.5 and later (see “System-Provided Images” (page 151) for more information on these). If you need to design your own images, try to imitate the clarity and simple lines of the system-provided images. For some tips on how to create custom images of this type, see “Designing Icons for Rectangular-Style Toolbar Controls” (page 150).

Segmented Control Specifications

Control sizes: The height of a segmented control is fixed for each size, but you determine the width of the control. Be sure to make the width of each segment the same, because a segment of a different width might imply that it has different behavior or is of greater or lesser importance than the others.

Label spacing and fonts: The text in a segmented control and the label text is proportional to the size of the control (Interface Builder automatically supplies the appropriate font for the text within the control):

Regular size: System font for text within the control and for label text below it.

Small: Small system font for text within the control and for label text below it.

Mini: Mini system font for text within the control and for label text below it.

Icon sizes: If you need to design an icon for each segment, you should constrain the icon to the following dimensions:

Regular size: 17 x 15 pixels.

Small: 14 x 13 pixels.

Mini: 12 x 11 pixels.

Figure 15-27 Segmented controls can contain icons or text

Regular-size segmented control

17 x 15

Segmented Control Implementation

The segmented control is available in Interface Builder. To create one using Application Kit programming interfaces, use the NSSegmentedControl class.

Icon Buttons and Bevel Buttons with Pop-Up Menus

A bevel button or an icon button containing a pop-up menu has a single downward-pointing arrow. 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.

Selection Controls

279

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

C H A P T E R 1 5

Controls

Important: An icon button with a pop-up menu is one of the three window-body controls that can also be used in a window-frame area. To learn more about controls that are designed specifically for use in window-frame areas, see “Window-Frame Controls” (page 249).

An icon or bevel button with a pop-up menu is easy to create in Interface Builder. First, drag a pop-up button (an NSPopUpButton object) into your window. Select the button and in the Attributes pane of the inspector, change its type to Pull Down. Finally, for a Rounded or Square Bevel Button, change the style to Square or Shadowless Square, respectively. For an icon button, it doesn’t matter which style you choose, but you must deselect the Bordered checkbox. Resize the button as needed.

See “Bevel Buttons” (page 269) and “Icon Buttons” (page 261) for specifications for the buttons themselves. Figure 15-28 shows examples of these types of buttons with pop-up menus.

Figure 15-28 Bevel and icon buttons can include pop-up menus

A bevel button with a pop-up menu

Icons buttons with pop-up menus

280

Selection Controls

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

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