#if !defined(AFX_MESSAGECONTEXT_H__BE876AE3_EF76_11D3_A1F5_00A024AAD7AF__INCLUDED_)
#define AFX_MESSAGECONTEXT_H__BE876AE3_EF76_11D3_A1F5_00A024AAD7AF__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

struct stCloneMMH
{
	CMainMessageHandler* pMMH;
	DWORD dwMask;
};

class CCloneManager
{
public:
	static CCloneManager& CCloneManager::GetManager();

	virtual bool AddEvent(stCloneMMH& CloneData);
	virtual bool DeleteEvent(stCloneMMH& CloneData);
};

class CMessageContext : public CBLContext
{
	DECLARE_DYNCREATE(CMessageContext);
public:

	enum {
		methVisible,
		methDock,
		methCaptureSystemMessages,
		methCloneSystemMessages,
		methClear,
		methMessage,
		methModule,
		methSetSystemMessages,
		methSaveToFile,
		methSetPosition,
		methGetPosition,
		methShowLine,
		methLinesCount,
		methGetLine,
		methSetBookMark,
		methIsBookMark,
		methGetBookMark,
		methClearAllBookMarks,
		methFindString,
		lastMethod
	};

	enum {
		propNone,
		propBlueTriangle,
		propExclamation,
		propExclamation2,
		propExclamation3,
		propInformation,
		propBlackErr,
		propRedErr,
		propMetaData,
		propUnderlinedErr,
		propCaptureNone,
		propCaptureBlueTriangle,
		propCaptureExclamation,
		propCaptureExclamation2,
		propCaptureExclamation3,
		propCaptureInformation,
		propCaptureBlackErr,
		propCaptureRedErr,
		propCaptureMetaData,
		propCaptureUnderlinedErr,
		propCaption,
		propDocking,
		propID,
		propMaxLineLenght,
		lastProp
	};

	enum DockBarCode {
		dbFloat = 0,
		dbBottom,
		dbTop,
		dbLeft,
		dbRight,
		dbFloatMDI
	};

	static struct paramdefs {
		char * Names[2];
		int HasReturnValue;
		int NumberOfParams;
	}  defFnNames[];

	static struct parampropdefs {
		char * Names[2];
		int IsReadable;
		int IsWritable;
		CValue* propValue;
	}  defPropNames[];

	CDockableWindow* m_pDockableWindow;
	DWORD m_dwLeft_Float;
	DWORD m_dwTop_Float;

	CMessageContext(int);
	CMessageContext();
	virtual ~CMessageContext();
	virtual int  CallAsFunc(int,class CValue &,class CValue * *);
	virtual int  CallAsProc(int,class CValue * *);
	virtual void  DecrRef(void);
	virtual int  FindMethod(char const *)const;
	virtual int  FindProp(char const *)const;
	virtual char const *  GetCode(void)const;
	virtual int  GetDestroyUnRefd(void)const;
	virtual void  GetExactValue(class CValue &);
	virtual class CObjID   GetID(void)const;
	virtual class CBLContextInternalData *  GetInternalData(void);
	virtual char const *  GetMethodName(int,int)const;
	virtual int  GetNMethods(void)const;
	virtual int  GetNParams(int)const;
	virtual int  GetNProps(void)const;
	virtual int  GetParamDefValue(int,int,class CValue *)const;
	virtual char const *  GetPropName(int,int)const;
	virtual int  GetPropVal(int,class CValue &)const;
	virtual long  GetTypeID(void)const;
	virtual char const *  GetTypeString(void)const;
	virtual class CType   GetValueType(void)const;
	virtual int  HasRetVal(int)const;
	virtual void  IncrRef(void);
	virtual void  InitObject(class CType const &);
	virtual void  InitObject(char const *);
	virtual int  IsExactValue(void)const;
	virtual int  IsOleContext(void)const;
	virtual int  IsPropReadable(int)const;
	virtual int  IsPropWritable(int)const;
	virtual int  IsSerializable(void);
	virtual int  SaveToString(class CString &);
	virtual void  SelectByID(class CObjID,long);
	virtual int  SetPropVal(int,class CValue const &);
	static class CObjID ObjID;

};

#endif // !defined(AFX_MESSAGECONTEXT_H__BE876AE3_EF76_11D3_A1F5_00A024AAD7AF__INCLUDED_)
