home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / Container / Sources / View.h < prev    next >
Encoding:
Text File  |  1996-08-16  |  2.8 KB  |  90 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                View.h
  4. //    Release Version:    $ ODF 1 $
  5. //
  6. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef VIEW_H
  11. #define VIEW_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_CMouseEvent;
  24. class FW_CEmbeddedMouseEvent;
  25. class FW_CBorderMouseEvent;
  26. class FW_CVirtualKeyEvent;
  27.  
  28. class CContainerPart;
  29. class CContainerFrame;
  30. class CPartContent;
  31.  
  32. //========================================================================================
  33. // Class CContainerView
  34. //========================================================================================
  35.  
  36. class CContainerView : public FW_CSuperView
  37. {
  38. public:
  39.     FW_DECLARE_CLASS
  40.  
  41. //----------------------------------------------------------------------------------------
  42. // Initialization/destruction
  43. //
  44. public:        
  45.     CContainerView(Environment* ev, 
  46.                     CContainerFrame* frame, 
  47.                     FW_CRect& bounds, 
  48.                     FW_CPoint& extent,
  49.                     CContainerPart* part);
  50.     virtual ~ CContainerView();
  51.     
  52. private:
  53.     CContainerView(Environment* ev);
  54.     
  55. //----------------------------------------------------------------------------------------
  56. // Inherited API
  57. //
  58. public:        
  59.     // ----- Cursor -----
  60.     virtual FW_Boolean        AdjustCursor(Environment* ev, ODFacet* facet, const FW_CPoint& where);
  61.     
  62.     // ----- Drawing -----
  63.     virtual void             Draw(Environment* ev, ODFacet* odFacet, ODShape* invalidShape);
  64.     virtual void             AdjustToNewLayout(Environment *ev, const FW_CPoint& oldExtent, 
  65.                                                 const FW_CPoint& newExtent, FW_Boolean refresh);
  66.     virtual void            SizeChanged(Environment* ev, const FW_CPoint& oldSize);
  67.  
  68.     // ----- Events -----
  69.     virtual FW_Boolean        DoMouseDown(Environment* ev, const FW_CMouseEvent& theMouseEvent);
  70.     virtual FW_Boolean        DoVirtualKey(Environment* ev, const FW_CVirtualKeyEvent& theVirtualKeyEvent);
  71.  
  72.     virtual FW_Boolean        WantsToBeTarget(Environment* ev);
  73.  
  74.     // ----- Archiving -----
  75.     static void*            Create(FW_CReadableStream& stream, FW_ClassTypeConstant type);
  76.     static void                Destroy(void* object, FW_ClassTypeConstant type);
  77.     virtual void            Flatten(Environment* ev, FW_CWritableStream& stream) const;
  78.     virtual void            InitializeFromStream(Environment* ev, FW_CReadableStream& stream);
  79.  
  80. //----------------------------------------------------------------------------------------
  81. // Data Members
  82. //
  83. private:    
  84.     CContainerPart*        fContainerPart;
  85.     CPartContent*        fPartContent;
  86.     CContainerFrame*    fContainerFrame;
  87. };
  88.  
  89. #endif
  90.