home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / Draw / Sources / DrawView.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  2.9 KB  |  95 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                DrawView.h
  4. //    Release Version:    $ ODF 2 $
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef DRAWVIEW_H
  11. #define DRAWVIEW_H
  12.  
  13. // ----- Part Layer -----
  14.  
  15. #ifndef FWSVIEW_H
  16. #include "FWSView.h"
  17. #endif
  18.  
  19. //========================================================================================
  20. // Forward Declaration
  21. //========================================================================================
  22.  
  23. class FW_CGraphicContext;
  24. class CDrawPart;
  25. class CDrawFrame;
  26. class CDrawSelection;
  27. class CDrawPartContent;
  28.  
  29. //========================================================================================
  30. // Class CDrawView
  31. //========================================================================================
  32.  
  33. class CDrawView : public FW_CSuperView
  34. {
  35. public:
  36.     FW_DECLARE_CLASS
  37.  
  38. //----------------------------------------------------------------------------------------
  39. // Initialization/destruction
  40. //
  41. public:        
  42.     virtual ~ CDrawView();
  43.  
  44. private:
  45.     CDrawView(Environment *ev);
  46.  
  47. //----------------------------------------------------------------------------------------
  48. // Inherited API
  49. //
  50. public:        
  51.     // ----- Cursor Adjustement
  52.     virtual FW_Handled        AdjustCursor(Environment *ev, ODFacet* facet, const FW_CPoint& where, ODEventInfo* eventInfo);
  53.     
  54.     // ----- Layout
  55.     virtual void            SizeChanged(Environment* ev, const FW_CPoint& oldSize);
  56.     virtual void             AdjustToNewLayout(Environment *ev, 
  57.                                             const FW_CPoint& oldExtent, 
  58.                                             const FW_CPoint& newExtent, 
  59.                                             FW_ERedrawVerb redraw);
  60.  
  61.     // ----- Drawing
  62.     virtual void             Draw(Environment *ev, ODFacet* odFacet, ODShape* invalidShape);
  63.  
  64.     // ----- Events -----
  65.     virtual FW_Handled        DoMouseDown(Environment *ev, const FW_CMouseEvent& theMouseEvent);
  66.     virtual FW_Handled        DoVirtualKey(Environment* ev, const FW_CVirtualKeyEvent& theVirtualKeyEvent);
  67.  
  68.     virtual FW_Boolean        WantsToBeTarget(Environment* ev);
  69.  
  70.     // ----- Archiving -----
  71.     static void*            Create(FW_CReadableStream& stream, FW_ClassTypeConstant type);
  72.     static void                Destroy(void* object, FW_ClassTypeConstant type);
  73.     virtual void            Flatten(Environment* ev, FW_CWritableStream& stream) const;
  74.     virtual void            InitializeFromStream(Environment* ev, FW_CReadableStream& stream);
  75.     
  76.     // ----- Scroll Notification -----
  77.     virtual void            InternalTransformChanged(Environment *ev);
  78.  
  79. //----------------------------------------------------------------------------------------
  80. //    New API
  81. //
  82. protected:
  83.     void                    DrawGrid(Environment *ev, FW_CGraphicContext& gc, const FW_CRect& invalidRect);    
  84.  
  85. //----------------------------------------------------------------------------------------
  86. // Data Members
  87. //
  88. private:    
  89.     CDrawPart*                fDrawPart;
  90.     CDrawPartContent*        fDrawPartContent;
  91.     CDrawFrame*                fDrawFrame;
  92. };
  93.  
  94. #endif
  95.