// ClassCarcas.h: interface for the CEnviromentContext class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_ATTRIBEX_H__BE876AE3_EF76_11D3_A1F5_00A024AAD7AF__INCLUDED_)
#define AFX_ATTRIBEX_H__BE876AE3_EF76_11D3_A1F5_00A024AAD7AF__INCLUDED_

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

class CFakeWnd:public CWnd
{
public:
	AFX_MSGMAP* GetMap(){return (AFX_MSGMAP*)GetMessageMap();}	// Äëÿ âûçîâà protected ôóíêöèè
};

class CEmptySkipper:public CSkipper
{
DECLARE_DYNAMIC(CEmptySkipper)

public:
	CEmptySkipper();
	virtual  ~CEmptySkipper(void);

	virtual int  next(void);
	virtual int  prev(void);
	virtual void  gotop(void);
	virtual void  gobot(void);
	virtual long  getpos(void);
	virtual long  setpos(void);

	virtual void  read(void);
	virtual int  skip(int);
	virtual int  Ok(void);
	virtual int  ateof(void);
	virtual void  godba(long);
	virtual long  getdba(void);
	virtual void  goeof(void);
	virtual long  MaxIndex(void);
	virtual long  MinIndex(void);
	virtual long  GetIndex(void);
	virtual void  SetIndex(long);
	virtual void  SetMinMaxIndex(void);
	virtual int  find(char const *);
protected:
	virtual void  init(void);
};

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

	enum {
		methAssignAttrib,
		methgetForm,
		methSetCoordinates,
		methGetCoordinates,
		methValueTypeStr,
		methWrapValueList,
		methWrapValueTable,
		methUpdateTree,
		methCurrentTreeItem,
		methCurrentTreeColumn,
		methValueFromTree,
		methValueToTree,
		methSetCursor,
		methExpandNode,
		methCollapseNode,
		methIsGroupNode,
		methSetCurrentNode,
#ifndef FORMEX_DLL
        methCreateControl,
#endif
		methTreeColumnName,
		methGetValueTableColumnNum,
		methTreeOptions,
		methModifyStyle,
		methModifyStyleEx,
		lastMethod
	};

	enum {
		propCaption,
		propHint,
		propDescription,
		propFormula,
		propVisible,
		propReadOnly,
		propLayer,
		propValue,
		propAttribID,
		propType,
		propBkColor,
		propFontColor,
		propMask,
		propRelated,
		propFont,
		propClass,
		propBorder,
		propParentWindow,
		propHandle,
		propStyle,
		propStyleEx,
		propPicture,
		propFocus,
		lastProp
	};

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

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

	CAttribEx(int);
	CAttribEx();
	virtual ~CAttribEx();
	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;

	CFormAllCtrlsContext* m_Form;
	int num;
};

#endif // !defined(AFX_ATTRIBEX_H__BE876AE3_EF76_11D3_A1F5_00A024AAD7AF__INCLUDED_)
