Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Macintosh Toolbox Essentials /
Chapter 4 - Window Manager / Window Manager Reference
Window Manager Routines / Zooming Windows


ZoomWindow

Use the ZoomWindow procedure to zoom the window when the user has pressed and released the mouse button with the cursor in the zoom box.

PROCEDURE ZoomWindow (theWindow: WindowPtr; 
                     partCode: Integer; front: Boolean);
theWindow
A pointer to the window record of the window to be zoomed.
partCode
The result (either inZoomIn or inZoomOut) returned by the FindWindow function.
front
A Boolean value that determines whether the window is to be brought to the front. If the value of front is TRUE, the window necessarily becomes the frontmost, active window. If the value of front is FALSE, the window's position in the window list does not change. Note that if a window was active before it was zoomed, it remains active even if the value of front is FALSE.
DESCRIPTION
The ZoomWindow procedure zooms a window in or out, depending on the value of
the partCode parameter. Your application calls ZoomWindow, passing it the part
code returned by FindWindow, when it receives a result of TRUE from TrackBox.
The ZoomWindow procedure then changes the window's port rectangle to either
the user state (if the part code is inZoomIn) or the standard state (if the part code is inZoomOut), as stored in the window state data record, described in the section "Zooming a Window" beginning on page 4-53.

If the part code is inZoomOut, your application ordinarily calculates and sets the standard state before calling ZoomWindow.

For best results, call the QuickDraw procedure EraseRect, passing the window's graphics port as the port rectangle, before calling ZoomWindow.

SEE ALSO
See Listing 4-12 on page 4-55 for an example that calculates and sets the standard state and then calls ZoomWindow to zoom a window.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996