#ifdef __PRIVATE__
//#
//#	File:		FacetB.idl
//#
//#	Contains:	SOM class definition for ODBaseFacet
//#
//#	Written by:	Joshua Susser
//#
//#	Copyright:	c 1994 by Apple Computer, Inc., all rights reserved.
//#
//#	Change History (most recent first):
//#
//#		 <9>	10/18/94	JBS		1188065: change return type of DragEnter &
//#									DragWithin to ODDragResult
//#		 <8>	 8/16/94	JBS		1180387: add CreateCanvas()
//#		 <7>	 8/15/94	JBS		1180387: added Imaging factory methods
//#		 <6>	 8/12/94	JBS		1179920: move fWindow from Facet to Frame
//#		 <5>	 8/10/94	JBS		1179919: coordinate system bias changes
//#		 <4>	  8/9/94	VL		1179857: DragEnter and DragWithin return
//#									ODBoolean.
//#		 <3>	 6/22/94	JBS		add functionprefix
//#		 <2>	  6/8/94	NP		Restore lost changes.
//#		 <3>	  6/7/94	RR		Privatise change log
//#		 <2>	 5/23/94	RR		ChangeGeometry replaces ChangeClipShape and
//#									ChangeExternalTransform
//#
//#	To Do:
//#
#else
//#	Copyright:	c 1993-1994 by Apple Computer, Inc., all rights reserved.
#endif

#ifndef _FACETB_
#define _FACETB_

#ifndef _ODOBJECT_
#include "ODObject.idl"
#endif

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

interface  ODBaseFacet;

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

interface  ODCanvas;
interface  ODDragItemIterator;
interface  ODFacet;
interface  ODFacetIterator;
interface  ODFrame;
interface  ODShape;
interface  ODTransform;
interface  ODWindow;

//=====================================================================================
// ODBaseFacet
//=====================================================================================

interface ODBaseFacet :  ODObject
{
	ODFrame GetFrame();

	ODFacet CreateEmbeddedFacet(in ODFrame frame,
								in ODShape clipShape,
								in ODTransform externalTransform,
								in ODCanvas canvas,
								in ODCanvas biasCanvas,
								in ODFacet siblingFacet,
								in ODFramePosition position);
        
	void RemoveFacet(in ODFacet facet);

	void MoveBefore(in ODFacet child,
					in ODFacet sibling);

	void MoveBehind(in ODFacet child,
				    in ODFacet sibling);

	ODFacet GetContainingFacet();
  
	ODFacetIterator CreateFacetIterator(in ODTraversalType traversalType,
										in ODSiblingOrder siblingOrder);

  	ODShape CreateShape();

	ODShape GetClipShape(in ODCanvas biasCanvas);

	void ChangeGeometry(in ODShape clipShape,
						in ODTransform transform,
						in ODCanvas biasCanvas);

	ODShape GetAggregateClipShape(in ODCanvas biasCanvas);

	ODShape GetWindowAggregateClipShape(in ODCanvas biasCanvas);

	void InvalidateAggregateClipShape();
  
	ODShape GetActiveShape(in ODCanvas biasCanvas);

	void ChangeActiveShape(in ODShape activeShape, in ODCanvas biasCanvas);

	ODTransform CreateTransform();

	ODTransform GetExternalTransform(in ODCanvas biasCanvas);

	void InternalTransformChanged();

	ODTransform GetFrameTransform(in ODCanvas biasCanvas);

	ODTransform GetContentTransform(in ODCanvas biasCanvas);

   	ODTransform GetWindowFrameTransform(in ODCanvas biasCanvas);

	ODTransform GetWindowContentTransform(in ODCanvas biasCanvas);

	void InvalidateAggregateTransforms();

	ODCanvas CreateCanvas(in ODGraphicsSystem graphicsSystem,
						  in ODPlatformCanvas platformCanvas,
						  in ODBoolean isDynamic,
						  in ODBoolean isOffscreen);

	ODBoolean HasCanvas();

	ODCanvas GetCanvas();

	void SetCanvas(in ODCanvas canvas);

	ODWindow GetWindow();

	ODInfoType GetPartInfo();

	void SetPartInfo(in ODInfoType partInfo);

	ODDragResult DragEnter(in ODPoint point,
						   in ODDragItemIterator dragInfo,
						   in ODCanvas biasCanvas);

	ODDragResult DragWithin(in ODPoint point,
							in ODDragItemIterator dragInfo,
							in ODCanvas biasCanvas);

	void DragLeave(in ODPoint point,
				   in ODCanvas biasCanvas);

	ODDropResult Drop(in ODPoint point,
					  in ODDragItemIterator dropInfo,
					  in ODCanvas biasCanvas);

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

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

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

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

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

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

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

	void InvalidateActiveBorder();

	void DrawActiveBorder();

	void MouseEnter(in ODPoint where, in ODCanvas biasCanvas);

	void MouseWithin(in ODPoint where, in ODCanvas biasCanvas);
      
	void MouseLeave();

	ODBoolean ContainsPoint(in ODPoint point, in ODCanvas biasCanvas);

	ODBoolean ActiveBorderContainsPoint(in ODPoint point, in ODCanvas biasCanvas);

	ODBoolean IsSelected();

	void SetSelected(in ODBoolean isSelected);

	ODHighlight GetHighlight();
  
	void ChangeHighlight(in ODHighlight highlight);

#ifdef __PRIVATE__

	void InitBaseFacet();
	void InitChildBaseFacet();
   
#endif

#ifdef __SOMIDL__
  implementation
  {
    functionprefix = ODBaseFacet;
	
    override:
    	somInit,
    	somUninit;
	releaseorder:
        GetFrame,
        CreateEmbeddedFacet,
        RemoveFacet,
        MoveBefore,
        MoveBehind,
        GetContainingFacet,
        CreateFacetIterator,
		CreateShape,
        GetClipShape,
        ChangeGeometry,
        GetAggregateClipShape,
        GetWindowAggregateClipShape,
        InvalidateAggregateClipShape,
        GetActiveShape,
        ChangeActiveShape,
		CreateTransform,
        GetExternalTransform,
        InternalTransformChanged,
        GetFrameTransform,
        GetContentTransform,
        GetWindowFrameTransform,
        GetWindowContentTransform,
        InvalidateAggregateTransforms,
		CreateCanvas,
        HasCanvas,
        GetCanvas,
        SetCanvas,
        GetWindow,
        GetPartInfo,
        SetPartInfo,
        DragEnter,
        DragWithin,
        DragLeave,
        Drop,
        Update,
        Invalidate,
        Validate,
        Draw,
        DrawChildren,
        DrawChildrenAlways,
        DrawnIn,
        InvalidateActiveBorder,
        DrawActiveBorder,
        MouseEnter,
        MouseWithin,
        MouseLeave,
        ContainsPoint,
        ActiveBorderContainsPoint,
        IsSelected,
        SetSelected,
        GetHighlight,
        ChangeHighlight,
        GetNode,
        NeedsUpdate,
        SetNeedsUpdate,
	#ifdef __PRIVATE__
		InitBaseFacet,
		InitChildBaseFacet;
	#else
		reserved1;
	#endif

	majorversion = 1; minorversion = 0;

  };
#endif
};

#endif //# _FACETB_
