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

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

#ifndef AdvGridWorkbookHPP
#define AdvGridWorkbookHPP

#pragma delphiheader begin
#pragma option push -w-
#pragma option push -Vx
#include <Menus.hpp>	// Pascal unit
#include <AdvObj.hpp>	// Pascal unit
#include <SysUtils.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <Grids.hpp>	// Pascal unit
#include <BaseGrid.hpp>	// Pascal unit
#include <AdvGrid.hpp>	// Pascal unit
#include <StdCtrls.hpp>	// Pascal unit
#include <Tabs.hpp>	// Pascal unit
#include <ExtCtrls.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.hpp>	// Pascal unit

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

namespace Advgridworkbook
{
//-- type declarations -------------------------------------------------------
typedef void __fastcall (__closure *TSheetChangeEvent)(System::TObject* Sender, int NewSheet, bool &
	AllowChange);

class DELPHICLASS TTabLook;
class PASCALIMPLEMENTATION TTabLook : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	bool FDitherBackground;
	Graphics::TColor FSelectColor;
	Graphics::TColor FUnSelectColor;
	Graphics::TColor FBackgroundColor;
	Graphics::TFont* FFont;
	Classes::TNotifyEvent FOnChange;
	void __fastcall SetBackgroundColor(const Graphics::TColor Value);
	void __fastcall SetDitherBackground(const bool Value);
	void __fastcall SetFont(const Graphics::TFont* Value);
	void __fastcall SetSelectColor(const Graphics::TColor Value);
	void __fastcall SetUnSelectColor(const Graphics::TColor Value);
	
protected:
	void __fastcall FontChanged(System::TObject* Sender);
	void __fastcall Changed(void);
	
public:
	__fastcall TTabLook(void);
	__fastcall virtual ~TTabLook(void);
	
__published:
	__property Graphics::TFont* Font = {read=FFont, write=SetFont};
	__property Graphics::TColor SelectColor = {read=FSelectColor, write=SetSelectColor, default=-2147483633
		};
	__property Graphics::TColor UnSelectColor = {read=FUnSelectColor, write=SetUnSelectColor, default=16777215
		};
	__property bool DitherBackground = {read=FDitherBackground, write=SetDitherBackground, default=1};
	__property Graphics::TColor BackgroundColor = {read=FBackgroundColor, write=SetBackgroundColor, default=-2147483633
		};
	__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
};


class DELPHICLASS TGridSheet;
class PASCALIMPLEMENTATION TGridSheet : public Classes::TCollectionItem 
{
	typedef Classes::TCollectionItem inherited;
	
private:
	Classes::TMemoryStream* FData;
	int FTag;
	AnsiString FName;
	int FCol;
	int FRow;
	int FLeftCol;
	int FTopRow;
	Advobj::TIntList* FColWidths;
	Advobj::TIntList* FRowHeights;
	int FSortColumn;
	void __fastcall SetName(const AnsiString Value);
	
protected:
	HIDESBASE void __fastcall Changed(void);
	
public:
	__fastcall virtual TGridSheet(Classes::TCollection* Collection);
	__fastcall virtual ~TGridSheet(void);
	__property Classes::TMemoryStream* Data = {read=FData};
	__property int Col = {read=FCol, write=FCol, nodefault};
	__property int Row = {read=FRow, write=FRow, nodefault};
	__property int TopRow = {read=FTopRow, write=FTopRow, nodefault};
	__property int LeftCol = {read=FLeftCol, write=FLeftCol, nodefault};
	__property Advobj::TIntList* ColWidths = {read=FColWidths};
	__property Advobj::TIntList* RowHeights = {read=FRowHeights};
	__property int SortColumn = {read=FSortColumn, write=FSortColumn, nodefault};
	
__published:
	__property AnsiString Name = {read=FName, write=SetName};
	__property int Tag = {read=FTag, write=FTag, nodefault};
};


