Dock Tile Concepts

The Dock was designed to make the Macintosh easier to use:

A Dock tile is the area that contains the Dock icon and provides users access to the Dock item’s name and menu. When a user rolls the cursor over a Dock tile, the item’s name appears. When the user holds the Control key down and clicks on a Dock tile, a menu appears. The following sections describe in more detail the Dock icon and menu.

Dock Icon

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.

Figure 1-1  The red badge in Mail’s Dock tile indicates the number of waiting messages
The red badge in the Mail’s Dock tile indicates the number of waiting 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.

Figure 1-2  A Mail window minimized into the Dock
A Mail window miniaturized into the Dock.

Dock Menu

When the user holds the Control key down and clicks on a Dock tile, a menu appears. If your application does nothing to customize the menu, the application Dock tile’s 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 menu for Xcode. Xcode provides a number of custom menu items.

Figure 1-3  Xcode Dock menu
Project Builder’s application Dock menu

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  Custom items in an application’s Dock menu
Custom items in an application’s Dock menu

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 OS X Human Interface Guidelines for additional information on designing and using a menu for the Dock.