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

		IMFExResponder.h

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

		Author:	Josh
		Date:	5/15/98

		Responder extension COM interface.

		Revision History

		when		who			what & why
		==========	==========	======================================================
		09/12/99	Pierre		Merged BecameFirstResponder and ResignedFirstResponder
		6/11/99		Greg		Added GetIndirectToolAction
		3/23/99		Greg		Added DragDrop tool support
		11/24/98	Joshua		Added SelfToolAction() to API
		6/18/98		Greg		Added SelfPreapreMenus() to API
		6/17/98		Greg		Added SelfMenuAction() to API


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

#ifndef __IMFEXRESPONDER__
#define __IMFEXRESPONDER__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "MCCompObj.h"

struct IMCGraphicContext;
struct IMFResponder;
struct IMFToolbarPart;
struct IMFDropCandidate;
struct IShMouseAction;
struct IMFPart;

class  TMCPlatformEvent;
class  TMCPoint;

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

MCDEFINE_GUID(IID_IMFExResponder, 0x787a5701, 0xeb6f, 0x11d1, 0xab, 0x25, 0x0, 0x60, 0x8, 0x15, 0xad, 0x45);

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



/******************************************************************************\
*                                                                              *
*           IMFExResponder                                                     *
*                                                                              *
\******************************************************************************/
/// \addtogroup MCF
/// \{

/// <P>The IMFExResponder interface is for Responder extensions outside the application.
/// </P>
/// \see IMFResponder
struct IMFExResponder : public IMCUnknown
{
	// -Description:
	//		Processes the given message if it interests this responder
	// -Parameters:
	//		message	:	the ID of the message being propagated 
	//					(generally defined in the EMFPartMessage namespace, eg: kMsg_MouseWheel)
	//		source	:	the responder that started the broadcast
	//					(can often be asked the IMFPart interface)
	//		data	:	the data associated with the message
	//
	// -Returns:
	//		true	:	if the message was handled and doesn't need to be propagated further.
	//		false	:	if the message was not handled or needs to be propagated further.
	//
	virtual	boolean	MCCOMAPI Receive				(int32 message, IMFResponder* source, void* data) = 0;

	virtual boolean MCCOMAPI SelfMenuAction			(ActionNumber actionNumber) = 0;
	virtual void	MCCOMAPI SelfPrepareMenus		() = 0;
	virtual boolean	MCCOMAPI SelfKeyDown			(TMCPlatformEvent* event) =0;
	virtual void	MCCOMAPI SelfKeyUp				(TMCPlatformEvent* event) =0;
	virtual boolean MCCOMAPI SelfToolAction			(int32 inOldTool, int32 inNewTool) =0;
	virtual boolean	MCCOMAPI GetToolDropCandidate	(IMFDropCandidate**	outDropCandidate, int32	inToolID,
													 IMFToolbarPart* inToolbarPart) = 0;

	virtual boolean	MCCOMAPI GetIndirectToolAction	(IShMouseAction**	outAction,
													 ActionNumber&		outActionNumber,
													 IMFResponder**		outContext,
													 IMFPart**			outPart,
													 const TMCPoint&	inWhere,
													 int32				inToolID,
													 IMFToolbarPart*	inToolbarPart) = 0;

	virtual void MCCOMAPI	BecameFirstResponder	(boolean on) = 0;
};

/// \}
#endif