// Borland C++ Builder
// Copyright (c) 1995, 1999 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'AdvCGrid.pas' rev: 5.00

#ifndef AdvCGridHPP
#define AdvCGridHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Controls.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Grids.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <AdvGrid.hpp>	// Pascal unit
#include <BaseGrid.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Advcgrid
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TGridColumnItem;
class PASCALIMPLEMENTATION TGridColumnItem : public Classes::TCollectionItem 
{
	typedef Classes::TCollectionItem inherited;
	
private:
	int FWidth;
	Classes::TAlignment FAlignment;
	AnsiString FColumnHeader;
	Advgrid::TSortStyle FSortStyle;
	AnsiString FSortPrefix;
	AnsiString FSortSuffix;
	AnsiString FEditMask;
	int FEditLength;
	Advgrid::TEditLink* FEditLink;
	Graphics::TFont* FFont;
	Graphics::TColor FColor;
	Advgrid::TEditorType FEditorType;
	bool FFixed;
	bool FReadOnly;
	Classes::TStringList* FComboItems;
	int FSpinMin;
	int FSpinMax;
	int FSpinStep;
	bool FPassword;
	Graphics::TFont* FPrintFont;
	Graphics::TColor FPrintColor;
	Advgrid::TCellBorders FBorders;
	Graphics::TPen* FBorderPen;
	Advgrid::TCellBorders FPrintBorders;
	Graphics::TPen* FPrintBorderPen;
	int FTag;
	int FDefIdx;
	AnsiString FName;
	AnsiString FCheckFalse;
	AnsiString FCheckTrue;
	bool FShowBands;
	void __fastcall SetWidth(const int Value);
	void __fastcall SetAlignment(const Classes::TAlignment Value);
	void __fastcall SetColumnHeader(const AnsiString Value);
	void __fastcall SetFont(const Graphics::TFont* Value);
	void __fastcall SetColor(const Graphics::TColor Value);
	void __fastcall SetFixed(const bool Value);
	void __fastcall SetPassword(const bool Value);
	void __fastcall SetComboItems(const Classes::TStringList* Value);
	void __fastcall FontChanged(System::TObject* Sender);
	void __fastcall PenChanged(System::TObject* Sender);
	void __fastcall SetBorders(const Advgrid::TCellBorders Value);
	void __fastcall SetBorderPen(const Graphics::TPen* Value);
	AnsiString __fastcall GetRows(int idx);
	void __fastcall SetRows(int idx, const AnsiString Value);
	System::TDateTime __fastcall GetDates(int idx);
	double __fastcall GetFloats(int idx);
	int __fastcall GetInts(int idx);
	void __fastcall SetDates(int idx, const System::TDateTime Value);
	void __fastcall SetFloats(int idx, const double Value);
	void __fastcall SetInts(int idx, const int Value);
	System::TDateTime __fastcall GetTimes(int idx);
	void __fastcall SetTimes(int idx, const System::TDateTime Value);
	void __fastcall SetEditorType(const Advgrid::TEditorType Value);
	void __fastcall SetShowBands(const bool Value);
	
protected:
	virtual AnsiString __fastcall GetDisplayName();
	
public:
	__fastcall virtual TGridColumnItem(Classes::TCollection* Collection);
	__fastcall virtual ~TGridColumnItem(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	__property int DefIdx = {read=FDefIdx, write=FDefIdx, nodefault};
	__property AnsiString Rows[int idx] = {read=GetRows, write=SetRows};
	__property int Ints[int idx] = {read=GetInts, write=SetInts};
	__property double Floats[int idx] = {read=GetFloats, write=SetFloats};
	__property System::TDateTime Dates[int idx] = {read=GetDates, write=SetDates};
	__property System::TDateTime Times[int idx] = {read=GetTimes, write=SetTimes};
	
__published:
	__property Classes::TAlignment Alignment = {read=FAlignment, write=SetAlignment, nodefault};
	__property Advgrid::TCellBorders Borders = {read=FBorders, write=SetBorders, nodefault};
	__property Graphics::TPen* BorderPen = {read=FBorderPen, write=SetBorderPen};
	__property AnsiString CheckFalse = {read=FCheckFalse, write=FCheckFalse};
	__property AnsiString CheckTrue = {read=FCheckTrue, write=FCheckTrue};
	__property Graphics::TColor Color = {read=FColor, write=SetColor, nodefault};
	__property Classes::TStringList* ComboItems = {read=FComboItems, write=SetComboItems};
	__property int EditLength = {read=FEditLength, write=FEditLength, nodefault};
	__property Advgrid::TEditLink* EditLink = {read=FEditLink, write=FEditLink};
	__property AnsiString EditMask = {read=FEditMask, write=FEditMask};
	__property Advgrid::TEditorType Editor = {read=FEditorType, write=SetEditorType, nodefault};
	__property bool Fixed = {read=FFixed, write=SetFixed, nodefault};
	__property Graphics::TFont* Font = {read=FFont, write=SetFont};
	__property AnsiString Header = {read=FColumnHeader, write=SetColumnHeader};
	__property AnsiString Name = {read=FName, write=FName};
	__property bool Password = {read=FPassword, write=SetPassword, nodefault};
	__property Advgrid::TCellBorders PrintBorders = {read=FPrintBorders, write=FPrintBorders, nodefault
		};
	__property Graphics::TPen* PrintBorderPen = {read=FPrintBorderPen, write=FPrintBorderPen};
	__property Graphics::TColor PrintColor = {read=FPrintColor, write=FPrintColor, nodefault};
	__property Graphics::TFont* PrintFont = {read=FPrintFont, write=FPrintFont};
	__property bool ReadOnly = {read=FReadOnly, write=FReadOnly, nodefault};
	__property bool ShowBands = {read=FShowBands, write=SetShowBands, nodefault};
	__property Advgrid::TSortStyle SortStyle = {read=FSortStyle, write=FSortStyle, nodefault};
	__property AnsiString SortPrefix = {read=FSortPrefix, write=FSortPrefix};
	__property AnsiString SortSuffix = {read=FSortSuffix, write=FSortSuffix};
	__property int SpinMax = {read=FSpinMax, write=FSpinMax, nodefault};
	__property int SpinMin = {read=FSpinMin, write=FSpinMin, nodefault};
	__property int SpinStep = {read=FSpinStep, write=FSpinStep, nodefault};
	__property int Tag = {read=FTag, write=FTag, nodefault};
	__property int Width = {read=FWidth, write=SetWidth, nodefault};
};


class DELPHICLASS TGridColumnCollection;
class DELPHICLASS TAdvColumnGrid;
class PASCALIMPLEMENTATION TAdvColumnGrid : public Advgrid::TAdvStringGrid 
{
	typedef Advgrid::TAdvStringGrid inherited;
	
private:
	TGridColumnCollection* FColumnCollection;
	bool FColMoving;
	Advgrid::TCellGraphic* FCellGraphic;
	void __fastcall SetColumnCollection(const TGridColumnCollection* Value);
	int __fastcall GetColCount(void);
	HIDESBASE void __fastcall SetColCount(const int Value);
	void __fastcall SynchColumns(void);
	TGridColumnItem* __fastcall GetColumnByName(AnsiString AValue);
	
protected:
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation AOperation
		);
	DYNAMIC void __fastcall ColumnMoved(int FromIndex, int ToIndex);
	DYNAMIC void __fastcall ColWidthsChanged(void);
	virtual void __fastcall CellsLoaded(void);
	virtual void __fastcall Loaded(void);
	DYNAMIC AnsiString __fastcall GetEditMask(int ACol, int ARow);
	DYNAMIC int __fastcall GetEditLimit(void);
	virtual Advgrid::TCellType __fastcall GetCellType(int ACol, int ARow);
	virtual Advgrid::TCellGraphic* __fastcall GetCellGraphic(int ACol, int ARow);
	virtual void __fastcall GetCellColor(int ACol, int ARow, Grids::TGridDrawState AState, Graphics::TBrush* 
		ABrush, Graphics::TFont* AFont);
	virtual void __fastcall GetCellPrintColor(int ACol, int ARow, Grids::TGridDrawState AState, Graphics::TBrush* 
		ABrush, Graphics::TFont* AFont);
	virtual void __fastcall GetCellBorder(int ACol, int ARow, Graphics::TPen* APen, Advgrid::TCellBorders 
		&borders);
	virtual void __fastcall GetCellPrintBorder(int ACol, int ARow, Graphics::TPen* APen, Advgrid::TCellBorders 
		&borders);
	virtual void __fastcall GetCellAlign(int ACol, int ARow, Classes::TAlignment &HAlign, Basegrid::TVAlignment 
		&VAlign);
	virtual void __fastcall GetColFormat(int ACol, Advgrid::TSortStyle &ASortStyle, AnsiString &aPrefix
		, AnsiString &aSuffix);
	virtual void __fastcall GetCellEditor(int ACol, int ARow, Advgrid::TEditorType &AEditor);
	virtual void __fastcall GetCellFixed(int ACol, int ARow, bool &IsFixed);
	virtual void __fastcall GetCellReadOnly(int ACol, int ARow, bool &IsReadOnly);
	virtual void __fastcall GetCellPassword(int ACol, int ARow, bool &IsPassword);
	virtual AnsiString __fastcall GetCheckTrue(int ACol, int ARow);
	virtual AnsiString __fastcall GetCheckFalse(int ACol, int ARow);
	
public:
	__fastcall virtual TAdvColumnGrid(Classes::TComponent* AOwner);
	__fastcall virtual ~TAdvColumnGrid(void);
	virtual int __fastcall GetVersionNr(void);
	virtual AnsiString __fastcall GetVersionString();
	void __fastcall SaveColumnsToStream(Classes::TStream* st);
	void __fastcall LoadColumnsFromStream(Classes::TStream* st);
	__property TGridColumnItem* ColumnByName[AnsiString AValue] = {read=GetColumnByName};
	
__published:
	__property TGridColumnCollection* Columns = {read=FColumnCollection, write=SetColumnCollection};
	__property int ColCount = {read=GetColCount, write=SetColCount, nodefault};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TAdvColumnGrid(HWND ParentWindow) : Advgrid::TAdvStringGrid(
		ParentWindow) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TGridColumnCollection : public Classes::TCollection 
{
	typedef Classes::TCollection inherited;
	
private:
	TAdvColumnGrid* fOwner;
	bool FNoRecursiveUpdate;
	HIDESBASE TGridColumnItem* __fastcall GetItem(int Index);
	HIDESBASE void __fastcall SetItem(int Index, const TGridColumnItem* Value);
	
protected:
	virtual void __fastcall Update(Classes::TCollectionItem* Item);
	
public:
	HIDESBASE TGridColumnItem* __fastcall Add(void);
	HIDESBASE TGridColumnItem* __fastcall Insert(int index);
	__property TGridColumnItem* Items[int Index] = {read=GetItem, write=SetItem};
	__fastcall TGridColumnCollection(TAdvColumnGrid* aOwner);
	DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
	void __fastcall SetOrganization(void);
	void __fastcall ResetOrganization(void);
public:
	#pragma option push -w-inl
	/* TCollection.Destroy */ inline __fastcall virtual ~TGridColumnCollection(void) { }
	#pragma option pop
	
};


class DELPHICLASS TAdvColumnGridIO;
class PASCALIMPLEMENTATION TAdvColumnGridIO : public Classes::TComponent 
{
	typedef Classes::TComponent inherited;
	
__published:
	TGridColumnCollection* FItems;
	
public:
	__fastcall virtual TAdvColumnGridIO(Classes::TComponent* AOwner);
	__fastcall virtual ~TAdvColumnGridIO(void);
	
__published:
	__property TGridColumnCollection* Items = {read=FItems, write=FItems};
};


//-- var, const, procedure ---------------------------------------------------

}	/* namespace Advcgrid */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Advcgrid;
#endif
#pragma option pop	// -w-
#pragma option pop	// -Vx

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