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

		ModelerProp.h

		(c)1990-1999 MetaCreations.

		
		Properties Palette of the Modeler
	
		Author:	Jerome Bignon
		Date:	06/01/99

		Revision History

		when		who			what & why
		==========	==========	======================================================
		06/11/99	Jerome		Added animation and saving
		06/01/99	Jerome		Creation

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

#ifndef __ModelerPROP__
#define __ModelerPROP__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "BasicCOMImplementations.h"
#include "IChangeManagement.h"
#include "IPropertiesModule.h"
#include "MCCountedPtr.h"

struct IMFPart;
class Modeler;

class	ModelerProp :	public TBasicUnknown,
							public IChangeListener,
							public IPropertiesClient
{
	public:	
		ModelerProp(
							IPropertiesModule* 	inPropertiesModule, 
							Modeler* 		modeler);
		~ModelerProp();
		
		// IMCUnknown methods
		MCCOMErr	MCCOMAPI 	QueryInterface	(const MCIID& riid, void** ppvObj);
 		uint32		MCCOMAPI 	AddRef 			();
		STANDARD_RELEASE;
  
		// IChangeListener methods
		void 		MCCOMAPI 	DataChanged			(IChangeChannel* 	channel, 
													 IDType 			changeKind, 
													 IMCUnknown* 		changedData);
		// IPropertiesClient methods
		void		MCCOMAPI	GetSelectionChannel	(IChangeChannel**	outChannel);
		IDType		MCCOMAPI	GetControllingModuleID();
		ResourceID	MCCOMAPI	GetPropResID		();
		
		void		MCCOMAPI	LoadPageData		(IMFPart* 			inTopPart);
			
		boolean		MCCOMAPI	HandlePageHit		(IMFPart*			inTopPart,
													 int32				inMessage,
													 IMFResponder*		inResponder,
													 void*				inData);

		void		MCCOMAPI	GetExtraPart		(IMFPart**			outExtraPart);

	protected:
	
		TMCCountedPtr<IPropertiesModule>	fPropertiesModule;
		TMCCountedPtr<Modeler>			fModeler;

		// channels
		TMCCountedPtr<IChangeChannel>		fImmediateUpdateChannel;
};

#endif
