/****************************************************************************************

		IMFDrawerPart.h

		Copyright: (c) 2001 Eovia Corp. All rights reserved.

		Author:	Emil
		Date:	3/4/99

		COM interface to internal Dock Part objects.

		Revision History

		when		who			what & why
		==========	==========	======================================================

*****************************************************************************************/

#ifndef __IMFDrawerPart__
#define __IMFDrawerPart__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "MCCompObj.h"

//*********************** Globally Unique Ids ********************************

MCDEFINE_GUID(IID_IMFDrawerPart, 0x29b4f884, 0xd25a, 0x11d2, 0x8b, 0x92, 0x0, 0x60, 0x97, 0xb, 0xc5, 0x21);

//****************************************************************************

enum EDrawerType
{
	kDrawerType_Undefined = -1,
	kDrawerType_Normal = 0,
	kDrawerType_Toggle,
	kDrawerType_TriState
};

enum EDrawerState
{
	kDrawerState_Undefined = -1,
	kDrawerState_Closed = 0,
	kDrawerState_Tray,
	kDrawerState_MinOpen,
	kDrawerState_Open,
	kDrawerState_ReOpen //Only use internally (temporary state)
};



/// \addtogroup MCF
/// \{

// ****************************************************************************
//								IMFDrawerPart
// 
/// IMFDrawerPart is the interface of a drawers in MCF.
/// 
struct IMFDrawerPart: public IMCUnknown
{
	virtual EDrawerType		MCCOMAPI GetDrawerType		() const = 0;
	virtual void			MCCOMAPI SetDrawerType		(EDrawerType inDrawerType) = 0;
	virtual EDrawerState	MCCOMAPI GetDrawerState		() const = 0;
	virtual void			MCCOMAPI SetDrawerState		(EDrawerState inDrawerState) = 0;

	virtual int32			MCCOMAPI GetTrayDepth		() const = 0;
	virtual void			MCCOMAPI SetTrayDepth		(int32 inTrayDepth) = 0;
	virtual int32			MCCOMAPI GetMinOpenDepth	() const = 0;
	virtual void			MCCOMAPI SetMinOpenDepth	(int32 inMinOpenDepth) = 0;

	// ****************************************************************************
	//								IsFillDrawer
	// 
	/// Returns true if the drawer fills all the space on the side where it is docked
	/// 
	virtual boolean			MCCOMAPI IsFillDrawer		() const = 0;
	virtual void			MCCOMAPI SetIsFillDrawer	(boolean isFillDrawer) = 0;


	// ****************************************************************************
	//								GetThisWindow
	// 
	/// A drawer is always a window
	/// 
	virtual IMFWindow*		MCCOMAPI GetThisWindow		() = 0;
	 
	// ****************************************************************************
	//								SetDrawerResizeLimits
	// 
	/// Sets the resize limits for the docked or the undocked state of the drawer.
	/// 
	/// \param inResizeLimits  The resize limits to apply
	/// \param dockedLimits    If true, the limits apply when the drawer is docked, else when it is undocked	
	/// 
	virtual void			MCCOMAPI SetDrawerResizeLimits	(const TMCRect& inResizeLimits, boolean dockedLimits) = 0;

	// ****************************************************************************
	//								GetDrawerResizeLimits
	// 
	/// Gets the resize limits for the docked or the undocked state of the drawer
	/// 
	/// \param outResizeLimits  The resize limits applied in the given state
	/// \param dockedLimits     If true, returns the limits used when the drawer is docked, else when it is undocked	
	/// 
	virtual void			MCCOMAPI GetDrawerResizeLimits	(TMCRect& outResizeLimits, boolean dockedLimits) = 0;


	/// Returns the drawer's handle (can be null)
	virtual IMFPart*		MCCOMAPI GetDrawerHandlePart	() = 0;
};

/// \}

#endif