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 / Displaying Windows


DrawGrowIcon

Use the DrawGrowIcon procedure to draw a window's size box.

PROCEDURE DrawGrowIcon (theWindow: WindowPtr);
theWindow
A pointer to the window record.
DESCRIPTION
The DrawGrowIcon procedure draws a window's size box or, if the window can't be sized, whatever other image is appropriate. You call DrawGrowIcon when drawing the content region of a window that contains a size box.

The exact appearance and location of the image depend on the window type and the window's active or inactive state. The DrawGrowIcon procedure automatically checks the window's type and state and draws the appropriate image.

In an active document window, DrawGrowIcon draws the grow image in the size box in the lower-right corner of the window's graphics port rectangle, along with the lines delimiting the size box and scroll bar areas. To draw the size box but not the scroll bar outline, set the clipRgn field in the window's graphics port to be a 15-by-15 pixel rectangle in the lower-right corner of the window.

The DrawGrowIcon procedure doesn't erase the scroll bar areas. If you use DrawGrowIcon to draw the size box and scroll bar outline, therefore, you should
erase those areas yourself when the window size changes, even if the window
doesn't contain scroll bars.

In an inactive document window, DrawGrowIcon draws the lines delimiting the size box and scroll bar areas and erases the size box.

SEE ALSO
See Listing 4-8 on page 4-39 for an example that draws a window's content region, including the size box. See Listing 4-11 on page 4-51 for an example that calls DrawGrowIcon to remove the size-box icon when a window becomes inactive.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996