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

		IMFDialogPart.h

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

		Author:	Arnaud
		Date:	02/11/99

		Revision History

		when		who			what & why
		==========	==========	======================================================
		

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

#ifndef __IMFDIALOGPART__
#define __IMFDIALOGPART__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "MCCompObj.h"

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

MCDEFINE_GUID_H(IID_IMFDialogPart);

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

struct IMFWindow;

#define kOkayButtonID		'OkBt'
#define kCancelButtonID		'CaBt'
#define kOkCancelNodeID		'OkCa'


/// \addtogroup MCF
/// \{

// ****************************************************************************
//								IMFDialogPart
// 
/// The interface to access dialogs
///
/// To create your own dialog, you can use the following code:
///
/// \code
/// 
/// // load the dialog from a resource.
///
/// TMCCountedPtr<IMFPart>	dialog;
/// gPartUtilities->CreatePartByResource(&dialog,kMFDialogResourceType,dialogResID);
/// ThrowIfNil(dialog);
///
/// TMCCountedPtr<IMFDialogPart> dialogPart;
/// dialog->QueryInterface(IID_IMFDialogPart, (void**)&dialogPart);
/// ThrowIfNil(dialogPart);
///
/// dialogPart->Go(); // opens the dialog
/// 
/// dialogPart->Finished();
/// 
/// \endcode
///
struct IMFDialogPart : public IMCUnknown 
{
	// ****************************************************************************
	//							
	/// is called to set the flag 
	/// 
	virtual void	MCCOMAPI	SetOKButtonFirstResponder(boolean value)=0;


	// ****************************************************************************
	//								Go
	// 
	/// Opens the dialog. Returns once the dialog has been closed.
	/// 
	virtual boolean	MCCOMAPI Go			()=0;

	// ****************************************************************************
	//								Go
	// 
	/// Opens the dialog. Returns once the dialog has been closed.
	/// 
	virtual boolean	MCCOMAPI Go			(IDType& resultButtonID)=0;
	
	// ****************************************************************************
	//								Go
	// 
	/// Opens the dialog. Returns once the dialog has been closed.
	/// 
	virtual boolean	MCCOMAPI Go			(IDType& resultButtonID, boolean& inSkipFlag)=0;
	
	// ****************************************************************************
	//								Finished
	// 
	/// Should be called before before destroying the dialog object.
	/// 
	virtual void	MCCOMAPI Finished	()=0;

	// ****************************************************************************
	//								GetThisWindow
	// 
	/// Returns the interface to IMFWindow (always supported by IMFDialogPart)
	/// 
	virtual	IMFWindow*	MCCOMAPI	GetThisWindow() = 0;
};

/// \}

#endif