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

// (DO NOT EDIT: machine generated header) 'Srvcontrol.pas' rev: 20.00

#ifndef SrvcontrolHPP
#define SrvcontrolHPP

#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 <Graphics.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit

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

namespace Srvcontrol
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum Srvcontrol__1 { srvblLeft, srvblTop, srvblRight, srvblBottom };
#pragma option pop

typedef Set<Srvcontrol__1, srvblLeft, srvblBottom>  TSRVBoundLines;

typedef Byte TSRVColorSteps;

#pragma option push -b-
enum TSRVGradientStyle { gsLeft, gsTop, gsRight, gsBottom };
#pragma option pop

struct TSRVSelection
{
	
public:
	int StartPos;
	int EndPos;
};


typedef void __fastcall (__closure *TSRVCtrlPaintPage)(System::TObject* Sender, const Types::TRect &R, Graphics::TCanvas* Canvas);

class DELPHICLASS TSRVCustomControl;
class PASCALIMPLEMENTATION TSRVCustomControl : public Controls::TCustomControl
{
	typedef Controls::TCustomControl inherited;
	
private:
	bool FMouseIn;
	bool FDrawOnPrint;
	Classes::TNotifyEvent FOnMouseLeave;
	Classes::TNotifyEvent FOnMouseEnter;
	
protected:
	Classes::TAlignment FAlignment;
	void __fastcall SetAlignment(Classes::TAlignment Value);
	HIDESBASE MESSAGE void __fastcall CMTextChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMMouseEnter(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMSize(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMFocusChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMParentColorChanged(Messages::TMessage &Message);
	
public:
	int ScreenOffX;
	int ScreenOffY;
	float ScaleX;
	float ScaleY;
	bool ParentSRV;
	__fastcall virtual TSRVCustomControl(Classes::TComponent* AOwner);
	__property Classes::TAlignment Alignment = {read=FAlignment, write=SetAlignment, nodefault};
	__property bool DrawOnPrint = {read=FDrawOnPrint, write=FDrawOnPrint, default=1};
	__property bool MouseIn = {read=FMouseIn, nodefault};
	__property Classes::TNotifyEvent OnMouseEnter = {read=FOnMouseLeave, write=FOnMouseLeave};
	__property Classes::TNotifyEvent OnMouseLeave = {read=FOnMouseLeave, write=FOnMouseLeave};
public:
	/* TCustomControl.Destroy */ inline __fastcall virtual ~TSRVCustomControl(void) { }
	
public:
	/* TWinControl.CreateParented */ inline __fastcall TSRVCustomControl(HWND ParentWindow) : Controls::TCustomControl(ParentWindow) { }
	
};


class DELPHICLASS TSRVWinControl;
class PASCALIMPLEMENTATION TSRVWinControl : public Controls::TWinControl
{
	typedef Controls::TWinControl inherited;
	
private:
	bool FMouseIn;
	bool FDrawOnPrint;
	Classes::TNotifyEvent FOnMouseEnter;
	Classes::TNotifyEvent FOnMouseLeave;
	
protected:
	Graphics::TColor FEnabledBorderColor;
	Graphics::TColor FDisabledBorderColor;
	Graphics::TColor FMouseInBorderColor;
	Graphics::TColor FFocusedBorderColor;
	int FEnabledBorderWidth;
	int FDisabledBorderWidth;
	int FMouseInBorderWidth;
	int FFocusedBorderWidth;
	void __fastcall SetEnabledBorderColor(Graphics::TColor Value);
	void __fastcall SetDisabledBorderColor(Graphics::TColor Value);
	void __fastcall SetEnabledBorderWidth(int Value);
	void __fastcall SetDisabledBorderWidth(int Value);
	void __fastcall SetMouseInBorderColor(Graphics::TColor Value);
	void __fastcall SetMouseInBorderWidth(int Value);
	void __fastcall SetFocusedBorderColor(Graphics::TColor Value);
	void __fastcall SetFocusedBorderWidth(int Value);
	HIDESBASE MESSAGE void __fastcall CMMouseEnter(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
	
public:
	int ScreenOffX;
	int ScreenOffY;
	float ScaleX;
	float ScaleY;
	bool ParentSRV;
	__fastcall virtual TSRVWinControl(Classes::TComponent* AOwner);
	__property Font;
	__property Graphics::TColor EnabledBorderColor = {read=FEnabledBorderColor, write=SetEnabledBorderColor, default=12558207};
	__property int EnabledBorderWidth = {read=FEnabledBorderWidth, write=SetEnabledBorderWidth, default=1};
	__property Graphics::TColor DisabledBorderColor = {read=FDisabledBorderColor, write=SetDisabledBorderColor, default=12114135};
	__property int DisabledBorderWidth = {read=FDisabledBorderWidth, write=SetDisabledBorderWidth, default=1};
	__property bool MouseIn = {read=FMouseIn, nodefault};
	__property Graphics::TColor MouseInBorderColor = {read=FMouseInBorderColor, write=SetMouseInBorderColor, default=255};
	__property int MouseInBorderWidth = {read=FMouseInBorderWidth, write=SetMouseInBorderWidth, default=1};
	__property Graphics::TColor FocusedBorderColor = {read=FFocusedBorderColor, write=SetFocusedBorderColor, default=16711680};
	__property int FocusedBorderWidth = {read=FFocusedBorderWidth, write=SetFocusedBorderWidth, default=1};
	__property bool DrawOnPrint = {read=FDrawOnPrint, write=FDrawOnPrint, default=1};
	__property Classes::TNotifyEvent OnMouseEnter = {read=FOnMouseLeave, write=FOnMouseLeave};
	__property Classes::TNotifyEvent OnMouseLeave = {read=FOnMouseLeave, write=FOnMouseLeave};
public:
	/* TWinControl.CreateParented */ inline __fastcall TSRVWinControl(HWND ParentWindow) : Controls::TWinControl(ParentWindow) { }
	/* TWinControl.Destroy */ inline __fastcall virtual ~TSRVWinControl(void) { }
	
};


class DELPHICLASS TSRVEditControl;
class PASCALIMPLEMENTATION TSRVEditControl : public TSRVWinControl
{
	typedef TSRVWinControl inherited;
	
protected:
	virtual int __fastcall GetSelLength(void);
	virtual int __fastcall GetSelStart(void);
	virtual void __fastcall SetSelLength(int Value);
	virtual void __fastcall SetSelStart(int Value);
	void __fastcall AdjustHeight(void);
	virtual Types::TPoint __fastcall GetCaretPos();
	MESSAGE void __fastcall WMSetFont(Messages::TWMSetFont &Message);
	HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMEnter(Messages::TWMNoParams &Message);
	
public:
	__fastcall virtual TSRVEditControl(Classes::TComponent* AOwner);
	void __fastcall SelectAll(void);
	__property Font;
	__property PopupMenu;
	__property Types::TPoint CaretPos = {read=GetCaretPos};
	__property int SelLength = {read=GetSelLength, write=SetSelLength, nodefault};
	__property int SelStart = {read=GetSelStart, write=SetSelStart, nodefault};
public:
	/* TWinControl.CreateParented */ inline __fastcall TSRVEditControl(HWND ParentWindow) : TSRVWinControl(ParentWindow) { }
	/* TWinControl.Destroy */ inline __fastcall virtual ~TSRVEditControl(void) { }
	
};


class DELPHICLASS TSRVRenderControl;
class PASCALIMPLEMENTATION TSRVRenderControl : public TSRVWinControl
{
	typedef TSRVWinControl inherited;
	
protected:
	Controls::TWinControl* FDisplay;
	Types::TRect FDisplayRect;
	Types::TRect FSourceRect;
	Types::TRect FDestinationRect;
	virtual bool __fastcall GetRenderVisible(void);
	virtual void __fastcall SetRenderVisible(bool Value);
	virtual void __fastcall SetDisplay(Controls::TWinControl* Value);
	virtual void __fastcall SetDisplayRect(const Types::TRect &Value);
	virtual void __fastcall SetSourceRect(const Types::TRect &Value);
	virtual void __fastcall SetDestinationRect(const Types::TRect &Value);
	
public:
	__fastcall virtual TSRVRenderControl(Classes::TComponent* AOwner);
	__property Types::TRect DisplayRect = {read=FDisplayRect, write=SetDisplayRect};
	__property Types::TRect SourceRect = {read=FSourceRect, write=SetSourceRect};
	__property Types::TRect DestinationRect = {read=FDestinationRect, write=SetDestinationRect};
	__property Controls::TWinControl* Display = {read=FDisplay, write=SetDisplay};
	__property bool RenderVisible = {read=GetRenderVisible, write=SetRenderVisible, nodefault};
public:
	/* TWinControl.CreateParented */ inline __fastcall TSRVRenderControl(HWND ParentWindow) : TSRVWinControl(ParentWindow) { }
	/* TWinControl.Destroy */ inline __fastcall virtual ~TSRVRenderControl(void) { }
	
};


class DELPHICLASS TSRVCanvasControl;
class PASCALIMPLEMENTATION TSRVCanvasControl : public Controls::TGraphicControl
{
	typedef Controls::TGraphicControl inherited;
	
private:
	Classes::TAlignment FAlignment;
	bool FMouseIn;
	bool FDrawOnPrint;
	Classes::TNotifyEvent FOnMouseEnter;
	Classes::TNotifyEvent FOnMouseLeave;
	TSRVCtrlPaintPage FOnPaint;
	void __fastcall SetAlignment(Classes::TAlignment Value);
	
protected:
	MESSAGE void __fastcall MouseEnter(Messages::TMessage &Message);
	MESSAGE void __fastcall MouseLeave(Messages::TMessage &Message);
	MESSAGE void __fastcall WMSize(Messages::TMessage &Message);
	MESSAGE void __fastcall CMDialogChar(Messages::TWMKey &Message);
	MESSAGE void __fastcall CMTextChanged(Messages::TMessage &Message);
	
public:
	int ScreenOffX;
	int ScreenOffY;
	float ScaleX;
	float ScaleY;
	bool ParentSRV;
	__fastcall virtual TSRVCanvasControl(Classes::TComponent* AOwner);
	virtual void __fastcall Invalidate(void);
	virtual void __fastcall PaintTo(unsigned DC, int X, int Y);
	__property Classes::TAlignment Alignment = {read=FAlignment, write=SetAlignment, default=0};
	__property bool DrawOnPrint = {read=FDrawOnPrint, write=FDrawOnPrint, default=1};
	__property bool MouseIn = {read=FMouseIn, nodefault};
	
__published:
	__property TSRVCtrlPaintPage OnPaint = {read=FOnPaint, write=FOnPaint};
	__property Classes::TNotifyEvent OnMouseEnter = {read=FOnMouseEnter, write=FOnMouseEnter};
	__property Classes::TNotifyEvent OnMouseLeave = {read=FOnMouseLeave, write=FOnMouseLeave};
public:
	/* TGraphicControl.Destroy */ inline __fastcall virtual ~TSRVCanvasControl(void) { }
	
};


class DELPHICLASS TSRVGraphicControl;
class PASCALIMPLEMENTATION TSRVGraphicControl : public Controls::TGraphicControl
{
	typedef Controls::TGraphicControl inherited;
	
private:
	bool FMouseIn;
	bool FAutoSize;
	Classes::TAlignment FAlignment;
	bool FDrawOnPrint;
	Graphics::TColor FForegroundColor;
	Graphics::TColor FBackgroundColor;
	int FOffset;
	Classes::TNotifyEvent FOnMouseEnter;
	Classes::TNotifyEvent FOnMouseLeave;
	HIDESBASE void __fastcall SetAutoSize(bool Value);
	void __fastcall SetAlignment(Classes::TAlignment Value);
	void __fastcall SetOffset(int Value);
	void __fastcall SetForegroundColor(Graphics::TColor Value);
	void __fastcall SetBackgroundColor(Graphics::TColor Value);
	
protected:
	MESSAGE void __fastcall MouseEnter(Messages::TMessage &Message);
	MESSAGE void __fastcall MouseLeave(Messages::TMessage &Message);
	MESSAGE void __fastcall WMSize(Messages::TMessage &Message);
	MESSAGE void __fastcall CMDialogChar(Messages::TWMKey &Message);
	MESSAGE void __fastcall CMTextChanged(Messages::TMessage &Message);
	void __fastcall Realign(void);
	
public:
	int ScreenOffX;
	int ScreenOffY;
	float ScaleX;
	float ScaleY;
	bool ParentSRV;
	__fastcall virtual TSRVGraphicControl(Classes::TComponent* AOwner);
	virtual void __fastcall PaintTo(unsigned DC, int X, int Y);
	__property bool AutoSize = {read=FAutoSize, write=SetAutoSize, default=1};
	__property Classes::TAlignment Alignment = {read=FAlignment, write=SetAlignment, default=0};
	__property bool DrawOnPrint = {read=FDrawOnPrint, write=FDrawOnPrint, default=1};
	__property Graphics::TColor ForegroundColor = {read=FForegroundColor, write=SetForegroundColor, default=16777215};
	__property Graphics::TColor BackgroundColor = {read=FBackgroundColor, write=SetBackgroundColor, default=8920080};
	__property int Offset = {read=FOffset, write=SetOffset, default=1};
	__property bool MouseIn = {read=FMouseIn, nodefault};
	
__published:
	__property Classes::TNotifyEvent OnMouseEnter = {read=FOnMouseEnter, write=FOnMouseEnter};
	__property Classes::TNotifyEvent OnMouseLeave = {read=FOnMouseLeave, write=FOnMouseLeave};
public:
	/* TGraphicControl.Destroy */ inline __fastcall virtual ~TSRVGraphicControl(void) { }
	
};


//-- var, const, procedure ---------------------------------------------------
static const int SRV_FLAG_COLOR = 0x21a221;
static const int SRV_FACE_START = 0xffffff;
static const int SRV_FACE_END = 0xe7ebef;
static const int SRV_ENABLED_BORDER = 0x80501f;
static const int SRV_DISABLED_BORDER = 0xbfc8cf;
static const int SRV_BORDER_COLOR = 0xb8d8d7;
static const ShortInt SRV_BORDER_WIDTH = 0x1;
static const int SRV_CAPTION_COLOR = 0xd05300;
static const ShortInt SRV_CAPTION_OFFSET = 0xa;
static const ShortInt SRV_CORNERS_OFFSET = 0xa;
static const ShortInt SRV_MAX_BORDER_WIDTH = 0xa;
static const ShortInt SRV_MIN_BORDER_WIDTH = 0x1;
static const ShortInt SRV_MAX_CAPTION_OFFSET = 0x1e;
static const ShortInt SRV_MIN_CAPTION_OFFSET = 0x1;
static const ShortInt SRV_MAX_CORNERS_OFFSET = 0x1e;
static const ShortInt SRV_MIN_CORNERS_OFFSET = 0x1;
static const int SRV_BORDER_ENABLED = 0xbf9f7f;
static const int SRV_BORDER_DISABLED = 0xb8d8d7;
static const int SRV_BORDER_MOUSEIN = 255;
static const int SRV_BORDER_FOCUSED = 16711680;
static const ShortInt SRV_ENABLED_WIDTH = 0x1;
static const ShortInt SRV_DISABLED_WIDTH = 0x1;
static const ShortInt SRV_MOUSEIN_WIDTH = 0x1;
static const ShortInt SRV_FOCUSED_WIDTH = 0x1;
static const ShortInt SRV_MAX_SRV_ENABLED_WIDTH = 0x3;
static const ShortInt SRV_MIN_SRV_ENABLED_WIDTH = 0x0;
static const ShortInt SRV_MAX_SRV_DISABLED_WIDTH = 0x3;
static const ShortInt SRV_MIN_SRV_DISABLED_WIDTH = 0x0;
static const ShortInt SRV_MAX_SRV_MOUSEIN_WIDTH = 0x3;
static const ShortInt SRV_MIN_SRV_MOUSEIN_WIDTH = 0x0;
static const ShortInt SRV_MAX_SRV_FOCUSED_WIDTH = 0x3;
static const ShortInt SRV_MIN_SRV_FOCUSED_WIDTH = 0x0;
static const bool SRV_AUTO_SIZE = true;
static const Classes::TAlignment SRV_CAPTION_ALIGNMENT = (Classes::TAlignment)(0);
static const int SRV_FOREGROUND_COLOR = 0xffffff;
static const int SRV_BACKGROUND_COLOR = 0x881c10;
static const ShortInt SRV_OFFSET = 0x1;
extern PACKAGE StaticArray<int, 3> Alignments;
extern PACKAGE void __fastcall Frame3D(Graphics::TCanvas* Canvas, Types::TRect &Rect, Graphics::TColor TopColor, Graphics::TColor BottomColor, int Width);
extern PACKAGE void __fastcall DrawLine(Graphics::TCanvas* ACanvas, int X1, int Y1, int X2, int Y2);
extern PACKAGE void __fastcall DrawBoundLines(Graphics::TCanvas* ACanvas, TSRVBoundLines ABoundLines, const Graphics::TColor AColor, const Types::TRect &R)/* overload */;
extern PACKAGE void __fastcall DrawGradient(int Width, int Height, Graphics::TColor StartColor, Graphics::TColor EndColor, TSRVColorSteps ColorSteps, TSRVGradientStyle Style, bool Dithered, Graphics::TMetafile* &Metafile)/* overload */;
extern PACKAGE void __fastcall PaintText(Controls::TControl* Parent, Graphics::TCanvas* Canvas, System::UnicodeString AText, Graphics::TFont* AFont, bool Enabled, bool ShowAccelChar, Types::TRect &Rect, int Flags)/* overload */;
extern PACKAGE void __fastcall DrawGradientToCanvas(int Width, int Height, Graphics::TColor StartColor, Graphics::TColor EndColor, TSRVColorSteps ColorSteps, TSRVGradientStyle Style, bool Dithered, Graphics::TCanvas* Canvas)/* overload */;
extern PACKAGE void __fastcall PaintFlag(Graphics::TColor Color, Graphics::TCanvas* Canvas);
extern PACKAGE void __fastcall PaintGrayed(Graphics::TColor Color, Graphics::TCanvas* Canvas);
extern PACKAGE void __fastcall PaintBorder(Graphics::TColor Color, Graphics::TCanvas* Canvas);
extern PACKAGE void __fastcall PaintPress(Graphics::TColor Color, Graphics::TCanvas* Canvas);
extern PACKAGE void __fastcall PaintDisabled(Graphics::TColor Color, Graphics::TCanvas* Canvas);

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

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