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

		IMFParameterPart.h

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

		Author:	Emil
		Date:	9/9/98


		Revision History

		when		who			what & why
		==========	==========	======================================================
		6/7/99		Greg		Added support for using mini parts instead of "full" parts
		02/10/99	del			Fix GetParameterComponent to use counted pointers
		10/9/98		Eml			API for UpdateComponentFromPart and UpdatePartFromComponent

*****************************************************************************************/
#ifndef __IMFParameterPart__
#define __IMFParameterPart__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "MCCompObj.h"

struct IShParameterComponent;
struct IMFPart;
template <class T> class TMCPtrArray;

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

MCDEFINE_GUID_H(IID_IMFParameterPart);
MCDEFINE_GUID_H(IID_IMFParameterComponentPart);


/*****************************************************************************\
*                                                                             *
*  IMFParameterPart                                                           *
*                                                                             *
\*****************************************************************************/


/// \addtogroup MCF
/// \{

/// Interface for a Parameter part.  
struct IMFParameterPart : public IMCUnknown
{
	virtual void MCCOMAPI SetParameterBuffer	(void* buffer, boolean redraw) = 0;

	// ****************************************************************************
	//								SetResourceID
	// 
	/// Sets the pmap resource id
	/// 
	/// \param resID       the PMAP resid
	/// \param bufferSize  the size of the struct that is used for this pmap.
	/// 
	virtual void MCCOMAPI SetResourceID			(int32 resID, int32 bufferSize) = 0;
};


/*****************************************************************************\
*                                                                             *
*  IMFParameterComponentPart                                                  *
*                                                                             *
\*****************************************************************************/

/// Interface for a Parameter Component part.  This interface allows the connection between
/// a Part and the parameter list of a component.  The part can have an alternate "Mini" view
/// for compact representation.  
/// In MultiValueMode, SetParameterComponent will accumulate the components (like SetValue with kComponentValueType)
struct IMFParameterComponentPart : public IMCUnknown
{
	virtual void 	MCCOMAPI SetParameterComponent	(IShParameterComponent* inComponent, boolean redraw, IMFPart* overridePart) = 0;
	virtual void 	MCCOMAPI GetParameterComponent	(IShParameterComponent** outComponent) = 0;

	///For use in Multivalue mode
	virtual void 	MCCOMAPI GetMVComponents		(TMCPtrArray<IShParameterComponent>& outComponents) = 0;

	virtual boolean	MCCOMAPI UpdateComponentsFromPart() = 0;
	virtual void	MCCOMAPI UpdatePartFromComponents(boolean forceRedraw) = 0;

	virtual void 	MCCOMAPI SetUseMiniPart(boolean inUseMiniPart) = 0;
	virtual boolean MCCOMAPI GetUseMiniPart() = 0;
};


/// \}

#endif