// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Srvtabset.pas' rev: 10.00

#ifndef SrvtabsetHPP
#define SrvtabsetHPP

#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 <Graphics.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Menus.hpp>	// Pascal unit
#include <Imglist.hpp>	// Pascal unit
#include <Srvskinmanager.hpp>	// Pascal unit

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

namespace Srvtabset
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TSRVTabSet;
typedef void __fastcall (__closure *TSRVCloseTabEvent)(TSRVTabSet* Sender, int TabIndex, bool &CanClose);

typedef void __fastcall (__closure *TSRVTabMoveEvent)(TSRVTabSet* Sender, int NewTabIndex, int OldTabIndex);

typedef void __fastcall (__closure *TSRVDrawTabSetEvent)(TSRVTabSet* Sender, Graphics::TCanvas* Canvas, const Types::TRect &ARect, const Types::TRect &PaintRect, Srvskinmanager::TSRVDrawStates State, bool &DoDefault);

typedef void __fastcall (__closure *TSRVDrawTabEvent)(TSRVTabSet* Sender, Graphics::TCanvas* Canvas, const Types::TRect &ARect, const Types::TRect &PaintRect, int TabIndex, Srvskinmanager::TSRVDrawStates State, bool &DoDefault);

#pragma option push -b-
enum TSRVTSCloseButtonVisibility { srvcbvAlways, srvcbvHot, srvcbvActive };
#pragma option pop

#pragma option push -b-
enum TSRVTabSetKind { srvtskHorizontal, srvtskVertical };
#pragma option pop

#pragma option push -b-
enum TSRVScrollerPosition { srvpsBegin, srvpsEnd };
#pragma option pop

#pragma option push -b-
enum TSRVTHAlign { srvthaLeft, srvthaCenter, srvthaRight };
#pragma option pop

#pragma option push -b-
enum TSRVTVAlign { srvtvaTop, srvtvaCenter, srvtvaBottom };
#pragma option pop

class DELPHICLASS TSRVTabItem;
class PASCALIMPLEMENTATION TSRVTabItem : public Classes::TCollectionItem 
{
	typedef Classes::TCollectionItem inherited;
	
private:
	Classes::TCollection* FOwner;
	
protected:
	int FTag;
	int FImageIndex;
	AnsiString FText;
	int FSkinSchemeIndex;
	int FSkinFontIndex;
	bool FEnabled;
	bool FVisible;
	void __fastcall SetImageIndex(const int Value);
	void __fastcall SetText(const AnsiString Value);
	void __fastcall SetSkinSchemeIndex(const int Value);
	void __fastcall SetSkinFontIndex(const int Value);
	void __fastcall SetEnabled(const bool Value);
	void __fastcall SetVisible(const bool Value);
	
public:
	#pragma pack(push,1)
	Types::TRect BoundsRect;
	#pragma pack(pop)
	__fastcall virtual TSRVTabItem(Classes::TCollection* Collection);
	DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	virtual AnsiString __fastcall GetDisplayName();
	void __fastcall Repaint(void);
	
__published:
	__property int ImageIndex = {read=FImageIndex, write=SetImageIndex, default=-1};
	__property int SkinSchemeIndex = {read=FSkinSchemeIndex, write=SetSkinSchemeIndex, default=-1};
	__property int SkinFontIndex = {read=FSkinFontIndex, write=SetSkinFontIndex, default=-1};
	__property AnsiString Text = {read=FText, write=SetText};
	__property int Tag = {read=FTag, write=FTag, default=0};
	__property bool Enabled = {read=FEnabled, write=SetEnabled, default=1};
	__property bool Visible = {read=FVisible, write=SetVisible, default=1};
public:
	#pragma option push -w-inl
	/* TCollectionItem.Destroy */ inline __fastcall virtual ~TSRVTabItem(void) { }
	#pragma option pop
	
};


