#ifdef __PRIVATE__
//#
//#	File:		Frame.idl
//#
//#	Contains:	SOM class definition for ODFrame
//#
//#	Written by:	Joshua Susser
//#
//#	Copyright:	c 1994 by Apple Computer, Inc., all rights reserved.
//#
//#	Change History (most recent first):
//#
//#		<10>	 9/26/94	JBS		1186332, 1188981 - nonpersistence; 1183568
//#									- keep fIsDirty flag
//#		 <9>	  9/6/94	CC		1153777: Added fLinkStatus field.
//#		 <8>	 8/26/94	VL		1183174: Removed CloneTo.
//#		 <7>	 8/15/94	JBS		1180387: added Imaging factory methods
//#		 <6>	 8/10/94	JBS		1179919: coordinate system bias changes;
//#									1179920: Frame::GetWindow()
//#		 <5>	  7/7/94	JBS		added ReleaseAll override
//#		 <4>	 6/29/94	JBS		#1155479: frameGroup & sequenceNumber
//#		 <3>	 6/22/94	JBS		add functionprefix
//#		 <2>	  6/8/94	NP		Restore lost changes.
//#		 <6>	  6/7/94	RR		Privatise change log
//#
//#	To Do:
//#
#else
//#	Copyright:	c 1993-1994 by Apple Computer, Inc., all rights reserved.
#endif

#ifndef _FRAME_
#define _FRAME_

#ifndef _PSTOBJ_
#include "PstObj.idl"
#endif

//==============================================================================
// Types
//==============================================================================

//==============================================================================
// Classes defined in this interface
//==============================================================================

interface  ODFrame;

//==============================================================================
// Classes used by this interface
//==============================================================================

interface  ODFrameFacetIterator;

interface  ODCanvas;
interface  ODDraft;
interface  ODFacet;
interface  ODPart;
interface  ODShape;
interface  ODStorageUnit;
interface  ODTransform;
interface  ODDragItemIterator;
interface  ODWindow;

#ifdef __PRIVATE__
//==============================================================================
// Implementation Types
//==============================================================================

typedef somToken OrderedCollection;
#endif

//# $$$$$ struct ODPoint;

//==============================================================================
// ODFrame
//==============================================================================

interface ODFrame :  ODPersistentObject
{

//# contianing frame

	ODFrame GetContainingFrame();
	
	void SetContainingFrame(in ODFrame frame);

//# window

	ODWindow GetWindow();
	
	void SetWindow(in ODWindow window);

//# getters/setters:

	ODULong GetFrameGroup();
	
	void SetFrameGroup(in ODULong groupID);

	ODULong GetSequenceNumber();
	
	void SetSequenceNumber(in ODULong sequenceNumber);

	ODBoolean IsRoot();

	ODBoolean IsSubframe();
	
	void SetSubframe(in ODBoolean isSubframe);

	ODBoolean IsOverlaid();

	ODBoolean IsFrozen();
	
	void SetFrozen(in ODBoolean isFrozen);

	ODBoolean DoesPropagateEvents();
	
	void SetPropagateEvents(in ODBoolean doesPropagateEvents);

//# part

	ODPart  GetPart();

	void ChangePart(in ODPart part);

	ODInfoType  GetPartInfo();
	
	void SetPartInfo(in ODInfoType partInfo);

	ODTypeToken GetViewType();
	
	void SetViewType(in ODTypeToken viewType);

	void ChangeViewType(in ODTypeToken viewType);

	ODTypeToken GetPresentation();
	
	void SetPresentation(in ODTypeToken presentation);

	void ChangePresentation(in ODTypeToken presentation);

//# facets

	void FacetAdded(in ODFacet facet);

	void FacetRemoved(in ODFacet facet);

	ODFrameFacetIterator  CreateFacetIterator();
	
//# shapes:

	ODShape CreateShape();

	//# frame shape
	
	ODShape  GetFrameShape(in ODCanvas biasCanvas);

	void ChangeFrameShape(in ODShape shape, in ODCanvas biasCanvas);

	ODShape  RequestFrameShape(in ODShape shape, in ODCanvas biasCanvas);

	//# used shape
	
	ODShape  GetUsedShape(in ODCanvas biasCanvas);

	void ChangeUsedShape(in ODShape shape, in ODCanvas biasCanvas);

//# transformations:

	ODTransform CreateTransform();

	ODTransform GetInternalTransform(in ODCanvas biasCanvas);

	void ChangeInternalTransform(in ODTransform transform, in ODCanvas biasCanvas);
	
//# content extent:

	ODPoint GetContentExtent();
	
