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

		ComMessages.h

		Copyright: (c) 2001 Eovia Corp. All rights reserved.
		
		Author:	Arnaud
		Date:	02/08/99

		Revision History

		when		who			what & why
		==========	==========	======================================================
		5/6/99		Greg		added kMsg_*Tracking messages
		3/29/99		psq			added kMsg_SCC_ComponentCollapedStateModified	

*****************************************************************************************/
#ifndef __ComMessages__
#define __ComMessages__

#include "MCBasicTypes.h"

#if CP_PRAGMA_ONCE
#pragma once
#endif

	// This message is sent by the single component chooser
	// when the user selects a different component 
	// from the popup
const int32 kMsg_SCC_NewComponentChosen = 5100;

	// This message is sent by the single component chooser
	// when the user changes the current component
	// (via editing an edit text box, etc.)
const int32 kMsg_SCC_ComponentModified = 5101;

	// This message is sent by the multiple component chooser
	// when the user adds a component to the list of
	// existing components
const int32 kMsg_MCC_NewComponentAdded = 5102;
	
	// This message is sent by the multiple component chooser
	// when the user deletes components from the list
const int32 kMsg_MCC_ComponentDeleted = 5103;

	// This message is sent by the multiple component chooser
	// when the user changes a component in the list
	// (via editing an edit text box etc.)
const int32 kMsg_MCC_ComponentModified = 5104;

	// This message is sent by the single component chooser
	// when the user expands/collapses a component
const int32 kMsg_SCC_ComponentCollapedStateModified = 5105;

	// This message is sent a part who needs some special
	// data from a component
const int32 kMsg_InitPreviewPart = 5106;

	// This message is sent by the single component chooser
	// when the user is changing the current component
	// (via moving a slider etc.)
const int32 kMsg_SCC_ComponentTracking = 5107;

	// This message is sent by the multiple component chooser
	// when the user is changing a component in the list
	// (via moving a slider etc.)
const int32 kMsg_MCC_ComponentTracking = 5108;


	/// This message is sent by the TComponentUIPart to its TUIHandlerFunctionPtr to say hello.
	/// The associated data is NULL.
	/// Use the provided dataExchanger list to initialize your custom parts
const int32 kMsg_CUIP_ComponentListAttached = 5109;

	// This message is sent by the TComponentUIPart 
	// to its Component to say hello when they are
	// bound together.
const int32 kMsg_CUIP_ComponentAttached = 5110;

	// This message is sent by the TComponentUIPart 
	// when a subcomponent has changed.
const int32 kMsg_CUIP_SubpartChanged = 5111;

	// This message is sent by the TComponentUIPart 
	// when a subcomponent is tracking a change (e.g., slider).
const int32 kMsg_CUIP_SubpartTracking = 5112;

	// This message is sent by the TComponentUIPart 
	// when a subcomponent is about to be changed.
const int32 kMsg_CUIP_SubpartAboutToBeChanged = 5120;

	// This message is sent by the TComponentUIPart 
	// when a subcomponent change has been canceled.
const int32 kMsg_CUIP_SubpartDidNotChange = 5122;

	// This message is sent by the TComponentTreePart 
	// when a subcomponent has changed.
const int32 kMsg_CTRE_ComponentChanged = 5113;
struct IShParameterComponent;
struct S_CTRE_ComponentChangedData
{
	IShParameterComponent*	fOldComponent;
	IShParameterComponent*	fNewComponent;
};

	// This message is sent by the TComponentTreePart 
	// when a subcomponent has been added to the list.
const int32 kMsg_CTRE_ComponentAdded = 5121;
struct IShParameterComponent;
struct S_CTRE_ComponentAddedData
{
	IShParameterComponent*	fListComponent;
	IShParameterComponent*	fNewComponent;
};

	// This message is sent by the TComponentTreePart 
	// when the selection changed.
const int32 kMsg_CTRE_SelectionChanged = 5123;

	// This message is sent by the TComponentUIPart 
	// just before it updates the component from the UI changes.
	// This allows you to perform about backup or cloning of your
	// component before it is actually changed.
const int32 kMsg_CUIP_AboutToApplySubpartChanges = 5114;

	// This message is sent by the TComponentTreePart 
	// when a subcomponent is about to recieve a drop.
	// The data is the struct of type S_CTRE_DragIsAcceptableMessageData.
	// It contains the offered flavors as input, and the accpeted flavor as output.
	// If the drag is accpeted by the responder, it must set fIsAcceptable true
	// and set fAcceptedFlavor.
const int32 kMsg_CTRE_DragIsAcceptable = 5115;
class TMFDragFlavors;
struct S_CTRE_DragIsAcceptableMessageData
{
	boolean				fIsAcceptable;
	TMFDragFlavors*		fOfferedFlavors;
	IDType*				fAcceptedFlavor;
};

	// Folllowing the previous message, this one is sent by the TComponentTreePart
	// if the drop as been accepted by the responder.
	// The data is the struct of type S_CTRE_ReceiveDropMessageData.
	// The receiver must set the fDone field true to validate the drop.
	// The drop candidate is passed in fDropCandidate (ain't that incredibly logical ?).
const int32 kMsg_CTRE_ReceiveDrop = 5116;
struct IMFDropCandidate;
struct S_CTRE_ReceiveDropMessageData
{
	boolean						fDone;
	IDType*						fAcceptedFlavor;
	IMFDropCandidate*			fDropCandidate;
	boolean						fIsDropOnTopLevel;
	IShParameterComponent**		fComponent;		// the component that should be used for
												// the drop (be careful with the refcount)
};


	// sent by a componentUIPart when a sub dialog as been changed
	// in this case there should be only a non undoable action
    // generated
const int32 kMsg_CUIP_DialogSubpartChanged = 5117;

	// This message is sent by the TComponentTreePart
	// during a drag and drop operation.
const int32 kMsg_CTRE_DragDrop_Done = 5118;

	// This message is sent by the componentUI when a dialog opens
	// to get the tree that is edited ( if there is one )
const int32 kMsg_CUIP_GetPreviewInfo = 5119;

	//This message is sent by the componentUI to show
	//the dialog in the case of multiple instance 
	//asking if we want to edit the master Object or
	//create a new one.
const int32 kMsg_CUIP_IsSubpartCanBeChanged = 5124;

#endif
