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

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

		Author:	pascalc
		Date:	9/1/2005

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

#ifndef __I3DExHierarchyModule__
#define __I3DExHierarchyModule__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "MCCompObj.h"
#include "IHierarchyWindow.h"


MCDEFINE_GUID_H(IID_I3DExHierarchyModule);
MCDEFINE_GUID_H(IID_I3DExMasterDropCandidate);


struct THierarchyFilter
{
	// should this tree be displayed
	virtual boolean Filter(I3DShTreeElement*) = 0;
	// flatten filter wipe out the hierarchy of groups
	virtual boolean Flatten() = 0;
};


/// Drag and drop candidate for masters (objects, shaders, clips, sounds)
struct I3DExMasterDropCandidate : public IMCUnknown
{
	virtual void 		MCCOMAPI Init(const TMCPtrArray<IMCUnknown>& inMasterList, IMCUnknown* inMainMaster, I3DShScene* origin) = 0;
};


struct I3DExHierarchyModule : public IMCUnknown
{

	// ****************************************************************************
	//								ChooseTree
	// 
	/// Launch a dialog box to choose from Scene Hierarchy
	/// 
	/// \param outSelection  The selection from the dialog
	/// \param inTitle       The title of the dialog
	/// \param inExplanation A small explanation (1 or 2 lines) displayed in the dialog
	/// \param multiple		 select multiple objects
	/// \param inFilter      Filters the view displayed in the dialog, if nil displays a combo box
	/// \param defaultSelection	The selection displayed at opening
	/// \return False if the dialog was canceled
	virtual boolean		MCCOMAPI ChooseTree		(ISceneSelection** outSelection, const TMCString& inTitle, const TMCString& inExplanation, boolean multiple = true, THierarchyFilter* inFilter = nil, const ISceneSelection* defaultSelection = nil, I3DShTreeElement* root = nil) = 0;

	///returns the id of the current content (tab)
	virtual EHierarchyTabs 		MCCOMAPI GetCurrentContent	() = 0;

	///Makes sure the given content is visible (eg by switching to the right tab)
	virtual void				MCCOMAPI RevealContent		(EHierarchyTabs contentID) = 0;

};

#endif
