#ifdef __PRIVATE__
//#
//#	File:		DrPlExt.idl
//#
//#	Contains:	Class definition for DrawPalette extension
//#
//#	Written by:	Jeff Hanson
//#
//#	Copyright:	c 1994-95 by Novell, all rights reserved.
//#
//#
#else
//#	Copyright:	c 1994-1995 by Novell, Inc., all rights reserved.
#endif

#ifndef _DRPLEXT_
#define _DRPLEXT_

#ifndef _EXTENSN_
#include "Extensn.idl"
#endif

//=====================================================================================
// classes used in this file
//=====================================================================================

interface ODToolSpaceManager;
interface ODObject;
interface ODToolSpaceObj;
interface ODShape;
interface ODSession;
interface ToolInfoList;

//=====================================================================================
// classes defined in this file
//=====================================================================================

interface DrawPaletteExt;

//=====================================================================================
// Implementation Types
//=====================================================================================

#ifdef __PRIVATE__
typedef somToken ODToolSpaceDomain;
typedef somToken ODToolSpacePos;
typedef somToken InitCompletedProc;
typedef somToken HBITMAP;
#endif


interface DrawPaletteExt : ODExtension
{
	void InstallCompletedProc(in InitCompletedProc anInitCompletedProc);
	void CallInitCompleted();

	void GetSize(out ODRect anODRect);
	void SetSize(in ODRect anODRect);
	
	void GetFloatRect(in ODRect anODRect); 
	void SetFloatRect(in ODRect anODRect);
	 
	ODToolSpaceObj GetToolSpaceObj();
	void SetToolSpaceObj(in ODToolSpaceObj aToolSpaceObj);
	
	ODToolSpacePos GetPos();
	void SetPos(in ODToolSpacePos aPos);
	
	ODPlatformWindow GetToolSpaceWnd();
	void SetToolSpaceWnd(in ODPlatformWindow aToolSpaceWnd);
	
	ODShape GetPartFrameShape();
	void SetPartFrameShape(in ODShape aPartFrameShape);
	
	ODToolSpaceDomain GetDomain();
	void SetDomain(in ODToolSpaceDomain aTSDomain);

	ODSession GetSession();
	void SetSession(in ODSession aSession);

	ODInfoType GetUserInfo();
	void SetUserInfo(in ODInfoType anInfoPtr);

	ODULong AddToolInfo(in ODULong aToolID, in ODRect bounds, 
										in HBITMAP toolBMP, in ODUShort state);
	void RemoveToolInfo(in ODULong aToolInfo);

	ODULong GetFirstTool();
	ODULong GetNextTool(in ODULong aTool);
	ODULong GetLastTool();

	void GetNextToolBounds(in ODRect theBounds);

	ODCoordinate GetToolWidth();
	void SetToolWidth(in ODCoordinate aToolWidth);

	ODCoordinate GetToolHeight();
	void SetToolHeight(in ODCoordinate aToolHeight);

	ODULong CreateTool(in ODULong toolID, in HBITMAP toolBMP, in ODUShort state);
	void DestroyTool(in ODULong toolID);

	ODUShort GetToolState(in ODULong aTool);
	void SetToolState(in ODULong aTool, in ODUShort state);

	ODULong GetToolID(in ODULong aTool);
	void SetToolID(in ODULong aTool, in ODULong anID);

	ODULong PtInTool(in ODPoint aPnt);

	void UpdateTools(in ODPlatformCanvas aCanvas);

	void ArrangeTools();

#ifdef __SOMIDL__
	implementation
	{
		majorversion = 1;
		minorversion = 0;
		
	override:
		somInit,
		somUninit,
		InitExtension,
		Release;

	releaseorder:
		InstallCompletedProc,
		CallInitCompleted,
		GetSize,
		SetSize,
		GetFloatRect,
		SetFloatRect,
		GetToolSpaceObj,
		SetToolSpaceObj,
		GetPos,
		SetPos,
		GetToolSpaceWnd,
		SetToolSpaceWnd,
		GetPartFrameShape,
		SetPartFrameShape,
		GetDomain,
		SetDomain,
		GetSession,
		SetSession,
		GetUserInfo,
		SetUserInfo,
		AddToolInfo,
		RemoveToolInfo,
		GetFirstTool,
		GetNextTool,
		GetLastTool,
		GetNextToolBounds,
		GetToolWidth,
		SetToolWidth,
		GetToolHeight,
		SetToolHeight,
		CreateTool,
		DestroyTool,
		GetToolState,
		SetToolState,
		GetToolID,
		SetToolID,
		PtInTool,
		UpdateTools,
		ArrangeTools;


	// instance variables
    #ifdef __PRIVATE__
		passthru C_xh =
			""
			"#define	kDrawPaletteExt		\"WordPerfect:DrawPalette:Extension\""
			"typedef void (*InitCompletedProc)(ODObject*);"
			""
			"#define kDrawToolStateOff	0"
			"#define kDrawToolStateOn	1"
			"";
		InitCompletedProc		fInitCompletedProc;
		ODObject				fPart;
		ODRect					fDrawPaletteRect;
		ODToolSpaceObj			fToolSpaceObj;
		ODToolSpacePos			fPos;
		ODPlatformWindow		fToolSpaceWnd;
		ODShape					fPartFrameShape;
		ODToolSpaceDomain		fTSDomain;
		ODSession 				fSession;
		ODInfoType				fUserInfo;
		ToolInfoList			fToolInfoList;
		ODCoordinate			fToolWidth;
		ODCoordinate			fToolHeight;
		ODRect					fFloatRect;
	#endif
	};
#endif
};

#endif
