// CodeGear C++Builder
// Copyright (c) 1995, 2007 by CodeGear
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Srvsbar.pas' rev: 11.00

#ifndef SrvsbarHPP
#define SrvsbarHPP

#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 <Forms.hpp>	// Pascal unit
#include <Stdctrls.hpp>	// Pascal unit
#include <Rvxptheme.hpp>	// Pascal unit
#include <Srvskinmanager.hpp>	// Pascal unit
#include <Rvfuncs.hpp>	// Pascal unit
#include <Rvuni.hpp>	// Pascal unit

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

namespace Srvsbar
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TSRVScrollBar;
typedef void __fastcall (__closure *TSRVDrawScrollBarEvent)(TSRVScrollBar* Sender, Graphics::TCanvas* Canvas, const Types::TRect &ARect, const Types::TRect &PaintRect, Srvskinmanager::TSRVDrawStates State, bool &DoDefault);

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

class PASCALIMPLEMENTATION TSRVScrollBar : public Stdctrls::TScrollBar 
{
	typedef Stdctrls::TScrollBar inherited;
	
protected:
	bool FInMouse;
	bool FIsMouseDown;
	bool FIsKeyDown;
	bool IsFocus;
	bool IsByse;
	bool CanUpdate;
	bool FIsHotButtonLeft;
	bool FIsHotButtonRight;
	bool FIsHotButtonThumb;
	bool FIsHotAreaLeft;
	bool FIsHotAreaRight;
	bool FIsDownButtonLeft;
	bool FIsDownButtonRight;
	bool FIsDownButtonThumb;
	bool FIsDownAreaLeft;
	bool FIsDownAreaRight;
	int MouseOffs;
	int PosAtCursor;
	int ValueOffs;
	int kdCharCode;
	int FocusFrame;
	int FScrollingDelay;
	int FFocusBlinkDelay;
	bool FFlat;
	unsigned FTheme;
	bool FUseXPThemes;
	int FDecButtonWidth;
	int FIncButtonWidth;
	int FSkinSchemeIndex;
	Srvskinmanager::TSRVSkinManager* FSkinManager;
	TSRVDrawScrollBarEvent FOnDrawBorder;
	TSRVDrawScrollBarEvent FOnDrawDecButton;
	TSRVDrawScrollBarEvent FOnDrawIncButton;
	TSRVDrawScrollBarEvent FOnDrawThumbTab;
	TSRVDrawScrollBarAreaEvent FOnDrawArea;
	virtual void __fastcall CreateWnd(void);
	virtual void __fastcall DestroyWnd(void);
	virtual void __fastcall CreateThemeHandle(void);
	virtual void __fastcall FreeThemeHandle(void);
	void __fastcall GetSizeImageSkin(int SkinIndex, int &W, int &H, bool isFlag, bool IsFocus);
	Types::TRect __fastcall GetBeginRect(int SkinIndex, bool isFlag, bool IsFocus, const Types::TRect &ARect);
	Types::TRect __fastcall GetEndRect(int SkinIndex, bool isFlag, bool IsFocus, 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 IsDown);
	void __fastcall DrawSkin(Graphics::TCanvas* Canvas, const Types::TRect &RepaintRect, const Types::TRect &ARect, Srvskinmanager::TSRVSkinElement* ASkinElement, bool InArea, bool IsDown);
	int __fastcall GetButtonSize1(void);
	int __fastcall GetButtonSize2(void);
	int __fastcall GetValueSize(void);
	void __fastcall DrawSBButtonFirst(Graphics::TCanvas* Canvas, const Types::TRect &r, const Types::TRect &ARect);
	void __fastcall DrawSBButtonLast(Graphics::TCanvas* Canvas, const Types::TRect &r, const Types::TRect &ARect);
	void __fastcall DrawButton(Graphics::TCanvas* Canvas, const Types::TRect &r, const Types::TRect &ARect);
	void __fastcall DrawScrollBar(Graphics::TCanvas* Canvas, int X, int Y, const Types::TRect &ARect);
	Types::TRect __fastcall GetRectButtonLeft();
	Types::TRect __fastcall GetRectButtonRight();
	Types::TRect __fastcall GetRectButtonValue();
	Types::TRect __fastcall GetRectAreaLeft();
	Types::TRect __fastcall GetRectAreaRight();
	void __fastcall SBEvents(void);
	void __fastcall DrawBorder(Graphics::TCanvas* Canvas, const Types::TRect &ARect);
	void __fastcall DrawLButton(Graphics::TCanvas* Canvas, const Types::TRect &ARect);
	void __fastcall DrawRButton(Graphics::TCanvas* Canvas, const Types::TRect &ARect);
	void __fastcall DrawThumb(Graphics::TCanvas* Canvas, const Types::TRect &ARect);
	void __fastcall DrawArea(Graphics::TCanvas* Canvas, const Types::TRect &ARect);
	int __fastcall GetPosition(void);
	int __fastcall GetPageSize(void);
	void __fastcall SetFlat(bool Value);
	void __fastcall SetDecButtonWidth(int Value);
	void __fastcall SetIncButtonWidth(int Value);
	HIDESBASE void __fastcall SetPosition(int Value);
	HIDESBASE void __fastcall SetPageSize(int Value);
	void __fastcall SetSkinManager(Srvskinmanager::TSRVSkinManager* Value);
	void __fastcall SetSkinSchemeIndex(int Value);
	void __fastcall SetUseXPThemes(const bool Value);
	HIDESBASE MESSAGE void __fastcall CMMouseEnter(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
	MESSAGE void __fastcall WMTimer(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TMessage &Message);
	MESSAGE void __fastcall SBMSetScrollInfo(Messages::TMessage &Message);
	MESSAGE void __fastcall WMCaptureChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
	HIDESBASE MESSAGE void __fastcall WMNCPaint(Messages::TWMPaint &Message);
	HIDESBASE MESSAGE void __fastcall WMEraseBkgnd(Messages::TWMPaint &Message);
	HIDESBASE MESSAGE void __fastcall WMKeyDown(Messages::TWMKey &Message);
	HIDESBASE MESSAGE void __fastcall WMKeyUp(Messages::TWMKey &Message);
	MESSAGE void __fastcall WMMouseDoubleClick(Messages::TWMMouse &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 CNCtlColorScrollBar(Messages::TMessage &Msg);
	MESSAGE void __fastcall WMThemeChanged(Messages::TMessage &Message);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
	
public:
	int ScreenOffX;
	int ScreenOffY;
	int CanvasOffX;
	int CanvasOffY;
	float ScaleX;
	float ScaleY;
	int SRVWidth;
	int SRVHeight;
	int MouseOffX_;
	int MouseOffY_;
	bool ParentSRV;
	bool Printing;
	bool IsSkin;
	__fastcall virtual TSRVScrollBar(Classes::TComponent* AOwner);
	__fastcall virtual ~TSRVScrollBar(void);
	virtual void __fastcall DefaultHandler(void *Message);
	virtual void __fastcall Repaint(void);
	virtual void __fastcall Invalidate(void);
	HIDESBASE void __fastcall PaintTo(HDC DC, int X, int Y);
	int __fastcall GetPosAtCursor(int X, int Y);
	DYNAMIC void __fastcall Change(void);
	DYNAMIC void __fastcall Resize(void);
	bool __fastcall IsStandartScrollBar(void);
	__property bool InMouse = {read=FInMouse, nodefault};
	__property bool IsMouseDown = {read=FIsMouseDown, nodefault};
	__property bool IsKeyDown = {read=FIsKeyDown, nodefault};
	__property bool IsHotButtonLeft = {read=FIsHotButtonLeft, nodefault};
	__property bool IsHotButtonRight = {read=FIsHotButtonRight, nodefault};
	__property bool IsHotButtonThumb = {read=FIsHotButtonThumb, nodefault};
	__property bool IsHotAreaLeft = {read=FIsHotAreaLeft, nodefault};
	__property bool IsHotAreaRight = {read=FIsHotAreaRight, nodefault};
	__property bool IsDownButtonLeft = {read=FIsDownButtonLeft, nodefault};
	__property bool IsDownButtonRight = {read=FIsDownButtonRight, nodefault};
	__property bool IsDownButtonThumb = {read=FIsDownButtonThumb, nodefault};
	__property bool IsDownAreaLeft = {read=FIsDownAreaLeft, nodefault};
	__property bool IsDownAreaRight = {read=FIsDownAreaRight, nodefault};
	
__published:
	__property Color  = {default=536870911};
	__property int ScrollingDelay = {read=FScrollingDelay, write=FScrollingDelay, nodefault};
	__property int FocusBlinkDelay = {read=FFocusBlinkDelay, write=FFocusBlinkDelay, nodefault};
	__property bool Flat = {read=FFlat, write=SetFlat, default=0};
	__property bool UseXPThemes = {read=FUseXPThemes, write=SetUseXPThemes, default=1};
	__property int DecButtonWidth = {read=FDecButtonWidth, write=SetDecButtonWidth, default=0};
	__property int IncButtonWidth = {read=FIncButtonWidth, write=SetIncButtonWidth, default=0};
	__property int Position = {read=GetPosition, write=SetPosition, default=0};
	__property int PageSize = {read=GetPageSize, write=SetPageSize, default=0};
	__property Srvskinmanager::TSRVSkinManager* SkinManager = {read=FSkinManager, write=SetSkinManager};
	__property int SkinSchemeIndex = {read=FSkinSchemeIndex, write=SetSkinSchemeIndex, default=0};
	__property TSRVDrawScrollBarEvent OnDrawBorder = {read=FOnDrawBorder, write=FOnDrawBorder};
	__property TSRVDrawScrollBarEvent OnDrawDecButton = {read=FOnDrawDecButton, write=FOnDrawDecButton};
	__property TSRVDrawScrollBarEvent OnDrawIncButton = {read=FOnDrawIncButton, write=FOnDrawIncButton};
	__property TSRVDrawScrollBarEvent OnDrawThumbTab = {read=FOnDrawThumbTab, write=FOnDrawThumbTab};
	__property TSRVDrawScrollBarAreaEvent OnDrawArea = {read=FOnDrawArea, write=FOnDrawArea};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TSRVScrollBar(HWND ParentWindow) : Stdctrls::TScrollBar(ParentWindow) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const Word WM_REPAINT_CONTROL = 0xbc1;
static const Byte TMT_RECT = 0xd1;
static const Word TMT_DEFAULTPANESIZE = 0x138a;

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

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