home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / Libraries / Aidan's Class Libraries / Source / Headers / CLDrawSlate.h < prev    next >
Encoding:
Text File  |  1997-05-18  |  1.1 KB  |  43 lines  |  [TEXT/CWIE]

  1. //Copyright (c) 1997 Aidan Cully
  2. //All rights reserved
  3.  
  4. #ifndef __DRAWSLATE_H
  5. #define __DRAWSLATE_H
  6.  
  7. #include <QuickDraw.h>
  8.  
  9. //class TDrawSlate
  10. //    uses:
  11. //        Used to manage drawing areas.
  12. //    theory:
  13. //        A "drawing slate" is an area which one can draw to.  Drawing occurs through the use of
  14. //        "shape" objects which draw themselves onto one of these.
  15. //    Future changes:
  16. //        I'm worried about having a couple of items in here (at least in their current form)
  17. //        In particular:
  18. //            MarkChanged()
  19. //            LocalToGlobal()
  20. //            GlobalToLocal()
  21. class TDrawSlate
  22. {
  23. private:
  24.     int mhCount;
  25.     TDrawSlate *mhOldFocus;
  26.     static TDrawSlate *shCurFocus;
  27.     Point mhOrigin;
  28. protected:
  29.     virtual Boolean GetDrawSelf();
  30.     virtual Boolean ReleaseDrawSelf();
  31. public:
  32.     TDrawSlate();
  33.     virtual ~TDrawSlate();
  34.     void SetOrigin( int x, int y ) {mhOrigin.h= x; mhOrigin.v= y;};
  35.     void GetOrigin( int &x, int &y ) {x= mhOrigin.h; y= mhOrigin.v;};
  36.     virtual void MarkChanged( Rect );
  37.     virtual Boolean GetDrawFocus();
  38.     virtual Boolean ReleaseDrawFocus();
  39.     virtual void LocalToGlobal( Point* );
  40.     virtual void GlobalToLocal( Point* );
  41. };
  42.  
  43. #endif