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

  1. //========================================================================================
  2. //
  3. //    File:                Part.h
  4. //    Release Version:    $ ODF 2 $ 
  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 CTableSelection;
  43. class CTableLinkManager;
  44. class CCell;
  45. class CTablePartContent;
  46.  
  47. //========================================================================================
  48. //    class CTablePart
  49. //========================================================================================
  50.  
  51. class CTablePart : public FW_CEmbeddingPart
  52. {
  53.   public:
  54.     friend class CTableLinkManager;    
  55.  
  56.     FW_DECLARE_AUTO(CTablePart)
  57.  
  58. //----------------------------------------------------------------------------------------
  59. //    Initialization/Destruction
  60. //
  61. public:
  62.     CTablePart(ODPart* odPart);
  63.     virtual ~CTablePart();
  64.  
  65. //----------------------------------------------------------------------------------------
  66. //    API Inherited from FW_CPart
  67. //
  68. public:
  69.     virtual void                Initialize(Environment* ev, ODStorageUnit* storageUnit, FW_Boolean fromStorage);
  70.                 
  71.     // ----- Factory Methods -----
  72.     virtual FW_CFrame*             NewFrame(Environment* ev, 
  73.                                      ODFrame* odFrame, 
  74.                                      FW_CPresentation* presentation,
  75.                                      FW_Boolean fromStorage);
  76.     virtual FW_CContent*         NewPartContent(Environment* ev);
  77.     virtual FW_CLinkManager*    NewLinkManager(Environment* ev);    // Override
  78.  
  79.                                         
  80.     // ----- About -----
  81.     virtual FW_Handled            DoAbout(Environment* ev);
  82.     
  83. //----------------------------------------------------------------------------------------
  84. //    New API
  85. //
  86. public:
  87.       // ----- Other Initialization -----
  88.     void                 DoPostCreate(Environment* ev);
  89.  
  90.     // ----- Change -----
  91.     void                PartChanged(Environment* ev);
  92.     
  93.     CTablePartContent*        GetTableContent(Environment*) const
  94.                                 {return fTableContent;}
  95.     FW_CPresentation*    GetTablePresentation(Environment*) const
  96.                                 {return fTablePresentation;}
  97.                                 
  98.     // ----- Linking Support -----
  99.     CTableSelection*    GetTableSelection(Environment* ev);
  100.  
  101.     void                AboutToClearCell(Environment* ev, const CCell& cell);
  102.     void                ChangeFrameStatus(Environment* ev, const CCell& cell, ODLinkStatus newStatus);
  103.     void                ProxyMoved(Environment* ev, const CCell& fromCell, const CCell& toCell);
  104.  
  105.     // ----- Frames -----
  106.     FW_Boolean            IsFrameValid(Environment* ev, FW_CFrame* frame);
  107.     CTableFrame*        FindValidTableFrame(Environment* ev, CTableFrame* frame1, CTableFrame* frame2);
  108.  
  109. //----------------------------------------------------------------------------------------
  110. //    Data Members
  111. //
  112. private:
  113.       CTablePartContent*        fTableContent;
  114.      FW_CPresentation*        fTablePresentation;
  115.     
  116.     CTableLinkManager*        fTableLinkManager;
  117.     FW_Boolean                fPostCreated;
  118. };
  119.  
  120. #endif
  121.