📄 vrbuttons.hpp
字号:
__property Vrclasses::TVrFont3D* Font3D = {read=FFont3D, write=SetFont3D};
__property bool Flat = {read=FFlat, write=SetFlat, default=0};
__property Anchors ;
__property BiDiMode ;
__property Constraints ;
__property Caption ;
__property Color ;
__property DragCursor ;
__property DragKind ;
__property DragMode ;
__property Enabled ;
__property ParentBiDiMode ;
__property ParentColor ;
__property ParentShowHint ;
__property PopupMenu ;
__property ShowHint ;
__property TabOrder ;
__property TabStop ;
__property Visible ;
__property OnClick ;
__property OnContextPopup ;
__property OnDragDrop ;
__property OnDragOver ;
__property OnEndDock ;
__property OnEndDrag ;
__property OnEnter ;
__property OnExit ;
__property OnKeyDown ;
__property OnKeyPress ;
__property OnKeyUp ;
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property OnStartDock ;
__property OnStartDrag ;
public:
#pragma option push -w-inl
/* TWinControl.CreateParented */ inline __fastcall TVrDemoButton(HWND ParentWindow) : Vrcontrols::TVrCustomImageControl(
ParentWindow) { }
#pragma option pop
};
class DELPHICLASS TVrPowerButton;
class PASCALIMPLEMENTATION TVrPowerButton : public Vrcontrols::TVrCustomImageControl
{
typedef Vrcontrols::TVrCustomImageControl inherited;
private:
bool FActive;
Vrcontrols::TVrMaxInt FLedWidth;
Vrcontrols::TVrMaxInt FLedHeight;
Vrclasses::TVrPalette* FPalette;
Vrcontrols::TVrByteInt FBevelWidth;
Graphics::TColor FHighlightColor;
Graphics::TColor FShadowColor;
Graphics::TColor FOutlineColor;
Vrcontrols::TVrByteInt FOutlineWidth;
int FSpacing;
int FMargin;
Vrcontrols::TVrImageTextLayout FLayout;
bool FFocused;
Graphics::TColor FFocusColor;
bool FDown;
bool FPressed;
Windows::TRect TextBounds;
Windows::TRect ImageRect;
void __fastcall SetActive(bool Value);
void __fastcall SetLedWidth(Vrcontrols::TVrMaxInt Value);
void __fastcall SetLedHeight(Vrcontrols::TVrMaxInt Value);
void __fastcall SetLayout(Vrcontrols::TVrImageTextLayout Value);
void __fastcall SetMargin(int Value);
void __fastcall SetSpacing(int Value);
void __fastcall SetPalette(Vrclasses::TVrPalette* Value);
HIDESBASE void __fastcall SetBevelWidth(Vrcontrols::TVrByteInt Value);
void __fastcall SetHighlightColor(Graphics::TColor Value);
void __fastcall SetShadowColor(Graphics::TColor Value);
void __fastcall SetOutlineColor(Graphics::TColor Value);
void __fastcall SetOutlineWidth(Vrcontrols::TVrByteInt Value);
void __fastcall SetFocusColor(Graphics::TColor Value);
void __fastcall PaletteModified(System::TObject* Sender);
HIDESBASE MESSAGE void __fastcall WMSize(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMTextChanged(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMFocusChanged(Controls::TCMFocusChanged &Message);
HIDESBASE MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMDialogChar(Messages::TWMKey &Message);
protected:
virtual void __fastcall Paint(void);
DYNAMIC void __fastcall Click(void);
void __fastcall PaintLed(Graphics::TCanvas* Canvas);
void __fastcall CalcPaintParams(bool DoPaint);
DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X,
int Y);
DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int
Y);
virtual void __fastcall MouseEnter(void);
virtual void __fastcall MouseLeave(void);
DYNAMIC void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
DYNAMIC void __fastcall KeyUp(Word &Key, Classes::TShiftState Shift);
public:
__fastcall virtual TVrPowerButton(Classes::TComponent* AOwner);
__fastcall virtual ~TVrPowerButton(void);
__published:
__property bool Active = {read=FActive, write=SetActive, default=0};
__property Vrcontrols::TVrMaxInt LedWidth = {read=FLedWidth, write=SetLedWidth, default=12};
__property Vrcontrols::TVrMaxInt LedHeight = {read=FLedHeight, write=SetLedHeight, default=12};
__property Vrcontrols::TVrImageTextLayout Layout = {read=FLayout, write=SetLayout, default=0};
__property int Margin = {read=FMargin, write=SetMargin, default=-1};
__property int Spacing = {read=FSpacing, write=SetSpacing, default=5};
__property Vrclasses::TVrPalette* Palette = {read=FPalette, write=SetPalette};
__property Graphics::TColor FocusColor = {read=FFocusColor, write=SetFocusColor, default=16711680};
__property Graphics::TColor OutlineColor = {read=FOutlineColor, write=SetOutlineColor, default=0};
__property Vrcontrols::TVrByteInt OutlineWidth = {read=FOutlineWidth, write=SetOutlineWidth, default=1
};
__property Graphics::TColor HighlightColor = {read=FHighlightColor, write=SetHighlightColor, default=-2147483628
};
__property Graphics::TColor ShadowColor = {read=FShadowColor, write=SetShadowColor, default=-2147483632
};
__property Vrcontrols::TVrByteInt BevelWidth = {read=FBevelWidth, write=SetBevelWidth, default=2};
__property Anchors ;
__property Constraints ;
__property Caption ;
__property Color ;
__property DragCursor ;
__property DragKind ;
__property DragMode ;
__property Font ;
__property Enabled ;
__property ParentColor ;
__property ParentFont ;
__property ParentShowHint ;
__property PopupMenu ;
__property ShowHint ;
__property TabOrder ;
__property TabStop ;
__property Visible ;
__property OnClick ;
__property OnContextPopup ;
__property OnDragDrop ;
__property OnDragOver ;
__property OnEndDock ;
__property OnEndDrag ;
__property OnEnter ;
__property OnExit ;
__property OnKeyDown ;
__property OnKeyPress ;
__property OnKeyUp ;
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property OnStartDock ;
__property OnStartDrag ;
public:
#pragma option push -w-inl
/* TWinControl.CreateParented */ inline __fastcall TVrPowerButton(HWND ParentWindow) : Vrcontrols::TVrCustomImageControl(
ParentWindow) { }
#pragma option pop
};
class DELPHICLASS TVrAniButton;
class PASCALIMPLEMENTATION TVrAniButton : public Vrcontrols::TVrGraphicImageControl
{
typedef Vrcontrols::TVrGraphicImageControl inherited;
private:
int FImageCount;
int FImageWidth;
int FImageHeight;
int FCurrentIndex;
Graphics::TBitmap* FCurrBitmap;
Graphics::TBitmap* FMask;
int FMaskIndex;
Vrthreads::TVrTimer* FTimer;
bool FPressed;
bool FSwitchStyle;
int FStage;
Vrsystem::TVrBitmapList* FBitmapList;
Vrcontrols::TVrChangeLink* FBitmapListLink;
int FBitmapIndex;
int __fastcall GetInterval(void);
bool __fastcall GetThreaded(void);
bool __fastcall GetDown(void);
void __fastcall SetImageCount(int Value);
void __fastcall SetDown(bool Value);
void __fastcall SetInterval(int Value);
void __fastcall SetSwitchStyle(bool Value);
void __fastcall SetMaskIndex(int Value);
void __fastcall SetBitmapIndex(int Value);
void __fastcall SetBitmapList(Vrsystem::TVrBitmapList* Value);
void __fastcall SetThreaded(bool Value);
void __fastcall BitmapListChanged(System::TObject* Sender);
void __fastcall TimerEvent(System::TObject* Sender);
protected:
DYNAMIC HPALETTE __fastcall GetPalette(void);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
Graphics::TBitmap* __fastcall GetBitmap(int Index);
virtual void __fastcall Paint(void);
virtual void __fastcall Loaded(void);
virtual bool __fastcall CanAutoSize(int &NewWidth, int &NewHeight);
void __fastcall UpdateImage(void);
bool __fastcall InControl(int X, int Y);
DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X,
int Y);
DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int
Y);
public:
__fastcall virtual TVrAniButton(Classes::TComponent* AOwner);
__fastcall virtual ~TVrAniButton(void);
DYNAMIC void __fastcall Click(void);
__published:
__property bool Threaded = {read=GetThreaded, write=SetThreaded, nodefault};
__property int BitmapIndex = {read=FBitmapIndex, write=SetBitmapIndex, default=-1};
__property int MaskIndex = {read=FMaskIndex, write=SetMaskIndex, default=-1};
__property Vrsystem::TVrBitmapList* BitmapList = {read=FBitmapList, write=SetBitmapList};
__property int ImageCount = {read=FImageCount, write=SetImageCount, default=0};
__property int Interval = {read=GetInterval, write=SetInterval, nodefault};
__property bool SwitchStyle = {read=FSwitchStyle, write=SetSwitchStyle, default=0};
__property bool Down = {read=GetDown, write=SetDown, nodefault};
__property Transparent ;
__property Anchors ;
__property AutoSize ;
__property Constraints ;
__property Color ;
__property DragCursor ;
__property DragKind ;
__property DragMode ;
__property Hint ;
__property ParentShowHint ;
__property PopupMenu ;
__property ShowHint ;
__property Visible ;
__property OnClick ;
__property OnContextPopup ;
__property OnDragDrop ;
__property OnDragOver ;
__property OnEndDock ;
__property OnEndDrag ;
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property OnStartDock ;
__property OnStartDrag ;
};
class DELPHICLASS TVrShapeBtn;
class PASCALIMPLEMENTATION TVrShapeBtn : public Vrcontrols::TVrGraphicImageControl
{
typedef Vrcontrols::TVrGraphicImageControl inherited;
private:
Graphics::TBitmap* FBitmap;
Graphics::TBitmap* FBitmapUp;
Graphics::TBitmap* FBitmapDown;
Graphics::TBitmap* FMaskBitmap;
bool FDown;
bool FPressed;
Graphics::TColor __fastcall BevelColor(bool Pressed, const bool TopLeft);
void __fastcall Create3DBitmap(Graphics::TBitmap* Source, bool Pressed, Graphics::TBitmap* Target);
void __fastcall SetBitmap(Graphics::TBitmap* Value);
MESSAGE void __fastcall CMDialogChar(Messages::TWMKey &Message);
HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMTextChanged(Messages::TMessage &Message);
MESSAGE void __fastcall CMSysColorChange(Messages::TMessage &Message);
bool __fastcall PtInMask(const int X, const int Y);
void __fastcall BitmapChanged(System::TObject* Sender);
protected:
virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
DYNAMIC HPALETTE __fastcall GetPalette(void);
virtual void __fastcall Loaded(void);
void __fastcall CreateMaskBitmap(void);
DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X,
int Y);
DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int
Y);
virtual void __fastcall Paint(void);
DYNAMIC void __fastcall Click(void);
virtual void __fastcall ReadBitmapData(Classes::TStream* Stream);
virtual void __fastcall WriteBitmapData(Classes::TStream* Stream);
public:
__fastcall virtual TVrShapeBtn(Classes::TComponent* AOwner);
__fastcall virtual ~TVrShapeBtn(void);
virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
__published:
__property Graphics::TBitmap* Bitmap = {read=FBitmap, write=SetBitmap};
__property Transparent ;
__property Anchors ;
__property Constraints ;
__property Caption ;
__property Color ;
__property DragCursor ;
__property DragKind ;
__property DragMode ;
__property Enabled ;
__property Font ;
__property ParentColor ;
__property ParentFont ;
__property ParentShowHint ;
__property PopupMenu ;
__property ShowHint ;
__property Visible ;
__property OnClick ;
__property OnContextPopup ;
__property OnDragDrop ;
__property OnDragOver ;
__property OnEndDock ;
__property OnEndDrag ;
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property OnStartDock ;
__property OnStartDrag ;
};
//-- var, const, procedure ---------------------------------------------------
} /* namespace Vrbuttons */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Vrbuttons;
#endif
#pragma option pop // -w-
#pragma option pop // -Vx
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // VrButtons
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -