advtrackbar.hpp

来自「TMSPack基本上涵盖了Delphi所有的基础控件」· HPP 代码 · 共 1,003 行 · 第 1/4 页

HPP
1,003
字号
	Gdipicture::TGDIPPicture* FIMinPictureDown;
	Classes::TNotifyEvent FOnChange;
	TTrackButtonShape FShape;
	Graphics::TColor FColorMirror;
	Graphics::TColor FColorMirrorTo;
	Graphics::TColor FColorMirrorHot;
	Graphics::TColor FColorMirrorDownTo;
	Graphics::TColor FColorMirrorHotTo;
	Graphics::TColor FColorMirrorDown;
	TGDIPGradient FGradientMirror;
	TGDIPGradient FGradient;
	int FCornerRadius;
	bool FRepeatClick;
	int FInitRepeatPause;
	int FRepeatPause;
	int FSize;
	TCustomTrackBar* FAdvTrackBar;
	int FSpacing;
	bool FRotateText;
	void __fastcall PictureChanged(System::TObject* Sender);
	void __fastcall SetBorderColor(const Graphics::TColor Value);
	void __fastcall SetBorderColorDown(const Graphics::TColor Value);
	void __fastcall SetBorderColorHot(const Graphics::TColor Value);
	void __fastcall SetColor(const Graphics::TColor Value);
	void __fastcall SetColorDown(const Graphics::TColor Value);
	void __fastcall SetColorDownTo(const Graphics::TColor Value);
	void __fastcall SetColorHot(const Graphics::TColor Value);
	void __fastcall SetColorHotTo(const Graphics::TColor Value);
	void __fastcall SetColorTo(const Graphics::TColor Value);
	void __fastcall SetMaxPicture(const Gdipicture::TGDIPPicture* Value);
	void __fastcall SetMaxPictureDown(const Gdipicture::TGDIPPicture* Value);
	void __fastcall SetMaxPictureHot(const Gdipicture::TGDIPPicture* Value);
	void __fastcall SetMinPicture(const Gdipicture::TGDIPPicture* Value);
	void __fastcall SetMinPictureDown(const Gdipicture::TGDIPPicture* Value);
	void __fastcall SetMinPictureHot(const Gdipicture::TGDIPPicture* Value);
	void __fastcall SetVisible(const bool Value);
	void __fastcall SetShape(const TTrackButtonShape Value);
	void __fastcall SetCornerRadius(const int Value);
	void __fastcall SetSize(const int Value);
	void __fastcall SetGradient(const TGDIPGradient Value);
	void __fastcall SetGradientMirror(const TGDIPGradient Value);
	void __fastcall SetSpacing(const int Value);
	void __fastcall SetRotateText(const bool Value);
	
protected:
	void __fastcall Changed(void);
	__property int CornerRadius = {read=FCornerRadius, write=SetCornerRadius, nodefault};
	__property TCustomTrackBar* AdvTrackBar = {read=FAdvTrackBar, write=FAdvTrackBar};
	
