// CodeGear C++Builder
// Copyright (c) 1995, 2009 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Anygrids.pas' rev: 21.00

#ifndef AnygridsHPP
#define AnygridsHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Stdctrls.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <Extctrls.hpp>	// Pascal unit
#include <Clipbrd.hpp>	// Pascal unit
#include <Comctrls.hpp>	// Pascal unit
#include <Inifiles.hpp>	// Pascal unit
#include <Registry.hpp>	// Pascal unit
#include <Commctrl.hpp>	// Pascal unit
#include <Mask.hpp>	// Pascal unit
#include <Grids.hpp>	// Pascal unit
#include <Variants.hpp>	// Pascal unit
#include <Jpeg.hpp>	// Pascal unit
#include <Gifimage_anylib.hpp>	// Pascal unit
#include <Olectnrs.hpp>	// Pascal unit
#include <Activex.hpp>	// Pascal unit
#include <Fatexp.hpp>	// Pascal unit
#include <Namelist.hpp>	// Pascal unit
#include <Imglist.hpp>	// Pascal unit
#include <Objlist.hpp>	// Pascal unit
#include <Axctrls.hpp>	// Pascal unit
#include <Printers.hpp>	// Pascal unit
#include <Anyrichedit.hpp>	// Pascal unit
#include <Richedit.hpp>	// Pascal unit
#include <Reportobj.hpp>	// Pascal unit
#include <Anychart.hpp>	// Pascal unit
#include <Shellapi.hpp>	// Pascal unit
#include <Chart.hpp>	// Pascal unit
#include <Comobj.hpp>	// Pascal unit
#include <Anydialogs.hpp>	// Pascal unit
#include <Menus.hpp>	// Pascal unit
#include <Filtertop10.hpp>	// Pascal unit
#include <Multimon.hpp>	// Pascal unit
#include <Customfilter.hpp>	// Pascal unit
#include <Db.hpp>	// Pascal unit
#include <Anyscroll.hpp>	// Pascal unit
#include <Dbctrls.hpp>	// Pascal unit
#include <Viewblobform.hpp>	// Pascal unit
#include <Dbtables.hpp>	// Pascal unit
#include <Any_hint.hpp>	// Pascal unit
#include <Anymetafile.hpp>	// Pascal unit
#include <Ibcustomdataset.hpp>	// Pascal unit
#include <Anyolectnrs.hpp>	// Pascal unit
#include <Types.hpp>	// Pascal unit

//-- user supplied -----------------------------------------------------------

namespace Anygrids
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum TUnitType { utPixel, utMillimeter, utInch };
#pragma option pop

#pragma option push -b-
enum TVerAlignment { vtaTop, vtaBottom, vtaCenter };
#pragma option pop

typedef void __fastcall (__closure *TFilterEvent)(System::TObject* Sender, bool &CanFilter);

typedef void __fastcall (__closure *TGetPageBreakEvent)(System::TObject* Sender, int Row, bool &ToBreak);

typedef void __fastcall (__closure *TDrawCellColorEvent)(System::TObject* Sender, int Row, int Col, Graphics::TColor &BKColor);

typedef void __fastcall (__closure *TGetAlignmentEvent)(System::TObject* Sender, int Row, int Col, Classes::TAlignment &HorzAlign, TVerAlignment &VertAlign);

typedef void __fastcall (__closure *TGetReadOnlyEvent)(System::TObject* Sender, int Row, int Col, bool &ReadOnly);

typedef void __fastcall (__closure *TChangeEvent)(System::TObject* Sender, int Index);

typedef void __fastcall (__closure *TSizeChangeEvent)(System::TObject* Sender, int Index, bool &CanChange);

typedef void __fastcall (__closure *TOnCompareFunc)(System::TObject* Sender, int Col, System::WideString Data1, System::WideString Data2, int &Result);

typedef void __fastcall (__closure *TOnKeyEventX)(System::TObject* Sender, int &Key, int Shift);

typedef void __fastcall (__closure *TOnMouseEventX)(System::TObject* Sender, Controls::TMouseButton Button, int Shift, int X, int Y);

typedef void __fastcall (__closure *TOnMouseMoveX)(System::TObject* Sender, int Shift, int X, int Y);

class DELPHICLASS TAnyStrings;
typedef void __fastcall (__closure *TOnEvaluateX)(System::TObject* Sender, System::WideString Eval, TAnyStrings* Args, System::Variant &Value, bool &Done);

typedef void __fastcall (__closure *TDrawItemEventX)(System::TObject* Sender, int DC, int Index, int Left, int Top, int Right, int Bottom, int State);

typedef void __fastcall (__closure *TMeasureItemEventX)(System::TObject* Sender, int DC, int Index, int &Height);

typedef void __fastcall (__closure *TGridBeforeEvent)(System::TObject* Sender, int Row, int Col, bool &CanSelect);

typedef void __fastcall (__closure *TGridEvent)(System::TObject* Sender, int Row, int Col);

typedef void __fastcall (__closure *TTextEvent)(System::TObject* Sender, int Row, int Col, System::WideString &Text);

typedef void __fastcall (__closure *TRowTitleEvent)(System::TObject* Sender, int Row);

typedef void __fastcall (__closure *TColumnTitleEvent)(System::TObject* Sender, int Col);

typedef void __fastcall (__closure *TDrawCellEvent)(System::TObject* Sender, int Row, int Col, Graphics::TCanvas* Canvas, const Types::TRect &R, bool &Handled);

typedef void __fastcall (__closure *TSetCursorEvent)(System::TObject* Sender, int Row, int Col, const Types::TRect &R, int X, int Y, Controls::TCursor &ACursor);

class DELPHICLASS TCellData;
typedef void __fastcall (__closure *TGetCellDataEvent)(System::TObject* Sender, int Row, int Col, TCellData* CellData);

typedef void __fastcall (__closure *TDrawGridRectEvent)(System::TObject* Sender, Graphics::TCanvas* Canvas, const Types::TRect &Rect);

typedef void __fastcall (__closure *TSaveProgressEvent)(System::TObject* Sender, int Count, int Pos);

typedef void __fastcall (__closure *TImportCellEvent)(System::TObject* Sender, int Row, int Col, System::WideString &Value, bool &Handled);

typedef void __fastcall (__closure *TExportCellEvent)(System::TObject* Sender, int Row, int Col, bool &IsString);

#pragma option push -b-
enum TAnyGridOption { agoShadow, agoAlwaysShowEditor, agoRowSizing, agoColSizing, agoHiddenSizing, agoMultiSelect, agoShowColIndex, agoShowExcelTitle, agoEditing, agoRowMoving, agoColMoving, agoSorting, agoShowFilter, agoRowSelect, agoCanCopy, agoCanPaste, agoCanSelectAll, agoCanInsert, agoCanAppend, agoCanDelete, agoConfirmDelete, agoCanCut, agoAutoCalFormula, agoAutoSelectRow, agoAutoSelectCol, agoSelAllOnEdit, agoShowHintSymbol, agoQuickShowHint, agoShowSizeInfo, agoAutoNextRowCol, agoAutoMerge, agoAlwaysShowButton };
#pragma option pop

typedef Set<TAnyGridOption, agoShadow, agoAlwaysShowButton>  TAnyGridOptions;

#pragma option push -b-
enum TCellType { ctEdit, ctCombo, ctButton, ctCheckBox, ctDate, ctRichEdit, ctRadioButton, ctSpinEdit, ctHyperLink, ctMemo };
#pragma option pop

#pragma option push -b-
enum TValueType { vtString, vtWord, vtInteger, vtFloat, vtNegInt, vtPosFloat, vtNegFloat, vtCurrency, vtPercent, vtChineseCurrency, vtChineseLongCurr, vtChineseShortCurr, vtChineseDate };
#pragma option pop

#pragma option push -b-
enum TLocation { slRegistry, slIniFile };
#pragma option pop

struct TRowCol
{
	
public:
	int Row;
	int Col;
};


typedef TRowCol *PRowCol;

struct TCellArea
{
	
public:
	int Row1;
	int Col1;
	int Row2;
	int Col2;
};


struct TOldRowInfo
{
	
public:
	int Height;
	int TotalHeight;
	int CloneHeight;
	bool Visible;
};


struct TRowInfo11
{
	
public:
	int Height;
	int TotalHeight;
	int CloneHeight;
	bool Visible;
	int DBRecNo;
	int RowType;
	int GroupedCol;
	int State;
	int Reserved;
};


struct TRowInfo
{
	
public:
	int Height;
	int TotalHeight;
	int CloneHeight;
	bool Visible;
	int DBRecNo;
	int RowType;
	int GroupedCol;
	int State;
	int Reserved;
	double PhyHeight;
	double PhyCloneHeight;
};


struct TColInfo
{
	
public:
	int Width;
	int TotalWidth;
	int CloneWidth;
	bool Visible;
};


struct TFooterFormulaData
{
	
public:
	int Count;
	System::Extended Sum;
};


#pragma option push -b-
enum TFormulaType { ftNone, ftSum, ftCount, ftMin, ftMax, ftAvg };
#pragma option pop

#pragma option push -b-
enum TState { gsNormal, gsRowSizing, gsColSizing, gsSelecting, gsSelection };
#pragma option pop

#pragma option push -b-
enum TGridType { gtExcel, gtInvoice, gtGrid };
#pragma option pop

#pragma option push -b-
enum TMoveDirectory { mdNone, mdLeft, mdTop, mdRight, mdBottom };
#pragma option pop

class DELPHICLASS TCellList;
class PASCALIMPLEMENTATION TCellList : public Objlist::TObjList
{
	typedef Objlist::TObjList inherited;
	
public:
	void * operator[](int Index) { return Items[Index]; }
	
protected:
	HIDESBASE void * __fastcall Get(int Index);
	HIDESBASE void __fastcall Put(int Index, void * Item);
	
public:
	__property void * Items[int Index] = {read=Get, write=Put/*, default*/};
public:
	/* TObjList.Destroy */ inline __fastcall virtual ~TCellList(void) { }
	
public:
	/* TObject.Create */ inline __fastcall TCellList(void) : Objlist::TObjList() { }
	
};


__interface IRichEditAdapter;
typedef System::DelphiInterface<IRichEditAdapter> _di_IRichEditAdapter;
class DELPHICLASS TInplaceRichEdit;
__interface  INTERFACE_UUID("{05AAB859-0C42-41CB-AED9-1F0FFBE1AB55}") IRichEditAdapter  : public System::IInterface 
{
	
public:
	virtual void __fastcall ReferenceRichEdit(TInplaceRichEdit* RichEdit) = 0 ;
	virtual void __fastcall ReleaseRichEdit(void) = 0 ;
};

class DELPHICLASS TBaseRichEdit;
class DELPHICLASS TCustomAnyGrid;
class PASCALIMPLEMENTATION TBaseRichEdit : public Anyrichedit::TAnyRichEdit
{
	typedef Anyrichedit::TAnyRichEdit inherited;
	
private:
	TCustomAnyGrid* FGrid;
	bool FInUsing;
	bool FNew;
	bool FSelfCreate;
	void __fastcall SetGrid(TCustomAnyGrid* Value);
	
protected:
	__property TCustomAnyGrid* Grid = {read=FGrid};
	
public:
	__fastcall virtual TBaseRichEdit(Classes::TComponent* AOwner);
public:
	/* TAnyCustomRichEdit.Destroy */ inline __fastcall virtual ~TBaseRichEdit(void) { }
	
public:
	/* TWinControl.CreateParented */ inline __fastcall TBaseRichEdit(HWND ParentWindow) : Anyrichedit::TAnyRichEdit(ParentWindow) { }
	
};


class PASCALIMPLEMENTATION TInplaceRichEdit : public TBaseRichEdit
{
	typedef TBaseRichEdit inherited;
	
private:
	int FClickTime;
	int FRow;
	int FCol;
	bool FDrawCell;
	bool FDirectInput;
	bool FNew;
	_di_IRichEditAdapter FRichEditAdapter;
	void __fastcall InternalMove(const Types::TRect &Loc, bool Redraw);
	HIDESBASE MESSAGE void __fastcall CMShowingChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
	MESSAGE void __fastcall WMPaste(Messages::TWMNoParams &Message);
	MESSAGE void __fastcall WMCut(Messages::TWMNoParams &Message);
	MESSAGE void __fastcall WMClear(Messages::TWMNoParams &Message);
	void __fastcall SetRichEditAdapter(const _di_IRichEditAdapter Value);
	
protected:
	DYNAMIC void __fastcall DblClick(void);
	DYNAMIC bool __fastcall DoMouseWheel(Classes::TShiftState Shift, int WheelDelta, const Types::TPoint &MousePos);
	DYNAMIC void __fastcall KeyDown(System::Word &Key, Classes::TShiftState Shift);
	DYNAMIC void __fastcall KeyPress(System::WideChar &Key);
	DYNAMIC void __fastcall KeyUp(System::Word &Key, Classes::TShiftState Shift);
	virtual void __fastcall BoundsChanged(void);
	virtual void __fastcall UpdateContents(void);
	virtual void __fastcall WndProc(Messages::TMessage &Message);
	bool __fastcall EditCanModify(void);
	void __fastcall UpdatePos(const Types::TRect &Loc);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	
public:
	__fastcall virtual TInplaceRichEdit(Classes::TComponent* AOwner);
	void __fastcall Deselect(void);
	HIDESBASE void __fastcall Hide(void);
	HIDESBASE void __fastcall Invalidate(void);
	void __fastcall Move(const Types::TRect &Loc);
	bool __fastcall PosEqual(const Types::TRect &Rect);
	HIDESBASE void __fastcall SetFocus(void);
	void __fastcall UpdateLoc(const Types::TRect &Loc);
	HIDESBASE bool __fastcall Visible(void);
	__property bool DirectInput = {read=FDirectInput, write=FDirectInput, nodefault};
	__property _di_IRichEditAdapter RichEditAdapter = {read=FRichEditAdapter, write=SetRichEditAdapter};
public:
	/* TAnyCustomRichEdit.Destroy */ inline __fastcall virtual ~TInplaceRichEdit(void) { }
	
public:
	/* TWinControl.CreateParented */ inline __fastcall TInplaceRichEdit(HWND ParentWindow) : TBaseRichEdit(ParentWindow) { }
	
};


class DELPHICLASS TBaseMemo;
class PASCALIMPLEMENTATION TBaseMemo : public Stdctrls::TCustomMemo
{
	typedef Stdctrls::TCustomMemo inherited;
	
private:
	TCustomAnyGrid* FGrid;
	bool FInUsing;
	bool FNew;
	bool FSelfCreate;
	void __fastcall SetGrid(TCustomAnyGrid* Value);
	
protected:
	__property TCustomAnyGrid* Grid = {read=FGrid};
	
public:
	__fastcall virtual TBaseMemo(Classes::TComponent* AOwner);
public:
	/* TCustomMemo.Destroy */ inline __fastcall virtual ~TBaseMemo(void) { }
	
public:
	/* TWinControl.CreateParented */ inline __fastcall TBaseMemo(HWND ParentWindow) : Stdctrls::TCustomMemo(ParentWindow) { }
	
};


class DELPHICLASS TInplaceMemo;
class PASCALIMPLEMENTATION TInplaceMemo : public TBaseMemo
{
	typedef TBaseMemo inherited;
	
private:
	int FClickTime;
	int FRow;
	int FCol;
	bool FDrawCell;
	bool FDirectInput;
	bool FNew;
	void __fastcall InternalMove(const Types::TRect &Loc, bool Redraw);
	HIDESBASE MESSAGE void __fastcall CMShowingChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
	MESSAGE void __fastcall WMPaste(Messages::TWMNoParams &Message);
	MESSAGE void __fastcall WMCut(Messages::TWMNoParams &Message);
	MESSAGE void __fastcall WMClear(Messages::TWMNoParams &Message);
	
protected:
	DYNAMIC void __fastcall DblClick(void);
	DYNAMIC bool __fastcall DoMouseWheel(Classes::TShiftState Shift, int WheelDelta, const Types::TPoint &MousePos);
	DYNAMIC void __fastcall KeyDown(System::Word &Key, Classes::TShiftState Shift);
	DYNAMIC void __fastcall KeyPress(System::WideChar &Key);
	DYNAMIC void __fastcall KeyUp(System::Word &Key, Classes::TShiftState Shift);
	virtual void __fastcall BoundsChanged(void);
	virtual void __fastcall UpdateContents(void);
	virtual void __fastcall WndProc(Messages::TMessage &Message);
	bool __fastcall EditCanModify(void);
	void __fastcall UpdatePos(const Types::TRect &Loc);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	
public:
	__fastcall virtual TInplaceMemo(Classes::TComponent* AOwner);
	void __fastcall Deselect(void);
	HIDESBASE void __fastcall Hide(void);
	HIDESBASE void __fastcall Invalidate(void);
	void __fastcall Move(const Types::TRect &Loc);
	bool __fastcall PosEqual(const Types::TRect &Rect);
	HIDESBASE void __fastcall SetFocus(void);
	void __fastcall UpdateLoc(const Types::TRect &Loc);
	HIDESBASE bool __fastcall Visible(void);
	__property bool DirectInput = {read=FDirectInput, write=FDirectInput, nodefault};
public:
	/* TCustomMemo.Destroy */ inline __fastcall virtual ~TInplaceMemo(void) { }
	
public:
	/* TWinControl.CreateParented */ inline __fastcall TInplaceMemo(HWND ParentWindow) : TBaseMemo(ParentWindow) { }
	
};


class DELPHICLASS TInplaceEditor;
class PASCALIMPLEMENTATION TInplaceEditor : public Mask::TCustomMaskEdit
{
	typedef Mask::TCustomMaskEdit inherited;
	
private:
	TCustomAnyGrid* FGrid;
	int FClickTime;
	int FRow;
	int FCol;
	bool FDirectInput;
	bool FDrawCell;
	int FLeftMargin;
	int FRightMargin;
	void __fastcall InternalMove(const Types::TRect &Loc, bool Redraw);
	void __fastcall SetGrid(TCustomAnyGrid* Value);
	HIDESBASE MESSAGE void __fastcall CMShowingChanged(Messages::TMessage &Message);
	MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
	HIDESBASE MESSAGE void __fastcall WMPaste(Messages::TWMNoParams &Message);
	HIDESBASE MESSAGE void __fastcall WMCut(Messages::TWMNoParams &Message);
	MESSAGE void __fastcall WMClear(Messages::TWMNoParams &Message);
	HIDESBASE MESSAGE void __fastcall WMContextMenu(Messages::TWMContextMenu &Message);
	bool FWordWrap;
	Classes::TAlignment FAlignment;
	HIDESBASE void __fastcall SetAlignment(const Classes::TAlignment Value);
	void __fastcall SetWordWrap(const bool Value);
	
protected:
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	DYNAMIC void __fastcall DblClick(void);
	DYNAMIC bool __fastcall DoMouseWheel(Classes::TShiftState Shift, int WheelDelta, const Types::TPoint &MousePos);
	virtual bool __fastcall EditCanModify(void);
	DYNAMIC void __fastcall KeyDown(System::Word &Key, Classes::TShiftState Shift);
	DYNAMIC void __fastcall KeyPress(System::WideChar &Key);
	DYNAMIC void __fastcall KeyUp(System::Word &Key, Classes::TShiftState Shift);
	virtual void __fastcall BoundsChanged(void);
	virtual void __fastcall UpdateContents(void);
	virtual void __fastcall WndProc(Messages::TMessage &Message);
	void __fastcall UpdatePos(const Types::TRect &Loc);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	__property TCustomAnyGrid* Grid = {read=FGrid};
	
public:
	__fastcall virtual TInplaceEditor(Classes::TComponent* AOwner);
	void __fastcall Deselect(void);
	HIDESBASE void __fastcall Hide(void);
	HIDESBASE void __fastcall Invalidate(void);
	void __fastcall Move(const Types::TRect &Loc);
	bool __fastcall PosEqual(const Types::TRect &Rect);
	HIDESBASE void __fastcall SetFocus(void);
	void __fastcall UpdateLoc(const Types::TRect &Loc);
	HIDESBASE bool __fastcall Visible(void);
	HIDESBASE void __fastcall SetIme(void);
	__property bool DirectInput = {read=FDirectInput, write=FDirectInput, nodefault};
	__property AutoSelect = {default=1};
	__property CharCase = {default=0};
	__property Color = {default=-16777211};
	__property ImeMode = {default=3};
	__property ImeName;
	__property bool WordWrap = {read=FWordWrap, write=SetWordWrap, nodefault};
	__property Classes::TAlignment Alignment = {read=FAlignment, write=SetAlignment, nodefault};
public:
	/* TWinControl.CreateParented */ inline __fastcall TInplaceEditor(HWND ParentWindow) : Mask::TCustomMaskEdit(ParentWindow) { }
	/* TWinControl.Destroy */ inline __fastcall virtual ~TInplaceEditor(void) { }
	
};


class DELPHICLASS TPopupEditListbox;
class PASCALIMPLEMENTATION TPopupEditListbox : public Stdctrls::TCustomListBox
{
	typedef Stdctrls::TCustomListBox inherited;
	
private:
	System::AnsiString FSearchText;
	int FSearchTickCount;
	TCustomAnyGrid* FGrid;
	TInplaceEditor* FEditor;
	int FRow;
	int FCol;
	
protected:
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	virtual void __fastcall CreateWnd(void);
	DYNAMIC void __fastcall KeyPress(System::WideChar &Key);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	
public:
	__fastcall virtual TPopupEditListbox(Classes::TComponent* AOwner);
public:
	/* TCustomListBox.Destroy */ inline __fastcall virtual ~TPopupEditListbox(void) { }
	
public:
	/* TWinControl.CreateParented */ inline __fastcall TPopupEditListbox(HWND ParentWindow) : Stdctrls::TCustomListBox(ParentWindow) { }
	
};


class DELPHICLASS TPopupMonthCalendar;
class PASCALIMPLEMENTATION TPopupMonthCalendar : public Comctrls::TMonthCalendar
{
	typedef Comctrls::TMonthCalendar inherited;
	
private:
	int FRow;
	int FCol;
	HIDESBASE MESSAGE void __fastcall CNNotify(Messages::TWMNotify &Message);
	
protected:
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	virtual void __fastcall CreateWnd(void);
	virtual void __fastcall WndProc(Messages::TMessage &Message);
public:
	/* TMonthCalendar.Create */ inline __fastcall virtual TPopupMonthCalendar(Classes::TComponent* AOwner) : Comctrls::TMonthCalendar(AOwner) { }
	
public:
	/* TCommonCalendar.Destroy */ inline __fastcall virtual ~TPopupMonthCalendar(void) { }
	
public:
	/* TWinControl.CreateParented */ inline __fastcall TPopupMonthCalendar(HWND ParentWindow) : Comctrls::TMonthCalendar(ParentWindow) { }
	
};


