home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / OpenDoc / ProcessMap / $Utilities / PartUtils.h < prev   
Encoding:
C/C++ Source or Header  |  1995-04-23  |  1.2 KB  |  64 lines  |  [TEXT/MPCC]

  1. /*
  2.     File:        PartUtils.h
  3.  
  4.     Contains:    Part utility functions & classes
  5.  
  6.     Owned by:    Reggie Adkins
  7.  
  8.     Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <2>      3/8/95    JS        Updated to b1c13/c14
  13.          <1>      2/2/95    RA        first checked in
  14.  
  15.          <0>    PartMaker source by Eric Soldan, Tantek Çelik, Jens Alfke
  16. */
  17.  
  18.  
  19. #ifndef _PARTUTILS_
  20. #define _PARTUTILS_
  21.  
  22. #ifndef __EVENTS__
  23. #include <Events.h>
  24. #endif
  25.  
  26. #ifndef __DIALOGS__
  27. #include <Dialogs.h>
  28. #endif
  29.  
  30. //----------------------------------------------------------------------------------------
  31.  
  32. class ODSession;
  33. class ODWindow;
  34. struct ODPoint;
  35.  
  36. extern ODSession* gSession;
  37.  
  38. #define TopLeft(aRect)    (* (Point *) &(aRect).top)
  39. #define BotRight(aRect)    (* (Point *) &(aRect).bottom)
  40.  
  41. #define Width(aRect)    ((aRect).right-(aRect).left)
  42. #define Height(aRect)    ((aRect).bottom-(aRect).top)
  43.  
  44. //----------------------------------------------------------------------------------------
  45.  
  46. #ifdef __cplusplus
  47. extern "C" {
  48. #endif
  49.  
  50. extern pascal Boolean MyDialogFilter(DialogPtr dialog, EventRecord* event, short* itemHit);
  51.  
  52. extern void GetWindowPoint(ODWindow *w, Environment *ev,
  53.                             Point globalPoint,
  54.                             ODPoint *localPoint);
  55.  
  56. extern Boolean AreTraceKeysDown();
  57.  
  58. #ifdef __cplusplus
  59. }
  60. #endif
  61.  
  62. #endif
  63.  
  64.