class DELPHICLASS TSRVTabCollection;
class PASCALIMPLEMENTATION TSRVTabCollection : public Classes::TCollection 
{
	typedef Classes::TCollection inherited;
	
public:
	TSRVTabItem* operator[](int Index) { return Items[Index]; }
	
private:
	Classes::TPersistent* FOwner;
	HIDESBASE TSRVTabItem* __fastcall GetItem(int Index);
	HIDESBASE void __fastcall SetItem(int Index, const TSRVTabItem* Value);
	
public:
	__fastcall TSRVTabCollection(TMetaClass* ItemClass, Classes::TPersistent* Owner);
	DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
	virtual void __fastcall AssignTo(Classes::TPersistent* Dest);
	__property TSRVTabItem* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
public:
	#pragma option push -w-inl
	/* TCollection.Destroy */ inline __fastcall virtual ~TSRVTabCollection(void) { }
	#pragma option pop
	
};


class DELPHICLASS TSRVMargins;
class PASCALIMPLEMENTATION TSRVMargins : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	Controls::TWinControl* FOwner;
	
protected:
	int FLeft;
	int FTop;
	int FRight;
	int Fbottom;
	void __fastcall SetLeft(int Value);
	void __fastcall SetTop(int Value);
	void __fastcall SetRight(int Value);
	void __fastcall SetBottom(int Value);
	
public:
	__fastcall TSRVMargins(Controls::TWinControl* AOwner);
	void __fastcall SetMargins(int ALeft, int ATop, int ARight, int ABottom);
	void __fastcall Repaint(void);
	
__published:
	__property int Left = {read=FLeft, write=SetLeft, default=0};
	__property int Top = {read=FTop, write=SetTop, default=0};
	__property int Right = {read=FRight, write=SetRight, default=0};
	__property int Bottom = {read=Fbottom, write=SetBottom, default=0};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TSRVMargins(void) { }
	#pragma option pop
	
};


class DELPHICLASS TSRVCloseButton;
class PASCALIMPLEMENTATION TSRVCloseButton : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	Controls::TWinControl* FOwner;
	
protected:
	TSRVTHAlign FHorizontalAlign;
	TSRVTVAlign FVerticalAlign;
	bool FVisible;
	int FIndentX;
	int FIndentY;
	int FWidth;
	int FHeight;
	TSRVTSCloseButtonVisibility FVisibility;
	bool FAllowCloseLastTab;
	void __fastcall SetHorizontalAlign(TSRVTHAlign Value);
	void __fastcall SetVerticalAlign(TSRVTVAlign Value);
	void __fastcall SetVisible(bool Value);
	void __fastcall SetIndentX(int Value);
	void __fastcall SetIndentY(int Value);
	void __fastcall SetWidth(int Value);
	void __fastcall SetHeight(int Value);
	void __fastcall SetVisibility(TSRVTSCloseButtonVisibility Value);
	
public:
	__fastcall TSRVCloseButton(Controls::TWinControl* AOwner);
	void __fastcall Repaint(void);
	
__published:
	__property TSRVTHAlign HorizontalAlign = {read=FHorizontalAlign, write=SetHorizontalAlign, default=2};
	__property TSRVTVAlign VerticalAlign = {read=FVerticalAlign, write=SetVerticalAlign, default=0};
	__property bool Visible = {read=FVisible, write=SetVisible, default=1};
	__property int IndentX = {read=FIndentX, write=SetIndentX, default=3};
	__property int IndentY = {read=FIndentY, write=SetIndentY, default=3};
	__property int Width = {read=FWidth, write=SetWidth, default=10};
	__property int Height = {read=FHeight, write=SetHeight, default=10};
	__property TSRVTSCloseButtonVisibility Visibility = {read=FVisibility, write=SetVisibility, default=0};
	__property bool AllowCloseLastTab = {read=FAllowCloseLastTab, write=FAllowCloseLastTab, default=1};
