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

		MFPartMessages.h

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

		Author:	Ian
		Date:	4/9/98

		This file contains some standard messages used by the MCFramework.

		Revision History

		when		who			what & why
		==========	==========	======================================================
		12/2/99		Pierre		added fast Draw message
		12/2/99		Pierre		added WindoidMove message and changed windoid ranges
		11/22/99	Ian			Added fHandled to TMFGlobalMessage.
		09/29/99	pbk			added kMsg_ParentPartRemovedFromHierarchy
		02/19/99	pbk			added kMsg_GetNonDoubleBufferedParts
		11/25/98	Ian			Added kMsg_OutOfScopePartValueChanged.
		11/5/98		Ian			Added kMsg_RevealRect.
		8/28/98		Ian			Updated to the new messaging system.

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

#ifndef __MFMessage__
#define __MFMessage__

#if CP_PRAGMA_ONCE
#pragma once
#endif

#include "MFPartTypes.h"

/// Undocumented, do NOT use in extensions.
///
struct TMFEnablePartsData : public TMCObject
{
	MFFrequency fEnableFrequency;
	boolean		fBeEnabled;
};

/// Undocumented, do NOT use in extensions.
///
struct TMFGlobalMessage : public TMCObject
{
	MessageID	fMessage;
	void*		fData;
	boolean		fHandled;
};

namespace EMFPartMessage
{
	enum												//Receive() data parameter contents
	{
		kMsg_EnableParts					= 1,		//TMFEnablePartsData*.
		kMsg_BeginPartTracking				= 2,		//TMFDataPacket (or derivative).
		kMsg_ContinuePartTracking			= 3,		//TMFDataPacket (or derivative).
		kMsg_EndPartTracking				= 4,		//TMFDataPacket (or derivative).
		kMsg_PartValueChanged				= 5,		//NULL.
		kMsg_SendToAllInWindow				= 6,		//TMFGlobalMessage*.
		kMsg_FindFirstResponderWindow		= 7,		//TMFBaseWindow*.
		kMsg_RevealRect						= 8,		//TMFRevealData*.
		kMsg_OutOfScopePartValueChanged		= 9,		//NULL.
		kMsg_WindowControl					= 10,		//TMFWindowControlMessage*
		kMsg_GetNonDoubleBufferedParts		= 11,		//TMCPtrArray<TMFLeafPart>*
		kMsg_FindTopDocumentWindow			= 12,		//TMFBaseWindow*
		kMsg_PartDoubleClicked				= 13,		//NULL
		kMsg_DialogPartValueChanged			= 14,		//NULL
		kMsg_PartSelectionChanged			= 15,
		kMsg_OpenDialogRequest				= 51,		//for TMFDialogButtonPart
		kMsg_ParentPartRemovedFromHierarchy	= 54,		//NULL
		kMsg_CollapseStatusChanged			= 55,		//NULL
		kMsg_EditTextBeginEdit				= 56,		//NULL (chandesris move from MFEditTextPart)
	
		kMsg_MouseWheel						= 61,		//TMFInt32DataPacket
		kMsg_UpdatePrefsFromPart			= 62,		//NULL (sent after the user cliked ok on the prefs dialog
		kMsg_DeactivateApplication			= 63,
		kMsg_OpenPopupMenuRequest			= 64,		//for TMFLinearSliderPart
		//messages 65 to 70 already reserved for use here (in MFPartMessages.txt)	
		kMsg_PartModifCancel				= 65,       //NULL

		kMsg_StartWindoidResize				= 100,		//NULL
		kMsg_EndWindoidResize				= 101,		//NULL
		kMsg_StartWindoidMove				= 102,		//NULL
		kMsg_EndWindoidMove					= 103,		//NULL
		kMsg_StartFastDraw					= 104,		//NULL
		kMsg_EndFastDraw					= 105,		//NULL
		kMsg_LastWindoid					= 125,		//NULL

		kMsg_InitComponent					= 126,		//NULL
	};
	//NOTE: Don't forget to Check and update MFPartMessages.doc when adding new message constants.
}

#endif