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

		IMFCollapsiblePart.h

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

		Author:	Greg 
		Date:	8/10/98

		COM interface to internal TabPart objects.

		Revision History

		when		who			what & why
		==========	==========	======================================================
		2/23/99		Greg		Added addreffing GetCollapsingPart() and fill attributes
		2/22/99		Ian			GetCollapsingPart() -> 	GetCollapsingPartNoAddRef().
		11/25/98	Ian			Had to add a forward declaration of IMFPart.
		09/14/98	cph			Added include for MCString.h
		
*****************************************************************************************/

#ifndef __IMFCOLLAPSIBLEPART__
#define __IMFCOLLAPSIBLEPART__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "MCCompObj.h"

struct IMFPart;
class  TMFFillAttributes;
class  TMCString;

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

MCDEFINE_GUID(IID_IMFCollapsiblePart, 0x33d0b52, 0x3236, 0x11d2, 0x81, 0x71, 0x0, 0x60, 0x8, 0x96, 0x53, 0x92);

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

enum ECollapseStatus 
{
	kExpanded,
	kCollapsed 
};

enum ECollapsibleStyle 
{
	kDefaultCollapsibleStyle,
	kRightCollapsibleStyle,
	kLeftCollapsibleStyle,
	kLeftNoLineCollapsibleStyle
};
	


/******************************************************************************\
*                                                                              *
*           IMFCollapsibePart                                                  *
*                                                                              *
\******************************************************************************/

/// \addtogroup MCF
/// \{

/// The interface to access collapsible parts
///
struct IMFCollapsiblePart : public IMCUnknown
{
	virtual void				MCCOMAPI	Initialize			(const TMCString& inName, IMFPart* inPart, ECollapseStatus inCollapseStatus) = 0;
	
	virtual void				MCCOMAPI	GetName				(TMCString&	outName) = 0;
	virtual void				MCCOMAPI	SetName				(const TMCString& inName, boolean forceRedraw) = 0;

	virtual void				MCCOMAPI	SetCanCollapse		(boolean canCollapse) = 0;	// hides the collapse/expand arrow, so the user can not change this ...
	virtual boolean				MCCOMAPI	GetCanCollapse		() = 0;							// ... (sounds silly, but it is usefull sometimes)

	virtual void				MCCOMAPI	SetCollapseStatus	(ECollapseStatus inCollapseStatus, boolean inRedraw) = 0;
	virtual void				MCCOMAPI	ToggleCollapseStatus(boolean inRedraw) = 0;
	virtual ECollapseStatus		MCCOMAPI	GetCollapseStatus	() = 0;	
	
	virtual void				MCCOMAPI	SetCollapsingPart	(IMFPart* inPart) = 0;
	virtual void				MCCOMAPI	GetCollapsingPart	(IMFPart** outPart)= 0;

	virtual void				MCCOMAPI	SetMiniPart			(IMFPart* inPart) = 0;
	virtual void				MCCOMAPI	GetMiniPart			(IMFPart** outPart)= 0;

	virtual void				MCCOMAPI	SetCollapsibleStyle (ECollapsibleStyle eStyle ) = 0;
	virtual ECollapsibleStyle	MCCOMAPI	GetCollapsibleStyle	() const = 0;
		

	virtual	TMFFillAttributes&	MCCOMAPI	GetHandleFill		() = 0;
	virtual TMFFillAttributes&	MCCOMAPI	GetTextFill			() = 0;
	virtual void				MCCOMAPI	SetHandleFill		(const TMFFillAttributes& inHandleFill) = 0;
	virtual void				MCCOMAPI	SetTextFill			(const TMFFillAttributes& inTextFill) = 0;

	virtual boolean				MCCOMAPI	GetFillHorizontal	() = 0;
	virtual void				MCCOMAPI	SetFillHorizontal	(boolean inFillHorizontal) = 0;

	virtual int32				MCCOMAPI	GetArrowOffset		() = 0;
	virtual void				MCCOMAPI	SetArrowOffset		(int32 inOffset) = 0;

	// ****************************************************************************
	//								IsSelected
	// 
	/// Returns true if the collapsible part is selected. Note that a collapsible
	/// part can be selected only if it's a TMFSelectableCollapsiblePart or a derived class.
	/// 
	virtual boolean				MCCOMAPI	IsSelected			()=0;

	// ****************************************************************************
	//								SetIsSelected
	// 
	/// Select or deselect a collapsible part. Note that a collapsible
	/// part can be selected only if it's a TMFSelectableCollapsiblePart
	/// or a derived class. When a collapsible part is selected or deselected,
	/// it's set as First Responder.
	/// 
	/// \param inIsSelected  
	/// 
	virtual void 				MCCOMAPI	SetIsSelected		(boolean inIsSelected)=0;

	// ****************************************************************************
	//								SetToolBarPart
	// 
	/// Set the part to diaply in the tool bar.
	/// 
	virtual void				MCCOMAPI	SetToolBarPart		(IMFPart* part) = 0;
};

/// \}


#endif