home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-08-09 | 1.8 KB | 51 lines | [TEXT/KAHL] |
- //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- // //
- // //
- // Copyright PennyWise Software, 1994. //
- // //
- // Part of the PennyWise Software Application Framework //
- // //
- // //
- // WindowUtils.h Written by Peter Kaplan //
- // //
- // //
- //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- // //
- // This is the header file for window utilities that may be useful //
- // //
- // None of these functions were particularly difficult to implement //
- // but having them provided never hurt :) //
- // //
- //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- #ifndef _WINDOW_UTILITIES_
- #define _WINDOW_UTILITIES_
-
- // Makes use of PrefsMgr for SetWindowPosition & ChangeWindowPosition
- #include <PWPrefsMgr.h>
-
- // Useful macros that may already be defined
- #ifndef topLeft
- #define topLeft(x) (((Point*)&(x))[0])
- #endif
- #ifndef botRight
- #define botRight(x) (((Point*)&(x))[1])
- #endif
-
- // Drawing common things
- extern void DrawButtonOutlineRect(WindowPtr theWindow, Rect* theRect, long color);
- extern void EraseButtonOutlineRect(WindowPtr theWindow, Rect *theRect);
- extern void DrawFocusRect(WindowPtr theWindow, Rect *theRect, long color);
- extern void EraseFocusRect(WindowPtr theWindow, Rect *theRect);
-
- // Setting pos of windows (MMDs)
- extern void SetWindowPosition(WindowPtr theWindow, short theID);
- extern void ChangeWindowPosition(WindowPtr theWindow, short theID);
-
- // Cascade pos
- extern void CascadePosition(WindowPtr theWindow);
-
- // switch coords for rects
- extern void LocalToGlobalRect(Rect *theRect);
- extern void GlobalToLocalRect(Rect *theRect);
-
- #endif