Nearly every Aqua application centers its interface around windows. Windows can represent either abstract areas of user interactivity, such as with web browser or Terminal console windows, or they can represent the contents of real files or folders on disk.
This section will introduce you to the basic features present in most windows and to the various types of windows you’ll encounter while using Mac OS X.
Windows in Mac OS X have an entirely different set of controls than those from earlier versions of the Mac OS. These window features are highlighted in Figure 1-27.
The controls are listed as follows:
Close button (red)
Minimize button (yellow)
Zoom button (green)
Filename or title
Toolbar button (not available on all windows)
Scrollbars and scroll arrows
Resize window control
The top part of the window is known as the titlebar . The titlebar is home to the three colored window control buttons used for closing (red), minimizing (yellow), and zooming (green) the window. Mousing over the buttons will change their state to be either an X, a minus sign (-), or a plus sign (+), respectively. These are visual cues of the function the button performs.
With some applications, you’ll notice that the red Close window button has a dark-colored dot in its center. This means that the document you’re working on has unsaved changes; if you save the document (File → Save, or
-S), the dot will go away.
A window’s titlebar runs across the top edge and, as its name implies, features the title or name of that window. Window names are usually unique within a single application. For example, word processor windows are named for the documents they represent, while web browser windows take their titles from the web pages they display.
In earlier versions of the Mac OS, double-clicking the titlebar
feature. Everything below the titlebar
would hide, leaving you with just the titlebar, which you could leave
in place or drag around as needed. The only Mac OS X application that
still retains the windowshade feature is
Stickies (found in
/Applications). However, if you miss this
feature, you can download a third-party application called
WindowShade X (http://www.unsanity.com).
Titlebars are a window’s simplest control. You can move a window around just by dragging its titlebar, and double-clicking the titlebar will cause the window to minimize to the Dock. Beyond this built-in functionality, however, the titlebar is home to several other controls, such as the close, minimize, and maximize window buttons, the proxy icon, and in certain circumstances, a toolbar button.
- Path view and selection
Command-click the window’s title (the actual text in the middle of the titlebar) to produce a pop-up menu showing the object’s path (as seen in Figure 1-28), with one menu row for each enclosing folder or disk. Selecting any of these folders or disks opens that object’s window in the Finder.
The final item in this pop-up menu is always a disk icon (most often that of a hard disk, or a disk partition); selecting it opens a Finder view of that disk’s
root. See Section 220.127.116.11 for more about disk icons in the Finder.
- Proxy icon
Any window that represents a file, folder, or disk gets a miniature version of its Finder icon to the left of its title in the titlebar, as seen in Figure 1-28; this is its proxy icon. (New document windows don’t get a proxy icon until the first time they are saved.) While this can be useful for visually determining a document’s file type, it’s more than a mere label.
You can click and drag this icon and get the same effect as if you were dragging its “real” Finder icon around. Hence, you can drop its icon into another document window, onto another application’s icon, place it in the Dock, and so on. In all cases, you’ll receive the same effect as if you performed the same action from the Finder. (There are some exceptions to this—you usually can’t drag an open document window’s proxy icon into the Trash, for example!)
Modifier keys for moving, copying, and making aliases all apply when dragging a proxy icon, as detailed in Section 2.5.
Some nondocument windows put proxy icons to other clever uses. Internet Explorer, for example, puts a little @-shaped proxy icon in the titlebar of web pages. Dragging it is equivalent to dragging the page’s URL string, letting you quickly paste it into an email message or drop it on the Desktop as a “Web Internet Location” document.
If the window is not in sync with its document (i.e., it contains unsaved changes), then the proxy icon is grayed out and untouchable. Saving the document returns it to its opaque and interactive state.
Some applications assign a toolbar to its windows, giving you quick access to various commands. As seen in Figure 1-29, every Finder window has a toolbar, which you can use to store links to folders or commands you use frequently.
Windows with toolbars have a transparent button on the right side of their titlebars, as shown in Figure 1-29. If you click on the toolbar button, the toolbar disappears; click on it again, and the toolbar reappears.
Most applications that use toolbars make them customizable by way of a “Customize Toolbar...” option in their menu bar. Selecting this summons a large dialog box that presents you with a palette of all the buttons you can place in that particular window’s toolbar (including a predefined default set, at the bottom) as well as options to control their appearance and organize them into groups. You can now make the toolbar look just how you want. Figure 1-30 shows the Finder’s Customize Toolbar window.
key, you can drag toolbar icons left or right to rearrange them, or drag and drop them from the toolbar to make them go away in a puff of smoke. (You can add them back again later by visiting the Customize Toolbar... dialog box.) Some applications, such as System Preferences and the Finder, let you drag icons onto and off of the toolbar.
Widgets are standard Aqua UI elements that appear within windows and control their content. “Widgets” is a generic term for what Mac OS X programmers call views, discussed in Chapter 2. These include all the buttons and controls that help give the Aqua interface its name, as well as some special interface features unique to Mac OS X, such as sheets and drawers.
Dialogs are a common sight in any GUI. When an application requires you to make a decision or otherwise needs your attention, it interrupts its activities to display a special window. Thereafter, it won’t let you perform any other activities within that application until you give it due attention, whether that involves making a choice, or merely acknowledging or dismissing the dialog.
A common example of a dialog window, or box, is what you see when you select File → Open in any document-editing application, as shown in Figure 1-31.
The open window’s view is similar to the Column View in the Finder. It offers a way to navigate to a specific file to open with that application. When you locate the file you wish to open, either select the file and hit the Open button, or dismiss the dialog through its Cancel button.
A sheet is a special kind of dialog that slides out from beneath the window’s titlebar, partially covering its content; see Figure 1-32. Cocoa applications (see Section 18.104.22.168) tend to use sheets whenever possible, while Carbon and other application types often use separate dialog windows instead.
A window loses most of its interactivity when displaying a sheet; the sheet requires your input on some decision (even if it’s just to dismiss the sheet through its Cancel button), although you can still use window controls to move, resize, and minimize the window. However, you can continue using other windows, even those belonging to that application.
The sheet you’ll see most often is the Save As sheet, seen when you first save a new document to disk or whenever you choose Save As... from an application’s File menu.
You’ll also often see the sheet that appears when you try to close the window of an unsaved document, as with Figure 1-33.
Typically, clicking Save or pressing Return saves the document (summoning a new Save sheet if it doesn’t already have a filename), clicking Don’t Save or pressing
-D closes the window and discards all changes, and clicking Cancel or pressing Esc or
-. dismisses the sheet and leaves the window open (and unsaved).
Windows can choose to hide parts of themselves in drawers , modular subwindows that contain information and controls secondary to the window’s main function. When summoned, a drawer slides out of a window’s left or right side. One such application that uses drawers is Mail, shown in Figure 1-34. Mail uses a drawer to hold a list of all the accounts and mailboxes you use for email.
As with sheets, a drawer remains attached to its window, even if you move or resize the parent window. You can change the width of a drawer by clicking and dragging on one of its edges. (You can also close it entirely by dragging it to the window’s edge, but usually it or its window provides faster ways to close it.)
Unlike previous versions of the Mac OS, Aqua windows can interleave freely. This means that windows belonging to a given application don’t insist on sticking together; bringing one window of an application into focus doesn’t automatically pop all other windows of that application to the top of the stack. This can prove useful when working with two applications side by side. You can arrange the windows so that you can see the contents of both without having to wrestle with any other open windows belonging to either application.
If you do want to bring all of an application’s windows to the top of the window stack, just click once on that application’s icon in the Dock.
Mac OS X windows follow the usual behavior of forming into a single stack, with one window at a time possessing focus and ready for user interaction. Aqua uses subtle visual cues to make the top window visually distinct, giving it an opaque titlebar with red, yellow, and green control buttons (see Section 1.4.1 earlier in this chapter), as well as a drop-shadow.
Most of the time, you’ll bring a window into focus by clicking on it, which makes it snap to the top of the stack. You can also call it forth by selecting its name from the Dock menu of its parent application’s Dock icon, or choosing it from its application’s Window menu, if it offers one.
You can use
You can interact with a background window (not in focus) by holding down the
key while using its various controls and widgets. You can always move, resize, or scroll it by
-dragging its various controls—if it uses standard Cocoa interface widgets, you can even press buttons and select text without losing focus from the top window! Similarly, you can also access the close, minimize, and zoom window control buttons by just mousing over them; no keypress required.