Window Zooming
When the user clicks a window's
zoom box, a
window zooms between two states, the
user state and the
standard state. The
user state
is any size and position in which the user can place the window on the desktop. The
standard state
is the size and position that the application defines as being best for the display of the data contained in the window. There are human interface guidelines for how best to determine a window's standard state, based upon its current user state, but prior to Mac OS 8.5 there were no system-supplied functions that enforced these guidelines for your application.
When you use the Mac OS 8.5 Window Manager zooming functions, your application automatically conforms to the human interface guidelines for determining a window's standard state, as follow:
-
A window should move as little as possible when zooming between the user state and standard state, to avoid distracting the user.
-
A window in its standard state should be positioned so that it is entirely on one screen.
-
If a window straddles more than one screen in the user state, when it is zoomed to the standard state it should be zoomed to the screen that contains the largest portion of the window's content region.
-
If the ideal size for the standard state is larger than the destination screen, the dimensions of the standard state should be that of the destination screen, minus a few pixels' boundary. If the destination screen is the main screen, space should also be left for the menu bar.
-
When a window is zoomed from the user state to the standard state, the top left corner of the window should remain anchored in place; however, if the standard state of the window cannot fit on the screen with the top left corner anchored, the window should be "nudged" so that the parts of the window in the standard state that would fall offscreen are, instead, just onscreen.
The Window Manager also ensures that the user state is tracked accurately and gives your application access to a window's user state information through the new zooming functions.
The Mac OS 8.5 Window Manager provides the following functions for zooming windows. See
Zooming a Window Gracefully for an example of how your application can call these functions.
� 1999 Apple Computer, Inc. (Last Updated 18 March 99)