Using the OpenStep Desktop
只搜尋這本書
以 PDF 格式下載這本書

Working With Windows

2

This chapter describes how to work with windows and includes information about the following:
  • Types of windows
  • Selecting a window to work in
  • Reordering overlapping windows
  • Moving a window
  • Resizing a window
  • Scrolling to see more
  • Miniaturizing a window
  • Closing a window

Types of Windows

Windows can look different from one another, but they generally have a few things in common.
  • A title bar at the top of the window shows the window's name.
  • Scrollers--shaded areas along the left side and sometimes the bottom of a window--to adjust the view in the window when there is more of it than you can currently see.
  • A resize bar at the bottom of many windows is for changing the window's size.
OpenStep(TM) has two types of windows: standard windows and panels.
A standard window is where the action in an application occurs. If you are creating a document, you type or draw in a standard window, such as the Edit window shown in Figure 2-1. The File Viewer is also a standard window--it is where you do desktop management tasks such as organizing files.

圖形

Figure 2-1

Panels are windows in which you tell an application what to do. Often they open when you choose a command, asking you for more instructions or to confirm the command. When you quit an application without saving your changes, for example, a panel might ask if you want to save those changes.
Some panels act on the contents of a standard window. For example, a Find panel locates specific text in a document (see Figure 2-2).

圖形

Figure 2-2

A panel with a blank title bar (no title or buttons) is an attention panel (see Figure 2-2). When one of these panels opens, you have to respond to it before you can do anything else in the application.

Selecting a Window to Work In

To work in a window, you make it the key window--the window where you type, or that accepts your keystrokes. There is only one key window at a time (see Figure 2-3).
* Click in the window where you want to work.

圖形

Figure 2-3

When you open a panel that helps you work in a standard window, the panel becomes the key window--its title bar becomes black. The standard window then gets a dark gray title bar and is known as the main window (see Figure 2-4).

圖形

Figure 2-4

A standard window with a black title bar is both the key window and the main window.

Reordering Windows That Overlap

Like sheets of paper on your desk, windows can overlap or completely cover each other. You bring a window forward so you can work in it by clicking in it (see Figure 2-5).
* To bring a window forward, click in it.
or
* Choose Windows from the Workspace menu and then choose the window from the Windows menu.

圖形

Figure 2-5

No other window can cover an attention panel. Menus stay in front of standard windows and ordinary panels.

More Ways to Reorder Windows

In addition to reordering by direct clicking, you can use keys on the keyboard to reorder windows in special ways, as listed Table 2-1.
Table 2-1
ActionEffect
Hold down the Alt1 key and click in the window's title bar.Brings the window forward without making it the key window
Hold down the Command2 key and click in the window's title bar.Sends the window to the back of other windows
Hold down the Command key and press the up arrow key.Brings the back window to the front
Hold down the Command key and press the down arrow key.Sends the front window to the back
1. On a Sun keyboard, either of the Alt keys works as you r Alt key.
2. On a Sun keyboard, the ·key works as your Command key.
For more information about the Windows menu, see "Standard Commands" on page A-1.

Moving a Window

You can move a window on the screen by dragging its title bar as shown in Figure 2-6 (do not press any buttons in the title bar). As you drag, the entire window follows the pointer. When the window is where you want it, release the mouse button.
* Drag the title bar of the window you want to move.

圖形

Figure 2-6

Dragging a window brings it to the front of other windows. It also makes it the key window (unless you hold down the Alt key while you drag).
You can drag a window anywhere on the screen and even partially off the edge of the screen (see Figure 2-7 on page 2-9). Since the pointer cannot leave the screen, part of the window's title bar--the part where the pointer is--always remains visible, and you can drag the window back into full view.

圖形

Figure 2-7

Resizing a Window

You can make a window larger, to see more of its contents, or smaller, so it takes up less space (see Figure 2-9 on page 2-10 and Figure 2-10 on page 2-11). To do so, drag its resize bar--the narrow gray border along the bottom of most windows (see Figure 2-8).
* To change the width of a window, drag horizontally from either end region of its resize bar.
* To change its height, drag vertically from the middle region.
* To change width and height at the same time, drag diagonally from an end region.

圖形

Figure 2-8

圖形

Figure 2-9

圖形

Figure 2-10

Scrolling to See More

Often there is more in a window than you can see at once. To see what is not visible, you scroll, as shown in Figure 2-11 on page 2-12. If only one page of a 25-page document is showing, for example, you can use the vertical scroller to see the other pages.
* To scroll one line or other increment, click on the scroll button that points in the direction you want to scroll.
* To scroll a "windowful," hold down the Alt key and click on a scroll button.
* To scroll to an approximate location, drag the scroll knob or click in the bar.

圖形

Figure 2-11

A scroller works like a slider--you move a knob up and down or back and forth in a bar (see Figure 2-12). You can also click on a scroll button. Press either of the scroll buttons to scroll continuously.

圖形

Figure 2-12

How to Scroll--A Summary

Table 2-2 summarizes the ways in which you can scroll through windows.
Table 2-2
ActionEffect
Click a scroll buttonScrolls an increment
Press a scroll buttonScrolls continuously by increments
1 Alt -click a scroll buttonScrolls a "windowful"
Click in the barScrolls directly to any location
Drag the scroll knobScrolls gradually to any location
Alt-drag the scroll knobScrolls more gradually to any location
1. On a Sun keyboard, either of the Alt keys works as your Alt key.
Some applications have their own buttons for scrolling a page at a time. See the user's guide that comes with the application.
You can hold down the Alt key while clicking on a scroll button to scroll by just less than the height or width of the current view, showing some of the previous view for context. Figure 2-13 on page 2-14 shows other ways to scroll.

圖形

Figure 2-13

The size and position of the scroll knob show how much and what part of the total contents you are viewing. The scroller represents the length or width of the contents, and the knob represents the portion and location of the current view (see Figure 2-14 on page 2-15).

圖形

Figure 2-14

The size of the scroll knob also changes when you resize the window.

Miniaturizing a Window

If you want to put a window aside without actually closing it, you can miniaturize it, as shown in Figure 2-15. When you do this, the window shrinks into a miniwindow--an icon that appears at the bottom of the screen.
* To miniaturize a window, click on the miniaturize button at the left of its title bar.
* To restore the window, double-click on its miniwindow.

圖形

Figure 2-15

You can move the miniwindow by dragging it, or click on it to bring it to the front. You cannot, however, drag it into the dock (as you can an application icon) or into the File Viewer (as you might a file or folder icon).
When you double-click on the miniwindow to restore the window, the miniwindow goes away and the window returns as you left it--in its same size and location as though it had never been miniaturized. Unsaved work is still there too.
You can also miniaturize a window by choosing Miniaturize Window from the Windows menu (see "Standard Commands" on page A-1).

Closing a Window

When you are finished with a window, you can close it to remove it from the workspace completely, as shown in Figure 2-16. Unlike miniaturizing, closing a window makes it disappear from the screen.
* Click on the close button at the right end of the window's title bar.

圖形

Figure 2-16

A partially drawn close button usually means that the window contains unsaved work (see Figure 2-17). When you save, the button returns to normal. If you click on the button while it is partially drawn, a panel asks if you want to save your work. After you respond to the panel, the window closes.

圖形

Figure 2-17

If you close a window without saving changes, the changes will not be there the next time you open the window.
For information on saving work in a window before closing that window, see Chapter 5, "Creating and Saving Files."
You can also close a window by choosing Close Window from the Windows menu. See "Standard Commands" on page A-1.