home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Frameworks / PennyWise™ Framework / PennyWise Includes / PWWindowUtils.h < prev   
Encoding:
Text File  |  1994-08-09  |  1.8 KB  |  51 lines  |  [TEXT/KAHL]

  1. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  2. //                                                                                //
  3. //                                                                                //
  4. //                    Copyright PennyWise Software, 1994.                            //
  5. //                                                                                //
  6. //            Part of the PennyWise Software Application Framework                //
  7. //                                                                                //
  8. //                                                                                //
  9. //            WindowUtils.h            Written by Peter Kaplan                        //
  10. //                                                                                //
  11. //                                                                                //
  12. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  13. //                                                                                //
  14. //        This is the header file for window utilities that may be useful            //
  15. //                                                                                //
  16. //        None of these functions were particularly difficult to implement        //
  17. //        but having them provided never hurt :)                                    //
  18. //                                                                                //
  19. //••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
  20. #ifndef    _WINDOW_UTILITIES_
  21. #define _WINDOW_UTILITIES_
  22.  
  23.     // Makes use of PrefsMgr for SetWindowPosition & ChangeWindowPosition
  24. #include <PWPrefsMgr.h>
  25.  
  26.     // Useful macros that may already be defined
  27. #ifndef topLeft
  28. #define topLeft(x)        (((Point*)&(x))[0])
  29. #endif
  30. #ifndef botRight
  31. #define botRight(x)        (((Point*)&(x))[1])
  32. #endif
  33.  
  34.     // Drawing common things
  35.     extern void DrawButtonOutlineRect(WindowPtr theWindow, Rect* theRect, long color);
  36.     extern void EraseButtonOutlineRect(WindowPtr theWindow, Rect *theRect);
  37.     extern void DrawFocusRect(WindowPtr theWindow, Rect *theRect, long color);
  38.     extern void EraseFocusRect(WindowPtr theWindow, Rect *theRect);
  39.     
  40.     // Setting pos of windows (MMDs)
  41.     extern void SetWindowPosition(WindowPtr theWindow, short theID);
  42.     extern void ChangeWindowPosition(WindowPtr    theWindow, short theID);
  43.     
  44.     // Cascade pos
  45.     extern void CascadePosition(WindowPtr theWindow); 
  46.     
  47.     // switch coords for rects
  48.     extern void LocalToGlobalRect(Rect *theRect);
  49.     extern void GlobalToLocalRect(Rect *theRect);
  50.  
  51. #endif