class DELPHICLASS TInplaceEditorList;
class PASCALIMPLEMENTATION TInplaceEditorList : public TInplaceEditor
{
	typedef TInplaceEditor inherited;
	
private:
	int FButtonWidth;
	Stdctrls::TCustomListBox* FPickList;
	Comctrls::TMonthCalendar* FMonthCalendar;
	Controls::TWinControl* FActiveList;
	Grids::TEditStyle FEditStyle;
	int FDropDownRows;
	bool FListVisible;
	bool FTracking;
	bool FPressed;
	bool FPickListLoaded;
	Grids::TOnGetPickListItems FOnGetPickListitems;
	Classes::TNotifyEvent FOnEditButtonClick;
	bool FNextToItem;
	Dbctrls::TDBLookupListBox* FDataList;
	bool FUseDataList;
	Db::TDataSource* FLookupSource;
	System::WideString FOldText;
	Stdctrls::TCustomListBox* __fastcall GetPickList(void);
	MESSAGE void __fastcall CMCancelMode(Controls::TCMCancelMode &Message);
	HIDESBASE MESSAGE void __fastcall WMCancelMode(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
	HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
	HIDESBASE MESSAGE void __fastcall WMSetCursor(Messages::TWMSetCursor &Message);
	MESSAGE void __fastcall WMPosChanged(Messages::TWMWindowPosMsg &Msg);
	void __fastcall UpdateDataList(System::WideString ListValue);
	
protected:
	virtual void __fastcall BoundsChanged(void);
	Types::TRect __fastcall ButtonRect(void);
	DYNAMIC void __fastcall CloseUp(bool Accept);
	DYNAMIC void __fastcall DblClick(void);
	virtual void __fastcall DoDropDownKeys(System::Word &Key, Classes::TShiftState Shift);
	virtual void __fastcall DoEditButtonClick(void);
	DYNAMIC void __fastcall DoGetPickListItems(void);
	DYNAMIC void __fastcall DropDown(void);
	DYNAMIC void __fastcall KeyPress(System::WideChar &Key);
	DYNAMIC void __fastcall KeyDown(System::Word &Key, Classes::TShiftState Shift);
	DYNAMIC void __fastcall KeyUp(System::Word &Key, Classes::TShiftState Shift);
	void __fastcall ListMouseUp(System::TObject* Sender, Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	bool __fastcall OverButton(const Types::TPoint &P);
	virtual void __fastcall PaintWindow(HDC DC);
	void __fastcall StopTracking(void);
	void __fastcall TrackButton(int X, int Y);
	virtual void __fastcall UpdateContents(void);
	virtual void __fastcall WndProc(Messages::TMessage &Message);
	
public:
	__fastcall virtual TInplaceEditorList(Classes::TComponent* Owner);
	void __fastcall RestoreContents(void);
	__property Controls::TWinControl* ActiveList = {read=FActiveList, write=FActiveList};
	__property int ButtonWidth = {read=FButtonWidth, write=FButtonWidth, nodefault};
	__property int DropDownRows = {read=FDropDownRows, write=FDropDownRows, nodefault};
	__property Grids::TEditStyle EditStyle = {read=FEditStyle, nodefault};
	__property bool ListVisible = {read=FListVisible, write=FListVisible, nodefault};
	__property Stdctrls::TCustomListBox* PickList = {read=GetPickList};
	__property bool PickListLoaded = {read=FPickListLoaded, write=FPickListLoaded, nodefault};
	__property bool Pressed = {read=FPressed, nodefault};
	__property Classes::TNotifyEvent OnEditButtonClick = {read=FOnEditButtonClick, write=FOnEditButtonClick};
	__property Grids::TOnGetPickListItems OnGetPickListitems = {read=FOnGetPickListitems, write=FOnGetPickListitems};
	__property Dbctrls::TDBLookupListBox* DataList = {read=FDataList};
public:
	/* TWinControl.CreateParented */ inline __fastcall TInplaceEditorList(HWND ParentWindow) : TInplaceEditor(ParentWindow) { }
	/* TWinControl.Destroy */ inline __fastcall virtual ~TInplaceEditorList(void) { }
	
};


class DELPHICLASS TInplaceSpinEditor;
class PASCALIMPLEMENTATION TInplaceSpinEditor : public TInplaceEditorList
{
	typedef TInplaceEditorList inherited;
	
private:
	int FButtonWidth;
	bool FTracking;
	bool FPressed;
	bool FPressUpBtn;
	Extctrls::TTimer* FTimer;
	bool FChanging;
	System::Extended FIncrement;
	void __fastcall Timer(System::TObject* Sender);
	HIDESBASE MESSAGE void __fastcall WMCancelMode(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
	HIDESBASE MESSAGE void __fastcall WMSetCursor(Messages::TWMSetCursor &Message);
	System::Extended __fastcall GetValue(void);
	bool __fastcall IsValueStored(void);
	void __fastcall SetValue(const System::Extended Value);
	void __fastcall ButtonDown(void);
	void __fastcall ButtonUp(void);
	bool __fastcall IsIncrementStored(void);
	
protected:
	virtual void __fastcall BoundsChanged(void);
	HIDESBASE Types::TRect __fastcall ButtonRect(void);
	virtual void __fastcall DoEditButtonClick(void);
	DYNAMIC void __fastcall KeyDown(System::Word &Key, Classes::TShiftState Shift);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	HIDESBASE bool __fastcall OverButton(const Types::TPoint &P);
	virtual void __fastcall PaintWindow(HDC DC);
	HIDESBASE void __fastcall StopTracking(void);
	HIDESBASE void __fastcall TrackButton(int X, int Y);
	DYNAMIC void __fastcall Change(void);
	
public:
	__fastcall virtual TInplaceSpinEditor(Classes::TComponent* Owner);
	__fastcall virtual ~TInplaceSpinEditor(void);
	__property bool Pressed = {read=FPressed, nodefault};
	__property int ButtonWidth = {read=FButtonWidth, write=FButtonWidth, nodefault};
	__property System::Extended Value = {read=GetValue, write=SetValue, stored=IsValueStored};
	__property System::Extended Increment = {read=FIncrement, write=FIncrement, stored=IsIncrementStored};
public:
	/* TWinControl.CreateParented */ inline __fastcall TInplaceSpinEditor(HWND ParentWindow) : TInplaceEditorList(ParentWindow) { }
	
};


#pragma option push -b-
enum TBiasDirection { bdDown, bdUp };
#pragma option pop

#pragma pack(push,1)
struct TCellRec
{
	
public:
	unsigned BoolData1;
	unsigned typeData1;
	unsigned typeData2;
	unsigned ByteData1;
	unsigned ByteData2;
	Controls::TCursor FCursor;
	Graphics::TColor FBackColor;
	Graphics::TColor FBiasColor;
	Graphics::TColor FRightFrameColor;
	Graphics::TColor FLeftFrameColor;
	Graphics::TColor FTopFrameColor;
	Graphics::TColor FBottomFrameColor;
	Graphics::TColor FTransparentColor;
	unsigned FMaxLength;
	unsigned FRows;
	unsigned FCols;
	int FMergeCol;
	int FMergeRow;
	System::Word FComboItemHeight;
	unsigned tmData1;
	unsigned tmData2;
	unsigned gmData1;
	unsigned gmData2;
	int FItemIndex;
	int FImageIndex;
	System::Extended FIncrement;
	System::Variant FFormulaValue;
	System::WideString FLeftText;
	System::WideString FRightText;
	System::WideString FName;
	System::WideString FMask;
	System::WideString FTag;
	System::WideString FHint;
	System::WideString FValueChecked;
	System::WideString FValueUnChecked;
	System::WideString FFieldName;
	System::WideString FFormulaVarValue;
	int FFontAngle;
	int FVerticalTextSpace;
	int FTabNextRow;
	int FTabNextCol;
	int FDropDownCount;
};
#pragma pack(pop)


typedef TCellRec *PCellRec;

__interface ICellAdapter;
typedef System::DelphiInterface<ICellAdapter> _di_ICellAdapter;
class DELPHICLASS TCellInfo;
__interface  INTERFACE_UUID("{27BD1FDD-8D28-4B5B-B8FE-BAD810C6574F}") ICellAdapter  : public System::IInterface 
{
	
public:
	virtual void __fastcall ReferenceCell(TCellInfo* Cell) = 0 ;
	virtual void __fastcall ReleaseCell(void) = 0 ;
};

class PASCALIMPLEMENTATION TAnyStrings : public Classes::TStringList
{
	typedef Classes::TStringList inherited;
	
public:
	/* TStringList.Create */ inline __fastcall TAnyStrings(void)/* overload */ : Classes::TStringList() { }
	/* TStringList.Destroy */ inline __fastcall virtual ~TAnyStrings(void) { }
	
};


__interface ICellDataAdapter;
typedef System::DelphiInterface<ICellDataAdapter> _di_ICellDataAdapter;
__interface  INTERFACE_UUID("{0ED2BE86-F234-47A2-817C-000425A4F778}") ICellDataAdapter  : public System::IInterface 
{
	
public:
	virtual void __fastcall ReferenceCellData(TCellData* Cell) = 0 ;
	virtual void __fastcall ReleaseCellData(void) = 0 ;
};

class PASCALIMPLEMENTATION TCellData : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	__int64 FData;
	__int64 FData2;
	bool FFontBold;
	bool FThousandSeparators;
	bool FCtl3D;
	bool FRightLine;
	bool FTopFrame;
	bool FRightFrame;
	bool FFontItalic;
	bool FBottomLine;
	bool FLeftLine;
	bool FTopLine;
	bool FFontUnderline;
	bool FTrimZero;
	bool FLeftFrame;
	bool FVerticalText;
	bool FFontStrikethrough;
	bool FBottomFrame;
	bool FTileGraphic;
	bool FTransparent;
	bool FWordWrap;
	bool FStretch;
	bool FStretchFine;
	int FRightFrameWidth;
	int FDigits;
	int FTopFrameWidth;
	int FBottomFrameWidth;
	int FBiasWidth;
	int FFontSize;
	int FLeftFrameWidth;
	System::AnsiString FFontName;
	Classes::TAlignment FGraphicHorAlignment;
	Classes::TAlignment FAlignment;
	TBiasDirection FBiasDirection;
	Graphics::TBrushStyle FBrushStyle;
	Graphics::TColor FBiasColor;
	Graphics::TColor FRightFrameColor;
	Graphics::TColor FLeftFrameColor;
	Graphics::TColor FBottomFrameColor;
	Graphics::TColor FBackColor;
	Graphics::TColor FTransparentColor;
	Graphics::TColor FTopFrameColor;
	Controls::TCursor FCursor;
	Graphics::TFontCharset FFontCharset;
	Graphics::TPenStyle FTopFrameStyle;
	Graphics::TPenStyle FBiasStyle;
	Graphics::TPenStyle FBottomFrameStyle;
	Graphics::TPenStyle FRightFrameStyle;
	Graphics::TPenStyle FLeftFrameStyle;
	TVerAlignment FGraphicVerAlignment;
	TVerAlignment FVerAlignment;
	System::WideString FHint;
	System::Word FGraphicBMargin;
	System::Word FGraphicLMargin;
	System::Word FGraphicTMargin;
	System::Word FTextBMargin;
	System::Word FTextLMargin;
	System::Word FTextRMargin;
	System::Word FTextTMargin;
	System::Word FGraphicRMargin;
	_di_ICellDataAdapter FAdapter;
	Graphics::TColor FFontColor;
	int FFontAngle;
	bool FShrinkToFit;
	bool FPrintable;
	bool FPrintCurrencyLine;
	int FVerticalTextSpace;
	bool FShowCurrencyLine;
	int FDropDownCount;
	void __fastcall SetAlignment(const Classes::TAlignment Value);
	void __fastcall SetBackColor(const Graphics::TColor Value);
	void __fastcall SetBiasColor(const Graphics::TColor Value);
	void __fastcall SetBiasDirection(const TBiasDirection Value);
	void __fastcall SetBiasStyle(const Graphics::TPenStyle Value);
	void __fastcall SetBiasWidth(const int Value);
	void __fastcall SetBottomFrame(const bool Value);
	void __fastcall SetBottomFrameColor(const Graphics::TColor Value);
	void __fastcall SetBottomFrameStyle(const Graphics::TPenStyle Value);
	void __fastcall SetBottomFrameWidth(const int Value);
	void __fastcall SetBottomLine(const bool Value);
	void __fastcall SetBrushStyle(const Graphics::TBrushStyle Value);
	void __fastcall SetCtl3D(const bool Value);
	void __fastcall SetCursor(const Controls::TCursor Value);
	void __fastcall SetDigits(const int Value);
	void __fastcall SetFontBold(const bool Value);
	void __fastcall SetFontCharset(const Graphics::TFontCharset Value);
	void __fastcall SetFontItalic(const bool Value);
	void __fastcall SetFontName(const System::AnsiString Value);
	void __fastcall SetFontSize(const int Value);
	void __fastcall SetFontStrikethrough(const bool Value);
	void __fastcall SetGraphicBMargin(const System::Word Value);
	void __fastcall SetGraphicHorAlignment(const Classes::TAlignment Value);
	void __fastcall SetGraphicLMargin(const System::Word Value);
	void __fastcall SetGraphicRMargin(const System::Word Value);
	void __fastcall SetGraphicTMargin(const System::Word Value);
	void __fastcall SetGraphicVerAlignment(const TVerAlignment Value);
	void __fastcall SetHint(const System::WideString Value);
	void __fastcall SetLeftFrame(const bool Value);
	void __fastcall SetLeftFrameColor(const Graphics::TColor Value);
	void __fastcall SetLeftFrameStyle(const Graphics::TPenStyle Value);
	void __fastcall SetLeftFrameWidth(const int Value);
	void __fastcall SetLeftLine(const bool Value);
	void __fastcall SetRightFrame(const bool Value);
	void __fastcall SetRightFrameColor(const Graphics::TColor Value);
	void __fastcall SetRightFrameStyle(const Graphics::TPenStyle Value);
	void __fastcall SetRightFrameWidth(const int Value);
	void __fastcall SetRightLine(const bool Value);
	void __fastcall SetStretch(const bool Value);
	void __fastcall SetStretchFine(const bool Value);
	void __fastcall SetTextBMargin(const System::Word Value);
	void __fastcall SetTextLMargin(const System::Word Value);
	void __fastcall SetTextRMargin(const System::Word Value);
	void __fastcall SetTextTMargin(const System::Word Value);
	void __fastcall SetThousandSeparators(const bool Value);
	void __fastcall SetTileGraphic(const bool Value);
	void __fastcall SetTopFrame(const bool Value);
	void __fastcall SetTopFrameColor(const Graphics::TColor Value);
	void __fastcall SetTopFrameStyle(const Graphics::TPenStyle Value);
	void __fastcall SetTopFrameWidth(const int Value);
	void __fastcall SetTopLine(const bool Value);
	void __fastcall SetTransparent(const bool Value);
	void __fastcall SetTransparentColor(const Graphics::TColor Value);
	void __fastcall SetTrimZero(const bool Value);
	void __fastcall SetUnderline(const bool Value);
	void __fastcall SetVerAlignment(const TVerAlignment Value);
	void __fastcall SetVerticalText(const bool Value);
	void __fastcall SetWordWrap(const bool Value);
	void __fastcall SetCellDataAdapter(const _di_ICellDataAdapter Value);
	void __fastcall SetFontColor(const Graphics::TColor Value);
	void __fastcall SetFontAngle(const int Value);
	void __fastcall SetShrinkToFit(const bool Value);
	void __fastcall SetPrintable(const bool Value);
	void __fastcall SetPrintCurrencyLine(const bool Value);
	void __fastcall SetVerticalTextSpace(const int Value);
	void __fastcall SetShowCurrencyLine(const bool Value);
	void __fastcall SetDropDownCount(const int Value);
	
protected:
	bool __fastcall TestSet(System::Byte Bit);
	void __fastcall Init(void);
	
public:
	__fastcall TCellData(void);
	__property Classes::TAlignment HorAlignment = {read=FAlignment, write=SetAlignment, nodefault};
	__property TVerAlignment VerAlignment = {read=FVerAlignment, write=SetVerAlignment, nodefault};
	__property Graphics::TColor BackColor = {read=FBackColor, write=SetBackColor, nodefault};
	__property int FontSize = {read=FFontSize, write=SetFontSize, nodefault};
	__property bool FontBold = {read=FFontBold, write=SetFontBold, nodefault};
	__property bool FontItalic = {read=FFontItalic, write=SetFontItalic, nodefault};
	__property bool FontStrikethrough = {read=FFontStrikethrough, write=SetFontStrikethrough, nodefault};
	__property bool FontUnderline = {read=FFontUnderline, write=SetUnderline, nodefault};
	__property Graphics::TFontCharset FontCharset = {read=FFontCharset, write=SetFontCharset, nodefault};
	__property System::AnsiString FontName = {read=FFontName, write=SetFontName};
	__property bool WordWrap = {read=FWordWrap, write=SetWordWrap, nodefault};
	__property Graphics::TColor BiasColor = {read=FBiasColor, write=SetBiasColor, nodefault};
	__property bool TopLine = {read=FTopLine, write=SetTopLine, nodefault};
	__property bool LeftLine = {read=FLeftLine, write=SetLeftLine, nodefault};
	__property bool RightLine = {read=FRightLine, write=SetRightLine, nodefault};
	__property bool BottomLine = {read=FBottomLine, write=SetBottomLine, nodefault};
	__property int Digits = {read=FDigits, write=SetDigits, nodefault};
	__property bool ThousandSeparators = {read=FThousandSeparators, write=SetThousandSeparators, nodefault};
	__property bool LeftFrame = {read=FLeftFrame, write=SetLeftFrame, nodefault};
	__property bool TopFrame = {read=FTopFrame, write=SetTopFrame, nodefault};
	__property bool RightFrame = {read=FRightFrame, write=SetRightFrame, nodefault};
	__property bool BottomFrame = {read=FBottomFrame, write=SetBottomFrame, nodefault};
	__property bool TileGraphic = {read=FTileGraphic, write=SetTileGraphic, nodefault};
	__property bool Stretch = {read=FStretch, write=SetStretch, nodefault};
	__property bool StretchFine = {read=FStretchFine, write=SetStretchFine, nodefault};
	__property bool VerticalText = {read=FVerticalText, write=SetVerticalText, nodefault};
	__property int LeftFrameWidth = {read=FLeftFrameWidth, write=SetLeftFrameWidth, nodefault};
	__property int TopFrameWidth = {read=FTopFrameWidth, write=SetTopFrameWidth, nodefault};
	__property int RightFrameWidth = {read=FRightFrameWidth, write=SetRightFrameWidth, nodefault};
	__property int BottomFrameWidth = {read=FBottomFrameWidth, write=SetBottomFrameWidth, nodefault};
	__property Graphics::TColor LeftFrameColor = {read=FLeftFrameColor, write=SetLeftFrameColor, nodefault};
	__property Graphics::TColor TopFrameColor = {read=FTopFrameColor, write=SetTopFrameColor, nodefault};
	__property Graphics::TColor RightFrameColor = {read=FRightFrameColor, write=SetRightFrameColor, nodefault};
	__property Graphics::TColor BottomFrameColor = {read=FBottomFrameColor, write=SetBottomFrameColor, nodefault};
	__property Graphics::TPenStyle LeftFrameStyle = {read=FLeftFrameStyle, write=SetLeftFrameStyle, nodefault};
	__property Graphics::TPenStyle TopFrameStyle = {read=FTopFrameStyle, write=SetTopFrameStyle, nodefault};
	__property Graphics::TPenStyle RightFrameStyle = {read=FRightFrameStyle, write=SetRightFrameStyle, nodefault};
	__property Graphics::TPenStyle BottomFrameStyle = {read=FBottomFrameStyle, write=SetBottomFrameStyle, nodefault};
	__property TBiasDirection BiasDirection = {read=FBiasDirection, write=SetBiasDirection, nodefault};
	__property int BiasWidth = {read=FBiasWidth, write=SetBiasWidth, nodefault};
	__property Graphics::TPenStyle BiasStyle = {read=FBiasStyle, write=SetBiasStyle, nodefault};
	__property Graphics::TColor TransparentColor = {read=FTransparentColor, write=SetTransparentColor, nodefault};
	__property bool Transparent = {read=FTransparent, write=SetTransparent, nodefault};
	__property System::Word TextLMargin = {read=FTextLMargin, write=SetTextLMargin, nodefault};
	__property System::Word TextTMargin = {read=FTextTMargin, write=SetTextTMargin, nodefault};
	__property System::Word TextRMargin = {read=FTextRMargin, write=SetTextRMargin, nodefault};
	__property System::Word TextBMargin = {read=FTextBMargin, write=SetTextBMargin, nodefault};
	__property Classes::TAlignment GraphicHorAlign = {read=FGraphicHorAlignment, write=SetGraphicHorAlignment, nodefault};
	__property TVerAlignment GraphicVerAlign = {read=FGraphicVerAlignment, write=SetGraphicVerAlignment, nodefault};
	__property System::Word GraphicLMargin = {read=FGraphicLMargin, write=SetGraphicLMargin, nodefault};
	__property System::Word GraphicTMargin = {read=FGraphicTMargin, write=SetGraphicTMargin, nodefault};
	__property System::Word GraphicRMargin = {read=FGraphicRMargin, write=SetGraphicRMargin, nodefault};
	__property System::Word GraphicBMargin = {read=FGraphicBMargin, write=SetGraphicBMargin, nodefault};
	__property bool Ctl3D = {read=FCtl3D, write=SetCtl3D, nodefault};
	__property Controls::TCursor Cursor = {read=FCursor, write=SetCursor, nodefault};
	__property System::WideString Hint = {read=FHint, write=SetHint};
	__property Graphics::TBrushStyle BrushStyle = {read=FBrushStyle, write=SetBrushStyle, nodefault};
	__property bool TrimZero = {read=FTrimZero, write=SetTrimZero, nodefault};
	__property Graphics::TColor FontColor = {read=FFontColor, write=SetFontColor, nodefault};
	__property int FontAngle = {read=FFontAngle, write=SetFontAngle, nodefault};
	__property bool ShrinkToFit = {read=FShrinkToFit, write=SetShrinkToFit, nodefault};
	__property bool Printable = {read=FPrintable, write=SetPrintable, nodefault};
	__property bool PrintCurrencyLine = {read=FPrintCurrencyLine, write=SetPrintCurrencyLine, nodefault};
	__property int VerticalTextSpace = {read=FVerticalTextSpace, write=SetVerticalTextSpace, nodefault};
	__property bool ShowCurrencyLine = {read=FShowCurrencyLine, write=SetShowCurrencyLine, nodefault};
	__property int DropDownCount = {read=FDropDownCount, write=SetDropDownCount, nodefault};
	__property _di_ICellDataAdapter CellDataAdapter = {read=FAdapter, write=SetCellDataAdapter};
public:
	/* TObject.Destroy */ inline __fastcall virtual ~TCellData(void) { }
	
};


class PASCALIMPLEMENTATION TCellInfo : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	System::TObject* FObject;
	_di_ICellAdapter FCellAdapter;
	TCustomAnyGrid* FOwner;
	Graphics::TFont* FFont;
	TAnyStrings* FItems;
	Graphics::TPicture* FGraphic;
	Classes::TMemoryStream* FRichStream;
	int FRow;
	int FCol;
	bool FLoading;
	TCellRec *FData;
	System::WideString FText;
	bool __fastcall notDefaultCell(TCellInfo* ACell);
	void __fastcall HideEditor(void);
	int __fastcall GetMergeCol(void);
	int __fastcall GetMergeRow(void);
	int __fastcall GetTabNextRow(void);
	int __fastcall GetTabNextCol(void);
	void __fastcall SetTabNextRow(const int Value);
	void __fastcall SetTabNextCol(const int Value);
	bool __fastcall GetAdded(void);
	void __fastcall SetAdded(const bool Value);
	bool __fastcall GetSetParentFont(void);
	void __fastcall SetParent_Font(const bool Value);
	Graphics::TFont* __fastcall GetFont(void);
	TAnyStrings* __fastcall GetItems(void);
	int __fastcall GetComboItemHeight(void);
	void __fastcall SetComboItemHeight(const int Value);
	Types::TRect __fastcall GetPrintRect(void);
	Classes::TAlignment __fastcall GetGraphicHorAlignment(void);
	TVerAlignment __fastcall GetGraphicVerAlignment(void);
	void __fastcall SetGraphicHorAlignment(const Classes::TAlignment Value);
	void __fastcall SetGraphicVerAlignment(const TVerAlignment Value);
	System::Word __fastcall GetGraphicBMargin(void);
	System::Word __fastcall GetGraphicLMargin(void);
	System::Word __fastcall GetGraphicRMargin(void);
	System::Word __fastcall GetGraphicTMargin(void);
	System::Word __fastcall GetTextBMargin(void);
	System::Word __fastcall GetTextLMargin(void);
	System::Word __fastcall GetTextRMargin(void);
	System::Word __fastcall GetTextTMargin(void);
	void __fastcall SetGraphicBMargin(const System::Word Value);
	void __fastcall SetGraphicLMargin(const System::Word Value);
	void __fastcall SetGraphicRMargin(const System::Word Value);
	void __fastcall SetGraphicTMargin(const System::Word Value);
	void __fastcall SetTextBMargin(const System::Word Value);
	void __fastcall SetTextLMargin(const System::Word Value);
	void __fastcall SetTextRMargin(const System::Word Value);
	void __fastcall SetTextTMargin(const System::Word Value);
	int __fastcall GetImageIndex(void);
	void __fastcall SetImageIndex(const int Value);
	bool __fastcall GetCtl3D(void);
	void __fastcall SetCtl3D(const bool Value);
	Controls::TCursor __fastcall GetCursor(void);
	void __fastcall SetCursor(const Controls::TCursor Value);
	System::WideString __fastcall GetHint(void);
	void __fastcall SetHint(const System::WideString Value);
	int __fastcall GetItemIndex(void);
	void __fastcall SetItemIndex(const int Value);
	System::Extended __fastcall GetIncrement(void);
	void __fastcall SetIncrement(const System::Extended Value);
	System::Variant __fastcall GetFormulaValue(void);
	void __fastcall EvaluateFormula(void);
	Graphics::TBrushStyle __fastcall GetBrushStyle(void);
	void __fastcall SetBrushStyle(const Graphics::TBrushStyle Value);
	void __fastcall SetCellAdapter(const _di_ICellAdapter Value);
	bool __fastcall GetAsBoolean(void);
	System::Currency __fastcall GetAsCurrency(void);
	System::TDateTime __fastcall GetAsDateTime(void);
	double __fastcall GetAsFloat(void);
	int __fastcall GetAsInteger(void);
	void __fastcall SetAsBoolean(const bool Value);
	void __fastcall SetAsCurrency(const System::Currency Value);
	void __fastcall SetAsDateTime(const System::TDateTime Value);
	void __fastcall SetAsFloat(const double Value);
	void __fastcall SetAsInteger(const int Value);
	int __fastcall GetCol(void);
	int __fastcall GetRow(void);
	bool __fastcall GetLoading(void);
	void __fastcall SetLoading(const bool Value);
	bool __fastcall GetBottomLineR(void);
	bool __fastcall GetLeftLineR(void);
	bool __fastcall GetRightLineR(void);
	bool __fastcall GetTopLineR(void);
	void __fastcall SetBottomLineR(const bool Value);
	void __fastcall SetLeftLineR(const bool Value);
	void __fastcall SetRightLineR(const bool Value);
	void __fastcall SetTopLineR(const bool Value);
	void __fastcall SetRow(int Value);
	void __fastcall SetCol(int Value);
	bool __fastcall GetIsNumber(void);
	void __fastcall SetNumber(const bool Value);
	System::WideString __fastcall GetValueChecked(void);
	System::WideString __fastcall GetValueUnChecked(void);
	void __fastcall SetValueChecked(const System::WideString Value);
	void __fastcall SetValueUnChecked(const System::WideString Value);
	System::WideString __fastcall GetFieldName(void);
	void __fastcall SetFieldName(const System::WideString Value);
	bool __fastcall GetTrimZero(void);
	void __fastcall SetTrimZero(const bool Value);
	bool __fastcall GetShrinkToFit(void);
	void __fastcall SetShrinkToFit(const bool Value);
	int __fastcall GetFontAngle(void);
	void __fastcall SetFontAngle(const int Value);
	void __fastcall CopyTextFromStream(Classes::TStream* Stream);
	bool __fastcall GetPrintable(void);
	void __fastcall SetPrintable(const bool Value);
	bool __fastcall GetPrintCurrencyLine(void);
	void __fastcall SetPrintCurrencyLine(const bool Value);
	int __fastcall GetVerticalTextSpace(void);
	void __fastcall SetVerticalTextSpace(const int Value);
	bool __fastcall GetShowCurrencyLine(void);
	void __fastcall SetShowCurrencyLine(const bool Value);
	Stdctrls::TEditCharCase __fastcall GetCharCase(void);
	void __fastcall SetCharCase(const Stdctrls::TEditCharCase Value);
	int __fastcall GetDropDownCount(void);
	void __fastcall SetDropDownCount(const int Value);
	void __fastcall SetDefault(void);
	void __fastcall CheckNil(void);
	void __fastcall InternalAssign(TCellInfo* Cell);
	void __fastcall RestoreNeedDraw(void);
	void __fastcall CalNeedDraw(void);
	void __fastcall DrawSelf(void);
	void __fastcall DrawOutCell(void);
	TCellInfo* __fastcall GetLeftCell(void);
	TCellInfo* __fastcall GetTopCell(void);
	TCellInfo* __fastcall GetRightCell(void);
	TCellInfo* __fastcall GetBottomCell(void);
	int __fastcall LeftCell(void);
	int __fastcall TopCell(void);
	int __fastcall RightCell(void);
	int __fastcall BottomCell(void);
	int __fastcall LeftCellByIndex(int Index);
	int __fastcall TopCellByIndex(int Index);
	int __fastcall RightCellByIndex(int Index);
	int __fastcall BottomCellByIndex(int Index);
	void __fastcall FontChanged(System::TObject* Sender);
	void __fastcall bmpChange(System::TObject* Sender);
	void __fastcall ItemsChange(System::TObject* Sender);
	void __fastcall SetCols(const int Value);
	void __fastcall SetRows(const int Value);
	void __fastcall SetLeftText(const System::WideString Value);
	void __fastcall SetText(const System::WideString Value);
	void __fastcall SetRightText(const System::WideString Value);
	void __fastcall SetFont(const Graphics::TFont* Value);
	void __fastcall SetWordWrap(const bool Value);
	void __fastcall SetAlignment(const Classes::TAlignment Value);
	void __fastcall SetBackColor(const Graphics::TColor Value);
	void __fastcall SetFixCell(const bool Value);
	void __fastcall SetAutoHeight(const bool Value);
	void __fastcall SetItems(const TAnyStrings* Value);
	void __fastcall SetGraphic(const Graphics::TPicture* Value);
	void __fastcall SetBiasColor(const Graphics::TColor Value);
	void __fastcall SetCellType(const TCellType Value);
	void __fastcall SetMask(const System::WideString Value);
	void __fastcall SetName(const System::WideString Value);
	void __fastcall SetReadOnly(const bool Value);
	void __fastcall SetChecked(const bool Value);
	void __fastcall SetBottomLine(const bool Value);
	void __fastcall SetLeftLine(const bool Value);
	void __fastcall SetRightLine(const bool Value);
	void __fastcall SetTopLine(const bool Value);
	void __fastcall SetThousandSeparators(const bool Value);
	void __fastcall SetValueType(const TValueType Value);
	void __fastcall SetDigits(const int Value);
	void __fastcall SetMaxLength(const int Value);
	void __fastcall SetPasswordChar(const char Value);
	void __fastcall SetDirectInput(const bool Value);
	void __fastcall SetBottomFrame(const bool Value);
	void __fastcall SetLeftFrame(const bool Value);
	void __fastcall SetRightFrame(const bool Value);
	void __fastcall SetTopFrame(const bool Value);
	void __fastcall SetTileGraphic(const bool Value);
	void __fastcall SetStretch(const bool Value);
	void __fastcall SetStretchFine(const bool Value);
	void __fastcall SetVerticalText(const bool Value);
	System::WideString __fastcall GetDisplayText(void);
	void __fastcall SetLeftFrameWidth(const int Value);
	void __fastcall SetBottomFrameWidth(const int Value);
	void __fastcall SetRightFrameWidth(const int Value);
	void __fastcall SetTopFrameWidth(const int Value);
	void __fastcall SetBottomFrameColor(const Graphics::TColor Value);
	void __fastcall SetLeftFrameColor(const Graphics::TColor Value);
	void __fastcall SetRightFrameColor(const Graphics::TColor Value);
	void __fastcall SetTopFrameColor(const Graphics::TColor Value);
	void __fastcall SetBottomFrameStyle(const Graphics::TPenStyle Value);
	void __fastcall SetLeftFrameStyle(const Graphics::TPenStyle Value);
	void __fastcall SetRightFrameStyle(const Graphics::TPenStyle Value);
	void __fastcall SetTopFrameStyle(const Graphics::TPenStyle Value);
	void __fastcall SetBiasDirection(const TBiasDirection Value);
	void __fastcall SetBiasStyle(const Graphics::TPenStyle Value);
	void __fastcall SetBiasWidth(const int Value);
	void __fastcall SetVerAlignment(const TVerAlignment Value);
	void __fastcall SetTransparentColor(const Graphics::TColor Value);
	void __fastcall SetTransparent(const bool Value);
	Graphics::TPicture* __fastcall GetGraphic(void);
	Types::TRect __fastcall GetRect(void);
	Types::TRect __fastcall GetFR(void);
	Classes::TAlignment __fastcall GetAlignment(void);
	bool __fastcall GetAutoHeight(void);
	Graphics::TColor __fastcall GetBackColor(void);
	Graphics::TColor __fastcall GetBiasColor(void);
	TBiasDirection __fastcall GetBiasDirection(void);
	Graphics::TPenStyle __fastcall GetBiasStyle(void);
	int __fastcall GetBiasWidth(void);
	bool __fastcall GetBottomFrame(void);
	Graphics::TColor __fastcall GetBottomFrameColor(void);
	Graphics::TPenStyle __fastcall GetBottomFrameStyle(void);
	int __fastcall GetBottomFrameWidth(void);
	bool __fastcall GetChecked(void);
	int __fastcall GetCols(void);
	int __fastcall GetDigits(void);
	bool __fastcall GetDirectInput(void);
	bool __fastcall GetBottomLine(void);
	bool __fastcall InternalBottomLine(void);
	bool __fastcall GetLeftLine(void);
	bool __fastcall GetRightLine(void);
	bool __fastcall GetTopLine(void);
	bool __fastcall InternalTopLine(void);
	TCellType __fastcall GetCellType(void);
	bool __fastcall GetFixCell(void);
	bool __fastcall GetLeftFrame(void);
	Graphics::TColor __fastcall GetLeftFrameColor(void);
	Graphics::TPenStyle __fastcall GetLeftFrameStyle(void);
	int __fastcall GetLeftFrameWidth(void);
	System::WideString __fastcall GetLeftText(void);
	System::WideString __fastcall GetMask(void);
	int __fastcall GetMaxLength(void);
	System::WideString __fastcall GetName(void);
	bool __fastcall GetNeedDraw(void);
	char __fastcall GetPasswordChar(void);
	bool __fastcall GetReadOnly(void);
	bool __fastcall GetRightFrame(void);
	Graphics::TColor __fastcall GetRightFrameColor(void);
	Graphics::TPenStyle __fastcall GetRightFrameStyle(void);
	int __fastcall GetRightFrameWidth(void);
	System::WideString __fastcall GetRightText(void);
	int __fastcall GetRows(void);
	bool __fastcall GetSelected(void);
	bool __fastcall GetStretch(void);
	bool __fastcall GetStretchFine(void);
	System::WideString __fastcall GetTag(void);
	System::WideString __fastcall GetText(void);
	bool __fastcall GetThousandSeparators(void);
	bool __fastcall GetTileGraphic(void);
	bool __fastcall GetTopFrame(void);
	Graphics::TColor __fastcall GetTopFrameColor(void);
	Graphics::TPenStyle __fastcall GetTopFrameStyle(void);
	int __fastcall GetTopFrameWidth(void);
	bool __fastcall GetTransparent(void);
	Graphics::TColor __fastcall GetTransparentColor(void);
	TValueType __fastcall GetValueType(void);
	TVerAlignment __fastcall GetVerAlignment(void);
	bool __fastcall GetVerticalText(void);
	bool __fastcall GetWordWrap(void);
	void __fastcall SetTag(const System::WideString Value);
	void __fastcall InternalLoadFromStream2(Classes::TStream* Stream, bool WithSize = false);
	void __fastcall SetRichText(System::WideString AText);
	__property bool Added = {read=GetAdded, write=SetAdded, nodefault};
	__property bool SetParentFont = {read=GetSetParentFont, write=SetParent_Font, nodefault};
	__property bool Loading = {read=GetLoading, write=SetLoading, nodefault};
	__property bool LeftLineR = {read=GetLeftLineR, write=SetLeftLineR, nodefault};
	__property bool TopLineR = {read=GetTopLineR, write=SetTopLineR, nodefault};
	__property bool RightLineR = {read=GetRightLineR, write=SetRightLineR, nodefault};
	__property bool BottomLineR = {read=GetBottomLineR, write=SetBottomLineR, nodefault};
	__property bool IsNumberCell = {read=GetIsNumber, write=SetNumber, nodefault};
	
protected:
	void __fastcall AssignRich(Anyrichedit::TAnyRichEdit* Rich);
	void __fastcall AssignToRich(Anyrichedit::TAnyRichEdit* Rich);
	
public:
	__property int MergeRow = {read=GetMergeRow, nodefault};
	__property int MergeCol = {read=GetMergeCol, nodefault};
	__property TCustomAnyGrid* Owner = {read=FOwner};
	__fastcall TCellInfo(TCustomAnyGrid* AOwner, int ARow, int ACol);
	__fastcall virtual ~TCellInfo(void);
	void __fastcall SaveToStream(Classes::TStream* Stream);
	void __fastcall LoadFromStream(Classes::TStream* Stream, bool WithSize = false);
	void __fastcall Assign(TCellInfo* Cell);
	bool __fastcall PeekFont(void);
	bool __fastcall PeekItems(void);
	bool __fastcall PeekGraphic(void);
	void __fastcall LoadRichTextFromStream(Classes::TStream* Stream);
	void __fastcall SaveRichTextToStream(Classes::TStream* Stream);
	void __fastcall LoadRichTextFromFile(System::WideString FileName);
	void __fastcall SaveRichTextToFile(System::WideString FileName);
	void __fastcall SaveRichTextToRichEdit(Comctrls::TRichEdit* RichEdit);
	void __fastcall LoadRichTextFromRichEdit(Comctrls::TRichEdit* RichEdit);
	void __fastcall PasteFromClipboard(void);
	__property bool NeedDraw = {read=GetNeedDraw, nodefault};
	__property Types::TRect Rect = {read=GetRect};
	__property Types::TRect PrintRect = {read=GetPrintRect};
	__property Types::TRect FR = {read=GetFR};
	__property int Row = {read=GetRow, nodefault};
	__property int Col = {read=GetCol, nodefault};
	__property bool Selected = {read=GetSelected, nodefault};
	__property bool CellIsNumber = {read=GetIsNumber, nodefault};
	
__published:
	__property System::WideString Text = {read=GetText, write=SetText};
	__property bool ReadOnly = {read=GetReadOnly, write=SetReadOnly, nodefault};
	__property System::WideString Tag = {read=GetTag, write=SetTag};
	__property Classes::TAlignment HorAlignment = {read=GetAlignment, write=SetAlignment, nodefault};
	__property TVerAlignment VerAlignment = {read=GetVerAlignment, write=SetVerAlignment, nodefault};
	__property Graphics::TColor BackColor = {read=GetBackColor, write=SetBackColor, nodefault};
	__property Graphics::TFont* Font = {read=GetFont, write=SetFont};
	__property int Rows = {read=GetRows, write=SetRows, nodefault};
	__property int Cols = {read=GetCols, write=SetCols, nodefault};
	__property bool FixCell = {read=GetFixCell, write=SetFixCell, nodefault};
	__property System::WideString LeftText = {read=GetLeftText, write=SetLeftText};
	__property System::WideString RightText = {read=GetRightText, write=SetRightText};
	__property bool WordWrap = {read=GetWordWrap, write=SetWordWrap, nodefault};
	__property System::WideString Name = {read=GetName, write=SetName};
	__property System::WideString Mask = {read=GetMask, write=SetMask};
	__property bool AutoHeight = {read=GetAutoHeight, write=SetAutoHeight, nodefault};
	__property TCellType CellType = {read=GetCellType, write=SetCellType, nodefault};
	__property TAnyStrings* Items = {read=GetItems, write=SetItems};
	__property Graphics::TPicture* Graphic = {read=GetGraphic, write=SetGraphic};
	__property Graphics::TColor BiasColor = {read=GetBiasColor, write=SetBiasColor, nodefault};
	__property bool Checked = {read=GetChecked, write=SetChecked, nodefault};
	__property bool TopLine = {read=GetTopLine, write=SetTopLine, nodefault};
	__property bool LeftLine = {read=GetLeftLine, write=SetLeftLine, nodefault};
	__property bool RightLine = {read=GetRightLine, write=SetRightLine, nodefault};
	__property bool BottomLine = {read=GetBottomLine, write=SetBottomLine, nodefault};
	__property TValueType ValueType = {read=GetValueType, write=SetValueType, nodefault};
	__property int Digits = {read=GetDigits, write=SetDigits, default=0};
	__property bool ThousandSeparators = {read=GetThousandSeparators, write=SetThousandSeparators, nodefault};
	__property char PasswordChar = {read=GetPasswordChar, write=SetPasswordChar, nodefault};
	__property int MaxLength = {read=GetMaxLength, write=SetMaxLength, nodefault};
	__property bool DirectInput = {read=GetDirectInput, write=SetDirectInput, nodefault};
	__property bool LeftFrame = {read=GetLeftFrame, write=SetLeftFrame, nodefault};
	__property bool TopFrame = {read=GetTopFrame, write=SetTopFrame, nodefault};
	__property bool RightFrame = {read=GetRightFrame, write=SetRightFrame, nodefault};
	__property bool BottomFrame = {read=GetBottomFrame, write=SetBottomFrame, nodefault};
	__property bool TileGraphic = {read=GetTileGraphic, write=SetTileGraphic, nodefault};
	__property bool Stretch = {read=GetStretch, write=SetStretch, nodefault};
	__property bool StretchFine = {read=GetStretchFine, write=SetStretchFine, nodefault};
	__property bool VerticalText = {read=GetVerticalText, write=SetVerticalText, nodefault};
	__property System::WideString DisplayText = {read=GetDisplayText};
	__property int LeftFrameWidth = {read=GetLeftFrameWidth, write=SetLeftFrameWidth, nodefault};
	__property int TopFrameWidth = {read=GetTopFrameWidth, write=SetTopFrameWidth, nodefault};
	__property int RightFrameWidth = {read=GetRightFrameWidth, write=SetRightFrameWidth, nodefault};
	__property int BottomFrameWidth = {read=GetBottomFrameWidth, write=SetBottomFrameWidth, nodefault};
	__property Graphics::TColor LeftFrameColor = {read=GetLeftFrameColor, write=SetLeftFrameColor, nodefault};
	__property Graphics::TColor TopFrameColor = {read=GetTopFrameColor, write=SetTopFrameColor, nodefault};
	__property Graphics::TColor RightFrameColor = {read=GetRightFrameColor, write=SetRightFrameColor, nodefault};
	__property Graphics::TColor BottomFrameColor = {read=GetBottomFrameColor, write=SetBottomFrameColor, nodefault};
	__property Graphics::TPenStyle LeftFrameStyle = {read=GetLeftFrameStyle, write=SetLeftFrameStyle, nodefault};
	__property Graphics::TPenStyle TopFrameStyle = {read=GetTopFrameStyle, write=SetTopFrameStyle, nodefault};
	__property Graphics::TPenStyle RightFrameStyle = {read=GetRightFrameStyle, write=SetRightFrameStyle, nodefault};
	__property Graphics::TPenStyle BottomFrameStyle = {read=GetBottomFrameStyle, write=SetBottomFrameStyle, nodefault};
	__property TBiasDirection BiasDirection = {read=GetBiasDirection, write=SetBiasDirection, nodefault};
	__property int BiasWidth = {read=GetBiasWidth, write=SetBiasWidth, nodefault};
	__property Graphics::TPenStyle BiasStyle = {read=GetBiasStyle, write=SetBiasStyle, nodefault};
	__property Graphics::TColor TransparentColor = {read=GetTransparentColor, write=SetTransparentColor, nodefault};
	__property bool Transparent = {read=GetTransparent, write=SetTransparent, nodefault};
	__property System::TObject* Obj = {read=FObject, write=FObject};
	__property int ComboItemHeight = {read=GetComboItemHeight, write=SetComboItemHeight, nodefault};
	__property Classes::TAlignment GraphicHorAlign = {read=GetGraphicHorAlignment, write=SetGraphicHorAlignment, nodefault};
	__property TVerAlignment GraphicVerAlign = {read=GetGraphicVerAlignment, write=SetGraphicVerAlignment, nodefault};
	__property System::Word TextLMargin = {read=GetTextLMargin, write=SetTextLMargin, nodefault};
	__property System::Word TextTMargin = {read=GetTextTMargin, write=SetTextTMargin, nodefault};
	__property System::Word TextRMargin = {read=GetTextRMargin, write=SetTextRMargin, nodefault};
	__property System::Word TextBMargin = {read=GetTextBMargin, write=SetTextBMargin, nodefault};
	__property System::Word GraphicLMargin = {read=GetGraphicLMargin, write=SetGraphicLMargin, nodefault};
	__property System::Word GraphicTMargin = {read=GetGraphicTMargin, write=SetGraphicTMargin, nodefault};
	__property System::Word GraphicRMargin = {read=GetGraphicRMargin, write=SetGraphicRMargin, nodefault};
	__property System::Word GraphicBMargin = {read=GetGraphicBMargin, write=SetGraphicBMargin, nodefault};
	__property int ImageIndex = {read=GetImageIndex, write=SetImageIndex, nodefault};
	__property bool Ctl3D = {read=GetCtl3D, write=SetCtl3D, nodefault};
	__property Controls::TCursor Cursor = {read=GetCursor, write=SetCursor, nodefault};
	__property System::WideString Hint = {read=GetHint, write=SetHint};
	__property int ItemIndex = {read=GetItemIndex, write=SetItemIndex, nodefault};
	__property System::Extended Increment = {read=GetIncrement, write=SetIncrement};
	__property System::Variant FormulaValue = {read=GetFormulaValue};
	__property Graphics::TBrushStyle BrushStyle = {read=GetBrushStyle, write=SetBrushStyle, nodefault};
	__property int AsInteger = {read=GetAsInteger, write=SetAsInteger, nodefault};
	__property double AsFloat = {read=GetAsFloat, write=SetAsFloat};
	__property System::TDateTime AsDateTime = {read=GetAsDateTime, write=SetAsDateTime};
	__property bool AsBoolean = {read=GetAsBoolean, write=SetAsBoolean, nodefault};
	__property System::Currency AsCurrency = {read=GetAsCurrency, write=SetAsCurrency};
	__property System::WideString ValueChecked = {read=GetValueChecked, write=SetValueChecked};
	__property System::WideString ValueUnChecked = {read=GetValueUnChecked, write=SetValueUnChecked};
	__property System::WideString FieldName = {read=GetFieldName, write=SetFieldName};
	__property bool TrimZero = {read=GetTrimZero, write=SetTrimZero, nodefault};
	__property int FontAngle = {read=GetFontAngle, write=SetFontAngle, nodefault};
	__property bool ShrinkToFit = {read=GetShrinkToFit, write=SetShrinkToFit, nodefault};
	__property bool Printable = {read=GetPrintable, write=SetPrintable, nodefault};
	__property bool PrintCurrencyLine = {read=GetPrintCurrencyLine, write=SetPrintCurrencyLine, nodefault};
	__property int VerticalTextSpace = {read=GetVerticalTextSpace, write=SetVerticalTextSpace, nodefault};
	__property int TabNextRow = {read=GetTabNextRow, write=SetTabNextRow, nodefault};
	__property int TabNextCol = {read=GetTabNextCol, write=SetTabNextCol, nodefault};
	__property bool ShowCurrencyLine = {read=GetShowCurrencyLine, write=SetShowCurrencyLine, nodefault};
	__property int DropDownCount = {read=GetDropDownCount, write=SetDropDownCount, nodefault};
	__property Stdctrls::TEditCharCase CharCase = {read=GetCharCase, write=SetCharCase, nodefault};
	__property _di_ICellAdapter CellAdapter = {read=FCellAdapter, write=SetCellAdapter};
};


__interface IColumnAdapter;
typedef System::DelphiInterface<IColumnAdapter> _di_IColumnAdapter;
class DELPHICLASS TAnyColumn;
__interface  INTERFACE_UUID("{C1983C2B-C933-477C-8A2F-203FE183E31D}") IColumnAdapter  : public System::IInterface 
{
	
public:
	virtual void __fastcall ReferenceColumn(TAnyColumn* Column) = 0 ;
	virtual void __fastcall ReleaseColumn(void) = 0 ;
};

__interface IColumnTitleAdapter;
typedef System::DelphiInterface<IColumnTitleAdapter> _di_IColumnTitleAdapter;
class DELPHICLASS TAnyColumnTitle;
__interface  INTERFACE_UUID("{A4F7D085-994C-43D2-8368-F8B3682E069B}") IColumnTitleAdapter  : public System::IInterface 
{
	
public:
	virtual void __fastcall ReferenceColumnTitle(TAnyColumnTitle* Column) = 0 ;
	virtual void __fastcall ReleaseColumnTitle(void) = 0 ;
};

class PASCALIMPLEMENTATION TAnyColumnTitle : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	TAnyColumn* FColumn;
	System::WideString FCaption;
	Graphics::TFont* FFont;
	Graphics::TColor FColor;
	Classes::TAlignment FAlignment;
	_di_IColumnTitleAdapter FColumnTitleAdapter;
	void __fastcall Invalidate(void);
	void __fastcall FontChanged(System::TObject* Sender);
	Classes::TAlignment __fastcall GetAlignment(void);
	Graphics::TColor __fastcall GetColor(void);
	System::WideString __fastcall GetCaption(void);
	Graphics::TFont* __fastcall GetFont(void);
	void __fastcall SetAlignment(Classes::TAlignment Value);
	void __fastcall SetColor(Graphics::TColor Value);
	void __fastcall SetFont(Graphics::TFont* Value);
	virtual void __fastcall SetCaption(const System::WideString Value);
	void __fastcall SetColumnTitleAdapter(const _di_IColumnTitleAdapter Value);
	
public:
	__fastcall TAnyColumnTitle(TAnyColumn* AColumn);
	__fastcall virtual ~TAnyColumnTitle(void);
	void __fastcall Assign(TAnyColumnTitle* Source);
	__property TAnyColumn* Column = {read=FColumn};
	__property Classes::TAlignment Alignment = {read=GetAlignment, write=SetAlignment, nodefault};
	__property System::WideString Caption = {read=GetCaption, write=SetCaption};
	__property Graphics::TColor Color = {read=GetColor, write=SetColor, nodefault};
	__property Graphics::TFont* Font = {read=GetFont, write=SetFont};
	__property _di_IColumnTitleAdapter ColumnTitleAdapter = {read=FColumnTitleAdapter, write=SetColumnTitleAdapter};
};


