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

// (DO NOT EDIT: machine generated header) 'XBookTabSet2.pas' rev: 28.00 (Windows)

#ifndef Xbooktabset2HPP
#define Xbooktabset2HPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <SysInit.hpp>	// Pascal unit
#include <System.Classes.hpp>	// Pascal unit
#include <System.SysUtils.hpp>	// Pascal unit
#include <System.Contnrs.hpp>	// Pascal unit
#include <System.Math.hpp>	// Pascal unit
#include <Xc12Utils5.hpp>	// Pascal unit
#include <XLSUtils5.hpp>	// Pascal unit
#include <XBookWindows2.hpp>	// Pascal unit
#include <XBookRects2.hpp>	// Pascal unit
#include <XBookPaintGDI2.hpp>	// Pascal unit
#include <XBookPaint2.hpp>	// Pascal unit
#include <XBookSkin2.hpp>	// Pascal unit
#include <XBookUtils2.hpp>	// Pascal unit
#include <XBookTypes2.hpp>	// Pascal unit

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

namespace Xbooktabset2
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TTabButtons;
class PASCALIMPLEMENTATION TTabButtons : public Xbookwindows2::TXSSClientWindow
{
	typedef Xbookwindows2::TXSSClientWindow inherited;
	
private:
	int FOverButton;
	System::StaticArray<Xbooktypes2::TXYRect, 4> FBtnRects;
	Xbookutils2::TXIntegerEvent FClickEvent;
	
public:
	__fastcall TTabButtons(Xbookwindows2::TXSSWindow* AParent);
	virtual void __fastcall SetSize(const int pX1, const int pY1, const int pX2, const int pY2);
	virtual void __fastcall Paint(void);
	virtual void __fastcall MouseDown(Xbookwindows2::TXSSMouseButton Button, Xbookwindows2::TXSSShiftState Shift, int X, int Y);
	virtual void __fastcall MouseMove(Xbookwindows2::TXSSShiftState Shift, int X, int Y);
	virtual void __fastcall MouseUp(Xbookwindows2::TXSSMouseButton Button, Xbookwindows2::TXSSShiftState Shift, int X, int Y);
	virtual void __fastcall MouseLeave(void);
	__property Xbookutils2::TXIntegerEvent OnClick = {read=FClickEvent, write=FClickEvent};
public:
	/* TXSSWindow.Destroy */ inline __fastcall virtual ~TTabButtons(void) { }
	
};