public:
	__fastcall TTrackBarButtons(void);
	__fastcall virtual ~TTrackBarButtons(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	
__published:
	__property Graphics::TColor BorderColor = {read=FBorderColor, write=SetBorderColor, nodefault};
	__property Graphics::TColor BorderColorHot = {read=FBorderColorHot, write=SetBorderColorHot, nodefault};
	__property Graphics::TColor BorderColorDown = {read=FBorderColorDown, write=SetBorderColorDown, nodefault};
	__property Graphics::TColor Color = {read=FColor, write=SetColor, nodefault};
	__property Graphics::TColor ColorTo = {read=FColorTo, write=SetColorTo, nodefault};
	__property Graphics::TColor ColorHot = {read=FColorHot, write=SetColorHot, nodefault};
	__property Graphics::TColor ColorHotTo = {read=FColorHotTo, write=SetColorHotTo, nodefault};
	__property Graphics::TColor ColorDown = {read=FColorDown, write=SetColorDown, nodefault};
	__property Graphics::TColor ColorDownTo = {read=FColorDownTo, write=SetColorDownTo, nodefault};
	__property Graphics::TColor ColorMirror = {read=FColorMirror, write=FColorMirror, default=12632256};
	__property Graphics::TColor ColorMirrorTo = {read=FColorMirrorTo, write=FColorMirrorTo, default=16777215};
	__property Graphics::TColor ColorMirrorHot = {read=FColorMirrorHot, write=FColorMirrorHot, nodefault};
	__property Graphics::TColor ColorMirrorHotTo = {read=FColorMirrorHotTo, write=FColorMirrorHotTo, nodefault};
	__property Graphics::TColor ColorMirrorDown = {read=FColorMirrorDown, write=FColorMirrorDown, nodefault};
	__property Graphics::TColor ColorMirrorDownTo = {read=FColorMirrorDownTo, write=FColorMirrorDownTo, nodefault};
	__property TGDIPGradient Gradient = {read=FGradient, write=SetGradient, default=1};
	__property TGDIPGradient GradientMirror = {read=FGradientMirror, write=SetGradientMirror, nodefault};
	__property Gdipicture::TGDIPPicture* MinPicture = {read=FIMinPicture, write=SetMinPicture};
	__property Gdipicture::TGDIPPicture* MinPictureHot = {read=FIMinPictureHot, write=SetMinPictureHot};
	__property Gdipicture::TGDIPPicture* MinPictureDown = {read=FIMinPictureDown, write=SetMinPictureDown};
	__property Gdipicture::TGDIPPicture* MaxPicture = {read=FIMaxPicture, write=SetMaxPicture};
	__property Gdipicture::TGDIPPicture* MaxPictureHot = {read=FIMaxPictureHot, write=SetMaxPictureHot};
	__property Gdipicture::TGDIPPicture* MaxPictureDown = {read=FIMaxPictureDown, write=SetMaxPictureDown};
	__property int InitRepeatPause = {read=FInitRepeatPause, write=FInitRepeatPause, default=400};
	__property int RepeatPause = {read=FRepeatPause, write=FRepeatPause, default=100};
	__property bool RepeatClick = {read=FRepeatClick, write=FRepeatClick, default=1};
	__property bool RotateText = {read=FRotateText, write=SetRotateText, default=1};
	__property bool Visible = {read=FVisible, write=SetVisible, default=0};
	__property int Size = {read=FSize, write=SetSize, default=20};
	__property TTrackButtonShape Shape = {read=FShape, write=SetShape, default=0};
	__property int Spacing = {read=FSpacing, write=SetSpacing, default=2};
	__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
};


typedef void __fastcall (__closure *TGetTrackHintEvent)(System::TObject* Sender, int Position, AnsiString &HintStr);