#pragma option push -b-
enum TFilterType { ftAll, ftTop10, ftCustom, ftBlanks, ftNonBlanks };
#pragma option pop

#pragma option push -b-
enum TFilterCondition { fcNone, fcEquals, fcDoesNotEqual, fcIsGreaterThan, fcIsGreaterThanOrEqual, fcIsLessThan, fcIsLessThanOrEqual, fcBeginsWith, fcDoesNotBeginWith, fcEndsWith, fcDoesNotEndWith, fcContains, fcDoesNotContain };
#pragma option pop

struct TTop10Filter
{
	
public:
	bool MaxTop;
	int Value;
	bool Item;
};


struct TCustomFilter
{
	
public:
	TFilterCondition Condition1;
	System::WideString Value1;
	bool And2;
	TFilterCondition Condition2;
	System::WideString Value2;
	bool IsNumber;
};


class PASCALIMPLEMENTATION TAnyColumn : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	bool FAssigning;
	bool FAutoHeight;
	bool FWordWrap;
	bool FVerticalText;
	bool FThousandSeparators;
	bool FDirectInput;
	bool FReadOnly;
	bool FFixCell;
	bool FTileGraphic;
	bool FStretch;
	bool FStretchFine;
	bool FTransparent;
	char FPasswordChar;
	System::Extended FIncrement;
	int FImageIndex;
	int FDigits;
	int FComboItemHeight;
	int FBiasWidth;
	int FMaxLength;
	System::WideString FMask;
	System::WideString FHint;
	Classes::TAlignment FAlignment;
	Classes::TAlignment FGraphicHorAlignment;
	TBiasDirection FBiasDirection;
	Graphics::TBrushStyle FBrushStyle;
	TCellType FCellType;
	Graphics::TColor FTransparentColor;
	Graphics::TColor FBackColor;
	Controls::TCursor FCursor;
	Graphics::TPenStyle FBiasStyle;
	Graphics::TPicture* FGraphic;
	TAnyStrings* FItems;
	TValueType FValueType;
	TVerAlignment FGraphicVerAlignment;
	TVerAlignment FVerAlignment;
	System::Word FGraphicLMargin;
	System::Word FGraphicRMargin;
	System::Word FTextBMargin;
	System::Word FTextTMargin;
	System::Word FGraphicTMargin;
	System::Word FGraphicBMargin;
	System::Word FTextLMargin;
	System::Word FTextRMargin;
	Graphics::TColor FBiasColor;
	TCustomAnyGrid* FGrid;
	_di_IColumnAdapter FColumnAdapter;
	int FIndex;
	TAnyColumnTitle* FTitle;
	int TotalWidth;
	int CloneWidth;
	bool FVisible;
	int FWidth;
	Objlist::TObjList* FSortDataList;
	bool FIsAllDigits;
	TTop10Filter Top10Filter;
	TCustomFilter CustomFilter;
	System::WideString FFieldName;
	Db::TField* FField;
	bool FColGrouped;
	bool FGroupedASC;
	bool FGroupHasFooter;
	System::WideString FTag;
	int FOriGroupCol;
	TFormulaType FFormulaType;
	System::WideString FValueUnChecked;
	System::WideString FValueChecked;
	bool FTrimZero;
	System::WideString FName;
	int FFontAngle;
	bool FShrinkToFit;
	bool FPrintable;
	bool FPrintCurrencyLine;
	int FVerticalTextSpace;
	double FPhyWidth;
	double FPhyCloneWidth;
	bool FShowCurrencyLine;
	int FDropDownCount;
	Stdctrls::TEditCharCase FCharCase;
	bool __fastcall Filter(const System::WideString Text, bool IsNumber);
	void __fastcall SetDefault(void);
	void __fastcall HideGridEditor(void);
	void __fastcall SetAlignment(const Classes::TAlignment Value);
	void __fastcall SetAutoHeight(const bool Value);
	void __fastcall SetBackColor(const Graphics::TColor Value);
	void __fastcall SetBiasDirection(const TBiasDirection Value);
	void __fastcall SetBiasStyle(const Graphics::TPenStyle Value);
	void __fastcall SetBiasWidth(const int Value);
	void __fastcall SetBrushStyle(const Graphics::TBrushStyle Value);
	void __fastcall SetCellType(const TCellType Value);
	void __fastcall SetComboItemHeight(const int Value);
	void __fastcall SetCursor(const Controls::TCursor Value);
	void __fastcall SetDigits(const int Value);
	void __fastcall SetDirectInput(const bool Value);
	void __fastcall SetFixCell(const bool Value);
	void __fastcall SetGraphic(const Graphics::TPicture* Value);
	void __fastcall SetGraphicBMargin(const System::Word Value);
	void __fastcall SetGraphicHorAlignment(const Classes::TAlignment Value);
	void __fastcall SetGraphicLMargin(const System::Word Value);
	void __fastcall SetGraphicRMargin(const System::Word Value);
	void __fastcall SetGraphicTMargin(const System::Word Value);
	void __fastcall SetGraphicVerAlignment(const TVerAlignment Value);
	void __fastcall SetHint(const System::WideString Value);
	void __fastcall SetImageIndex(const int Value);
	void __fastcall SetIncrement(const System::Extended Value);
	void __fastcall SetItems(const TAnyStrings* Value);
	void __fastcall SetMask(const System::WideString Value);
	void __fastcall SetMaxLength(const int Value);
	void __fastcall SetPasswordChar(const char Value);
	void __fastcall SetReadOnly(const bool Value);
	void __fastcall SetStretch(const bool Value);
	void __fastcall SetStretchFine(const bool Value);
	void __fastcall SetTextBMargin(const System::Word Value);
	void __fastcall SetTextLMargin(const System::Word Value);
	void __fastcall SetTextRMargin(const System::Word Value);
	void __fastcall SetTextTMargin(const System::Word Value);
	void __fastcall SetThousandSeparators(const bool Value);
	void __fastcall SetTileGraphic(const bool Value);
	void __fastcall SetTransparent(const bool Value);
	void __fastcall SetTransparentColor(const Graphics::TColor Value);
	void __fastcall SetValueType(const TValueType Value);
	void __fastcall SetVerAlignment(const TVerAlignment Value);
	void __fastcall SetVerticalText(const bool Value);
	void __fastcall SetWordWrap(const bool Value);
	void __fastcall SetBiasColor(const Graphics::TColor Value);
	void __fastcall ItemsChange(System::TObject* Sender);
	void __fastcall PictureChange(System::TObject* Sender);
	void __fastcall SetColumnAdapter(const _di_IColumnAdapter Value);
	void __fastcall SetTitle(const TAnyColumnTitle* Value);
	void __fastcall SetVisible(const bool Value);
	void __fastcall SetWidth(const int Value);
	void __fastcall InternalSetWidth(const int Value);
	void __fastcall SaveToStream(Classes::TStream* AStream);
	void __fastcall LoadFromStream(Classes::TStream* AStream);
	void __fastcall SetFieldName(const System::WideString Value);
	void __fastcall SetFormulaType(const TFormulaType Value);
	void __fastcall SetValueChecked(const System::WideString Value);
	void __fastcall SetValueUnChecked(const System::WideString Value);
	void __fastcall SetTrimZero(const bool Value);
	void __fastcall SetTag(const System::WideString Value);
	void __fastcall SetName(const System::WideString Value);
	void __fastcall SetFontAngle(const int Value);
	void __fastcall SetShrinkToFit(const bool Value);
	void __fastcall SetPrintable(const bool Value);
	void __fastcall SetPrintCurrencyLine(const bool Value);
	void __fastcall SetVerticalTextSpace(const int Value);
	void __fastcall SetPhyWidth(const double Value);
	void __fastcall SetShowCurrencyLine(const bool Value);
	void __fastcall SetDropDownCount(const int Value);
	void __fastcall SetCharCase(const Stdctrls::TEditCharCase Value);
	
