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

		IMFDocument.h

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

		Author:	Josh
		Date:	6/4/98

		COM interface to internal documents

		Revision History

		when		who			what & why
		==========	==========	======================================================
		04/14/99	Thierry		GetTitle is const

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

#ifndef __IMFDOCUMENT__
#define __IMFDOCUMENT__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "MCCompObj.h"

class TMCString;

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

MCDEFINE_GUID(IID_IMFDocument, 0x252a1a20, 0xfbe8, 0x11d1, 0xab, 0x2e, 0x0, 0x60, 0x8, 0x15, 0xad, 0x45);

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



#ifndef qDemoVersion //regular interface

/// \addtogroup MCF
/// \{

// ****************************************************************************
//								IMFDocument
// 
/// IMFDocument is the generic interface of a document in MCF.
/// 
struct IMFDocument : public IMCUnknown
{
	// ****************************************************************************
	//								GetTitle
	// 
	/// Returns the title string of the document window (use at least a TMCString255)
	/// 
	/// \param aTitle  
	/// 
	virtual void	MCCOMAPI	GetTitle			(TMCString& aTitle) const = 0;
	
	// ****************************************************************************
	//								SetTitle
	// 
	/// Sets the title string of the document window.
	/// 
	/// \param aTitle  The new title.
	/// 
	virtual void	MCCOMAPI	SetTitle			(const TMCString& aTitle) = 0;
	
	// ****************************************************************************
	//								GetChangeCount
	// 
	/// Returns the number of changes made to this document.
	/// 
	virtual int32	MCCOMAPI	GetChangeCount		() = 0;
	
	// ****************************************************************************
	//								SetChangeCount
	// 
	/// Sets the number of changes made to this document.
	/// 
	virtual void	MCCOMAPI	SetChangeCount		(int32 newChangeCount) = 0;
	
	// ****************************************************************************
	//								IsScratchDocument
	// 
	/// Returns true if it is scratch document (ie store in the scratch disk)
	/// 
	virtual boolean MCCOMAPI	IsScratchDocument	() const = 0;
	
	// ****************************************************************************
	//								SetIsScratchDocument
	// 
	/// Sets whether a document is a scratch document (ie store in the scratch disk).
	/// 
	/// \param isScratch  True if the document is a scratch document.
	/// 
	virtual void	MCCOMAPI	SetIsScratchDocument(boolean isScratch) = 0;

	// ****************************************************************************
	//								CloseDocument
	// 
	/// Remove all reference to this document from the application. This method should
	/// always be called before detroying a document.
	/// 
	virtual void    MCCOMAPI    CloseDocument		() = 0;
};

/// \}

#else 	//(qDemoVersion) begin scrambled interface

struct IMFDocument : public IMCUnknown
{
	virtual void	MCCOMAPI	SetTitle			(const TMCString& aTitle) = 0;
	virtual void	MCCOMAPI	GetTitle			(TMCString& aTitle) const = 0;	
	virtual void	MCCOMAPI	SetChangeCount		(int32 newChangeCount) = 0;
	virtual int32	MCCOMAPI	GetChangeCount		() = 0;	
	virtual void	MCCOMAPI	SetIsScratchDocument(boolean isScratch) = 0;
	virtual boolean MCCOMAPI	IsScratchDocument	() const = 0;
	virtual void    MCCOMAPI    CloseDocument		() = 0;
};

#endif	//(qDemoVersion) end scrambled

#endif