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 / Table / Sources / View.h < prev    next >
Encoding:
Text File  |  1996-09-17  |  3.4 KB  |  114 lines  |  [TEXT/CWIE]

  1. //========================================================================================
  2. //
  3. //    File:                View.h
  4. //    Release Version:    $ ODF 2 $ 
  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. #ifndef FWSVIEW_H
  14. #include "FWSView.h"
  15. #endif
  16.  
  17. #ifndef CONSTANT_H
  18. #include "Constant.h"
  19. #endif
  20.  
  21. //========================================================================================
  22. // Forward Declaration
  23. //========================================================================================
  24.  
  25. class FW_CViewContext;
  26. class CTablePart;
  27. class CTableFrame;
  28. class CTableSelection;
  29. class CTablePartContent;
  30. class CCell;
  31.  
  32. //========================================================================================
  33. //    class CTableView
  34. //========================================================================================
  35.  
  36. class CTableView : public FW_CSuperView
  37. {
  38. public:
  39.     FW_DECLARE_CLASS
  40.  
  41. //----------------------------------------------------------------------------------------
  42. //    Initialization/Destruction
  43. //
  44. public:
  45.     CTableView(Environment* ev);
  46.     virtual ~CTableView();
  47.  
  48. //----------------------------------------------------------------------------------------
  49. // Inherited API
  50. //
  51. public:        
  52.     // ----- Rendering -----
  53.     virtual void                 Draw(Environment* ev, 
  54.                                         ODFacet* odFacet, 
  55.                                         ODShape* invalidShape);
  56.  
  57.     // ----- Menus -----
  58.     virtual FW_Handled            DoAdjustMenus(Environment* ev, FW_CMenuBar* menuBar, FW_Boolean hasMenuFocus, FW_Boolean isRoot);
  59.     virtual FW_Handled            DoMenu(Environment* ev, const FW_CMenuEvent& theMenuEvent);
  60.  
  61.     // ----- Events -----
  62.     virtual FW_Handled            DoMouseDown(Environment* ev, const FW_CMouseEvent& theMouseEvent);
  63.     virtual void                DoActivateEvent(Environment* ev, const FW_CActivateEvent& theActivateEvent);
  64.  
  65.     // ----- Adjust Cursor -----
  66.     virtual FW_Handled            AdjustCursor(Environment* ev, ODFacet* odFacet, const FW_CPoint& where, ODEventInfo* eventInfo);
  67.  
  68.     // ----- Archiving -----
  69.     static void*                Create(FW_CReadableStream& stream, FW_ClassTypeConstant type);
  70.     static void                    Destroy(void* object, FW_ClassTypeConstant type);
  71.  
  72.     virtual void                PostCreateViewFromStream(Environment* ev);
  73.  
  74.     // ----- Internal Transformed changed -----
  75.     virtual void                InternalTransformChanged(Environment *ev);
  76.  
  77. //----------------------------------------------------------------------------------------
  78. //    New API
  79. //
  80. public:
  81.     void                        DrawGray(Environment* ev, FW_CGraphicContext& gc);
  82.  
  83.     // ----- Grid -----
  84.     void                        DrawGrid(Environment* ev, FW_CGraphicContext& gc, FW_Boolean gray);
  85.     void                        HideShowGrid(Environment* ev);
  86.     FW_Boolean                    IsGridShown(Environment*) const
  87.                                     {return fGridShown;}
  88.                         
  89.     // ----- Mouse down response -----
  90.     FW_Boolean                    Resize(Environment* ev, 
  91.                                        const FW_CMouseEvent& theMouseEvent,
  92.                                        const CCell& cell,
  93.                                        ETableLoc tl);
  94.  
  95.     // ----- Cell Highlight -----
  96.     void                        DrawCellHighlight(Environment* ev, 
  97.                                     FW_CViewContext& fc, 
  98.                                     const CCell& cell);
  99.     void                        ChangeHighlightState(Environment* ev,
  100.                                     ODHighlight highlight);
  101.  
  102. //----------------------------------------------------------------------------------------
  103. // Data Members
  104. //
  105. private:    
  106.     CTablePart*                fTablePart;
  107.     CTablePartContent*        fTableContent;
  108.     CTableFrame*            fTableFrame;
  109.     ODHighlight             fHighlight;
  110.     FW_Boolean                 fGridShown;
  111. };
  112.  
  113. #endif
  114.