public:
	TFilterType FilterType;
	void __fastcall AutoWidth(void);
	void __fastcall SetTop10Filter(bool isMaxTop, int Value, bool isItem);
	void __fastcall SetCustomFilter(TFilterCondition Condition1, const System::WideString Value1, bool And2, TFilterCondition Condition2, const System::WideString Value2, bool IsNumber)/* overload */;
	void __fastcall SetCustomFilter(TFilterCondition Condition, const System::WideString Value, bool IsNumber)/* overload */;
	__fastcall TAnyColumn(TCustomAnyGrid* AGrid);
	__fastcall virtual ~TAnyColumn(void);
	void __fastcall Assign(TAnyColumn* Source);
	__property TCustomAnyGrid* Grid = {read=FGrid};
	__property TAnyColumnTitle* Title = {read=FTitle, write=SetTitle};
	__property bool ReadOnly = {read=FReadOnly, write=SetReadOnly, nodefault};
	__property Classes::TAlignment HorAlignment = {read=FAlignment, write=SetAlignment, nodefault};
	__property TVerAlignment VerAlignment = {read=FVerAlignment, write=SetVerAlignment, nodefault};
	__property Graphics::TColor BackColor = {read=FBackColor, write=SetBackColor, nodefault};
	__property bool FixCell = {read=FFixCell, write=SetFixCell, nodefault};
	__property bool WordWrap = {read=FWordWrap, write=SetWordWrap, nodefault};
	__property System::WideString Mask = {read=FMask, write=SetMask};
	__property bool AutoHeight = {read=FAutoHeight, write=SetAutoHeight, nodefault};
	__property TCellType CellType = {read=FCellType, write=SetCellType, nodefault};
	__property TAnyStrings* Items = {read=FItems, write=SetItems};
	__property Graphics::TPicture* Graphic = {read=FGraphic, write=SetGraphic};
	__property Graphics::TColor BiasColor = {read=FBiasColor, write=SetBiasColor, nodefault};
	__property TValueType ValueType = {read=FValueType, write=SetValueType, nodefault};
	__property int Digits = {read=FDigits, write=SetDigits, default=0};
	__property bool ThousandSeparators = {read=FThousandSeparators, write=SetThousandSeparators, nodefault};
	__property char PasswordChar = {read=FPasswordChar, write=SetPasswordChar, nodefault};
	__property int MaxLength = {read=FMaxLength, write=SetMaxLength, nodefault};
	__property bool DirectInput = {read=FDirectInput, write=SetDirectInput, nodefault};
	__property bool TileGraphic = {read=FTileGraphic, write=SetTileGraphic, nodefault};
	__property bool Stretch = {read=FStretch, write=SetStretch, nodefault};
	__property bool StretchFine = {read=FStretchFine, write=SetStretchFine, nodefault};
	__property bool VerticalText = {read=FVerticalText, write=SetVerticalText, nodefault};
	__property TBiasDirection BiasDirection = {read=FBiasDirection, write=SetBiasDirection, nodefault};
	__property int BiasWidth = {read=FBiasWidth, write=SetBiasWidth, nodefault};
	__property Graphics::TPenStyle BiasStyle = {read=FBiasStyle, write=SetBiasStyle, nodefault};
	__property Graphics::TColor TransparentColor = {read=FTransparentColor, write=SetTransparentColor, nodefault};
	__property bool Transparent = {read=FTransparent, write=SetTransparent, nodefault};
	__property int ComboItemHeight = {read=FComboItemHeight, write=SetComboItemHeight, nodefault};
	__property Classes::TAlignment GraphicHorAlign = {read=FGraphicHorAlignment, write=SetGraphicHorAlignment, nodefault};
	__property TVerAlignment GraphicVerAlign = {read=FGraphicVerAlignment, write=SetGraphicVerAlignment, nodefault};
	__property System::Word TextLMargin = {read=FTextLMargin, write=SetTextLMargin, nodefault};
	__property System::Word TextTMargin = {read=FTextTMargin, write=SetTextTMargin, nodefault};
	__property System::Word TextRMargin = {read=FTextRMargin, write=SetTextRMargin, nodefault};
	__property System::Word TextBMargin = {read=FTextBMargin, write=SetTextBMargin, nodefault};
	__property System::Word GraphicLMargin = {read=FGraphicLMargin, write=SetGraphicLMargin, nodefault};
	__property System::Word GraphicTMargin = {read=FGraphicTMargin, write=SetGraphicTMargin, nodefault};
	__property System::Word GraphicRMargin = {read=FGraphicRMargin, write=SetGraphicRMargin, nodefault};
	__property System::Word GraphicBMargin = {read=FGraphicBMargin, write=SetGraphicBMargin, nodefault};
	__property int ImageIndex = {read=FImageIndex, write=SetImageIndex, nodefault};
	__property Controls::TCursor Cursor = {read=FCursor, write=SetCursor, nodefault};
	__property System::WideString Hint = {read=FHint, write=SetHint};
	__property System::Extended Increment = {read=FIncrement, write=SetIncrement};
	__property Graphics::TBrushStyle BrushStyle = {read=FBrushStyle, write=SetBrushStyle, nodefault};
	__property int Index = {read=FIndex, nodefault};
	__property int Width = {read=FWidth, write=SetWidth, nodefault};
	__property bool Visible = {read=FVisible, write=SetVisible, nodefault};
	__property System::WideString FieldName = {read=FFieldName, write=SetFieldName};
	__property Db::TField* Field = {read=FField};
	__property System::WideString Tag = {read=FTag, write=SetTag};
	__property TFormulaType FormulaType = {read=FFormulaType, write=SetFormulaType, nodefault};
	__property System::WideString ValueChecked = {read=FValueChecked, write=SetValueChecked};
	__property System::WideString ValueUnChecked = {read=FValueUnChecked, write=SetValueUnChecked};
	__property bool TrimZero = {read=FTrimZero, write=SetTrimZero, nodefault};
	__property System::WideString Name = {read=FName, write=SetName};
	__property int FontAngle = {read=FFontAngle, write=SetFontAngle, nodefault};
	__property bool ShrinkToFit = {read=FShrinkToFit, write=SetShrinkToFit, nodefault};
	__property bool Printable = {read=FPrintable, write=SetPrintable, nodefault};
	__property bool PrintCurrencyLine = {read=FPrintCurrencyLine, write=SetPrintCurrencyLine, nodefault};
	__property int VerticalTextSpace = {read=FVerticalTextSpace, write=SetVerticalTextSpace, nodefault};
	__property double PhyWidth = {read=FPhyWidth, write=SetPhyWidth};
	__property bool ShowCurrencyLine = {read=FShowCurrencyLine, write=SetShowCurrencyLine, nodefault};
	__property int DropDownCount = {read=FDropDownCount, write=SetDropDownCount, nodefault};
	__property Stdctrls::TEditCharCase CharCase = {read=FCharCase, write=SetCharCase, nodefault};
	__property _di_IColumnAdapter ColumnAdapter = {read=FColumnAdapter, write=SetColumnAdapter};
};


class DELPHICLASS TDragControl;
class PASCALIMPLEMENTATION TDragControl : public Controls::TCustomControl
{
	typedef Controls::TCustomControl inherited;
	
private:
	Graphics::TBitmap* FBackBmp;
	
protected:
	virtual void __fastcall Paint(void);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	
public:
	__fastcall TDragControl(Classes::TComponent* AOwner, System::WideString ResName);
	__fastcall virtual ~TDragControl(void);
public:
	/* TWinControl.CreateParented */ inline __fastcall TDragControl(HWND ParentWindow) : Controls::TCustomControl(ParentWindow) { }
	
};


class DELPHICLASS TInnerPanel;
class PASCALIMPLEMENTATION TInnerPanel : public Extctrls::TPanel
{
	typedef Extctrls::TPanel inherited;
	
private:
	TCustomAnyGrid* FOwner;
	int FType;
	Types::TPoint FDownPoint;
	int FDownRow;
	int FDownCol;
	int FilterDownCol;
	bool FDowned;
	Types::TPoint FMovePoint;
	bool FDownFilter;
	Types::TPoint FOldDrawPoint;
	Types::TPoint FCurrPoint;
	bool FStarted;
	TDragControl* FDrag;
	Graphics::TBitmap* FFilterUpBmp;
	Graphics::TBitmap* FFilterDownBmp;
	Graphics::TBitmap* FFilteredUpBmp;
	Graphics::TBitmap* FFilteredDownBmp;
	Menus::TPopupMenu* FPopupMenu;
	bool __fastcall WholeRowSelected(int Row);
	bool __fastcall WholeColSelected(int Col);
	bool __fastcall GetCustomFilter(TAnyColumn* AColumn, int Index);
	void __fastcall CreateMenus(void);
	void __fastcall ClickMenu(System::TObject* Sender);
	void __fastcall DrawTopButtonDown(void);
	void __fastcall DrawLeftButtonDown(void);
	void __fastcall DrawMoveLine(void);
	bool __fastcall BoldText(int Row, int Col, int Index);
	HIDESBASE MESSAGE void __fastcall WMSetCursor(Messages::TWMSetCursor &Msg);
	void __fastcall DrawSmallText(const Types::TRect &R, int Col);
	int __fastcall GetTextTopOff(void);
	void __fastcall DrawLastCol(bool EmptyTitle);
	void __fastcall DrawLastRow(void);
	void __fastcall DrawLeftTopCorner(void);
	Graphics::TBitmap* __fastcall GetSortBmp(int Col);
	void __fastcall CheckDragControl(void);
	void __fastcall DrawTopCell(int ACol);
	void __fastcall DrawLeftCell(int ARow);
	HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TWMNCHitTest &Msg);
	HIDESBASE MESSAGE void __fastcall WMContextMenu(Messages::TWMContextMenu &Message);
	
