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

  1. //========================================================================================
  2. //
  3. //    File:                Proxy.h
  4. //    Release Version:    $ ODF 2 $ 
  5. //
  6. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  7. //
  8. //========================================================================================
  9.  
  10. #ifndef PROXY_H
  11. #define PROXY_H
  12.  
  13. #ifndef PART_H
  14. #include "Part.h"
  15. #endif
  16.  
  17. #ifndef CELL_H
  18. #include "Cell.h"
  19. #endif
  20.  
  21. // ----- ODF Includes -----
  22.  
  23. #ifndef FWPROXY_H
  24. #include "FWProxy.h"
  25. #endif
  26.  
  27. // ----- Foundation Layer -----
  28.  
  29. #ifndef FWRUNTYP_H
  30. #include "FWRunTyp.h"
  31. #endif
  32.  
  33. #ifndef FWTCOLL_H
  34. #include "FWTColl.h"
  35. #endif
  36.  
  37. //========================================================================================
  38. //    Forward declarations
  39. //========================================================================================
  40.  
  41. class CTablePart;
  42. class CTablePartContent;
  43.  
  44. //========================================================================================
  45. //    class CTableProxy
  46. //========================================================================================
  47.  
  48. class CTableProxy : public FW_MProxy
  49. {
  50. public:
  51.  
  52. //----------------------------------------------------------------------------------------
  53. //    Initialization/Destruction
  54. //
  55.   public:
  56.     CTableProxy(Environment* ev, CTablePart* tablePart, CTablePartContent* content);
  57.     virtual ~ CTableProxy();
  58.  
  59. //----------------------------------------------------------------------------------------
  60. //    Inherited API
  61. //
  62.     virtual void         UsedShapeChanged(Environment *ev,
  63.                                       FW_CEmbeddingFrame* embeddingFrame,
  64.                                       ODFrame* odEmbeddedFrame);
  65.  
  66.     virtual ODShape*     FrameShapeRequested(Environment* ev, 
  67.                                     FW_CEmbeddingFrame* embeddingFrame, 
  68.                                     ODFrame* odEmbeddedFrame, 
  69.                                     ODShape* askedFrameShape);
  70.  
  71.     virtual short        CreateFacets(Environment* ev,
  72.                                     FW_CEmbeddingFrame* embeddingFrame,
  73.                                     ODFacet* embeddingFacet,
  74.                                     ODFrame* embeddedFrame,
  75.                                     ODShape* proposedClipShape);
  76.                                     
  77. //----------------------------------------------------------------------------------------
  78. //    New API
  79. //
  80.   public:
  81.     void                MoveEmbeddedFrames(Environment* ev, const CCell& destCell);
  82.     ODShape*            AcquireHiliteShape(Environment* ev, const CCell& cell, FW_CEmbeddingFrame* frame);
  83.  
  84.     // ----- Getters/Setters -----
  85.     const CCell&         GetCell() const;
  86.     void                SetCell(const CCell& cell);    
  87.     
  88.     ODUpdateID            GetLinkSpecID()    
  89.                                 { return fLinkSpecID; }
  90.     void                SetLinkSpecID(ODUpdateID id)
  91.                                 { fLinkSpecID = id; }
  92.  
  93. //----------------------------------------------------------------------------------------
  94. //    Data Members
  95. //
  96.   private:
  97.     CTablePart*            fTablePart;
  98.     CTablePartContent*    fTableContent;
  99.     CCell                fCell;
  100.     ODUpdateID            fLinkSpecID;        // id of link spec written to clipboard
  101. };
  102.  
  103. //========================================================================================
  104. // class CTableProxyCollection
  105. //========================================================================================
  106.  
  107. class CTableProxyCollection : public FW_TOrderedCollection<CTableProxy>
  108. {
  109. public:
  110.     FW_DECLARE_AUTO(CTableProxyCollection)
  111.     
  112.     CTableProxyCollection() :
  113.         FW_TOrderedCollection<CTableProxy>(){}
  114.     ~CTableProxyCollection() {}
  115. };
  116.  
  117. //========================================================================================
  118. // class CTableProxyCollectionIterator
  119. //========================================================================================
  120.  
  121. class CTableProxyCollectionIterator : public FW_TOrderedCollectionIterator<CTableProxy>
  122. {
  123. public:
  124.     FW_DECLARE_AUTO(CTableProxyCollectionIterator)
  125.     
  126.     CTableProxyCollectionIterator(CTableProxyCollection* collection) :
  127.         FW_TOrderedCollectionIterator<CTableProxy>(collection){}
  128.     ~CTableProxyCollectionIterator() {}
  129. };
  130.  
  131. //========================================================================================
  132. //    CTableProxy Inlines
  133. //========================================================================================
  134.  
  135. //----------------------------------------------------------------------------------------
  136. //    CTableProxy::GetCell
  137. //----------------------------------------------------------------------------------------
  138. inline const CCell& CTableProxy::GetCell() const
  139. {
  140.     return fCell;
  141. }
  142.  
  143. //----------------------------------------------------------------------------------------
  144. //    CTableProxy::SetCell
  145. //----------------------------------------------------------------------------------------
  146. inline void CTableProxy::SetCell(const CCell& cell)
  147. {
  148.     fCell = cell;
  149. }
  150.  
  151. #endif
  152.