home *** CD-ROM | disk | FTP | other *** search
- #include <WindowMgr.h>
- #include <MenuMgr.h>
- #include <EventMgr.h>
- #include "Skel defines.h"
- #include "Skel globals.h"
-
- /*
-
- Change the size of the given window
- ############################ ReSize ###############################
-
- Called on a mouse-down in the grow box, this allows the user to change
- the size of the window. We change the size, then
- claim that the whole of the window contents is no longer validly drawn,
- because we're too lazy to do so for just the scroll bar regions
- that are actually subject to change. See the Window Manager.
- */
-
- resize (a_window, downpt)
- WindowPtr a_window;
- Point downpt;
- {
- int w,
- h; /* new width and height of the sized
- window */
- long newsize; /* the new size */
-
- newsize = GrowWindow (a_window, downpt, &growrect);
- /* find new size */
- w = LoWord (newsize); /* find the width */
- h = HiWord (newsize); /* find the height */
-
- SizeWindow (a_window, w, h, 1);/* change to the new window size */
-
- /*
- place whole window into update Region to be sure it all gets
- updated. This is more than is strictly necessary, but a lot
- easier than just invalidating the regions that actually may have
- changed.
- */
- InvalRect (&a_window -> portRect);
-
- } /* ReSize */
-
-