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

		ISelectableObject.h

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

		ISelectableObject definition

		Author:	Joshua
		Date:	6/3/98
		
		Revision History

		when		who			what & why
		==========	==========	======================================================
		4/20/99		Greg		ISceneSelection uses arrays instead of linked lists

*****************************************************************************************/
#ifndef __ISELECTABLEOBJECT__
#define __ISELECTABLEOBJECT__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "COMTypes.h"
#include "MCClassArray.h"

struct ISceneSelection;
class TSelectionPath;
class TSelectionNode;

//****** Globally Unique Ids *************************************************
MCDEFINE_GUID_H(IID_ISelectableObject);

enum ESelectState
{
	kNotSelected		=0,
	kSelectedInPath		=1,
	kSelectedInLeaf		=2
};
/// \addtogroup ExternalInterface
/// \{

/// <P>Selectable objects can handle adding and removing themselves from scene selections.</P>
struct ISelectableObject : public IMCUnknown
{
	virtual void			MCCOMAPI AddToSelection(ISceneSelection* inSelection, boolean allowMultiple) = 0;
	virtual void			MCCOMAPI RemoveFromSelection(ISceneSelection* inSelection) = 0;

	virtual void			MCCOMAPI GetPath(TSelectionPath& outPath) = 0;
	virtual void			MCCOMAPI GetLeaf(TSelectionNode& leaf) = 0;
	virtual void			MCCOMAPI GetFullPath(TSelectionPath& outPath) = 0;

	virtual void			MCCOMAPI SetIsInCurrentSelection(ESelectState isSelected) = 0;
	virtual ESelectState	MCCOMAPI IsInCurrentSelection() = 0;
	virtual	ESelectState	MCCOMAPI IsInSelection(ISceneSelection* inSelection) = 0;

	//returns the sub selectable object identified by inSubNode (eg one of the paraminfos)
	virtual	ISelectableObject*	MCCOMAPI GetSelectedSubObject	(const TSelectionNode& inSubNode) const = 0;

	virtual ISelectableObject*	MCCOMAPI GetSelectedObject		(const TSelectionPath& path) const = 0;
};

/// \}

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

#endif
