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

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

		Author:	Arnaud
		Date:	1/24/2005

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

#ifndef __BasicPrefsComponent__
#define __BasicPrefsComponent__

#if CP_PRAGMA_ONCE
#pragma once
#endif


#include "BasicCOMImplementations.h"
#include "IExPrefsComponent.h"
#include "MCCountedPtrHelper.h"

class TMCCommandBindingContext;
class TMCCommandBindingGroup;


class TBasicPrefsComponent : public IExPrefsComponent, public TBasicDataExchanger 
{
public:	
	virtual MCCOMErr	MCCOMAPI QueryInterface	(const MCIID &riid, void** ppvObj)
	{
		if (MCIsEqualIID(riid, IID_IExPrefsComponent))
		{
			TMCCountedGetHelper<IExPrefsComponent> result(ppvObj);
			result= this;
			return MC_S_OK;
		}
		return TBasicDataExchanger::QueryInterface(riid, ppvObj);
	}

	virtual uint32		MCCOMAPI AddRef			() { return TBasicDataExchanger::AddRef(); }

	virtual TMCCommandBindingContextList* MCCOMAPI GetCommandBindingContexts() { return NULL; }


	// ****************************************************************************
	//								PrepareBindingContext
	// 
	/// Sets the name and id of a TMCCommandBindingContext
	/// 
	/// \param ioContext          the context to setup
	/// \param inContextID        the context's ID
	/// \param inNameRessourceID  the STR# resource number from which the context's name will be loaded
	/// \param inNameStringIndex  the index of the context's name in the previous STR# resource
	/// 
	static void	PrepareBindingContext	(	TMCCommandBindingContext&	ioContext, 
											IDType						inContextID, 
											int16 						inNameRessourceID,
											int16 						inNameStringIndex);

};





#endif