class DELPHICLASS TXTab;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TXTab : public System::TObject
{
	typedef System::TObject inherited;
	
private:
	System::UnicodeString FText;
	int FX1;
	int FX2;
	unsigned FColor;
	bool FFocused;
	void __fastcall SetText(const System::UnicodeString Value);
	void __fastcall SetColor(const unsigned Value);
	
public:
	__property System::UnicodeString Text = {read=FText, write=SetText};
	__property int X1 = {read=FX1, write=FX1, nodefault};
	__property int X2 = {read=FX2, write=FX2, nodefault};
	__property unsigned Color = {read=FColor, write=SetColor, nodefault};
	__property bool Focused = {read=FFocused, write=FFocused, nodefault};
public:
	/* TObject.Create */ inline __fastcall TXTab(void) : System::TObject() { }
	/* TObject.Destroy */ inline __fastcall virtual ~TXTab(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TXTabs;
#pragma pack(push,4)
class PASCALIMPLEMENTATION TXTabs : public System::Contnrs::TObjectList
{
	typedef System::Contnrs::TObjectList inherited;
	
public:
	TXTab* operator[](int Index) { return Items[Index]; }
	
private:
	Xbookskin2::TXLSBookSkin* FSkin;
	int FLeftTab;
	int FWidth;
	int FSelectedTab;
	TXTab* __fastcall GetItems(int Index);
	void __fastcall SetClickTab(const int Value, Xbookskin2::TTabState State, bool Range);
	void __fastcall SetSelectedTab(const int Value);
	int __fastcall GetLeftStart(void);
	
public:
	__fastcall TXTabs(Xbookskin2::TXLSBookSkin* Skin);
	void __fastcall CalcSize(void);
	HIDESBASE TXTab* __fastcall Add(void);
	int __fastcall MouseDown(Xbookwindows2::TXSSMouseButton Button, Xbookwindows2::TXSSShiftState Shift, int X, int Y);
	__property TXTab* Items[int Index] = {read=GetItems/*, default*/};
	__property int LeftTab = {read=FLeftTab, write=FLeftTab, nodefault};
	__property int LeftStart = {read=GetLeftStart, nodefault};
	__property int SelectedTab = {read=FSelectedTab, write=SetSelectedTab, nodefault};
	__property int Width = {read=FWidth, write=FWidth, nodefault};
public:
	/* TList.Destroy */ inline __fastcall virtual ~TXTabs(void) { }
	
};

#pragma pack(pop)

class DELPHICLASS TXTabSet;
class PASCALIMPLEMENTATION TXTabSet : public Xbookwindows2::TXSSClientWindow
{
	typedef Xbookwindows2::TXSSClientWindow inherited;
	
private:
	TXTabs* FTabs;
	Xbookrects2::TSplitterHandle* FSplitter;
	double FPercentWidth;
	Xbookutils2::TX2IntegerEvent FXSizeEvent;
	bool FSplitterSizing;
	TTabButtons* FTabButtons;
	int FLastClick;
	Xbookutils2::TXIntegerEvent FClickEvent;
	void __fastcall SetPercentWidth(const double Value);
	int __fastcall GetSelectedTab(void);
	void __fastcall SetSelectedTab(const int Value);
	System::UnicodeString __fastcall GetTexts(int Index);
	void __fastcall SetTexts(int Index, const System::UnicodeString Value);
	
protected:
	void __fastcall ButtonClick(System::TObject* Sender, int Value);
	void __fastcall ClientPaint(void);
	void __fastcall CalcEditSize(void);
	void __fastcall ShowEdit(void);
	void __fastcall HideEdit(void);
	void __fastcall TabEditKeyPress(System::TObject* Sender, System::WideChar &Key);
	
public:
	__fastcall TXTabSet(Xbookwindows2::TXSSWindow* AParent);
	__fastcall virtual ~TXTabSet(void);
	virtual void __fastcall SetSize(const int pX1, const int pY1, const int pX2, const int pY2);
	virtual void __fastcall Paint(void);
	virtual void __fastcall MouseDown(Xbookwindows2::TXSSMouseButton Button, Xbookwindows2::TXSSShiftState Shift, int X, int Y);
	virtual void __fastcall MouseMove(Xbookwindows2::TXSSShiftState Shift, int X, int Y);
	virtual void __fastcall MouseUp(Xbookwindows2::TXSSMouseButton Button, Xbookwindows2::TXSSShiftState Shift, int X, int Y);
	virtual void __fastcall MouseEnter(int X, int Y);
	virtual void __fastcall MouseLeave(void);
	int __fastcall SnapX(int &X);
	void __fastcall Exchange(int Index1, int Index2);
	virtual void __fastcall DeleteChilds(void);
	HIDESBASE void __fastcall Add(System::UnicodeString TabText, unsigned TabColor = (unsigned)(0xf0000000));
	__property double PercentWidth = {read=FPercentWidth, write=SetPercentWidth};
	__property Xbookutils2::TX2IntegerEvent OnSize = {read=FXSizeEvent, write=FXSizeEvent};
	__property int LastClick = {read=FLastClick, write=FLastClick, nodefault};
	__property int SelectedTab = {read=GetSelectedTab, write=SetSelectedTab, nodefault};
	__property System::UnicodeString Texts[int Index] = {read=GetTexts, write=SetTexts};
	__property Xbookutils2::TXIntegerEvent OnClick = {read=FClickEvent, write=FClickEvent};
};


//-- var, const, procedure ---------------------------------------------------
static const System::Int8 TABBUTTONWIDTH = System::Int8(0xf);
static const System::Int8 TABBUTTONHEIGHT = System::Int8(0xe);
static const System::Int8 MAXTABTEXTLEN = System::Int8(0x1f);
}	/* namespace Xbooktabset2 */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_XBOOKTABSET2)
using namespace Xbooktabset2;
#endif
#pragma pack(pop)
#pragma option pop

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