protected:
	virtual void __fastcall Paint(void);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall Click(void);
	DYNAMIC void __fastcall DblClick(void);
	void __fastcall SortCol(int Col, bool ASC);
	
public:
	__fastcall TInnerPanel(TCustomAnyGrid* AOwner, int AType);
	__fastcall virtual ~TInnerPanel(void);
public:
	/* TWinControl.CreateParented */ inline __fastcall TInnerPanel(HWND ParentWindow) : Extctrls::TPanel(ParentWindow) { }
	
};


__interface IOleAdapter;
typedef System::DelphiInterface<IOleAdapter> _di_IOleAdapter;
class DELPHICLASS TAnyOleContainer;
__interface  INTERFACE_UUID("{54D72551-B175-4343-A228-71FC0C43B9FC}") IOleAdapter  : public System::IInterface 
{
	
public:
	virtual void __fastcall ReferenceOle(TAnyOleContainer* Ole) = 0 ;
	virtual void __fastcall ReleaseOle(void) = 0 ;
};

class PASCALIMPLEMENTATION TAnyOleContainer : public Anyolectnrs::TCustomOleContainer
{
	typedef Anyolectnrs::TCustomOleContainer inherited;
	
private:
	int FRow;
	int FCol;
	int X;
	int Y;
	TCustomAnyGrid* FGrid;
	bool FFixPosSize;
	bool FUpdating;
	_di_IOleAdapter FOleAdaper;
	void __fastcall SetPosition(void);
	bool __fastcall GetAllowInPlace(void);
	HIDESBASE MESSAGE void __fastcall WMNCHITTEST(Messages::TWMNCHitTest &message);
	MESSAGE void __fastcall WMPosChange(Messages::TWMWindowPosMsg &message);
	void __fastcall SetOleAdapter(const _di_IOleAdapter Value);
	
protected:
	DYNAMIC void __fastcall DblClick(void);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TMessage &message);
	
public:
	__fastcall virtual TAnyOleContainer(Classes::TComponent* AOwner);
	__fastcall virtual ~TAnyOleContainer(void);
	virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
	__property bool FixPosAndSize = {read=FFixPosSize, write=FFixPosSize, nodefault};
	__property bool AllowInPlace = {read=GetAllowInPlace, nodefault};
	__property _di_IOleAdapter OleAdapter = {read=FOleAdaper, write=SetOleAdapter};
public:
	/* TWinControl.CreateParented */ inline __fastcall TAnyOleContainer(HWND ParentWindow) : Anyolectnrs::TCustomOleContainer(ParentWindow) { }
	
};


class DELPHICLASS TInnerControl;
class PASCALIMPLEMENTATION TInnerControl : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	int FRow;
	int FCol;
	int X;
	int Y;
	TCustomAnyGrid* FGrid;
	Controls::TWinControl* FControl;
	Classes::TWndMethod FWinMethod;
	bool FUpdating;
	bool FFixPosSize;
	bool FAddClick;
	void __fastcall SetPosition(void);
	void __fastcall Msg(Messages::TMessage &Message);
	
public:
	__fastcall TInnerControl(TCustomAnyGrid* AGrid, Controls::TWinControl* AControl, int ARow, int ACol);
	__fastcall TInnerControl(TCustomAnyGrid* AGrid, Controls::TWinControl* AControl, const Types::TPoint &TopLeft);
	__fastcall virtual ~TInnerControl(void);
};


#pragma option push -b-
enum TEditControlType { ectEdit, ectRichEdit, ectMemo };
#pragma option pop

class PASCALIMPLEMENTATION TCustomAnyGrid : public Controls::TCustomControl
{
	typedef Controls::TCustomControl inherited;
	
private:
	typedef DynamicArray<TRowInfo> _TCustomAnyGrid__1;
	
	typedef DynamicArray<TRowInfo> _TCustomAnyGrid__2;
	
	typedef DynamicArray<TColInfo> _TCustomAnyGrid__3;
	
