home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-09-17 | 4.5 KB | 159 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: Frame.h
- // Release Version: $ ODF 2 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FRAME_H
- #define FRAME_H
-
- // ----- TablePart Includes -----
-
- #ifndef PART_H
- #include "Part.h"
- #endif
-
- #ifndef CELL_H
- #include "Cell.h"
- #endif
-
- #ifndef CONSTANT_H
- #include "Constant.h"
- #endif
-
- // ----- ODF Includes -----
-
- #ifndef FWDRGDRP_H
- #include "FWDrgDrp.h"
- #endif
-
- #ifndef FWFRMING_H
- #include "FWFrming.h"
- #endif
-
- #ifndef FWPRESEN_H
- #include "FWPresen.h"
- #endif
-
- #ifndef FWRECSHP_H
- #include "FWRecShp.h"
- #endif
-
- //========================================================================================
- // Forward declarations
- //========================================================================================
-
- class FW_CGraphicContext;
- class CTablePart;
- class CTableSelection;
- class CTableProxy;
- class CTablePartContent;
- class FW_CViewContext;
- class CTableView;
-
- //========================================================================================
- // class CTableFrame
- //========================================================================================
-
- class CTableFrame : public FW_CEmbeddingFrame, public FW_MDraggableFrame, public FW_MDroppableFrame
- {
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- public:
-
- FW_DECLARE_AUTO(CTableFrame)
-
- CTableFrame(Environment* ev,
- ODFrame* odFrame,
- FW_CPresentation* presentation,
- CTablePart* tablePart,
- CTablePartContent* tableContent);
- virtual ~ CTableFrame();
-
- //----------------------------------------------------------------------------------------
- // Inherited API
- //
- public:
- // ----- Getters/Setters -----
- CTableSelection* GetSelection(Environment* ev) const;
- ETableLoc GetDragLocation() const;
- CCell GetDragCell() const;
- CCell GetDragSourceCell() const;
-
- // ----- Focus change -----
- virtual void FocusStateChanged(Environment* ev, ODTypeToken focus, FW_Boolean newState, ODFrame* newOwner);
-
- virtual void FrameShapeChanged(Environment* ev);
-
- // ----- Events -----
- virtual FW_Handled DoVirtualKey(Environment* ev, const FW_CVirtualKeyEvent& theVirtualKeyEvent);
- virtual FW_Handled DoMouseDownInEmbeddedFrameBorder(Environment* ev, const FW_CBorderMouseEvent& theBorderMouseEvent);
-
- // ----- Window Geometry -----
- virtual void AdjustZoomedWindowSize(Environment *ev, FW_CPoint& proposedSize);
-
- // ----- Views & Geometry -----
- virtual void PostCreateViewFromStream(Environment* ev);
-
- // ----- Drag And Drop -----
- virtual ODDragResult CanAcceptDrop(Environment *ev, ODDragItemIterator* dragInfo);
- virtual FW_CDropTracker* NewDropTracker(Environment *ev, FW_CView* view, ODFacet* facet);
-
- virtual FW_CDragCommand* NewDragCommand(Environment *ev,
- FW_CFrame* theFrame,
- const FW_CMouseEvent& theMouseEvent);
- virtual FW_CDropCommand* NewDropCommand(Environment *ev,
- FW_CFrame* frame,
- ODDragItemIterator* dropInfo,
- ODFacet* odFacet,
- const FW_CPoint& dropPoint);
-
- virtual FW_CClipboardCommand* NewClipboardCommand(Environment* ev, ODCommandID commandID);
-
- virtual FW_CInsertCommand* NewInsertCommand(Environment* ev, const FW_PFileSpecification& fileSpec);
-
- virtual FW_Handled Drag(Environment* ev, const FW_CMouseEvent& event);
-
- // ----- Linking -----
- virtual void FacetAdded(Environment* ev, ODFacet* facet, unsigned short facetCount);
-
- //----------------------------------------------------------------------------------------
- // New API
- //
- public:
- void ChangeEmbeddedFacetSelectState(Environment* ev, FW_Boolean state);
-
- void MoveProxy(Environment* ev, CTableProxy* proxy, const CCell& destCell);
-
- void SelectCell(Environment* ev, const CCell& cell);
-
- CTablePartContent* GetTableContent(Environment*) const
- {return fTableContent;}
- CTableView* GetTableView(Environment*) const
- {return fTableView;}
-
- FW_CRect GetContentRect(Environment* ev) const;
- void AdjustContentViewSize(Environment* ev, FW_ERedrawVerb redraw);
-
- //----------------------------------------------------------------------------------------
- // Data Members
- //
- protected:
- // ----- Part back-pointer -----
- CTablePart* fTablePart;
- CTablePartContent* fTableContent;
-
- // ----- Drag & drop state variables -----
- CCell fDraggedCell;
-
- FW_CRectShape fSelectFrame;
-
- CTableView* fTableView;
- };
-
- #endif
-