class DELPHICLASS TTrackHintWindow;
class PASCALIMPLEMENTATION TTrackHintWindow : public Controls::THintWindow 
{
	typedef Controls::THintWindow inherited;
	
private:
	int FTextHeight;
	int FTextWidth;
	HIDESBASE MESSAGE void __fastcall CMTextChanged(Messages::TMessage &Message);
	
protected:
	virtual void __fastcall Paint(void);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	
public:
	virtual void __fastcall ActivateHint(const Types::TRect &Rect, const AnsiString AHint);
	virtual Types::TRect __fastcall CalcHintRect(int MaxWidth, const AnsiString AHint, void * AData);
public:
	#pragma option push -w-inl
	/* THintWindow.Create */ inline __fastcall virtual TTrackHintWindow(Classes::TComponent* AOwner) : Controls::THintWindow(AOwner) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TCustomControl.Destroy */ inline __fastcall virtual ~TTrackHintWindow(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TTrackHintWindow(HWND ParentWindow) : Controls::THintWindow(ParentWindow) { }
	#pragma option pop
	
};


class DELPHICLASS TTrackBarLabel;
class PASCALIMPLEMENTATION TTrackBarLabel : public Classes::TPersistent 
{
	typedef Classes::TPersistent inherited;
	
private:
	bool FVisible;
	AnsiString FFormat;
	Graphics::TFont* FFont;
	TLabelPosition FPosition;
	Classes::TNotifyEvent FOnChange;
	int FSpacing;
	void __fastcall SetFont(const Graphics::TFont* Value);
	void __fastcall SetFormat(const AnsiString Value);
	void __fastcall SetPosition(const TLabelPosition Value);
	void __fastcall SetVisible(const bool Value);
	void __fastcall Changed(void);
	void __fastcall OnFontChanged(System::TObject* Sender);
	void __fastcall SetSpacing(const int Value);
	
protected:
	__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
	
public:
	__fastcall TTrackBarLabel(void);
	__fastcall virtual ~TTrackBarLabel(void);
	virtual void __fastcall Assign(Classes::TPersistent* Source);
	
__published:
	__property bool Visible = {read=FVisible, write=SetVisible, default=0};
	__property TLabelPosition Position = {read=FPosition, write=SetPosition, default=0};
	__property Graphics::TFont* Font = {read=FFont, write=SetFont};
	__property AnsiString Format = {read=FFormat, write=SetFormat};
	__property int Spacing = {read=FSpacing, write=SetSpacing, default=4};
};


class PASCALIMPLEMENTATION TCustomTrackBar : public Controls::TCustomControl 
{
	typedef Controls::TCustomControl inherited;
	
private:
	TTrackBarThumb* FThumb;
	TTrackBarSlider* FSlider;
	TTrackBarTick* FTickMark;
	int FMax;
	int FMin;
	Comctrls::TTrackBarOrientation FOrientation;
	int FPageSize;
	int FPosition;
	bool FSliding;
	Classes::TNotifyEvent FOnChange;
	TDrawTickEvent FOnDrawTick;
	Graphics::TColor FColorDisabled;
	Graphics::TColor FColorTo;
	Graphics::TColor FBorderColorDisabled;
	Graphics::TColor FBorderColor;
	Graphics::TColor FColorDisabledTo;
	Gdipicture::TGDIPPicture* FIBackGround;
	TGradientDirection FDirection;
	bool FTransparent;
	int FSliderTickOffset;
	int FOffset;
	int FTickTextOffset;
	bool FThumbHot;
	bool FThumbDown;
	Imglist::TCustomImageList* FImages;
	Gdipicture::TGDIPPicture* FIRateInActive;
	Gdipicture::TGDIPPicture* FIRateActive;
	Gdipicture::TGDIPPicture* FIBackGroundDisabled;
	TTrackBarButtons* FButtons;
	int FBorderWidth;
	bool FMinButtonHot;
	bool FMinButtonDown;
	bool FMaxButtonHot;
	bool FMaxButtonDown;
	int FTextHeight;
	Extctrls::TTimer* FRepeatTimer;
	bool FTrackHint;
	TGetTrackHintEvent FOnGetTrackHint;
	bool FBackGroundStretched;
	int FHintTickIndex;
	TTrackHintWindow* FTrackHintWnd;
	bool FTrackHintShow;
	bool FShowFocus;
	TTrackBarLabel* FTrackLabel;
	MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Msg);
	HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Msg);
	HIDESBASE MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Msg);
	HIDESBASE MESSAGE void __fastcall WMEraseBkGnd(Messages::TWMEraseBkgnd &Message);
	HIDESBASE MESSAGE void __fastcall CMFocusChanged(Controls::TCMFocusChanged &Message);
	HIDESBASE MESSAGE void __fastcall CMMouseEnter(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Msg);
	HIDESBASE MESSAGE void __fastcall CMHintShow(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMMouseWheel(Messages::TWMMouseWheel &Message);
	void __fastcall BackGroundChanged(System::TObject* Sender);
	void __fastcall OnThumbChanged(System::TObject* Sender);
	void __fastcall OnSliderChanged(System::TObject* Sender);
	void __fastcall OnTickMarkChanged(System::TObject* Sender);
	void __fastcall OnRatePictureChanged(System::TObject* Sender);
	void __fastcall OnButtonsChanged(System::TObject* Sender);
	void __fastcall OnTrackLabelChanged(System::TObject* Sender);
	void __fastcall SetMax(int Value);
	void __fastcall SetMin(int Value);
	void __fastcall SetOrientation(Comctrls::TTrackBarOrientation Value);
	void __fastcall SetBorderColor(const Graphics::TColor Value);
	void __fastcall SetBorderColorDisabled(const Graphics::TColor Value);
	void __fastcall SetColorDisabled(const Graphics::TColor Value);
	void __fastcall SetColorDisabledTo(const Graphics::TColor Value);
	void __fastcall SetColorTo(const Graphics::TColor Value);
	void __fastcall SetDirection(const TGradientDirection Value);
	void __fastcall SetBackGround(const Gdipicture::TGDIPPicture* Value);
	void __fastcall SetTransparent(const bool Value);
	void __fastcall SetSlider(const TTrackBarSlider* Value);
	void __fastcall SetThumb(const TTrackBarThumb* Value);
	void __fastcall SetTickMark(const TTrackBarTick* Value);
	void __fastcall SetImages(const Imglist::TCustomImageList* Value);
	void __fastcall SetRateActive(const Gdipicture::TGDIPPicture* Value);
	void __fastcall SetRateInActive(const Gdipicture::TGDIPPicture* Value);
	void __fastcall SetBackGroundDisabled(const Gdipicture::TGDIPPicture* Value);
	void __fastcall SetButtons(const TTrackBarButtons* Value);
	HIDESBASE void __fastcall SetBorderWidth(const int Value);
	void __fastcall SetBackGroundStretched(const bool Value);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?