home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 4.5 KB | 152 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Proxy.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef PROXY_H
- #define PROXY_H
-
- #ifndef PART_H
- #include "Part.h"
- #endif
-
- #ifndef CELL_H
- #include "Cell.h"
- #endif
-
- // ----- ODF Includes -----
-
- #ifndef FWPROXY_H
- #include "FWProxy.h"
- #endif
-
- // ----- Foundation Layer -----
-
- #ifndef FWRUNTYP_H
- #include "FWRunTyp.h"
- #endif
-
- #ifndef FWTCOLL_H
- #include "FWTColl.h"
- #endif
-
- //========================================================================================
- // Forward declarations
- //========================================================================================
-
- class CTablePart;
- class CTableContent;
-
- //========================================================================================
- // class CTableProxy
- //========================================================================================
-
- class CTableProxy : public FW_MProxy
- {
- public:
-
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
- CTableProxy(Environment* ev, CTablePart* tablePart, CTableContent* content, FW_CPresentation* presentation);
- virtual ~ CTableProxy();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- virtual void UsedShapeChanged(Environment *ev,
- FW_CEmbeddingFrame* embeddingFrame,
- ODFrame* odEmbeddedFrame);
-
- virtual ODShape* FrameShapeRequested(Environment* ev,
- FW_CEmbeddingFrame* embeddingFrame,
- ODFrame* odEmbeddedFrame,
- ODShape* askedFrameShape);
-
- virtual void OpenInWindow(Environment* ev, FW_CProxyFrame* proxyFrame);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- void MoveEmbeddedFrames(Environment* ev, const CCell& destCell);
- ODShape* AcquireHiliteShape(Environment* ev, const CCell& cell, FW_CEmbeddingFrame* frame);
-
- // ----- Getters/Setters -----
- const CCell& GetCell() const;
- void SetCell(const CCell& cell);
-
- void Selected(FW_Boolean state);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- protected:
- CTablePart* fTablePart;
- CTableContent* fTableContent;
- CCell fCell;
- FW_Boolean fSelected;
- };
-
- //========================================================================================
- // class CTableProxyCollection
- //========================================================================================
-
- class CTableProxyCollection : public FW_TOrderedCollection<CTableProxy>
- {
- public:
- FW_DECLARE_AUTO(CTableProxyCollection)
-
- CTableProxyCollection() :
- FW_TOrderedCollection<CTableProxy>(){}
- ~CTableProxyCollection() {}
- };
-
- //========================================================================================
- // class CTableProxyCollectionIterator
- //========================================================================================
-
- class CTableProxyCollectionIterator : public FW_TOrderedCollectionIterator<CTableProxy>
- {
- public:
- FW_DECLARE_AUTO(CTableProxyCollectionIterator)
-
- CTableProxyCollectionIterator(CTableProxyCollection* collection) :
- FW_TOrderedCollectionIterator<CTableProxy>(collection){}
- ~CTableProxyCollectionIterator() {}
- };
-
- //========================================================================================
- // CTableProxy Inlines
- //========================================================================================
-
- //----------------------------------------------------------------------------------------
- // CTableProxy::GetCell
- //----------------------------------------------------------------------------------------
- inline const CCell& CTableProxy::GetCell() const
- {
- return fCell;
- }
- //----------------------------------------------------------------------------------------
- // CTableProxy::Selected
- //----------------------------------------------------------------------------------------
- inline void CTableProxy::Selected(FW_Boolean state)
- {
- fSelected = state;
- }
-
- //----------------------------------------------------------------------------------------
- // CTableProxy::SetCell
- //----------------------------------------------------------------------------------------
- inline void CTableProxy::SetCell(const CCell& cell)
- {
- fCell = cell;
- }
-
- #endif
-