The Dock was designed to make the Macintosh easier to use:
The Doc organizes your applications and documents.
The Dock allows users to switch between tasks simply by clicking the application or window icon in the Dock.
Items in the Dock provide users with useful feedback about what each item represents. For example, images in the Dock are shown in preview mode, so it’s apparent what the image is without opening it.
A Dock tile is the area that contains the Dock icon and provides users access to the Dock item’s name and contextual menu. When a user rolls the cursor over a Dock tile, the item’s name appears. When the user presses and holds the mouse button while the cursor is on a Dock tile, a contextual menu appears. The following sections describe in more detail the Dock icon and contextual menu.
An application's Dock Icon is, by default, its application icon. It is possible for you to modify or replace the default icon with another image that indicates the current state of your application. Figure 1-1 shows an example of an application, Mail, that does just that. The icon for Mail changes when messages are waiting to be read. A badge—the red circle and number in the figure—is overlaid onto Mail’s application icon to indicate the number of unread messages. The number changes each time Mail retrieves more messages.
A window that is minimized into the Dock also has a Dock tile icon. By default, this is a miniaturized version of the window’s content that is badged with the application's Dock Icon.
When the user presses and holds the mouse button while the cursor is over a Dock tile, a contextual menu appears. If your application does nothing to customize the contextual menu, the application Dock tile’s contextual menu contains a list of the application’s open documents (if any), followed by the standard menu items Keep in Dock, Open at Login, Show in Finder, Hide, and Quit.
Figure 1-3 shows the application Dock contextual menu for Xcode. Xcode provides a number of custom menu items.
Custom items that an application adds to its Dock menu appear between the list of open documents and the standard items, as shown in Figure 1-4. The sample application has one window, named Window, open. The menu items Play, Pause, Stop, Next Song, Previous Song, and the Submenu (with its items) are custom items added by the application.
Figure 1-4 illustrates that you can further customize menu items—add an icon to an item. A window icon appears next to the window name, the application’s icon appears to the left of the item Play, and a custom icon appears next to Pause. It’s best to use icons that convey meaning to the user. For example, it would be preferable for the sample application to use a standard icon that indicates play for the Play item and pause for the Pause item. See Apple Human Interface Guidelines for additional information on designing and using a menu for the Dock.
© 2009 Apple Inc. All Rights Reserved. (Last updated: 2009-03-04)