class DELPHICLASS TGridSheetCollection;
class DELPHICLASS TAdvGridWorkbook;
class PASCALIMPLEMENTATION TAdvGridWorkbook : public Controls::TCustomControl 
{
	typedef Controls::TCustomControl inherited;
	
private:
	Tabs::TTabSet* FTabSet;
	Advgrid::TAdvStringGrid* FGrid;
	int FActiveSheet;
	bool FAutoCreated;
	TGridSheetCollection* FSheets;
	int FDefaultColCount;
	int FDefaultRowCount;
	int FDefaultRowHeight;
	int FDefaultColWidth;
	TSheetChangeEvent FOnSheetChange;
	TTabLook* FTabLook;
	void __fastcall NCPaintProc(void);
	HIDESBASE MESSAGE void __fastcall WMNCPaint(Messages::TMessage &Message);
	void __fastcall TabChange(System::TObject* Sender, int NewTab, bool &AllowChange);
	void __fastcall SheetChange(System::TObject* Sender);
	void __fastcall TabLookChange(System::TObject* Sender);
	TGridSheetCollection* __fastcall GetSheets(void);
	void __fastcall SetSheets(const TGridSheetCollection* Value);
	void __fastcall SetActiveSheet(const int Value);
	void __fastcall StoreActiveSheet(void);
	AnsiString __fastcall GetVersion();
	void __fastcall SetVersion(const AnsiString Value);
	
protected:
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation AOperation
		);
	
public:
	virtual int __fastcall GetVersionNr(void);
	DYNAMIC void __fastcall GetChildren(Classes::TGetChildProc Proc, Classes::TComponent* Root);
	__fastcall virtual TAdvGridWorkbook(Classes::TComponent* AOwner);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	__fastcall virtual ~TAdvGridWorkbook(void);
	virtual void __fastcall CreateWnd(void);
	__property Advgrid::TAdvStringGrid* Grid = {read=FGrid};
	void __fastcall RemoveSheet(int Index);
	void __fastcall InsertSheet(int Index, AnsiString SheetName);
	void __fastcall AddSheet(AnsiString SheetName);
	
__published:
	__property int ActiveSheet = {read=FActiveSheet, write=SetActiveSheet, nodefault};
	__property TGridSheetCollection* Sheets = {read=GetSheets, write=SetSheets};
	__property TTabLook* TabLook = {read=FTabLook, write=FTabLook};
	__property TSheetChangeEvent OnSheetChange = {read=FOnSheetChange, write=FOnSheetChange};
	__property Align ;
	__property Anchors ;
	__property Constraints ;
	__property PopupMenu ;
	__property TabOrder ;
	__property TabStop ;
	__property Visible ;
	__property AnsiString Version = {read=GetVersion, write=SetVersion};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TAdvGridWorkbook(HWND ParentWindow) : Controls::TCustomControl(
		ParentWindow) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TGridSheetCollection : public Classes::TCollection 
{
	typedef Classes::TCollection inherited;
	
private:
	TAdvGridWorkbook* FOwner;
	Classes::TNotifyEvent FOnChange;
	HIDESBASE TGridSheet* __fastcall GetItem(int Index);
	HIDESBASE void __fastcall SetItem(int Index, const TGridSheet* Value);
	
protected:
	virtual void __fastcall Update(Classes::TCollectionItem* Item);
	
public:
	__fastcall TGridSheetCollection(TAdvGridWorkbook* AOwner);
	HIDESBASE void __fastcall Clear(void);
	HIDESBASE TGridSheet* __fastcall Add(void);
	HIDESBASE TGridSheet* __fastcall Insert(int Index);
	__property TGridSheet* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
	__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
	DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
public:
	#pragma option push -w-inl
	/* TCollection.Destroy */ inline __fastcall virtual ~TGridSheetCollection(void) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Shortint MAJ_VER = 0x2;
static const Shortint MIN_VER = 0x8;
static const Shortint REL_VER = 0x8;
static const Shortint BLD_VER = 0x2;
#define DATE_VER "May, 2005"

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

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