	typedef DynamicArray<bool> _TCustomAnyGrid__4;
	
	
private:
	bool FKeyFired;
	bool FRestoreFocused;
	Extctrls::TTimer* FSpinTimer;
	TPopupMonthCalendar* FPopupCalendar;
	bool FPopupCalendarVisible;
	Namelist::TNameList* FFormulaUpdatedList;
	Namelist::TNameList* FRefFormulaCell;
	bool FDestroying;
	Namelist::TNameList* FFormulaCellList;
	bool FCrossFixRow;
	bool FCrossFixCol;
	Anyscroll::TWScroll* FWScroll;
	Graphics::TPicture* FScroll16Bitmap;
	Graphics::TPicture* FScroll18Bitmap;
	TCellData* FCellDataGet;
	bool FDirectInputEdit;
	Types::TPoint FHitTest;
	bool FPainting;
	unsigned FHandle;
	Controls::TControl* FHintPanel;
	Any_hint::TCariHint* FAnyHint;
	bool FAutoHeightUpdating;
	bool FEditChanging;
	Anydialogs::TAnyFindDialog* FFindDialog;
	int FSortCol;
	bool FSortASC;
	bool FSorted;
	bool FGrouped;
	Types::TPoint FLinkDownPoint;
	bool FCreating;
	int FRows;
	int FCols;
	int FLeftMargin;
	int FTopMargin;
	int FRightMargin;
	int FBottomMargin;
	int FFocusIndex;
	bool FMouseDowned;
	bool FChangingCell;
	bool FSelfMouseDowned;
	int FDownHorzPosition;
	int FDownVertPosition;
	Types::TPoint FMouseDownPoint;
	_TCustomAnyGrid__1 FRowHeights;
	_TCustomAnyGrid__2 FPrintRowHeights;
	_TCustomAnyGrid__3 FPrintColWidths;
	int FRow;
	int FCol;
	bool InUpdate;
	TGridEvent FOnUpdateData;
	TGridEvent FOnButtonClick;
	Graphics::TColor FBackColor;
	Graphics::TColor FLineColor;
	TState State;
	int FMovingCol;
	int FMovingRow;
	TRowCol OldMoveSelRowCol;
	TRowCol OldMaxMoveSelRowCol;
	TRowCol OldMinMoveSelRowCol;
	TRowCol MoveDownRowCol;
	Types::TPoint FDownPoint;
	Types::TPoint MoveDownPoint;
	Types::TPoint OldMovingPoint;
	Types::TPoint OldPoint;
	Forms::TFormBorderStyle FBorderStyle;
	Stdctrls::TScrollStyle FScrollBars;
	TCellList* FCellList;
	bool FPtInRect;
	int FPtIndex;
	bool FSelecting;
	TRowCol MinMoveSelRowCol;
	TRowCol MaxMoveSelRowCol;
	TRowCol FMultiSelBegin;
	TRowCol FMultiSelEnd;
	TCellArea FOldSelectionArea;
	int FLeftOff;
	int FTopOff;
	Forms::TScrollBarKind FKind;
	int FGridWidth;
	int FGridHeight;
	bool FUpdateScroll;
	int FTopSpace;
	int FLeftSpace;
	int FRightSpace;
	int FBottomSpace;
	bool TimerUpdate;
	Classes::TFileStream* FDFMStream;
	System::WideString FDFMFile;
	bool FDesigning;
	TGridType FGridType;
	TInnerPanel* FLeftPanel;
	TInnerPanel* FTopPanel;
	bool FUpdateShowCell;
	TTextEvent FOnGetText;
	TTextEvent FOnEditText;
	TTextEvent FOnSetText;
	TGridEvent FOnAfterSelectCell;
	TGridBeforeEvent FOnBeforeSelectCell;
	TGridEvent FOnAfterEdit;
	TGridEvent FOnUnSelectCell;
	TSaveProgressEvent FOnSaveProgress;
	TDrawCellColorEvent FOnDrawCellColor;
	TGridEvent FOnChange;
	bool FShowCelling;
	bool FShowH;
	bool FShowW;
	bool FEditHiding;
	bool FEditorMode;
	System::WideString FBeforeText;
	System::WideString FEditText;
	Classes::TMemoryStream* FBeforeStream;
	bool FChanging;
	bool FInCombo;
	Graphics::TPen* FSavePen;
	Graphics::TBrush* FSaveBrush;
	int FSaveIndex;
	Graphics::TColor FShadowColor;
	Objlist::TObjList* FMergeCells;
	TRowCol FLeftTop;
	TRowCol FRightBottom;
	TRowCol FFixLeftTop;
	TRowCol FFixRightBottom;
	Objlist::TObjList* FAutoHeightRows;
	bool FInScroll;
	System::Word ClipFormat;
	System::Word CF_CSV;
	Objlist::TObjList* FOleObjectList;
	Objlist::TObjList* FControlList;
	Objlist::TObjList* FChartList;
	Namelist::TNameList* FNameList;
	bool FInserting;
	Fatexp::TFatExpression* FFatExp;
	int FMovingOnRow;
	int FMovingOnCol;
	bool FPrinting;
	int FFixRowCount;
	int FFixColCount;
	TAnyGridOptions FOptions;
	bool FShowingEdit;
	bool FInvalidating;
	int FUpdateCount;
	int FTitleWidth;
	int FTitleHeight;
	Imglist::TCustomImageList* FImages;
	Imglist::TChangeLink* FImageChangeLink;
	HICON FCursorHandle;
	TRowCol FHintCell;
	TEditControlType FEditType;
	TInplaceEditorList* FEdit;
	Objlist::TObjList* FDrawRichList;
	Objlist::TObjList* FTempRichList;
	TInplaceRichEdit* FRichEdit;
	TInplaceMemo* FMemoEdit;
	Objlist::TObjList* FFormulaList;
	Objlist::TObjList* FRefList;
	TColumnTitleEvent FOnClickColumnTitle;
	TRowTitleEvent FOnClickRowTitle;
	TAnyStrings* FColumnTitles;
	bool FLoadText;
	Classes::TAlignment FColumnTitleAlign;
	Graphics::TFont* FColumnTitleFont;
	TOnCompareFunc FOnCompareFunc;
	Graphics::TBitmap* FSortDownBmp;
	Graphics::TBitmap* FSortUpBmp;
	bool FSortting;
	int FSortBeginRow;
	int FSortEndRow;
	Classes::TNotifyEvent FOnRichEditSelectionChange;
	TChangeEvent FOnColMoved;
	TChangeEvent FOnRowMoved;
	TChangeEvent FOnColWidthChanged;
	TChangeEvent FOnRowHeightChanged;
	TChangeEvent FOnColVisibleChanged;
	TChangeEvent FOnRowVisibleChanged;
	TChangeEvent FOnSorted;
	Objlist::TObjList* FColumns;
	Stdctrls::TDrawItemEvent FOnDrawComboItem;
	Stdctrls::TMeasureItemEvent FOnMeasureComboItem;
	TDrawCellEvent FOnDrawCell;
	TSetCursorEvent FOnSetCursor;
	Fatexp::TOnEvaluate FOnEvaluate;
	int FFilterBeginRow;
	int FFilterEndRow;
	Classes::TNotifyEvent FOnFiltered;
	bool FShowPagesLine;
	Objlist::TObjList* FPagesList;
	int FOldVertBookmark;
	int FOldHorzBookmark;
	int FDefaultColWidth;
	int FDefaultRowHeight;
	Db::TDataSource* FDataSource;
	Db::TDataLink* FDataLink;
	bool FInSetRow;
	int FTitleRows;
	int FFooterRows;
	bool FGettingCount;
	bool FUpdateBufferCount;
	Db::TDataSetNotifyEvent FOldAfterRefreshEvent;
	Graphics::TColor FGroupHeaderColor;
	Graphics::TColor FGroupFooterColor;
	double FRTFLineSpace;
	int FLineSpace;
	bool FShowGroupFooter;
	int FGroupFooterRow;
	int FGroupHeaderRow;
	TGetPageBreakEvent FOnGetPageBreak;
	Graphics::TPicture* FBackGround;
	Graphics::TBitmap* FBackBmp;
	Graphics::TBitmap* FBackFocusBmp;
	Graphics::TBitmap* FTitleBack;
	bool FAutoShowBlobField;
	TSaveProgressEvent FOnImportExportProgress;
	Db::TDataSource* FMasterDataSource;
	Db::TDataLink* FMasterDataLink;
	Classes::TNotifyEvent FOnLeftTopChange;
	TGetReadOnlyEvent FOnGetReadOnly;
	TGetAlignmentEvent FOnGetAlignment;
	Namelist::TNameList* FColumnNameList;
	bool FIncludeHiddenData;
	bool FColumnUserDefined;
	TFilterEvent FOnBeforeFilter;
	Graphics::TBitmap* FDownArrowBmp;
	bool FExportHiddenRow;
	bool FExportHiddenCol;
	System::WideString FCurrencySymbol;
	Graphics::TColor FDecimalSeparatorColor;
	Graphics::TColor FThousandSeparatorColor;
	int FCurrencyCellWidth;
	int FCurrencyDigits;
	TSizeChangeEvent FOnBeforeColumnWidthChange;
	TSizeChangeEvent FOnBeforeRowHeightChange;
	Graphics::TColor FTitleColor;
	Graphics::TColor FCurrencySeparatorColor;
	int FPrintZoom;
	bool FTileBackGround;
	Graphics::TColor FFocusColor;
	System::Byte FRValue;
	System::Byte FGValue;
	System::Byte FBValue;
	bool FLockBackGround;
	bool FHorzTracking;
	bool FVertTracking;
	TCellData* FCellData;
	TCellData* FTempCellData;
	TGetCellDataEvent FOnGetCellData;
	Graphics::TBitmap* FDrawBmp;
	bool FNeedReCalHeight;
	TGridEvent FOnShowEditor;
	TMoveDirectory FMoveDirEnter;
	System::AnsiString FAbout;
	Graphics::TColor FTitleLineColor;
	TImportCellEvent FOnImportCell;
	TExportCellEvent FOnExportCell;
	TUnitType FUnitType;
	double FPhyLeftMargin;
	double FPhyRightMargin;
	double FPhyTopMargin;
	double FPhyBottomMargin;
	TDrawGridRectEvent FOnDrawGridBackground;
	TDrawGridRectEvent FOnDrawGridForeground;
	TDrawGridRectEvent FOnDrawTitle;
	bool FOwnerHintPanel;
	_TCustomAnyGrid__4 FCustomRows;
	bool FPasteReadOnly;
	int FButtonWidth;
	bool FCellButtonPress;
	int FCellPressRow;
	int FCellPressCol;
	bool FCellPressUp;
	bool FCellPressDown;
	bool FListVisible;
	Controls::TWinControl* FActiveList;
	Dbctrls::TDBLookupListBox* FDataList;
	Db::TDataSource* FLookupSource;
	TPopupEditListbox* FPickList;
	Grids::TEditStyle FEditStyle;
	bool FUseDataList;
	bool FDoKeyExit;
	Stdctrls::TCustomListBox* __fastcall GetPickList(int ARow, int ACol);
	TCellType __fastcall TestCellType(int Row, int Col, Types::TRect &Rect);
	void __fastcall DoDropDownKeys(System::Word &Key, Classes::TShiftState Shift);
	void __fastcall DoPopupListKeyDown(System::Word &Key, Classes::TShiftState Shift);
	void __fastcall DoPopupListKeyUp(System::Word &Key, Classes::TShiftState Shift);
	void __fastcall DropDownPopupList(void);
	bool __fastcall CellCanEdit(int Row, int Col);
	void __fastcall InitPopupList(int ARow, int ACol);
	void __fastcall UpdateDataList(System::WideString ListValue);
	void __fastcall CloseUp(bool Accept);
	void __fastcall ListMouseUp(System::TObject* Sender, Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	System::Extended __fastcall GetCellValue(TCellInfo* Cell);
	void __fastcall SetCellValue(TCellInfo* Cell, const System::Extended Value);
	void __fastcall IncCellText(TCellInfo* Cell);
	void __fastcall DecCellText(TCellInfo* Cell);
	void __fastcall OnSpinTimer(System::TObject* Sender);
	void __fastcall OverCellSpinButton(const Types::TRect &CellRect, const Types::TPoint &P, bool &DownPress, bool &UpPress);
	void __fastcall PaintSpinButton(Graphics::TCanvas* Canvas, const Types::TRect &CellRect, bool UpPressed, bool DownPressed);
	void __fastcall CreatePopupCalendar(void);
	bool __fastcall OverCellButton(const Types::TRect &CellRect, const Types::TPoint &P);
	void __fastcall PaintButton(Graphics::TCanvas* Canvas, const Types::TRect &CellRect, Grids::TEditStyle EditStyle, bool Pressed);
	void __fastcall AddFormulaCellList(int Row, int Col, const System::WideString Text);
	void __fastcall DeleteFormulaCellList(int Row, int Col, const System::WideString Text, bool Reset);
	void __fastcall GetFormulaCellList(TCellInfo* ACell, const System::WideString Text, Objlist::TObjList* List, bool Del);
	void __fastcall UpdateFormulaFromCell(int Row, int Col);
	void __fastcall UpdateCrossFlag(void);
	bool __fastcall AcquireFocus(void);
	TBaseRichEdit* __fastcall GetRichEdt(Objlist::TObjList* AList, int MaxCount);
	void __fastcall ClearRichList(Objlist::TObjList* AList);
	bool __fastcall GetSortData(int Col, bool ASC, Objlist::TObjList* List);
	void __fastcall ClearColumnObj(void);
	Types::TRect __fastcall GetRectInClient(const Types::TRect &R);
	Types::TRect __fastcall CellEditRect(int ACol, int ARow);
	TInplaceRichEdit* __fastcall GetRichEdit(void);
	void __fastcall CancelMode(void);
	void __fastcall RichEditSelectionChange(System::TObject* Sender);
	void __fastcall DecUpdateCount(void);
	bool __fastcall FindErrorMerge(void);
	int __fastcall Compare(void * Data1, void * Data2, bool *isNumber, const int isNumber_Size);
	void __fastcall QSInsertionSort(Objlist::TObjList* List, int First, int Last, bool *isNumber, const int isNumber_Size);
	void __fastcall QS(Objlist::TObjList* List, int First, int Last, bool *isNumber, const int isNumber_Size);
	void __fastcall QuickSort(Objlist::TObjList* List, int First, int Last, bool *isNumber, const int isNumber_Size);
	void __fastcall SetColumnTitleFont(Graphics::TFont* Value);
	void __fastcall ColumnTitleFontChange(System::TObject* Sender);
	void __fastcall TitleChange(System::TObject* Sender);
	void __fastcall UpdateFormula(bool ForceUpdate = false);
	void __fastcall ResetFormula(int Index, int Count, int ResetType, bool IsFooter = false, bool ForceUpdateFormula = true);
	bool __fastcall CellReadOnly(TCellInfo* Cell);
	void __fastcall ImageListChange(System::TObject* Sender);
	bool __fastcall InternalUpdate(unsigned AHandle, Types::PRect PR, bool Erase);
	int __fastcall GetFirstNoWidthCol(int ACol);
	int __fastcall GetFirstNoHeightRow(int ARow);
	int __fastcall GetLastNoWidthCol(int ACol);
	int __fastcall GetLastNoHeightRow(int ARow);
	int __fastcall GetNextVisibleCol(int ACol);
	int __fastcall GetNextVisibleRow(int ARow);
	int __fastcall GetPriorVisibleCol(int ACol);
	int __fastcall GetPriorVisibleRow(int ARow);
	bool __fastcall CheckFixRowCount(void);
	bool __fastcall CheckFixColCount(void);
	int __fastcall GetTSpace(void);
	int __fastcall GetLSpace(void);
	void __fastcall DelColOfMergeCell(int ACol, int ColLen = 0x1);
	void __fastcall DelRowOfMergeCell(int ARow, int RowLen = 0x1);
	void __fastcall ResetColOfMergeCell(int ACol, int ColLen = 0x1);
	void __fastcall ResetRowOfMergeCell(int ARow, int RowLen = 0x1);
	void __fastcall ClearUserControl(void);
	void __fastcall ClearChart(void);
	void __fastcall ClearOleObject(void);
	void __fastcall RestoreDraw(void);
	void __fastcall CalViewRegion(void);
	void __fastcall CalFixViewRegion(void);
	Db::TField* __fastcall GetSelectedField(void);
	void __fastcall SetSelectedField(Db::TField* Value);
	int __fastcall InternalFirstCell(int Pos, bool Horz, int FromIndex = 0xffffffff, int ToIndex = 0xffffffff);
	int __fastcall GetFirstCell(int Pos, bool Horz, int FromIndex = 0xffffffff, int ToIndex = 0xffffffff);
	TCellArea __fastcall CalPrintViewRegion(int AWidth, int AHeight, int Offx, int Offy);
	Types::TRect __fastcall InternalCellRect(int ARow, int ACol);
	Types::TRect __fastcall GetTextRect(Graphics::TCanvas* ACanvas, const System::WideString Text, const Types::TRect &R, Classes::TAlignment HAlign, TVerAlignment VAlign, int FontAngle);
	Types::TRect __fastcall GetDrawRect(const Types::TRect &R, int W, int H, Classes::TAlignment HAlign, TVerAlignment VAlign);
	void __fastcall LineTo(Graphics::TCanvas* Canvas, const Types::TPoint &PointFrom, const Types::TPoint &PointTo, int Dir);
	Types::TRect __fastcall GetSelRect(void);
	Types::TRect __fastcall RegionRect(int Row1, int Col1, int Row2, int Col2);
	void __fastcall DrawFocusRect(Graphics::TCanvas* Canvas);
	Grids::TEditStyle __fastcall GetEditStyle(int ACol, int ARow);
	Grids::TEditStyle __fastcall GetSelfEditStyle(int ACol, int ARow);
	System::WideString __fastcall GetEditText(TCellInfo* ACell, const System::WideString AText);
	void __fastcall ResetCellFrame(TCellInfo* P);
	void __fastcall DrawVerticalText(int Space, Graphics::TCanvas* ACanvas, const Types::TRect &R, const System::WideString Text, Classes::TAlignment TextAlign, TVerAlignment VerAlign);
	void __fastcall DrawBoldText(void);
	void __fastcall AddFormulaCell(TCellInfo* ACell);
	void __fastcall AddMergeCell(TCellInfo* ACell);
	void __fastcall DeleteMergeCell(TCellInfo* ACell);
	void __fastcall DeleteFormulaCell(TCellInfo* ACell);
	void __fastcall CalMergeCell(void);
	void __fastcall AddPassWord(char PasswordChar, System::WideString &Text);
	void __fastcall AddThousandSept(TCellInfo* ACell, System::WideString &Text, TCellData* AData = (TCellData*)(0x0));
	void __fastcall AddEmptyCellThousandSept(int Row, int Col, TAnyColumn* AColumn, System::WideString &Text, TCellData* AData = (TCellData*)(0x0));
	void __fastcall AddEmptyCellPassWord(TAnyColumn* AColumn, System::WideString &Text);
	void __fastcall DeleteThousandSept(TCellInfo* ACell, System::WideString &Text);
	void __fastcall Timer(System::TObject* Sender);
	int __fastcall GetLeftFixSpace(void);
	int __fastcall GetTopFixSpace(void);
	int __fastcall Position(Forms::TScrollBarKind FKind);
	void __fastcall SetPosition(int Value, Forms::TScrollBarKind FKind);
	int __fastcall GetRang(Forms::TScrollBarKind FKind);
	int __fastcall RealRange(Forms::TScrollBarKind FKind);
	bool __fastcall ScrollMessage(Messages::TWMScroll &Msg);
	void __fastcall CheckScroll(void);
	void __fastcall UpdateScrollRange(void);
	int __fastcall GetNextRowHeight(void);
	int __fastcall GetNextColWidth(void);
	int __fastcall GetNext18RowHeight(void);
	int __fastcall GetNext18ColWidth(void);
	int __fastcall GetUpRowHeight(void);
	int __fastcall GetUpColWidth(void);
	int __fastcall GetUp18RowHeight(void);
	int __fastcall GetUp18ColWidth(void);
	void __fastcall InternalInvalidateRect(unsigned Handle, Types::PRect lpRect, bool bErase);
	void __fastcall DeleteItem(int Index);
	void __fastcall DeleteItem2(int Index);
	void __fastcall ClearItem(void);
	int __fastcall GetShadowWidth(void);
	bool __fastcall EqualCellRect(int Index1, int Index2);
	bool __fastcall DrawAutoText(Graphics::TCanvas* Canvas, TCellInfo* ACell, const Types::TRect &ARect);
	bool __fastcall DrawEmptyCellAutoText(Graphics::TCanvas* Canvas, int Row, int Col, TAnyColumn* AColumn, const System::WideString CellText, const Types::TRect &ARect, Classes::TAlignment Align, int Offx = 0x0, int Offy = 0x0);
	void __fastcall SetLeftMargin(const int Value);
	void __fastcall SetTopMargin(const int Value);
	void __fastcall SetBottomMargin(const int Value);
	void __fastcall SetRightMargin(const int Value);
	void __fastcall InternalSetLeftMargin(const int Value);
	void __fastcall InternalSetTopMargin(const int Value);
	void __fastcall InternalSetBottomMargin(const int Value);
	void __fastcall InternalSetRightMargin(const int Value);
	void __fastcall InternalSetRowHeight(int Row, const int Value);
	int __fastcall GetRowHeight(int Row);
	void __fastcall SetRowHeight(int Row, const int Value);
	int __fastcall GetColWidth(int Col);
	void __fastcall SetColWidth(int Col, const int Value);
	bool __fastcall GetColVisible(int Col);
	bool __fastcall GetRowVisible(int Row);
	void __fastcall SetColVisible(int Col, const bool Value);
	void __fastcall SetRowVisible(int Row, const bool Value);
	double __fastcall GetPhyRowHeight(int Row);
	void __fastcall SetPhyRowHeight(int Row, const double Value);
	double __fastcall GetPhyColWidth(int Col);
	void __fastcall SetPhyColWidth(int Col, const double Value);
	Graphics::TColor __fastcall GetTransColor(Graphics::TColor Color);
	void __fastcall UpdateTitlePanelSize(void);
	void __fastcall UpdatePanel(int Index);
	void __fastcall UpdatePanelRect(int Index, const Types::TRect &R);
	void __fastcall SetWidthHeight(void);
	void __fastcall CalTotalWH(int CalType, int FromIndex);
	int __fastcall GetColsW(int Col);
	int __fastcall GetRowsH(int Row);
	int __fastcall GetMinColsW(int Col);
	int __fastcall GetMinRowsH(int Row);
	void __fastcall Rectangle(Graphics::TCanvas* ACanvas, const Types::TRect &ARect, int AIndex, int Offx = 0x0, int Offy = 0x0, bool ToFill = false, bool OnlyText = false, bool Sel = false, bool CellFocused = false, Graphics::TColor BackColor = (Graphics::TColor)(0xffffff));
	void __fastcall RectangleEmptyCell(Graphics::TCanvas* ACanvas, const Types::TRect &ARect, int Row, int Col, bool DrawBottomLine, bool DrawTopLine, int Offx = 0x0, int Offy = 0x0, bool ToFill = false, bool OnlyText = false, bool Sel = false, bool CellFocused = false, Graphics::TColor BackColor = (Graphics::TColor)(0xffffff));
	bool __fastcall CalPosition(Forms::TScrollBarKind Kind);
	HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Msg);
	MESSAGE void __fastcall WMPosChanged(Messages::TWMWindowPosMsg &Msg);
	HIDESBASE MESSAGE void __fastcall WMVScroll(Messages::TWMScroll &Msg);
	HIDESBASE MESSAGE void __fastcall WMHScroll(Messages::TWMScroll &Msg);
	HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Msg);
	HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Msg);
	MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Msg);
	HIDESBASE MESSAGE void __fastcall WMChar(Messages::TWMKey &Msg);
	HIDESBASE MESSAGE void __fastcall CMColorChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMSetCursor(Messages::TWMSetCursor &Msg);
	HIDESBASE MESSAGE void __fastcall CMShowingChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMCtl3DChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMDesignHitTest(Messages::TWMMouse &Msg);
	HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TWMNCHitTest &Msg);
	MESSAGE void __fastcall CMCancelMode(Messages::TMessage &Msg);
	HIDESBASE MESSAGE void __fastcall WMCancelMode(Messages::TWMNoParams &Msg);
	HIDESBASE MESSAGE void __fastcall CMHintShow(Messages::TMessage &Msg);
	HIDESBASE MESSAGE void __fastcall WMCommand(Messages::TWMCommand &Message);
	HIDESBASE MESSAGE void __fastcall WMSysCommand(Messages::TWMSysCommand &Message);
	HIDESBASE MESSAGE void __fastcall WMLButtonDown(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMNCLButtonDown(Messages::TWMNCHitMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMLButtonUp(Messages::TMessage &Message);
	MESSAGE void __fastcall CMControlChange(Controls::TCMControlChange &Msg);
	HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Msg);
	MESSAGE void __fastcall WMTimer(Messages::TWMTimer &Msg);
	MESSAGE void __fastcall WMReleaseMouse(Messages::TMessage &Msg);
	MESSAGE void __fastcall WMShowEditor(Messages::TMessage &Msg);
	void __fastcall ControlChange(void);
	bool __fastcall ToMoveCol(const Types::TPoint &Pos, int &ACol);
	bool __fastcall ToMoveRow(const Types::TPoint &Pos, int &ARow);
	int __fastcall MoveColIndex(int X, int Col, int OnRow);
	int __fastcall MoveRowIndex(int Y, int Row, int OnCol);
	bool __fastcall IsActiveControl(void);
	void __fastcall RestoreFocus(void);
	void __fastcall SetCol(const int Value);
	void __fastcall SetRow(const int Value);
	bool __fastcall CellCanSetFocus(int Index, bool FireEvent = true);
	void __fastcall InternalSetRow(bool DrawFocus = true);
	int __fastcall FindAnyChart(Controls::TWinControl* Chart);
	int __fastcall FindOleObject(Controls::TWinControl* Ole);
	int __fastcall GetCol(void);
	int __fastcall GetRow(void);
	int __fastcall GetRealCol(void);
	int __fastcall GetRealRow(void);
	int __fastcall GetColByIndex(int Index);
	int __fastcall GetRowByIndex(int Index);
	void __fastcall SetCols(const int Value);
	void __fastcall InternalSetCols(const int Value);
	void __fastcall SetRows(const int Value);
	void __fastcall InterSetRows(const int Value);
	void __fastcall InternalSetRows(const int Value);
	TCellInfo* __fastcall GetSelCell(void);
	void __fastcall SetBackColor(const Graphics::TColor Value);
	void __fastcall SetLineColor(const Graphics::TColor Value);
	void __fastcall SetBorderStyle(const Forms::TBorderStyle Value);
	void __fastcall SetScrollBars(const Stdctrls::TScrollStyle Value);
	int __fastcall GetGridHeight(void);
	int __fastcall GetGridWidth(void);
	void __fastcall DrawMovingLine(const Types::TPoint &OldPoint, const Types::TPoint &NewPoint);
	void __fastcall DrawSelection(TCellInfo* ACell, int CellRow, int CellCol);
	void __fastcall Init(void);
	void __fastcall SetLeftSpace(const int Value);
	void __fastcall SetTopSpace(const int Value);
	void __fastcall SetBottomSpace(const int Value);
	void __fastcall SetRightSpace(const int Value);
	int __fastcall GetInnerHeight(void);
	int __fastcall GetInnerWidth(void);
	int __fastcall GetInnerPrintHeight(void);
	int __fastcall GetInnerPrintWidth(void);
	void __fastcall GetNearSelectCell(bool ChangeFocusIndex);
	void __fastcall SetGridType(const TGridType Value);
	int __fastcall GetBottomMargin(void);
	int __fastcall GetBottomSpace(void);
	int __fastcall GetLeftMargin(void);
	int __fastcall GetLeftSpace(void);
	int __fastcall GetRightMargin(void);
	int __fastcall GetRightSpace(void);
	int __fastcall GetTopMargin(void);
	int __fastcall GetTopSpace(void);
	bool __fastcall CellChanged(TCellInfo* ACell, int ARow, int ACol);
	void __fastcall UpdateEdit(void);
	bool __fastcall CanEditShow(void);
	void __fastcall ShowEditorChar(System::WideChar Ch);
	void __fastcall UpdateText(void);
	void __fastcall ClearRow(void);
	void __fastcall ClearCol(void);
	void __fastcall SetSortBeginRow(const int Value);
	void __fastcall SetSortEndRow(const int Value);
	void __fastcall SetShadowColor(const Graphics::TColor Value);
	TCellArea __fastcall InternalGetSelection(int FromRow, int FromCol, int ToRow, int ToCol);
	int __fastcall GetOleObjectCount(void);
	void __fastcall UpdateOle(void);
	void __fastcall UpdateUserControl(void);
	void __fastcall UpdateChart(void);
	void __fastcall EndUpdateChart(void);
	void __fastcall EndUpdateUserControl(void);
	void __fastcall EndUpdateOle(void);
	int __fastcall GetUserControlCount(void);
	int __fastcall GetAnyChartCount(void);
	void __fastcall UpdateControlPos(void);
	void __fastcall UpdateBoldText(void);
	void __fastcall AddControl(Controls::TWinControl* AControl);
	void __fastcall DrawTo(Graphics::TCanvas* ACanvas, int Offx = 0x0, int Offy = 0x0, bool PrintOnlyText = false);
	void __fastcall DoEvaluate(System::TObject* Sender, System::WideString Eval, System::Variant *Args, const int Args_Size, int ArgCount, System::Variant &Value, bool &Done);
	void __fastcall SetMovingOnCol(const int Value);
	void __fastcall SetMovingOnRow(const int Value);
	bool __fastcall ErrorRowCol(const int ARow, const int ACol);
	bool __fastcall ErrorRow(const int ARow);
	bool __fastcall ErrorCol(const int ACol);
	void __fastcall SetFixColCount(const int Value);
	void __fastcall SetFixRowCount(const int Value);
	void __fastcall SetOptions(const TAnyGridOptions Value);
	TCellArea __fastcall GetSelectionArea(void);
	bool __fastcall GetLocking(void);
	void __fastcall SetTitleHeight(const int Value);
	void __fastcall SetTitleWidth(const int Value);
	void __fastcall ChangeTitleWH(void);
	void __fastcall SetImages(const Imglist::TCustomImageList* Value);
	bool __fastcall PrecedingCol3D(int ARow, int ACol);
	bool __fastcall PrecedingRow3D(int ARow, int ACol);
	bool __fastcall DrawEmptyCell(Graphics::TCanvas* ACanvas, int Row, int Col, int Offx = 0x0, int Offy = 0x0, bool Sel = false, bool OnlyText = false);
	TCellInfo* __fastcall InternalCellFromPoint(const Types::TPoint &P, int &Row, int &Col);
	TCellInfo* __fastcall HintCellFromPoint(const Types::TPoint &P, int &Row, int &Col);
	void __fastcall RealCellFromPoint(const Types::TPoint &P, int &Row, int &Col);
	bool __fastcall Selected(int Row, int Col);
	void __fastcall SetColumnTitles(const TAnyStrings* Value);
	void __fastcall SetColumnTitleAlign(const Classes::TAlignment Value);
	void __fastcall GetToNewCol(int SourceCol, int ColLen, int DestCol, int &NewCol);
	void __fastcall GetToNewRow(int SourceRow, int RowLen, int DestRow, int &NewRow);
	TAnyStrings* __fastcall GetColumnTitles(void);
	void __fastcall SetFilterBeginRow(const int Value);
	void __fastcall SetFilterEndRow(const int Value);
	System::WideString __fastcall GetRichString(Classes::TMemoryStream* Memory);
	int __fastcall GetRTFHeight(TBaseRichEdit* RichEdt);
	void __fastcall SetShowPagesLine(const bool Value);
	void __fastcall GetPages(void);
	void __fastcall ClearPagesList(void);
	void __fastcall DrawPagesLine(Graphics::TCanvas* Canvas);
	void __fastcall SetDefaultColWidth(const int Value);
	void __fastcall SetDefaultRowHeight(const int Value);
	void __fastcall SetDataSource(const Db::TDataSource* Value);
	void __fastcall SetMasterDataSource(const Db::TDataSource* Value);
	void __fastcall UpdateFields(void);
	void __fastcall DataScroll(Db::TDataLink* DataLink);
	Db::TField* __fastcall FindField(System::WideString FieldName);
	bool __fastcall UpdateRows(int CurrRows, int ATitleRows, int AFooterRows);
	int __fastcall GetActiveRow(int Row);
	bool __fastcall DataCellReadOnly(int ARow, int ACol);
	void __fastcall SetTitleRows(const int Value);
	void __fastcall SetFooterRows(const int Value);
	bool __fastcall InDBBody(int ARow, int ACol);
	void __fastcall InternalDataChanged(Db::TDataLink* DataLink, int ATitleRows, int AFooterRows);
	void __fastcall SetActiveRecNo(int RecNo);
	int __fastcall GetDBNo(int ARow, int ACol);
	void __fastcall DBAfterRefresh(Db::TDataSet* DataSet);
	void __fastcall CalHeight(int Row);
	void __fastcall CalWidth(int Col);
	int __fastcall GetRowByActiveRecord(int ActiveRecord);
	bool __fastcall GetSortingColASC(void);
	int __fastcall GetSortingColIndex(void);
	void __fastcall SetGroupedFalse(void);
	bool __fastcall CellIsReadOnly(int Row, int Col);
	void __fastcall SelectRow(void);
	void __fastcall ClickGroupHeader(void);
	int __fastcall InternalExpandNode(int ARow, bool Expand);
	void __fastcall SaveCellToStream(int Row, int Col, Classes::TStream* Stream);
	void __fastcall SetRTFLineSpace(const double Value);
	int __fastcall SetExpandNode(int ARow);
	void __fastcall SetShowGroupFooter(const bool Value);
	void __fastcall SetFooterFormula(int Row, int Col, int BeginRow, int EndRow, const TFooterFormulaData &FooterFormulaData);
	bool __fastcall Expanded(int Row);
	void __fastcall SetRowState(int Row, bool State);
	void __fastcall BackGroundChange(System::TObject* Sender);
	void __fastcall Scroll16BitmapChange(System::TObject* Sender);
	void __fastcall Scroll18BitmapChange(System::TObject* Sender);
	void __fastcall SetBackGround(const Graphics::TPicture* Value);
	void __fastcall SetScroll16Bitmap(const Graphics::TPicture* Value);
	void __fastcall SetScroll18Bitmap(const Graphics::TPicture* Value);
	bool __fastcall CanShowHidden(void);
	void __fastcall SetFieldText(Db::TField* Field, System::WideString Text);
	System::WideString __fastcall GetFieldText(Db::TField* Field);
	void __fastcall ShowBlob(void);
	void __fastcall SetAutoShowBlobField(const bool Value);
	bool __fastcall IsGraphiField(Db::TField* BlobFld, Graphics::TGraphic* &Bmp);
	int __fastcall MessageBox(System::WideChar * Text, System::WideChar * Caption, int Flags);
	void __fastcall DoFind(System::TObject* Sender);
	bool __fastcall MasterDataSetActive(void);
	bool __fastcall IsMasterDBCell(int ARow, int ACol);
	bool __fastcall DataSetRecordCount(Db::TDataSet* DataSet);
	bool __fastcall SaveUpdateRegion(int Row, int Col, HRGN &SaveRgn, HRGN &NewRgn, int &OldRgn);
	void __fastcall RestoreUpdateRegion(HRGN SaveRgn, HRGN NewRgn, int OldRgn);
	void __fastcall UpdateCell(Graphics::TCanvas* ACanvas, TCellInfo* Cell, int Offx = 0x0, int Offy = 0x0, bool OnlyText = false, bool ForceDraw = false);
	void __fastcall UpdateEmptyCell(Graphics::TCanvas* ACanvas, int Row, int Col, int Offx = 0x0, int Offy = 0x0, bool Sel = false, bool OnlyText = false);
	bool __fastcall GetCellReadOnly(int Row, int Col);
	bool __fastcall IsStringValue(const System::Variant &Value);
	int __fastcall RealRows(void);
	Classes::TAlignment __fastcall GetDefaultAlignment(int Row, int Col);
	TCellType __fastcall GetDefaultCellType(int Row, int Col);
	void __fastcall SetIncludeHiddenData(const bool Value);
	void __fastcall InternalEndUpdate(void);
	Graphics::TColor __fastcall GetCellDrawColor(TCellInfo* Cell);
	void __fastcall InternalSelectNext(bool MultiSelect);
	void __fastcall DrawCurrenyCell(Graphics::TCanvas* Canvas, const Types::TRect &CellRect, const Types::TRect &Rect, int Top, Graphics::TColor Color1, Graphics::TColor Color2, const System::AnsiString CurrencySymbol, const System::WideString Text, double Value, char PasswordChar, bool ChineseCurrency);
	void __fastcall SetCurrencySymbol(const System::WideString Value);
	void __fastcall SetDecimalSeparatorColor(const Graphics::TColor Value);
	void __fastcall SetThousandSeparatorColor(const Graphics::TColor Value);
	void __fastcall SetCurrencyCellWidth(const int Value);
	void __fastcall SetCurrencyDigits(const int Value);
	void __fastcall SetTitleColor(const Graphics::TColor Value);
	void __fastcall SetCurrencySeparatorColor(const Graphics::TColor Value);
	System::WideString __fastcall CellDisplayText(int Row, int Col);
	void __fastcall SetPrintZoom(const int Value);
	int __fastcall GetPrintTitleHeight(void);
	int __fastcall GetPrintTitleWidth(void);
	void __fastcall SetTileBackGround(const bool Value);
	void __fastcall SetFocusColor(const Graphics::TColor Value);
	void __fastcall AlphaBlendColor(Graphics::TBitmap* Bitmap);
	void __fastcall SetLockBackGround(const bool Value);
	void __fastcall UpdateDBColumnAutoHeight(void);
	TInplaceEditor* __fastcall GetEditor(void);
	HIDESBASE void __fastcall DoKeyDown(System::Word &Key, Classes::TShiftState Shift, bool IsEnterKey = false);
	System::AnsiString __fastcall GetVersion(void);
	void __fastcall SetAbout(const System::AnsiString Value);
	void __fastcall SetVersion(const System::AnsiString Value);
	void __fastcall SetTitleLineColor(const Graphics::TColor Value);
	void __fastcall LoadCellsFromStream_OnlyText(Classes::TStream* Stream, int DestRow, int DestCol);
	int __fastcall GetMaxRowAutoHeightIndex(int Row);
	bool __fastcall CalAutoHeight_Col(int Col);
	bool __fastcall CalAutoHeight_Row(int Row);
	void __fastcall SetPhyLeftMargin(const double Value);
	void __fastcall SetPhyTopMargin(const double Value);
	void __fastcall SetPhyRightMargin(const double Value);
	void __fastcall SetPhyBottomMargin(const double Value);
	void __fastcall SetUnitType(const TUnitType Value);
	System::WideString __fastcall WidthInfo(int Width);
	System::WideString __fastcall HeightInfo(int Height);
	void __fastcall CheckHintPanel(void);
	bool __fastcall FindLeftEnterCell(int &Row, int &Col);
	bool __fastcall FindRightEnterCell(int &Row, int &Col);
	bool __fastcall FindTopEnterCell(int &Row, int &Col);
	bool __fastcall FindBottomEnterCell(int &Row, int &Col);
	bool __fastcall IsLastTabCell(int Row, int Col);
	void __fastcall InternalClearSelection(void);
	bool __fastcall InternalCellReadOnly(int Row, int Col);
	void __fastcall FillExcludeRect(Graphics::TCanvas* ACanvas, const Types::TRect &SourceRect, const Types::TRect &ExcRect);
	bool __fastcall IsSelectionActive(void);
	Graphics::TColor __fastcall LightenColor(Graphics::TColor Color1, Graphics::TColor Color2, bool Ungray);
	Graphics::TColor __fastcall BrushColor(Graphics::TColor Color, bool Sel);
	void __fastcall GetRealRowCol(int &ARow, int &ACol);
	bool __fastcall CellFixed(TCellInfo* ACell);
	int __fastcall Cross_LeftOff(bool LeftLine, bool LeftFrame, int LeftFrameWidth, bool TopLine, bool TopFrame, int TopFrameWidth, bool RightLine, bool RightFrame, int RightFrameWidth, bool BottomLine, bool BottomFrame, int BottomFrameWidth);
	int __fastcall Cross_TopOff(bool LeftLine, bool LeftFrame, int LeftFrameWidth, bool TopLine, bool TopFrame, int TopFrameWidth, bool RightLine, bool RightFrame, int RightFrameWidth, bool BottomLine, bool BottomFrame, int BottomFrameWidth);
	int __fastcall Cross_RightOff(bool LeftLine, bool LeftFrame, int LeftFrameWidth, bool TopLine, bool TopFrame, int TopFrameWidth, bool RightLine, bool RightFrame, int RightFrameWidth, bool BottomLine, bool BottomFrame, int BottomFrameWidth);
	int __fastcall Cross_BottomOff(bool LeftLine, bool LeftFrame, int LeftFrameWidth, bool TopLine, bool TopFrame, int TopFrameWidth, bool RightLine, bool RightFrame, int RightFrameWidth, bool BottomLine, bool BottomFrame, int BottomFrameWidth);
	bool __fastcall CellTopLine(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	bool __fastcall CellLeftLine(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	bool __fastcall CellBottomLine(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	bool __fastcall CellRightLine(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	bool __fastcall CellLeftFrame(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	bool __fastcall CellTopFrame(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	bool __fastcall CellRightFrame(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	bool __fastcall CellBottomFrame(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	int __fastcall CellLeftFrameWidth(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	int __fastcall CellTopFrameWidth(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	int __fastcall CellRightFrameWidth(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	int __fastcall CellBottomFrameWidth(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	int __fastcall LeftLine_TopOff(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	int __fastcall LeftLine_BottomOff(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	int __fastcall TopLine_LeftOff(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	int __fastcall TopLine_RightOff(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	int __fastcall RightLine_TopOff(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	int __fastcall RightLine_BottomOff(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	int __fastcall BottomLine_LeftOff(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	int __fastcall BottomLine_RightOff(int Row, int Col, TCellData* AData = (TCellData*)(0x0));
	void __fastcall UpdateRoundCell(Graphics::TCanvas* Canvas, int Row, int Col);
	void __fastcall InternalShowEditor(void);
	
protected:
	bool Assigning;
	Classes::TComponent* PrintControl;
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	DYNAMIC void __fastcall DoExit(void);
	virtual bool __fastcall DrawCell(Graphics::TCanvas* ACanvas, TCellInfo* Cell, int Offx = 0x0, int Offy = 0x0, bool OnlyText = false, bool ForceDraw = false);
	virtual bool __fastcall DrawFocusSelectCell(Graphics::TCanvas* ACanvas, TCellInfo* Cell, bool Sel, int Offx = 0x0, int Offy = 0x0);
	TInplaceEditorList* __fastcall CreateEditor(void);
	TInplaceEditorList* __fastcall CreateSpinEditor(void);
	void __fastcall ShowEditor(void);
	void __fastcall HideEdit(void);
	void __fastcall SetEditText(int ACol, int ARow, System::WideString AText, bool ForceSave = false);
	void __fastcall SetRichEditText(int ACol, int ARow);
	void __fastcall SetMemoText(int ACol, int ARow, System::WideString AText, bool ForceSave = false);
	Types::TRect __fastcall GetCellPrintRect(int ARow, int ACol);
	virtual void __fastcall Paint(void);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall KeyDown(System::Word &Key, Classes::TShiftState Shift);
	DYNAMIC void __fastcall KeyUp(System::Word &Key, Classes::TShiftState Shift);
	DYNAMIC void __fastcall KeyPress(System::WideChar &Key);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	virtual void __fastcall CreateWnd(void);
	DYNAMIC bool __fastcall DoMouseWheelDown(Classes::TShiftState Shift, const Types::TPoint &MousePos);
	DYNAMIC bool __fastcall DoMouseWheelUp(Classes::TShiftState Shift, const Types::TPoint &MousePos);
	virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
	void __fastcall ReadBinaryData(Classes::TStream* Stream);
	void __fastcall WriteBinaryData(Classes::TStream* Stream);
	virtual void __fastcall Loaded(void);
	bool __fastcall IsBitmap(Classes::TStream* mem);
	bool __fastcall IsEmfImage(Classes::TStream* Stream);
	bool __fastcall IsWmfImage(Classes::TStream* Stream);
	bool __fastcall IsJpegImage(Classes::TStream* mem);
	bool __fastcall IsGifImage(Classes::TStream* mem);
	bool __fastcall IsIconImage(Classes::TStream* mem);
	bool __fastcall IsParadoxGraphic(Db::TField* Field);
	bool __fastcall ValidateName(Classes::TComponent* Owner, const System::WideString NewName);
	DYNAMIC void __fastcall DblClick(void);
	DYNAMIC void __fastcall Click(void);
	virtual void __fastcall LinkActive(Db::TDataLink* DataLink, bool Value);
	void __fastcall DataChanged(Db::TDataLink* DataLink);
	__property int TitleHeight = {read=FTitleHeight, write=SetTitleHeight, default=20};
	__property int TitleWidth = {read=FTitleWidth, write=SetTitleWidth, default=40};
	void __fastcall CopyBackGround(Graphics::TCanvas* Canvas, const Types::TRect &SourceRect, const Types::TRect &DestRect, bool Sel = false);
	bool __fastcall CellTextCanDraw(int Row, int Col);
	Types::TRect __fastcall GetCellRect(int ARow, int ACol);
	Db::TField* __fastcall MasterDBField(int ARow, int ACol);
	bool __fastcall IsBodyDBCell(int ARow, int ACol);
	int __fastcall GetLeftCol(void);
	int __fastcall GetTopRow(void);
	int __fastcall GetRightCol(void);
	int __fastcall GetBottomRow(void);
	void __fastcall SetLeftCol(const int Value);
	void __fastcall SetTopRow(const int Value);
	__property int PrintTitleHeight = {read=GetPrintTitleHeight, nodefault};
	__property int PrintTitleWidth = {read=GetPrintTitleWidth, nodefault};
	void __fastcall LayoutChanged(Db::TDataLink* DataLink);
	__property int PrintZoom = {read=FPrintZoom, write=SetPrintZoom, nodefault};
	void __fastcall SetZoom(int Zoom);
	virtual void __fastcall WndProc(Messages::TMessage &Message);
	
public:
	TCellType __fastcall DrawEmptyCellGraphic(Graphics::TCanvas* Canvas, int Row, int Col, const Types::TRect &ARect, bool &GraphicDBCell, Types::TRect &DrawRect);
	bool __fastcall DrawGraphic(Graphics::TCanvas* Canvas, TCellInfo* Cell, const Types::TRect &ARect, Types::TRect &DrawRect, int Offx = 0x0, int Offy = 0x0);
	int __fastcall DrawRadioButton(const Graphics::TCanvas* Canvas, const Types::TRect &Rect, TAnyStrings* Items, int ItemIndex);
	int __fastcall GetRadioButton(int ARow, int ACol, const Types::TPoint &Pt);
	void __fastcall SetScrollPageSize(int nBar, int nMax);
	int __fastcall ControlSize(Forms::TScrollBarKind Kind, bool ControlSB, bool AssumeSB);
	__fastcall virtual TCustomAnyGrid(Classes::TComponent* AOwner);
	__fastcall virtual ~TCustomAnyGrid(void);
	void __fastcall DoFilter(void);
	void __fastcall HideEditor(void);
	bool __fastcall ShowCell(int Row, int Col);
	bool __fastcall DesignCells(bool InternalDesign = true, const System::WideString AFileName = L"");
	void __fastcall UpdateSelection(void);
	Types::TRect __fastcall CellRect(int ARow, int ACol);
	bool __fastcall Sort(int Col, bool ASC);
	bool __fastcall Group(System::WideString GroupColsList, int SortCol = 0xffffffff, bool ASC = true);
	bool __fastcall MoveCol(int SourceCol, int ColLen, int DestCol);
	bool __fastcall MoveRow(int SourceRow, int RowLen, int DestRow);
	void __fastcall InvalidateRect(const Types::TRect &R, bool bErase);
	void __fastcall FixUserControl(Controls::TWinControl* Control, bool FixPosSize)/* overload */;
	void __fastcall FixUserControl(int Index, bool FixPosSize)/* overload */;
	void __fastcall FixChart(Anychart::TAnyChart* AnyChart, bool FixPosSize)/* overload */;
	void __fastcall FixChart(int Index, bool FixPosSize)/* overload */;
	void __fastcall FixChart(System::WideString ChartName, bool FixPosSize)/* overload */;
	void __fastcall InsertUserControl(Controls::TWinControl* Control, int Row, int Col, bool FixPosSize = false);
	void __fastcall InsertUserControlByPos(Controls::TWinControl* Control, int ALeft, int ATop, bool FixPosSize = false);
	void __fastcall RemoveUserControl(Controls::TWinControl* Control);
	void __fastcall DeleteChart(System::WideString ChartName)/* overload */;
	void __fastcall DeleteChart(int Index)/* overload */;
	void __fastcall DeleteChart(Anychart::TAnyChart* AnyChart)/* overload */;
	void __fastcall SetUserControlPos(Controls::TWinControl* Control, int ALeft, int ATop)/* overload */;
	void __fastcall SetChartPos(Anychart::TAnyChart* AnyChart, int ALeft, int ATop)/* overload */;
	void __fastcall SetChartPos(System::WideString ChartName, int ALeft, int ATop)/* overload */;
	void __fastcall SetChartPos(int Index, int ALeft, int ATop)/* overload */;
	Controls::TWinControl* __fastcall GetUserControl(int Index);
	int __fastcall FindUserControl(Controls::TWinControl* Control);
	int __fastcall FindChart(Anychart::TAnyChart* AnyChart)/* overload */;
	int __fastcall FindChart(System::WideString ChartName)/* overload */;
	TAnyOleContainer* __fastcall InsertOleObject(int Row, int Col, System::WideString Name = L"", bool ShowDialog = false);
	TAnyOleContainer* __fastcall InsertOleObjectByPos(int ALeft, int ATop, System::WideString Name = L"", bool ShowDialog = false);
	Anychart::TAnyChart* __fastcall InsertChart(System::WideString ChartName, int Row, int Col, bool FixPosSize = false);
	Anychart::TAnyChart* __fastcall InsertChartByPos(System::WideString ChartName, int ALeft, int ATop, bool FixPosSize = false);
	TAnyOleContainer* __fastcall GetOleObject(System::WideString Name)/* overload */;
	TAnyOleContainer* __fastcall GetOleObject(int Index)/* overload */;
	Anychart::TAnyChart* __fastcall GetChart(System::WideString ChartName)/* overload */;
	Anychart::TAnyChart* __fastcall GetChart(int Index)/* overload */;
	void __fastcall DeleteOleObject(System::WideString Name)/* overload */;
	void __fastcall DeleteOleObject(int Index)/* overload */;
	void __fastcall SelectCells(int FirstRow, int FirstCol, int LastRow, int LastCol);
	void __fastcall ClearSelection(void);
	void __fastcall LoadFromStream(Classes::TStream* Stream);
	void __fastcall SaveToStream(Classes::TStream* Stream, bool Encrypt = true, bool IncludeBody = true);
	void __fastcall LoadFromFile(System::WideString FileName);
	void __fastcall SaveToFile(System::WideString FileName, bool IncludeBody = true);
	void __fastcall BeginUpdate(void);
	void __fastcall EndUpdate(void)/* overload */;
	void __fastcall EndUpdate(const Types::TRect &Rect)/* overload */;
	void __fastcall ResetUpdate(void);
	System::WideString __fastcall GetCellLabel(int Row, int Col);
	TCellInfo* __fastcall CellFromPoint(const Types::TPoint &P);
	void __fastcall DrawPrn(Graphics::TCanvas* ACanvas, int AWidth, int AHeight, int Offx = 0x0, int Offy = 0x0, bool OnlyDrawText = false);
	void __fastcall Clear(void);
	HIDESBASE void __fastcall SelectNext(void);
	void __fastcall InsertCol(int Index, int Count = 0x1);
	void __fastcall InsertRow(int Index, int Count = 0x1, bool AutoAssign = true);
	void __fastcall AppendRow(void)/* overload */;
	void __fastcall AppendCol(void)/* overload */;
	bool __fastcall ResetFilter(void);
	void __fastcall AppendRow(int Count, bool AutoAssign)/* overload */;
	void __fastcall AppendCol(int Count, bool AutoAssign)/* overload */;
	void __fastcall DeleteCol(int Index);
	void __fastcall DeleteRow(int Index);
	void __fastcall Cancel(void);
	void __fastcall CopyStructure(int SourceRow, int SourceCol, int RowLen, int ColLen, int DestRow, int DestCol, bool IncludeText = false);
	void __fastcall Edit(void);
	void __fastcall SaveCellsToStream(int SourceRow, int SourceCol, int RowLen, int ColLen, Classes::TStream* Stream);
	void __fastcall SaveSelectionToStream(Classes::TStream* Stream);
	void __fastcall LoadCellsFromStream(Classes::TStream* Stream, int DestRow, int DestCol, bool WithSize = false, bool IgnoreHidden = false);
	void __fastcall SaveCellsToFile(int SourceRow, int SourceCol, int RowLen, int ColLen, System::WideString FileName);
	void __fastcall SaveSelectionToFile(System::WideString FileName);
	void __fastcall LoadCellsFromFile(System::WideString FileName, int DestRow, int DestCol, bool WithSize = false);
	void __fastcall CopyToClipBoard(void);
	void __fastcall CutToClipBoard(void);
	void __fastcall PasteFromClipBoard(bool OnlyCopyText = false);
	void __fastcall MergeSelection(void);
	void __fastcall MergeCells(int StartRow, int StartCol, int EndRow, int EndCol);
	void __fastcall SaveLayout(const System::WideString Key, const System::WideString Section, TLocation Location = (TLocation)(0x0));
	void __fastcall LoadLayout(const System::WideString Key, const System::WideString Section, TLocation Location = (TLocation)(0x0));
	void __fastcall RefreshCell(int Row, int Col)/* overload */;
	void __fastcall RefreshCell(TCellInfo* Cell)/* overload */;
	TCellInfo* __fastcall Cells(int Row, int Col);
	TCellInfo* __fastcall CellByName(const System::WideString CellName);
	__property bool Locking = {read=GetLocking, nodefault};
	__property int RowHeight[int Row] = {read=GetRowHeight, write=SetRowHeight};
	__property int ColWidth[int Col] = {read=GetColWidth, write=SetColWidth};
	__property bool RowVisible[int Row] = {read=GetRowVisible, write=SetRowVisible};
	__property bool ColVisible[int Col] = {read=GetColVisible, write=SetColVisible};
	__property int Row = {read=GetRealRow, write=SetRow, nodefault};
	__property int Col = {read=GetRealCol, write=SetCol, nodefault};
	__property TCellInfo* SelectedCell = {read=GetSelCell};
	__property int GridWidth = {read=GetGridWidth, nodefault};
	__property int GridHeight = {read=GetGridHeight, nodefault};
	__property int InnerWidth = {read=GetInnerWidth, nodefault};
	__property int InnerHeight = {read=GetInnerHeight, nodefault};
	__property int InnerPrintWidth = {read=GetInnerPrintWidth, nodefault};
	__property int InnerPrintHeight = {read=GetInnerPrintHeight, nodefault};
	__property int Offx = {read=FLeftOff, nodefault};
	__property int Offy = {read=FTopOff, nodefault};
	__property bool Designing = {read=FDesigning, nodefault};
	__property int OleObjectCount = {read=GetOleObjectCount, nodefault};
	__property int UserControlCount = {read=GetUserControlCount, nodefault};
	__property int ChartCount = {read=GetAnyChartCount, nodefault};
	__property bool EditorMode = {read=FEditorMode, nodefault};
	__property TInplaceRichEdit* RichEdit = {read=GetRichEdit};
	__property Imglist::TCustomImageList* Images = {read=FImages, write=SetImages};
	System::Variant __fastcall Evaluate(const System::WideString Expression);
	System::WideString __fastcall ColToText(int Col);
	int __fastcall TextToCol(const System::WideString Text);
	bool __fastcall ExportToExcel(const System::WideString FileName, const System::WideString Title = L"", Graphics::TFont* TitleFont = (Graphics::TFont*)(0x0), bool AutoAddFrame = false, Comctrls::TProgressBar* Progress = (Comctrls::TProgressBar*)(0x0), bool ExportPic = true, int SheetIndex = 0x0, System::WideString SheetName = L"")/* overload */;
	bool __fastcall ExportToExcel(const System::WideString FileName, Comctrls::TProgressBar* Progress)/* overload */;
	bool __fastcall ImportFromExcel(const System::WideString FileName, int FirstRow = 0x0, int FirstCol = 0x0, int LastRow = 0xffffffff, int LastCol = 0xffffffff, int Sheet = 0x0, Comctrls::TProgressBar* Progress = (Comctrls::TProgressBar*)(0x0))/* overload */;
	bool __fastcall ImportFromExcel(const System::WideString FileName, Comctrls::TProgressBar* Progress)/* overload */;
	bool __fastcall PeekCell(const int Row, const int Col)/* overload */;
	bool __fastcall PeekCell(const Types::TPoint &Pos)/* overload */;
	TAnyColumn* __fastcall Columns(int Index);
	TAnyOleContainer* __fastcall ActivedOleObject(void);
	int __fastcall ActivedOleObject2(void);
	Anychart::TAnyChart* __fastcall ActivedChart(void);
	int __fastcall ActivedChart2(void);
	Controls::TWinControl* __fastcall ActivedUserControl(void);
	int __fastcall ActivedUserControl2(void);
	void __fastcall SaveBookmark(void);
	void __fastcall RestoreBookmark(void);
	bool __fastcall IsDBCell(int ARow, int ACol);
	System::WideString __fastcall GetCellText(int ARow, int ACol);
	void __fastcall SetCellText(int ARow, int ACol, System::WideString Text);
	TCellType __fastcall GetCellType(int Row, int Col);
	Classes::TAlignment __fastcall GetCellAlignment(int Row, int Col);
	bool __fastcall GetCellChecked(int Row, int Col);
	Graphics::TColor __fastcall GetCellBackColor(int Row, int Col);
	bool __fastcall GetCellTopLine(int Row, int Col);
	bool __fastcall GetCellBottomLine(int Row, int Col);
	Graphics::TGraphic* __fastcall GetDBCellGraphic(int Row, int Col);
	void __fastcall ReGroup(void);
	void __fastcall CancelGroup(void);
	DYNAMIC void __fastcall Resize(void);
	void __fastcall ExpandNode(int Row);
	void __fastcall CloseNode(int Row);
	void __fastcall ExpandAllNode(void);
	void __fastcall CloseAllNode(void);
	int __fastcall RowType(int Row, int &State, int &GroupCol);
	void __fastcall PostDataSet(void);
	void __fastcall DeleteSelection(void);
	TAnyColumn* __fastcall ColumnByName(const System::WideString ColumnName);
	void __fastcall RefreshFormula(void);
	bool __fastcall IsFormulaText(const System::WideString Text);
	void __fastcall CalAutoHeight(void);
	void __fastcall CellSetting(int Row, int Col);
	void __fastcall ColumnSetting(int Col);
	int __fastcall XmmToPixel(double mm);
	int __fastcall YmmToPixel(double mm);
	int __fastcall XInchToPixel(double Inch);
	int __fastcall YInchToPixel(double Inch);
	double __fastcall PixelToXmm(int Pixel);
	double __fastcall PixelToYmm(int Pixel);
	double __fastcall PixelToXInch(int Pixel);
	double __fastcall PixelToYInch(int Pixel);
	void __fastcall SetFocusCell(int Row, int Col);
	__property Font;
	__property bool ShowPagesLine = {read=FShowPagesLine, write=SetShowPagesLine, nodefault};
	__property Types::TRect SelectionRect = {read=GetSelRect};
	__property TCellArea Selection = {read=GetSelectionArea};
	__property int FixRowCount = {read=FFixRowCount, write=SetFixRowCount, default=0};
	__property int FixColCount = {read=FFixColCount, write=SetFixColCount, default=0};
	__property int LeftMargin = {read=GetLeftMargin, write=SetLeftMargin, default=30};
	__property int TopMargin = {read=GetTopMargin, write=SetTopMargin, default=30};
	__property int RightMargin = {read=GetRightMargin, write=SetRightMargin, default=30};
	__property int BottomMargin = {read=GetBottomMargin, write=SetBottomMargin, default=30};
	__property int Rows = {read=FRows, write=SetRows, default=6};
	__property int Cols = {read=FCols, write=SetCols, default=6};
	__property Graphics::TColor BackColor = {read=FBackColor, write=SetBackColor, default=-16777204};
	__property Graphics::TColor LineColor = {read=FLineColor, write=SetLineColor, default=12632256};
	__property Forms::TBorderStyle BorderStyle = {read=FBorderStyle, write=SetBorderStyle, default=1};
	__property Stdctrls::TScrollStyle ScrollBars = {read=FScrollBars, write=SetScrollBars, default=3};
	__property int LeftSpace = {read=GetLeftSpace, write=SetLeftSpace, default=10};
	__property int TopSpace = {read=GetTopSpace, write=SetTopSpace, default=10};
	__property int RightSpace = {read=GetRightSpace, write=SetRightSpace, default=10};
	__property int BottomSpace = {read=GetBottomSpace, write=SetBottomSpace, default=10};
	__property TGridType GridType = {read=FGridType, write=SetGridType, default=1};
	__property TAnyStrings* ColumnTitles = {read=GetColumnTitles, write=SetColumnTitles};
	__property int SortBeginRow = {read=FSortBeginRow, write=SetSortBeginRow, default=0};
	__property int SortEndRow = {read=FSortEndRow, write=SetSortEndRow, default=-1};
	__property int FilterBeginRow = {read=FFilterBeginRow, write=SetFilterBeginRow, default=0};
	__property int FilterEndRow = {read=FFilterEndRow, write=SetFilterEndRow, default=-1};
	__property TGridEvent OnUpdateData = {read=FOnUpdateData, write=FOnUpdateData};
	__property TGridEvent OnButtonClick = {read=FOnButtonClick, write=FOnButtonClick};
	__property TTextEvent OnGetText = {read=FOnGetText, write=FOnGetText};
	__property TTextEvent OnSetText = {read=FOnSetText, write=FOnSetText};
	__property TTextEvent OnEditText = {read=FOnEditText, write=FOnEditText};
	__property TGridBeforeEvent OnBeforeEnterCell = {read=FOnBeforeSelectCell, write=FOnBeforeSelectCell};
	__property TGridEvent OnAfterEnterCell = {read=FOnAfterSelectCell, write=FOnAfterSelectCell};
	__property TGridEvent OnAfterEdit = {read=FOnAfterEdit, write=FOnAfterEdit};
	__property TGridEvent OnLeaveCell = {read=FOnUnSelectCell, write=FOnUnSelectCell};
	__property TSaveProgressEvent OnSaveProgress = {read=FOnSaveProgress, write=FOnSaveProgress};
	__property TGridEvent OnChange = {read=FOnChange, write=FOnChange};
	__property TChangeEvent OnRowVisibleChanged = {read=FOnRowVisibleChanged, write=FOnRowVisibleChanged};
	__property TChangeEvent OnColVisibleChanged = {read=FOnColVisibleChanged, write=FOnColVisibleChanged};
	__property TChangeEvent OnRowHeightChanged = {read=FOnRowHeightChanged, write=FOnRowHeightChanged};
	__property TChangeEvent OnColWidthChanged = {read=FOnColWidthChanged, write=FOnColWidthChanged};
	__property TChangeEvent OnRowMoved = {read=FOnRowMoved, write=FOnRowMoved};
	__property TChangeEvent OnColMoved = {read=FOnColMoved, write=FOnColMoved};
	__property TChangeEvent OnSorted = {read=FOnSorted, write=FOnSorted};
	__property Classes::TNotifyEvent OnFiltered = {read=FOnFiltered, write=FOnFiltered};
	__property Stdctrls::TDrawItemEvent OnDrawComboItem = {read=FOnDrawComboItem, write=FOnDrawComboItem};
	__property Stdctrls::TMeasureItemEvent OnMeasureComboItem = {read=FOnMeasureComboItem, write=FOnMeasureComboItem};
	__property TDrawCellEvent OnDrawCell = {read=FOnDrawCell, write=FOnDrawCell};
	__property TSetCursorEvent OnSetCursor = {read=FOnSetCursor, write=FOnSetCursor};
	__property Fatexp::TOnEvaluate OnEvaluate = {read=FOnEvaluate, write=FOnEvaluate};
	__property Classes::TNotifyEvent OnRichEditSelectionChange = {read=FOnRichEditSelectionChange, write=FOnRichEditSelectionChange};
	__property TOnCompareFunc OnSortCompareFunc = {read=FOnCompareFunc, write=FOnCompareFunc};
	__property TRowTitleEvent OnClickRowTitle = {read=FOnClickRowTitle, write=FOnClickRowTitle};
	__property TColumnTitleEvent OnClickColumnTitle = {read=FOnClickColumnTitle, write=FOnClickColumnTitle};
	__property TDrawCellColorEvent OnDrawCellColor = {read=FOnDrawCellColor, write=FOnDrawCellColor};
	__property Graphics::TColor ShadowColor = {read=FShadowColor, write=SetShadowColor, default=0};
	__property int ResizeColOnRow = {read=FMovingOnRow, write=SetMovingOnRow, default=0};
	__property int ResizeRowOnCol = {read=FMovingOnCol, write=SetMovingOnCol, default=0};
	__property Classes::TAlignment ColumnTitleAlign = {read=FColumnTitleAlign, write=SetColumnTitleAlign, default=2};
	__property Graphics::TFont* ColumnTitleFont = {read=FColumnTitleFont, write=SetColumnTitleFont};
	__property int DefaultRowHeight = {read=FDefaultRowHeight, write=SetDefaultRowHeight, default=18};
	__property int DefaultColWidth = {read=FDefaultColWidth, write=SetDefaultColWidth, default=60};
	__property TAnyGridOptions Options = {read=FOptions, write=SetOptions, default=369082876};
	__property Db::TDataSource* DataSource = {read=FDataSource, write=SetDataSource};
	__property Db::TDataSource* MasterDataSource = {read=FMasterDataSource, write=SetMasterDataSource};
	__property Db::TField* SelectedField = {read=GetSelectedField, write=SetSelectedField};
	__property int TitleRows = {read=FTitleRows, write=SetTitleRows, default=0};
	__property int FooterRows = {read=FFooterRows, write=SetFooterRows, default=0};
	__property int SortingColIndex = {read=GetSortingColIndex, nodefault};
	__property bool SortingColASC = {read=GetSortingColASC, nodefault};
	__property double RTFLineSpace = {read=FRTFLineSpace, write=SetRTFLineSpace};
	__property bool ShowGroupFooter = {read=FShowGroupFooter, write=SetShowGroupFooter, default=1};
	__property TGetPageBreakEvent OnGetPageBreak = {read=FOnGetPageBreak, write=FOnGetPageBreak};
	__property Graphics::TPicture* BackGround = {read=FBackGround, write=SetBackGround};
	__property bool AutoShowBlobField = {read=FAutoShowBlobField, write=SetAutoShowBlobField, default=0};
	bool __fastcall GetDrawBmpOfCell(int Row, int Col, Graphics::TBitmap* CellDrawBmp, double &XPercent, double &YPercent);
	__property TSaveProgressEvent OnImportExportProgress = {read=FOnImportExportProgress, write=FOnImportExportProgress};
	void __fastcall ShowFindDialog(void);
	__property Color = {default=-16777211};
	__property Classes::TNotifyEvent OnLeftTopChange = {read=FOnLeftTopChange, write=FOnLeftTopChange};
	__property int LeftCol = {read=GetLeftCol, write=SetLeftCol, nodefault};
	__property int TopRow = {read=GetTopRow, write=SetTopRow, nodefault};
	__property TGetAlignmentEvent OnGetAlignment = {read=FOnGetAlignment, write=FOnGetAlignment};
	__property TGetReadOnlyEvent OnGetReadOnly = {read=FOnGetReadOnly, write=FOnGetReadOnly};
	__property int RightCol = {read=GetRightCol, nodefault};
	__property int BottomRow = {read=GetBottomRow, nodefault};
	__property bool IncludeHiddenData = {read=FIncludeHiddenData, write=SetIncludeHiddenData, default=0};
	__property TFilterEvent OnBeforeFilter = {read=FOnBeforeFilter, write=FOnBeforeFilter};
	__property bool ExportHiddenRow = {read=FExportHiddenRow, write=FExportHiddenRow, default=1};
	__property bool ExportHiddenCol = {read=FExportHiddenCol, write=FExportHiddenCol, default=1};
	__property System::WideString CurrencySymbol = {read=FCurrencySymbol, write=SetCurrencySymbol};
	__property Graphics::TColor CurrencyDecimalSeparatorColor = {read=FDecimalSeparatorColor, write=SetDecimalSeparatorColor, default=255};
	__property Graphics::TColor CurrencyThousandSeparatorColor = {read=FThousandSeparatorColor, write=SetThousandSeparatorColor, default=32768};
	__property int CurrencyCellWidth = {read=FCurrencyCellWidth, write=SetCurrencyCellWidth, default=12};
	__property int CurrencyDigits = {read=FCurrencyDigits, write=SetCurrencyDigits, default=2};
	__property TSizeChangeEvent OnBeforeColumnWidthChange = {read=FOnBeforeColumnWidthChange, write=FOnBeforeColumnWidthChange};
	__property TSizeChangeEvent OnBeforeRowHeightChange = {read=FOnBeforeRowHeightChange, write=FOnBeforeRowHeightChange};
	__property Graphics::TColor TitleColor = {read=FTitleColor, write=SetTitleColor, nodefault};
	__property Graphics::TColor CurrencySeparatorColor = {read=FCurrencySeparatorColor, write=SetCurrencySeparatorColor, default=12632256};
	__property bool TileBackGround = {read=FTileBackGround, write=SetTileBackGround, default=0};
	__property Graphics::TColor FocusColor = {read=FFocusColor, write=SetFocusColor, default=-16777203};
	__property bool LockBackGround = {read=FLockBackGround, write=SetLockBackGround, default=1};
	__property bool HorzScrollTracking = {read=FHorzTracking, write=FHorzTracking, default=0};
	__property bool VertScrollTracking = {read=FVertTracking, write=FVertTracking, default=0};
	__property TGetCellDataEvent OnGetCellData = {read=FOnGetCellData, write=FOnGetCellData};
	int __fastcall GetRowAutoHeight(int Row, int Col, const System::WideString Text);
	__property TInplaceEditor* Editor = {read=GetEditor};
	__property TGridEvent OnShowEditor = {read=FOnShowEditor, write=FOnShowEditor};
	__property TMoveDirectory MoveDirEnter = {read=FMoveDirEnter, write=FMoveDirEnter, default=4};
	__property System::AnsiString About = {read=FAbout, write=SetAbout};
	__property System::AnsiString Version = {read=GetVersion, write=SetVersion};
	__property Graphics::TColor TitleLineColor = {read=FTitleLineColor, write=SetTitleLineColor, default=8421504};
	__property TImportCellEvent OnImportCell = {read=FOnImportCell, write=FOnImportCell};
	__property TExportCellEvent OnExportCell = {read=FOnExportCell, write=FOnExportCell};
	__property TUnitType UnitType = {read=FUnitType, write=SetUnitType, default=0};
	__property double PhyLeftMargin = {read=FPhyLeftMargin, write=SetPhyLeftMargin};
	__property double PhyTopMargin = {read=FPhyTopMargin, write=SetPhyTopMargin};
	__property double PhyRightMargin = {read=FPhyRightMargin, write=SetPhyRightMargin};
	__property double PhyBottomMargin = {read=FPhyBottomMargin, write=SetPhyBottomMargin};
	__property double PhyRowHeight[int Row] = {read=GetPhyRowHeight, write=SetPhyRowHeight};
	__property double PhyColWidth[int Col] = {read=GetPhyColWidth, write=SetPhyColWidth};
	__property TDrawGridRectEvent OnDrawGridForeground = {read=FOnDrawGridForeground, write=FOnDrawGridForeground};
	__property TDrawGridRectEvent OnDrawGridBackground = {read=FOnDrawGridBackground, write=FOnDrawGridBackground};
	__property TDrawGridRectEvent OnDrawTitle = {read=FOnDrawTitle, write=FOnDrawTitle};
	__property Graphics::TPicture* Scroll16Bitmap = {read=FScroll16Bitmap, write=SetScroll16Bitmap};
	__property Graphics::TPicture* Scroll18Bitmap = {read=FScroll18Bitmap, write=SetScroll18Bitmap};
public:
	/* TWinControl.CreateParented */ inline __fastcall TCustomAnyGrid(HWND ParentWindow) : Controls::TCustomControl(ParentWindow) { }
	
};


class DELPHICLASS TAnyGrid;
class PASCALIMPLEMENTATION TAnyGrid : public TCustomAnyGrid
{
	typedef TCustomAnyGrid inherited;
	
__published:
	__property OnClick;
	__property OnDblClick;
	__property OnMouseDown;
	__property OnMouseMove;
	__property OnMouseUp;
	__property OnKeyDown;
	__property OnKeyPress;
	__property OnKeyUp;
	__property Align = {default=0};
	__property Anchors = {default=3};
	__property Constraints;
	__property TabStop = {default=1};
	__property TabOrder = {default=-1};
	__property OnResize;
	__property OnExit;
	__property OnEnter;
	__property Font;
	__property ParentFont = {default=1};
	__property PopupMenu;
	__property Color = {default=16777215};
	__property Ctl3D;
	__property DragCursor = {default=-12};
	__property DragKind = {default=0};
	__property DragMode = {default=0};
	__property Enabled = {default=1};
	__property ParentColor = {default=1};
	__property ParentCtl3D = {default=1};
	__property ParentShowHint = {default=1};
	__property ShowHint;
	__property Visible = {default=1};
	__property DefaultRowHeight = {default=18};
	__property DefaultColWidth = {default=60};
	__property OnContextPopup;
	__property OnDragDrop;
	__property OnDragOver;
	__property OnEndDock;
	__property OnEndDrag;
	__property OnStartDock;
	__property OnStartDrag;
	__property FixRowCount = {default=0};
	__property FixColCount = {default=0};
	__property LeftMargin = {default=30};
	__property TopMargin = {default=30};
	__property RightMargin = {default=30};
	__property BottomMargin = {default=30};
	__property SortBeginRow = {default=0};
	__property SortEndRow = {default=-1};
	__property FilterBeginRow = {default=0};
	__property FilterEndRow = {default=-1};
	__property Rows = {default=6};
	__property Cols = {default=6};
	__property BackColor = {default=-16777204};
	__property LineColor = {default=12632256};
	__property BorderStyle = {default=1};
	__property ScrollBars = {default=3};
	__property LeftSpace = {default=10};
	__property TopSpace = {default=10};
	__property RightSpace = {default=10};
	__property BottomSpace = {default=10};
	__property GridType = {default=1};
	__property Images;
	__property OnRichEditSelectionChange;
	__property ColumnTitles;
	__property ColumnTitleAlign = {default=2};
	__property ColumnTitleFont;
	__property OnUpdateData;
	__property OnButtonClick;
	__property OnGetText;
	__property OnSetText;
	__property OnEditText;
	__property OnBeforeEnterCell;
	__property OnAfterEnterCell;
	__property OnAfterEdit;
	__property OnLeaveCell;
	__property OnSaveProgress;
	__property OnChange;
	__property OnSortCompareFunc;
	__property OnRowVisibleChanged;
	__property OnColVisibleChanged;
	__property OnRowHeightChanged;
	__property OnColWidthChanged;
	__property OnRowMoved;
	__property OnColMoved;
	__property OnSorted;
	__property OnFiltered;
	__property OnDrawComboItem;
	__property OnMeasureComboItem;
	__property OnDrawCell;
	__property OnSetCursor;
	__property OnEvaluate;
	__property OnClickRowTitle;
	__property OnClickColumnTitle;
	__property ShadowColor = {default=0};
	__property ResizeColOnRow = {default=0};
	__property ResizeRowOnCol = {default=0};
	__property Options = {default=369082876};
	__property DataSource;
	__property MasterDataSource;
	__property TitleRows = {default=0};
	__property FooterRows = {default=0};
	__property RTFLineSpace;
	__property OnGetPageBreak;
	__property BackGround;
	__property ShowGroupFooter = {default=1};
	__property OnDrawCellColor;
	__property AutoShowBlobField = {default=0};
	__property OnImportExportProgress;
	__property OnLeftTopChange;
	__property OnGetAlignment;
	__property OnGetReadOnly;
	__property IncludeHiddenData = {default=0};
	__property OnBeforeFilter;
	__property ExportHiddenRow = {default=1};
	__property ExportHiddenCol = {default=1};
	__property CurrencySymbol;
	__property CurrencyDecimalSeparatorColor = {default=255};
	__property CurrencyThousandSeparatorColor = {default=32768};
	__property CurrencyCellWidth = {default=12};
	__property CurrencyDigits = {default=2};
	__property OnBeforeColumnWidthChange;
	__property OnBeforeRowHeightChange;
	__property TitleColor;
	__property TitleHeight = {default=20};
	__property TitleWidth = {default=40};
	__property CurrencySeparatorColor = {default=12632256};
	__property TileBackGround = {default=0};
	__property FocusColor = {default=-16777203};
	__property LockBackGround = {default=1};
	__property HorzScrollTracking = {default=0};
	__property VertScrollTracking = {default=0};
	__property OnGetCellData;
	__property OnShowEditor;
	__property MoveDirEnter = {default=4};
	__property About;
	__property Version;
	__property TitleLineColor = {default=8421504};
	__property OnImportCell;
	__property OnExportCell;
	__property UnitType = {default=0};
	__property OnDrawGridForeground;
	__property OnDrawGridBackground;
	__property OnDrawTitle;
	__property Scroll16Bitmap;
	__property Scroll18Bitmap;
public:
	/* TCustomAnyGrid.Create */ inline __fastcall virtual TAnyGrid(Classes::TComponent* AOwner) : TCustomAnyGrid(AOwner) { }
	/* TCustomAnyGrid.Destroy */ inline __fastcall virtual ~TAnyGrid(void) { }
	
public:
	/* TWinControl.CreateParented */ inline __fastcall TAnyGrid(HWND ParentWindow) : TCustomAnyGrid(ParentWindow) { }
	
};


class DELPHICLASS TAnyGridDataLink;
class PASCALIMPLEMENTATION TAnyGridDataLink : public Db::TDataLink
{
	typedef Db::TDataLink inherited;
	
private:
	TCustomAnyGrid* FGrid;
	bool FModified;
	
protected:
	virtual void __fastcall ActiveChanged(void);
	virtual void __fastcall DataSetChanged(void);
	virtual void __fastcall DataSetScrolled(int Distance);
	virtual void __fastcall FocusControl(Db::TFieldRef Field);
	virtual void __fastcall EditingChanged(void);
	virtual void __fastcall UpdateData(void);
	virtual void __fastcall LayoutChanged(void);
	
public:
	__fastcall TAnyGridDataLink(TCustomAnyGrid* AGrid);
	__fastcall virtual ~TAnyGridDataLink(void);
	__property TCustomAnyGrid* Grid = {read=FGrid};
};


//-- var, const, procedure ---------------------------------------------------
static const Word WM_SETHPOSITON = 0x46c;
static const Word WM_SETVPOSITON = 0x46d;
static const Word WM_RELEASEMOUSE = 0x46e;
static const Word WM_SHOWEDITOR = 0x46f;
#define Anylib_Version L"7.2"
static const int clShadowColor = 0x808080;
static const int clFocusColor = 0xcab2a9;
extern PACKAGE bool Win32PlatformIsUnicode;
extern PACKAGE bool Win32PlatformIsXP;
extern PACKAGE bool Win32PlatformIs2003;
static const ShortInt cs_HorAlignment = 0x0;
static const ShortInt cs_VerAlignment = 0x1;
static const ShortInt cs_BackColor = 0x2;
static const ShortInt cs_FontSize = 0x3;
static const ShortInt cs_FontBold = 0x4;
static const ShortInt cs_FontItalic = 0x5;
static const ShortInt cs_FontStrikethrough = 0x6;
static const ShortInt cs_FontUnderline = 0x7;
static const ShortInt cs_FontCharset = 0x8;
static const ShortInt cs_FontName = 0x9;
static const ShortInt cs_WordWrap = 0xa;
static const ShortInt cs_BiasColor = 0xb;
static const ShortInt cs_TopLine = 0xc;
static const ShortInt cs_LeftLine = 0xd;
static const ShortInt cs_RightLine = 0xe;
static const ShortInt cs_BottomLine = 0xf;
static const ShortInt cs_Digits = 0x10;
static const ShortInt cs_ThousandSeparators = 0x11;
static const ShortInt cs_LeftFrame = 0x12;
static const ShortInt cs_TopFrame = 0x13;
static const ShortInt cs_RightFrame = 0x14;
static const ShortInt cs_BottomFrame = 0x15;
static const ShortInt cs_TileGraphic = 0x16;
static const ShortInt cs_Stretch = 0x17;
static const ShortInt cs_StretchFine = 0x18;
static const ShortInt cs_VerticalText = 0x19;
static const ShortInt cs_LeftFrameWidth = 0x1a;
static const ShortInt cs_TopFrameWidth = 0x1b;
static const ShortInt cs_RightFrameWidth = 0x1c;
static const ShortInt cs_BottomFrameWidth = 0x1d;
static const ShortInt cs_LeftFrameColor = 0x1e;
static const ShortInt cs_TopFrameColor = 0x1f;
static const ShortInt cs_RightFrameColor = 0x20;
static const ShortInt cs_BottomFrameColor = 0x21;
static const ShortInt cs_LeftFrameStyle = 0x22;
static const ShortInt cs_TopFrameStyle = 0x23;
static const ShortInt cs_RightFrameStyle = 0x24;
static const ShortInt cs_BottomFrameStyle = 0x25;
static const ShortInt cs_BiasDirection = 0x26;
static const ShortInt cs_BiasWidth = 0x27;
static const ShortInt cs_BiasStyle = 0x28;
static const ShortInt cs_TransparentColor = 0x29;
static const ShortInt cs_Transparent = 0x2a;
static const ShortInt cs_TextLMargin = 0x2b;
static const ShortInt cs_TextTMargin = 0x2c;
static const ShortInt cs_TextRMargin = 0x2d;
static const ShortInt cs_TextBMargin = 0x2e;
static const ShortInt cs_GraphicHorAlign = 0x2f;
static const ShortInt cs_GraphicVerAlign = 0x30;
static const ShortInt cs_GraphicLMargin = 0x31;
static const ShortInt cs_GraphicTMargin = 0x32;
static const ShortInt cs_GraphicRMargin = 0x33;
static const ShortInt cs_GraphicBMargin = 0x34;
static const ShortInt cs_Ctl3D = 0x35;
static const ShortInt cs_Cursor = 0x36;
static const ShortInt cs_Hint = 0x37;
static const ShortInt cs_BrushStyle = 0x38;
static const ShortInt cs_TrimZero = 0x39;
static const ShortInt cs_FontColor = 0x3a;
static const ShortInt cs_FontAngle = 0x3b;
static const ShortInt cs_ShrinkToFit = 0x3c;
static const ShortInt cs_Printable = 0x3d;
static const ShortInt cs_PrintCurrencyLine = 0x3e;
static const ShortInt cs_VerticalTextSpace = 0x3f;
static const ShortInt cs_ShowCurrencyLine = 0x40;
static const ShortInt cs_DropDownCount = 0x41;
extern PACKAGE int __fastcall AnyDrawText(HDC hDC, System::WideChar * lpString, int nCount, Types::TRect &lpRect, unsigned uFormat);
extern PACKAGE bool __fastcall DeleteFile(const System::WideString FileName);
extern PACKAGE void __fastcall CanvasTextOut(Graphics::TCanvas* Canvas, int X, int Y, const System::WideString Text);
extern PACKAGE void __fastcall CanvasTextRect(Graphics::TCanvas* Canvas, const Types::TRect &Rect, int X, int Y, const System::WideString Text);
extern PACKAGE int __fastcall CanvasTextWidth(Graphics::TCanvas* Canvas, const System::WideString Text);
extern PACKAGE int __fastcall CanvasTextHeight(Graphics::TCanvas* Canvas, const System::WideString Text);
extern PACKAGE void __fastcall MxFormatKeyPress(const System::WideString Text, int SelStart, int SelLength, System::WideChar &Key, TValueType EditType, int Digits, bool InPaste = false);
extern PACKAGE int __fastcall CharPos(char Chr, const System::AnsiString Text);
extern PACKAGE int __fastcall Min(int A1, int A2);
extern PACKAGE int __fastcall Max(int A1, int A2);
extern PACKAGE bool __fastcall MatchStr(const System::AnsiString S, const System::AnsiString Mask, char MaskChar = '\x3f', char WildCard = '\x2a');
extern PACKAGE char __fastcall WideCharToAnsiChar(const System::WideChar C);
extern PACKAGE System::AnsiString __fastcall ColToColText(int Value);
extern PACKAGE int __fastcall ColTextToCol(const System::AnsiString Text);
extern PACKAGE System::AnsiString __fastcall GetTempFile(const System::AnsiString Prefix, const System::AnsiString Ext)/* overload */;
extern PACKAGE void __fastcall CopyToClipbrd(Classes::TMemoryStream* Memory, System::Word Format);
extern PACKAGE void __fastcall SaveFontToStream(Graphics::TFont* AFont, Classes::TStream* Stream);
extern PACKAGE void __fastcall LoadFontFromStream(Graphics::TFont* AFont, Classes::TStream* Stream);
extern PACKAGE void __fastcall LoadFromClipBoard(Classes::TMemoryStream* Memory, System::Word Format);
extern PACKAGE void __fastcall ParseColRow(const System::AnsiString AText, int &Col, int &Row);
extern PACKAGE System::WideString __fastcall ChineseMoney(System::Currency Money);
extern PACKAGE System::WideString __fastcall ChineseFullMoney(System::Currency Money);
extern PACKAGE System::WideString __fastcall ReplaceStr(const System::WideString SourceString, const System::WideString FindString, const System::WideString ReplaceString);
extern PACKAGE bool __fastcall IsNumber(const System::AnsiString S);
extern PACKAGE void __fastcall SaveTextToStream(Classes::TStream* Stream, System::WideString Text);
extern PACKAGE System::WideString __fastcall LoadTextFromStream(Classes::TStream* Stream);
extern PACKAGE System::WideString __fastcall LoadTextFromStream2(Classes::TStream* Stream, int AVersion);
extern PACKAGE void __fastcall ParseString(const System::WideString str, const System::WideString ParseChar, TAnyStrings* lst);
extern PACKAGE System::WideString __fastcall IncFormulaRow(TCustomAnyGrid* Grid, const System::WideString Formula, int IncRows);
extern PACKAGE void __fastcall DrawBitmapTransparent(Graphics::TCanvas* Dest, int DstX, int DstY, Graphics::TBitmap* Bitmap, Graphics::TColor TransparentColor);
extern PACKAGE System::WideString __fastcall ConvertCellText(const System::WideString Text);
extern PACKAGE bool __fastcall IsFormulaText(const System::WideString Text);

}	/* namespace Anygrids */
using namespace Anygrids;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// AnygridsHPP
