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 / Table / Sources / Part.h < prev    next >
Encoding:
Text File  |  1996-08-16  |  3.3 KB  |  121 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                TblPart.h
  4. //    Release Version:    $ ODF 1 $ 
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef TBLPART_H
  11. #define TBLPART_H
  12.  
  13. // ----- TablePart Includes -----
  14.  
  15. #ifndef DEFINES_K
  16. #include "Defines.k"
  17. #endif
  18.  
  19. // ----- ODF Includes -----
  20.  
  21. #ifndef FWPARTNG_H
  22. #include "FWPartng.h"
  23. #endif
  24.  
  25. #ifndef FWMNUITM_H
  26. #include "FWMnuItm.h"
  27. #endif
  28.  
  29. #ifndef FWPOINT_H
  30. #include "FWPoint.h"
  31. #endif
  32.  
  33. #ifndef FWFXMATH_H
  34. #include "FWFxMath.h"
  35. #endif
  36.  
  37. //========================================================================================
  38. //    Forward declarations
  39. //========================================================================================
  40.  
  41. class CTableFrame;
  42. class CTableProxy;
  43. class CTableSelection;
  44. class CTableLinkManager;
  45. class CCell;
  46. class CTableContent;
  47.  
  48. //========================================================================================
  49. //    class CTablePart
  50. //========================================================================================
  51.  
  52. class CTablePart : public FW_CEmbeddingPart
  53. {
  54.     friend class CTableLinkManager;
  55.     
  56. //----------------------------------------------------------------------------------------
  57. //    Initialization/Destruction
  58. //
  59.   public:
  60.  
  61.     FW_DECLARE_AUTO(CTablePart)
  62.  
  63.     CTablePart(ODPart* odPart);
  64.     virtual ~CTablePart();
  65.  
  66. //----------------------------------------------------------------------------------------
  67. //    API Inherited from FW_CPart
  68. //
  69.   public:
  70.     virtual void            Initialize(Environment* ev);
  71.                 
  72.     // ----- Factory Methods -----
  73.     virtual FW_CFrame*             NewFrame(Environment* ev, 
  74.                                      ODFrame* odFrame, 
  75.                                      FW_CPresentation* presentation,
  76.                                      FW_Boolean fromStorage);
  77.     virtual FW_CContent*         NewPartContent(Environment* ev);
  78.     virtual FW_CLinkManager*    NewLinkManager(Environment* ev);    // Override
  79.  
  80.                                         
  81.     // ----- Menu bar support -----
  82.     virtual FW_Boolean            DoAdjustMenus(Environment* ev, FW_CMenuBar* menuBar, FW_Boolean hasMenuFocus, FW_Boolean isRoot);
  83.     virtual FW_Boolean            DoMenu(Environment* ev, const FW_CMenuEvent& theMenuEvent);
  84.     
  85. //----------------------------------------------------------------------------------------
  86. //    Table-specific API
  87. //
  88.   public:
  89.     // ----- Change -----
  90.     void                PartChanged(Environment* ev);
  91.     
  92.     CTableContent*        GetTableContent(Environment* ev) const
  93.                                 {return fTableContent;}
  94.     FW_CPresentation*    GetTablePresentation(Environment* ev) const
  95.                                 {return fTablePresentation;}
  96.                                 
  97.     // ----- Linking Support -----
  98.     FW_Boolean            IsLinkSelected(Environment* ev);
  99.  
  100.     CTableSelection*    GetTableSelection(Environment* ev);
  101.  
  102.     void                RegisterSubscribers(Environment* ev);
  103.     FW_Boolean            ShowLinkInfo(Environment* ev, FW_CFrame* frame);
  104.  
  105.     void                AboutToClearCell(Environment* ev, const CCell& cell);
  106.     void                ChangeFrameStatus(Environment* ev, const CCell& cell, ODLinkStatus newStatus);
  107.     void                ProxyMoved(Environment* ev, const CCell& fromCell, const CCell& toCell);
  108.  
  109. //----------------------------------------------------------------------------------------
  110. //    Data Members
  111. //
  112.   private:
  113.       CTableContent*                            fTableContent;
  114.      FW_CPresentation*                         fTablePresentation;
  115.     
  116.     CTableLinkManager*                        fTableLinkManager;
  117.     FW_Boolean                                fLinksRegistered;
  118. };
  119.  
  120. #endif
  121.