home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-11-08 | 10.4 KB | 414 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWODPart.h
- // Release Version: $ 1.0d11 $
- //
- // Copyright: © 1995 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
-
- #ifndef FWODPART_H
- #define FWODPART_H
-
- /*
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #ifndef FWEVENTH_H
- #include "FWEventH.h"
- #endif
-
- #ifndef SOM_ODFModule_FW_SOMPart_xh
- #include "FWSOMPrt.xh"
- #endif
-
- #ifndef FWIDLE_H
- #include "FWIdle.h"
- #endif
-
- #ifndef FWPRTDEF_H
- #include "FWPrtDef.h"
- #endif
-
- // ----- OS Includes -----
-
- #ifndef FWWINDOW_H
- #include "FWWindow.h"
- #endif
-
- #ifndef FWODMISS_H
- #include "FWODMiss.h"
- #endif
-
- // ----- Foundation Includes -----
-
- #ifndef FWRUNTYP_H
- #include "FWRunTyp.h"
- #endif
-
- // ----- OpenDoc Includes -----
-
- #ifndef SOM_ODPart_xh
- #include <Part.xh>
- #endif
-
- #ifndef SOM_ODDraft_xh
- #include <Draft.xh>
- #endif
-
- #ifndef SOM_ODDocument_xh
- #include <Document.xh>
- #endif
-
- #ifndef SOM_ODStorageSystem_xh
- #include <ODStor.xh>
- #endif
-
- #ifndef SOM_ODStorageUnit_xh
- #include <StorageU.xh>
- #endif
- */
-
- #ifndef SOM_ODStorageUnitView_xh
- #include <SUView.xh>
- #endif
-
- #ifndef SOM_ODCanvas_xh
- #include <Canvas.xh>
- #endif
-
- #ifndef SOM_ODDragItemIterator_xh
- #include <DgItmIt.xh>
- #endif
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export on
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class FW_CLASS_ATTR ODFrame;
- class FW_CLASS_ATTR ODWindow;
- class FW_CLASS_ATTR ODSession;
- class FW_CLASS_ATTR ODTypeList;
- class FW_CLASS_ATTR ODLinkSource;
- class FW_CLASS_ATTR ODObjectSpec;
- class FW_CLASS_ATTR ODEmbeddedFramesIterator;
- class FW_CLASS_ATTR ODLink;
-
- class FW_CLASS_ATTR FW_CPoint;
- class FW_CLASS_ATTR FW_CPart;
-
- //========================================================================================
- // class FW_CODPart
- //========================================================================================
-
- class FW_CLASS_ATTR FW_CODPart
- {
- //----------------------------------------------------------------------------------------
- // Initialization/Destruction
- //
- protected:
- FW_CODPart() {}
- ~FW_CODPart() {}
-
- //----------------------------------------------------------------------------------------
- // ODPart API
- //
- public:
- //--------------------------------------------------------------------------
- // Initialization
-
- static void InitPart(Environment *ev,
- FW_CPart* part,
- ODStorageUnit* storageUnit);
-
- static void InitPartFromStorage(Environment *ev,
- FW_CPart* part,
- ODStorageUnit* storageUnit);
-
- //--------------------------------------------------------------------------
- // From Layout protocol
-
- static void DisplayFrameAdded(Environment *ev,
- FW_CPart* part,
- ODFrame* odFrame);
-
- static void DisplayFrameRemoved(Environment *ev,
- ODFrame* odFrame);
-
- static void DisplayFrameConnected(Environment *ev,
- ODFrame* odFrame);
-
- static void DisplayFrameClosed(Environment *ev,
- ODFrame* odFrame);
-
- static void AttachSourceFrame(Environment *ev,
- ODFrame* odFrame,
- ODFrame* odSourceFrame);
-
- static void FrameShapeChanged(Environment *ev,
- ODFrame* odFrame);
-
- static void ViewTypeChanged(Environment *ev,
- ODFrame* odFrame);
-
- static void PresentationChanged(Environment *ev,
- ODFrame* odFrame);
-
- static void SequenceChanged(Environment *ev,
- ODFrame* odFrame);
-
- static void LinkStatusChanged(Environment *ev,
- FW_CPart* part,
- ODFrame* odFrame);
-
- static void ContainingPartPropertiesUpdated(Environment *ev,
- ODFrame* odFrame,
- ODStorageUnit* propertyUnit);
-
- static ODInfoType ReadPartInfo(Environment *ev,
- FW_CPart* part,
- ODFrame* odFrame,
- ODStorageUnitView* storageUnitView);
-
- static void WritePartInfo(Environment *ev,
- ODInfoType partInfo,
- ODStorageUnitView* storageUnitView);
-
- static void ClonePartInfo(Environment *ev,
- ODDraftKey key,
- ODInfoType partInfo,
- ODStorageUnitView* storageUnitView,
- ODFrame* scope);
-
- static ODID Open(Environment *ev,
- FW_CPart* part,
- ODFrame* odFrame);
-
- //--------------------------------------------------------------------------
- // From Imaging protocol
-
- static void Draw(Environment *ev,
- ODFacet* facet,
- ODShape* invalidShape);
-
- static void FacetAdded(Environment *ev,
- ODFacet* facet);
-
- static void FacetRemoved(Environment *ev,
- ODFacet* facet);
-
- static void GeometryChanged(Environment *ev,
- ODFacet* facet,
- FW_Boolean clipShapeChanged,
- FW_Boolean externalTransformChanged);
-
- static void HighlightChanged(Environment *ev,
- ODFacet* facet);
-
- static void CanvasChanged(Environment *ev,
- ODFacet* facet);
-
- static void CanvasUpdated(Environment *ev,
- ODCanvas* canvas);
-
- static unsigned long GetPrintResolution(Environment *ev,
- ODFrame* odFrame);
-
- //--------------------------------------------------------------------------
- // From Part Activation protocol
-
- static FW_Boolean BeginRelinquishFocus(Environment *ev,
- FW_CPart* part,
- ODTypeToken focus,
- ODFrame* odOwnerFrame,
- ODFrame* proposedFrame);
-
- static void CommitRelinquishFocus(Environment *ev,
- ODTypeToken focus,
- ODFrame* odOwnerFrame,
- ODFrame* odProposedFrame);
-
- static void AbortRelinquishFocus(Environment *ev,
- ODTypeToken focus,
- ODFrame* ownerFrame,
- ODFrame* proposedFrame);
-
- static void FocusAcquired(Environment *ev,
- ODTypeToken focus,
- ODFrame* ownerFrame);
-
- static void FocusLost(Environment *ev,
- ODTypeToken focus,
- ODFrame* ownerFrame);
-
-
- //--------------------------------------------------------------------------
- // From Part Persistance protocol
-
- static void ExternalizeKinds(Environment *ev,
- ODTypeList* kindset);
-
- static void ChangeKind(Environment *ev,
- ODType kind);
-
- //--------------------------------------------------------------------------
- // From UI Events protocol
-
- static FW_Boolean HandleEvent(Environment *ev,
- FW_CPart* part,
- ODEventData* event,
- ODFrame* odFrame,
- ODFacet* odFacet,
- ODEventInfo* eventInfo);
-
- static void AdjustMenus(Environment *ev,
- FW_CPart* part,
- ODFrame* odFrame);
-
- //--------------------------------------------------------------------------
- // From Undo protocol
-
- static void UndoAction(Environment *ev,
- FW_CPart* part,
- ODActionData* actionState);
-
- static void RedoAction(Environment *ev,
- ODActionData* actionState);
-
- static void DisposeActionState(Environment *ev,
- ODActionData* actionState,
- ODDoneState doneState);
-
- static void WriteActionState(Environment *ev,
- ODActionData* actionState,
- ODStorageUnitView* storageUnitView);
-
- static void ReadActionState(Environment *ev,
- ODStorageUnitView* storageUnitView,
- ODActionData* actionData);
-
- //--------------------------------------------------------------------------
- // From DragAndDrop protocol
-
- static void FulfillPromise(Environment *ev,
- FW_CPart* part,
- ODStorageUnitView* promiseSUView);
-
- static void DropCompleted(Environment *ev,
- ODPart* destPart,
- ODDropResult dropResult);
-
- static ODDragResult DragEnter(Environment *ev,
- ODDragItemIterator* dragInfo,
- ODFacet* facet,
- const FW_CPoint& where);
-
- static ODDragResult DragWithin(Environment *ev,
- ODDragItemIterator* dragInfo,
- ODFacet* facet,
- const FW_CPoint& where);
-
- static void DragLeave(Environment *ev,
- ODFacet* facet,
- const FW_CPoint& where);
-
- static ODDropResult Drop(Environment *ev,
- ODDragItemIterator* dropInfo,
- ODFacet* facet,
- const FW_CPoint& where);
-
- //--------------------------------------------------------------------------
- // From Linking protocol
-
- static ODLinkSource* CreateLink(Environment *ev,
- FW_CPart* part,
- ODByteArray* data);
-
- static void RevealLink(Environment *ev,
- FW_CPart* part,
- ODLinkSource* linkSource);
-
- static void LinkUpdated(Environment *ev,
- FW_CPart* part,
- ODLink* updatedLink,
- ODUpdateID updateID);
-
- // --- for containing parts ---
-
- static void EmbeddedFrameUpdated(Environment *ev,
- FW_CPart* part,
- ODFrame* odFrame,
- ODUpdateID updateID);
-
- static FW_Boolean EditInLinkAttempted(Environment *ev,
- FW_CPart* part,
- ODFrame* odFrame);
-
- //--------------------------------------------------------------------------
- // From Embedding protocol
-
- static ODFrame* RequestEmbeddedFrame(Environment *ev,
- ODFrame* containingFrame,
- ODFrame* baseFrame,
- ODShape* frameShape,
- ODPart* embeddedPart,
- ODTypeToken viewType,
- ODTypeToken presentation,
- FW_Boolean isOverlaid);
-
- static void RemoveEmbeddedFrame(Environment *ev,
- ODFrame* embeddedFrame);
-
- static ODShape* RequestFrameShape(Environment *ev,
- ODFrame* embeddedFrame,
- ODShape* frameShape);
-
- static void UsedShapeChanged(Environment *ev,
- ODFrame* embeddedFrame);
-
- static ODShape* AdjustBorderShape(Environment *ev,
- ODFacet* embeddedFacet,
- ODShape* shape);
-
- static ODStorageUnit* AcquireContainingPartProperties(Environment *ev,
- ODFrame* odFrame);
-
- static FW_Boolean RevealFrame(Environment *ev,
- ODFrame* embeddedFrame,
- ODShape* revealShape);
-
- static void EmbeddedFrameSpec(Environment *ev,
- ODFrame* embeddedFrame,
- ODObjectSpec* spec);
-
- //--------------------------------------------------------------------------
- // Inherited ODPart API
-
- static void Externalize(Environment *ev, FW_CPart* part);
- static void CloneInto(Environment *ev,
- FW_CPart* part,
- ODDraftKey key,
- ODStorageUnit* toSU,
- ODFrame* scope);
-
- static void Release(Environment *ev, FW_CPart* part);
- static void ReleaseAll(Environment *ev, FW_CPart* part);
-
- static ODSize Purge(Environment *ev, FW_CPart*, ODSize size);
-
- };
-
- #if FW_LIB_EXPORT_PRAGMAS
- #pragma lib_export off
- #endif
-
- #endif
-
-
-
-