	void ChangeContentExtent(in ODPoint contentExtent);

//# drag&drop:

   ODBoolean  IsDroppable();
   
   void      SetDroppable(in ODBoolean isDroppable);

   ODBoolean  IsDragging();
   
   void      SetDragging(in ODBoolean isDragging);

//# linking:

   void        ContentChanged(in ODChangeID change);
   
   void        ChangeLinkStatus(in ODLinkStatus status);
   
   ODLinkStatus  GetLinkStatus();

//# invalidation/draw:

   void Invalidate(in ODShape invalidShape, in ODCanvas biasCanvas);

   void Validate(in ODShape validShape, in ODCanvas biasCanvas);

   void InvalidateActiveBorder();

   void DrawActiveBorder();

//# ref counting

   void Close();

   void Remove();


#ifdef __PRIVATE__

	OrderedCollection*  GetFacets();

	void CommonInitFrame();

	void InitFrame(in ODStorageUnit storageUnit,
				   in ODFrame containingFrame,
				   in ODShape frameShape,
				   in ODCanvas biasCanvas,
				   in ODPart part,
				   in ODTypeToken viewType,
				   in ODTypeToken presentation,
				   in ODBoolean isRoot,
				   in ODBoolean isOverlaid);

	void InitFrameFromStorage(in ODStorageUnit  storageUnit);

	void InitFrameNonPersistent(in ODDraft draft,
								in ODID id,
								in ODFrame containingFrame,
								in ODShape frameShape,
								in ODCanvas biasCanvas,
								in ODPart part,
								in ODTypeToken viewType,
								in ODTypeToken presentation,
								in ODBoolean isRoot,
								in ODBoolean isOverlaid);

#endif  


#ifdef __SOMIDL__
	implementation
  	{
	functionprefix = ODFrame;
	
	override:
    	somInit,
		somUninit,
        Purge,
        Release,
		ReleaseAll,
        Externalize,
		GetID,
		CloneInto;
		
    releaseorder:
        GetContainingFrame,
        SetContainingFrame,
		GetWindow,
		SetWindow,
        GetFrameGroup,
        SetFrameGroup,
		GetSequenceNumber,
		SetSequenceNumber,
        IsRoot,
        IsSubframe,
        SetSubframe,
        IsOverlaid,
        IsFrozen,
        SetFrozen,
        DoesPropagateEvents,
        SetPropagateEvents,
        GetPart,
        ChangePart,
        GetPartInfo,
        SetPartInfo,
        GetViewType,
        SetViewType,
        ChangeViewType,
        GetPresentation,
        SetPresentation,
        ChangePresentation,
        FacetAdded,
        FacetRemoved,
        CreateFacetIterator,
		CreateShape,
        GetFrameShape,
        ChangeFrameShape,
        RequestFrameShape,
        GetUsedShape,
        ChangeUsedShape,
		CreateTransform,
        GetInternalTransform,
        ChangeInternalTransform,
        GetContentExtent,
        ChangeContentExtent,
        IsDroppable,
        SetDroppable,
        IsDragging,
        SetDragging,
        ContentChanged,
        ChangeLinkStatus,
        GetLinkStatus,
        Invalidate,
        Validate,
        InvalidateActiveBorder,
        DrawActiveBorder,
        Close,
        Remove,
        GetFacets,
        CommonInitFrame,
        InitFrame,
        InitFrameFromStorage,
		InitFrameNonPersistent;
		
    #ifdef __PRIVATE__
	passthru C_xh = "
	""
	"class OrderedCollection;"
	"";

		ODDraft				fDraft;
		ODID				fNPID;
		ODBoolean			fIsDirty;
		
		ODFrame				fContainingFrame;
		OrderedCollection*	fFacets;
		ODWindow			fWindow;
	  
		ODShape				fFrameShape;
		ODShape				fUsedShape;
		ODTransform			fInternalTransform;
		ODPoint				fContentExtent;

		ODPart				fPart;
		ODInfoType			fPartInfo;
		ODTypeToken			fViewType;
		ODTypeToken			fPresentation;

		ODULong				fFrameGroup;
		ODULong				fSequenceNumber;

		ODLinkStatus 		fLinkStatus;
		ODBoolean			fIsRoot;
		ODBoolean			fIsSubframe;
		ODBoolean			fIsOverlaid;
		ODBoolean			fIsFrozen;
		ODBoolean			fIsDroppable;
		ODBoolean			fIsDragging;
		ODBoolean 			fDoesPropagateEvents;
	#endif

  };
#endif
};

#endif //# _FRAME_