public:
	#pragma option push -w-inl
	/* TPersistent.Destroy */ inline __fastcall virtual ~TSRVCloseButton(void) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TSRVTabSet : public Controls::TCustomControl 
{
	typedef Controls::TCustomControl inherited;
	
private:
	bool IsMouseDown;
	bool IsKeyDown;
	bool IsFocus;
	bool IsByse;
	bool IsMouseUp;
	bool IsDecMouseDown;
	bool IsIncMouseDown;
	int IsTabMouseDown;
	int dPosTabMoving;
	int IsCloseMouseDown;
	bool IsDecMouseHot;
	bool IsIncMouseHot;
	int IsTabMouseHot;
	int IsCloseMouseHot;
	int kdCharCode;
	int FocusFrame;
	
protected:
	#pragma pack(push,1)
	Types::TRect RScroller;
	#pragma pack(pop)
	int FScrollTabIndex;
	bool IsScrollShow;
	int LockUpdate;
	Graphics::TBitmap* Buffer;
	int FMovingTabIndex;
	int FMinTabSize;
	bool FAutoTabWidth;
	bool FRestrictMove;
	bool FCanMoveTabs;
	int FTabHeight;
	int FMaxTabSize;
	Menus::TPopupMenu* FScrollerMenu;
	TSRVTabCollection* FTabs;
	TSRVScrollerPosition FScrollerPosition;
	TSRVMargins* FMargins;
	int FIndent;
	TSRVCloseButton* FCloseButton;
	int FTabIndex;
	TSRVTHAlign FTextAlignH;
	TSRVTVAlign FTextAlignV;
	Imglist::TCustomImageList* FImageList;
	TSRVTabSetKind FKind;
	int FScrollOffs;
	int FScrollingDelay;
	bool FMirrorText;
	int FSpacings;
	int FScrollButtonWidth;
	Srvskinmanager::TSRVSkinManager* FSkinManager;
	int FSkinSchemeIndex;
	bool FDoubleBuffered;
	Classes::TNotifyEvent FOnChange;
	TSRVTabMoveEvent FOnTabMove;
	TSRVCloseTabEvent FOnCloseTab;
	TSRVDrawTabSetEvent FOnDrawBorder;
	TSRVDrawTabSetEvent FOnDrawDecButton;
	TSRVDrawTabSetEvent FOnDrawIncButton;
	TSRVDrawTabSetEvent FOnDrawBackground;
	TSRVDrawTabEvent FOnDrawTab;
	TSRVDrawTabEvent FOnDrawCloseButton;
	void __fastcall GetSizeImageSkin(int SkinIndex, int &W, int &H, bool isFlag, bool IsFocus, bool IsEnabled);
	Types::TRect __fastcall GetBeginRect(int SkinIndex, bool isFlag, bool IsFocus, bool IsEnabled, const Types::TRect &ARect);
	Types::TRect __fastcall GetEndRect(int SkinIndex, bool isFlag, bool IsFocus, bool IsEnabled, const Types::TRect &ARect);
	Types::TRect __fastcall GetCenterRect(const Types::TRect &R1, const Types::TRect &R2, const Types::TRect &DefaultRect);
	Srvskinmanager::TSRVSkinElement* __fastcall GetSkinElement(int Index);
	Graphics::TPicture* __fastcall GetSkinImage(Srvskinmanager::TSRVSkinElement* ASkinElement, bool InArea, bool InDown, bool IsEnabled);
	bool __fastcall DrawSkin(Graphics::TCanvas* Canvas, const Types::TRect &RepaintRect, const Types::TRect &ARect, Srvskinmanager::TSRVSkinElement* ASkinElement, bool InArea, bool InDown, bool IsEnabled);
	void __fastcall SetTabIndex(int Value);
	void __fastcall SetMinTabSize(int Value);
	void __fastcall SetAutoTabWidth(bool Value);
	void __fastcall SetTabHeight(int Value);
	void __fastcall SetMaxTabSize(int Value);
	void __fastcall SetScrollerPosition(TSRVScrollerPosition Value);
	void __fastcall SetIndent(int Value);
	void __fastcall SetTextAlignH(TSRVTHAlign Value);
	void __fastcall SetTextAlignV(TSRVTVAlign Value);
	void __fastcall SetKind(TSRVTabSetKind Value);
	void __fastcall SetImageList(Imglist::TCustomImageList* Value);
	void __fastcall SetMirrorText(bool Value);
	void __fastcall SetSpacings(int Value);
	void __fastcall SetScrollButtonWidth(int Value);
	void __fastcall SetSkinManager(Srvskinmanager::TSRVSkinManager* Value);
	void __fastcall SetSkinSchemeIndex(int Value);
	void __fastcall SetTabs(const TSRVTabCollection* Value);
	HIDESBASE void __fastcall SetMargins(const TSRVMargins* Value);
	void __fastcall SetCloseButton(const TSRVCloseButton* Value);
	void __fastcall SetDoubleBuffered(bool Value);
	int __fastcall GetFirstTabIndex(void);
	int __fastcall GetLastTabIndex(void);
	int __fastcall GetTabSize(int TabIndex);
	void __fastcall DrawBorder(Graphics::TCanvas* Canvas, const Types::TRect &ARect);
	void __fastcall DrawTabs(Graphics::TCanvas* ACanvas, const Types::TRect &ARect);
	void __fastcall DrawTabItem(Graphics::TCanvas* ACanvas, int TabIndex, const Types::TRect &ARect);
	void __fastcall DrawCloseButton(Graphics::TCanvas* ACanvas, int TabIndex, const Types::TRect &ARect);
	void __fastcall DrawScroller(Graphics::TCanvas* ACanvas, const Types::TRect &ARect);
	void __fastcall CalculateTabs(int FirstTabIndex);
	int __fastcall GetShowTabCount(void);
	Types::TRect __fastcall GetScrollerRect();
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	MESSAGE void __fastcall WMTimer(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMKeyDown(Messages::TWMKey &Message);
	HIDESBASE MESSAGE void __fastcall WMKeyUp(Messages::TWMKey &Message);
	MESSAGE void __fastcall WMMouseDown(Messages::TWMMouse &Message);
	MESSAGE void __fastcall WMMouseUp(Messages::TWMMouse &Message);
	HIDESBASE MESSAGE void __fastcall WMMouseMove(Messages::TWMMouse &Message);
	HIDESBASE MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMEraseBkgnd(Messages::TWMPaint &Message);
	
public:
	int ScreenOffX;
	int ScreenOffY;
	int CanvasOffX;
	int CanvasOffY;
	float ScaleX;
	float ScaleY;
	bool ParentSRV;
	bool Printing;
	__fastcall virtual TSRVTabSet(Classes::TComponent* AOwner);
	__fastcall virtual ~TSRVTabSet(void);
	DYNAMIC void __fastcall Resize(void);
	Types::TRect __fastcall GetTabsRect();
	Types::TRect __fastcall GetTabRect(int TabIndex);
	Types::TRect __fastcall GetTabTextRect(int TabIndex);
	Types::TRect __fastcall GetCloseAtTabIndex(int TabIndex);
	bool __fastcall IsTabVisible(int TabIndex, bool IsFullVisible);
	int __fastcall GetTabIndexAtPos(int X, int Y);
	void __fastcall ScrollToTab(int TabIndex);
	void __fastcall BeginUpdate(void);
	void __fastcall EndUpdate(void);
	virtual void __fastcall Paint(void);
	DYNAMIC bool __fastcall DoMouseWheel(Classes::TShiftState Shift, int WheelDelta, const Types::TPoint &MousePos);
	__property Canvas ;
	__property int MovingTabIndex = {read=FMovingTabIndex, nodefault};
	__property int FirstTabIndex = {read=GetFirstTabIndex, nodefault};
	__property int LastTabIndex = {read=GetLastTabIndex, nodefault};
	__property int ScrollOffs = {read=FScrollOffs, write=FScrollOffs, nodefault};
	
__published:
	__property TSRVTabCollection* Tabs = {read=FTabs, write=SetTabs};
	__property TSRVMargins* Margins = {read=FMargins, write=SetMargins};
	__property int Indent = {read=FIndent, write=SetIndent, default=5};
	__property int TabIndex = {read=FTabIndex, write=SetTabIndex, default=-1};
	__property int ScrollingDelay = {read=FScrollingDelay, write=FScrollingDelay, default=100};
	__property int MinTabSize = {read=FMinTabSize, write=SetMinTabSize, default=0};
	__property bool AutoTabWidth = {read=FAutoTabWidth, write=SetAutoTabWidth, default=1};
	__property bool RestrictMove = {read=FRestrictMove, write=FRestrictMove, default=0};
	__property bool CanMoveTabs = {read=FCanMoveTabs, write=FCanMoveTabs, default=1};
	__property int TabHeight = {read=FTabHeight, write=SetTabHeight, default=20};
	__property int MaxTabSize = {read=FMaxTabSize, write=SetMaxTabSize, default=200};
	__property Menus::TPopupMenu* ScrollerMenu = {read=FScrollerMenu, write=FScrollerMenu};
	__property TSRVScrollerPosition ScrollerPosition = {read=FScrollerPosition, write=SetScrollerPosition, default=1};
	__property TSRVCloseButton* CloseButton = {read=FCloseButton, write=SetCloseButton};
	__property TSRVTHAlign TextAlignH = {read=FTextAlignH, write=SetTextAlignH, default=0};
	__property TSRVTVAlign TextAlignV = {read=FTextAlignV, write=SetTextAlignV, default=1};
	__property Imglist::TCustomImageList* ImageList = {read=FImageList, write=SetImageList};
	__property TSRVTabSetKind Kind = {read=FKind, write=SetKind, default=0};
	__property bool MirrorText = {read=FMirrorText, write=SetMirrorText, default=0};
	__property int Spacings = {read=FSpacings, write=SetSpacings, default=0};
	__property int ScrollButtonWidth = {read=FScrollButtonWidth, write=SetScrollButtonWidth, default=15};
	__property Srvskinmanager::TSRVSkinManager* SkinManager = {read=FSkinManager, write=SetSkinManager};
	__property int SkinSchemeIndex = {read=FSkinSchemeIndex, write=SetSkinSchemeIndex, default=0};
	__property bool DoubleBuffered = {read=FDoubleBuffered, write=SetDoubleBuffered, default=0};
	__property TabStop  = {default=0};
	__property Align  = {default=0};
	__property Anchors  = {default=3};
	__property Color  = {default=-16777211};
	__property Constraints ;
	__property Cursor  = {default=0};
	__property Enabled  = {default=1};
	__property Font ;
	__property Hint ;
	__property ShowHint ;
	__property PopupMenu ;
	__property Width ;
	__property Height ;
	__property Left ;
	__property Top ;
	__property OnMouseMove ;
	__property OnMouseDown ;
	__property OnMouseUp ;
	__property OnKeyUp ;
	__property OnKeyDown ;
	__property OnEnter ;
	__property OnExit ;
	__property OnMouseEnter ;
	__property OnMouseLeave ;
	__property OnClick ;
	__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
	__property TSRVTabMoveEvent OnTabMove = {read=FOnTabMove, write=FOnTabMove};
	__property TSRVCloseTabEvent OnCloseTab = {read=FOnCloseTab, write=FOnCloseTab};
	__property TSRVDrawTabSetEvent OnDrawBorder = {read=FOnDrawBorder, write=FOnDrawBorder};
	__property TSRVDrawTabSetEvent OnDrawDecButton = {read=FOnDrawDecButton, write=FOnDrawDecButton};
	__property TSRVDrawTabSetEvent OnDrawIncButton = {read=FOnDrawIncButton, write=FOnDrawIncButton};
	__property TSRVDrawTabSetEvent OnDrawBackground = {read=FOnDrawBackground, write=FOnDrawBackground};
	__property TSRVDrawTabEvent OnDrawTab = {read=FOnDrawTab, write=FOnDrawTab};
	__property TSRVDrawTabEvent OnDrawCloseButton = {read=FOnDrawCloseButton, write=FOnDrawCloseButton};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TSRVTabSet(HWND ParentWindow) : Controls::TCustomControl(ParentWindow) { }
	#pragma option pop
	
};


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

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

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