#ifdef __PRIVATE__
//#	File:		ODTlWnd.h
//#
//#	Contains:	ODToolWindow class definition
//#
//#	Written by:	Jeff Hanson
//#
//#	Copyright:	c 1994-95 by Novell, Inc., all rights reserved.
//#
//#	Change History (most recent first):
//#
//#		 <1>	 1/20/95	JH		Created
//#
//#	To Do:
#else
//#	Copyright:	c 1993-1994 by Novell, Inc., all rights reserved.
#endif

#ifndef _ODTLWND_
#define _ODTLWND_

#ifndef _WINDOW_
#include "Window.idl"
#endif

//==============================================================================
// Theory of Operation
//==============================================================================

/*
	This class defines toolspace used with ODToolSpaceManager.
*/

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

interface ODToolWindow;

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

interface ODSession;
interface ODToolSpaceManager;
interface ODToolSpaceObj;

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

#ifdef __PRIVATE__
typedef somToken HINSTANCE;
#endif

//==============================================================================
// ODToolWindow
//==============================================================================

interface ODToolWindow : ODWindow
{
	void InitToolWindow(in ODPart requestingPart, in ODSession session,
										in ODPlatformWindow parentWindow,
										in ODToolSpaceManager theTSMgr,
										in ODRect wndBounds,
										in ODToolSpaceObj aToolSpaceObj,
										in ODBoolean isFloating);

	ODPlatformWindow CreatePlatformWindow(in ODPlatformWindow parent, in ODRect bounds, 
										in ODBoolean isFloating);

	ODPlatformWindow GetParentWindow();

	void SetParentWindow(in ODPlatformWindow aWnd);

	void HandleMove(in ODULong lParam);

	void HandleDestroy();

	ODBoolean SetSizePosition(in ODSShort x, in ODSShort y, in ODSShort width, in ODSShort height);

	ODToolSpaceObj GetToolSpaceObj();

	void SetToolSpaceObj(in ODToolSpaceObj aToolSpaceObj);

#ifdef __SOMIDL__
	implementation
	{
  	functionprefix = ODToolWindow;

    override:
		somInit,
		somUninit,
		InitWindow, 
		InitWindowFromStorage,
		CommonInitWindow,
		Show,
		Hide,
		AdjustWindowShape,	
		GetFacetUnderPoint,	
		Open,
		Select,
		HandleActivateEvent,
		HandleUpdateEvent,
		Update,
		Drag,
		SuspendResume,
		Externalize,
		SetStorageUnit,
		CreateRootFrame,
		CreateRootFacet,
		DrawActiveBorder,
		GetRootPart,
		GetRootFrame,
		GetRootFacet,
		SetRootPart,
		SetRootFrame,
		SetRootFacet;

    releaseorder:
		InitToolWindow,
		CreatePlatformWindow, 
		GetParentWindow,
		SetParentWindow,
		HandleMove,
		HandleDestroy,
		SetSizePosition,
		GetToolSpaceObj,
		SetToolSpaceObj;

    #ifdef __PRIVATE__
		passthru C_xh =
			""
			"ODBoolean IsToolWindow(ODPlatformWindow aWindow);"
			"ODToolWindow* GetToolWindow(ODPlatformWindow aWindow);"
			"#define kODToolWindowID \"appl:ODToolWindow$class,1.0.0\""
			"extern const ODType kPresentationToolSpace;"	
			"#define kODToolWndClass	\"ODToolWndClass\""
			"";

		ODBoolean				fInitialized;
		ODToolSpaceManager		fTSMgr;
		ODPlatformWindow		fParentWindow;
		ODToolSpaceObj			fToolSpaceObj;
		HINSTANCE				fInst;
	#endif
  };
#endif
};

#endif

	
