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

C H A P T E R 6

Dialogs

The Choose Dialog

A Choose dialog lets a user select an item as the target of a customized task. For example, when a user attempts to open a broken alias, the Fix Alias dialog lets the user choose another item for the alias to open. An application can have more than one Choose dialog, but only one can be open at a time. In some situations, it may be appropriate for a Choose dialog to be a sheet.

Figure 6-13 A Choose dialog

A Choose dialog

can be opened by various commands

can support multiple selection

114Dialog Behavior

Apple Computer, Inc. June 2002

C H A P T E R 6

Dialogs

supports document preview

can be resized with the resize control in the lower-right corner

can include a Show pop-up menu, which allows the user to filter the type of files that appear in the list. Items that do not meet the filtering criteria appear dimmed. The system creates a list of native file types supported by the application to populate the menu. You can supplement this list with custom types and specify the default to show when the dialog opens. You should include an “All applicable files” item, but it does not have to be the default.

The dialog’s default title is “Choose,” but you should change it to include the name of the task. For example, if the command that brings up the dialog is Choose Picture, the dialog should be titled “Choose Picture.” Also include some instructional text at the top, such as “Choose a picture to display in the background of the folder ‘Documents.’” If it’s helpful, also change the Choose button to something more specific.

The default location is the user’s home folder. If the dialog is targeted to only volumes, the default location is the Computer directory. Files and folders not appropriate for the target selection should be dimmed.

Note: Recent Places (in the Where pop-up menu of a Save dialog) does not record folders selected in Choose dialogs.

Cocoa developers can use a variation of the Open dialog (NSOpenPanel class). The Choose dialog is available to Carbon developers through Navigation Services. For more information, see the documentation for Navigation Services, available on the Mac OS X developer documentation website.

The Printing Dialogs

Printing dialogs include the Print dialog and the Page Setup dialog. In the Print dialog, user options are provided via the features pop-up menu, which contains panes drawn and controlled by printing dialog extensions (PDEs). PDEs are provided by the operating system, printer modules, and applications.

Apple provides a number of printing panes. The standard Print dialog is shown in Figure 6-14.

Dialog Behavior

115

Apple Computer, Inc. June 2002

C H A P T E R 6

Dialogs

Figure 6-14 A Print dialog (a sheet attached to a document window)

Features menu

Options for choosing paper type and print quality should look like the dialog in Figure 6-15. You can customize the quality descriptions. If you want to provide more options, make them visible only when the user clicks a disclosure triangle.

Figure 6-15 Options for choosing paper type and print quality

Displays advanced options

116Dialog Behavior

Apple Computer, Inc. June 2002

C H A P T E R 6

Dialogs

Figure 6-16 shows an example of a Print dialog with its advanced features visible. Most users won’t need access to controls for specifying precise percentages of cyan, yellow, and magenta; the dialog opens initially displaying only the top portion of the dialog. The user must click a disclosure triangle to display the advanced options.

Advanced options should always have a title. Use help tags when necessary to explain options (see “Help Tags” (page 238)).

Figure 6-16 The expanded Color Options pane, showing advanced options

Dialog Behavior

117

Apple Computer, Inc. June 2002

C H A P T E R 6

Dialogs

If you create custom printing dialogs, follow the interface guidelines provided throughout this book and the layout guidelines described in “Positioning Controls in Dialogs and Windows” (page 149). Here are some specific guidelines to keep in mind if you implement custom printing features.

Make sure the item name that appears in the features pop-up menu doesn’t conflict with already existing menu items.

Make sure the menu item (the pane name) helps users easily determine the options the pane contains.

Make sure the features you implement are appropriate for your application. For example, an option to print in reverse order should be provided by the operating system, not your application. (Implementing this feature requires the application to know the hardware’s capabilities.)

Make interdependencies among options clear to users. For example, if a user selects double-sided printing, the option to print on transparencies should become unavailable.

Separate more advanced features from frequently used features. When the user chooses to display the advanced features, there should be an “advanced options” title above the advanced controls.

Provide visual feedback (such as the preview in the Layout pane of the Print dialog) when appropriate. A thumbnail showing the effect of changing a tone control, for example, helps users determine desired settings.

Save a user’s printing preferences for a document, at least while the document is open. Provide a way for users to save custom settings.

If you are a Carbon application developer, you can write a PDE to customize panes in the Page Setup or Print dialogs. For more information, see Inside Mac OS X: Extending Printing Dialogs, available on the Mac OS X developer documentation website. If you are a Cocoa application developer, you can implement an accessory view by using NSPageLayout and NSPrintPanel, both Application Kit classes.

118Dialog Behavior

Apple Computer, Inc. June 2002

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