⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 htmlstatusbar.hpp

📁 一个非常棒的控件.做商业软件特别适用.里面的控件涉及面非常的广,有兴趣的话可以下来用用就知道了.
💻 HPP
📖 第 1 页 / 共 2 页
字号:
	__property bool CompletionSmooth = {read=FCompletionSmooth, write=SetCompletionSmooth, default=0};
	__property AnsiString Suffix = {read=FSuffix, write=SetSuffix};
	__property AnsiString Prefix = {read=FPrefix, write=SetPrefix};
	__property bool ShowGradient = {read=FShowGradient, write=SetShowGradient, default=1};
};


class DELPHICLASS THTMLStatusPanels;
class DELPHICLASS THTMLStatusBar;
typedef void __fastcall (__closure *TDrawPanelEvent)(THTMLStatusBar* StatusBar, THTMLStatusPanel* Panel, const Types::TRect &Rect);

class PASCALIMPLEMENTATION THTMLStatusBar : public Controls::TWinControl 
{
	typedef Controls::TWinControl inherited;
	
private:
	THTMLStatusPanels* FPanels;
	Graphics::TCanvas* FCanvas;
	AnsiString FSimpleText;
	bool FSimplePanel;
	bool FSizeGrip;
	bool FUseSystemFont;
	bool FAutoHint;
	TDrawPanelEvent FOnDrawPanel;
	Classes::TNotifyEvent FOnHint;
	Graphics::TColor FURLColor;
	int FTimerID;
	int FTimerCount;
	Controls::TImageList* FImages;
	int FMousePanel;
	AnsiString FAnchor;
	bool FAnchorHint;
	TAnchorClick FAnchorClick;
	TAnchorClick FAnchorEnter;
	TAnchorClick FAnchorExit;
	TPanelClick FOnPanelClick;
	TPanelClick FOnPanelDblClick;
	TPanelClick FOnPanelRightClick;
	Picturecontainer::TPictureContainer* FContainer;
	AnsiString __fastcall IsAnchor(int x, int y);
	int __fastcall GetPanel(int x);
	void __fastcall DoRightToLeftAlignment(AnsiString &Str, Classes::TAlignment AAlignment, bool ARTLAlignment);
	HIDESBASE bool __fastcall IsFontStored(void);
	void __fastcall SetPanels(THTMLStatusPanels* Value);
	void __fastcall SetSimplePanel(bool Value);
	void __fastcall UpdateSimpleText(void);
	void __fastcall SetSimpleText(const AnsiString Value);
	void __fastcall SetSizeGrip(bool Value);
	void __fastcall SyncToSystemFont(void);
	void __fastcall UpdatePanel(int Index, bool Repaint);
	void __fastcall UpdatePanels(bool UpdateRects, bool UpdateText);
	HIDESBASE MESSAGE void __fastcall CMBiDiModeChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMColorChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMHintShow(Messages::TMessage &Msg);
	HIDESBASE MESSAGE void __fastcall CMParentFontChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMSysColorChange(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMWinIniChange(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMSysFontChanged(Messages::TMessage &Message);
	MESSAGE void __fastcall CNDrawItem(Messages::TWMDrawItem &Message);
	MESSAGE void __fastcall WMGetTextLength(Messages::TWMNoParams &Message);
	HIDESBASE MESSAGE void __fastcall WMPaint(Messages::TWMPaint &Message);
	HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
	MESSAGE void __fastcall WMTimer(Messages::TWMTimer &Msg);
	HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
	void __fastcall SetUseSystemFont(const bool Value);
	void __fastcall SetImages(const Controls::TImageList* Value);
	AnsiString __fastcall GetVersion();
	void __fastcall SetVersion(const AnsiString Value);
	int __fastcall GetVersionNr(void);
	
protected:
	virtual void __fastcall UpdateStatusBar(void);
	DYNAMIC void __fastcall ChangeScale(int M, int D);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	virtual void __fastcall CreateWnd(void);
	virtual void __fastcall DestroyWnd(void);
	virtual void __fastcall Loaded(void);
	virtual bool __fastcall DoHint(void);
	DYNAMIC void __fastcall DrawPanel(THTMLStatusPanel* Panel, const Types::TRect &Rect);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation AOperation);
	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);
	
public:
	__fastcall virtual THTMLStatusBar(Classes::TComponent* AOwner);
	__fastcall virtual ~THTMLStatusBar(void);
	DYNAMIC bool __fastcall ExecuteAction(Classes::TBasicAction* Action);
	DYNAMIC void __fastcall FlipChildren(bool AllLevels);
	__property Graphics::TCanvas* Canvas = {read=FCanvas};
	__property int PanelIndex[int x] = {read=GetPanel};
	
__published:
	__property Action ;
	__property Anchors  = {default=3};
	__property BiDiMode ;
	__property BorderWidth  = {default=0};
	__property DragKind  = {default=0};
	__property Constraints ;
	__property ParentBiDiMode  = {default=1};
	__property bool AnchorHint = {read=FAnchorHint, write=FAnchorHint, nodefault};
	__property bool AutoHint = {read=FAutoHint, write=FAutoHint, default=0};
	__property Align  = {default=2};
	__property Color  = {default=-16777201};
	__property DragCursor  = {default=-12};
	__property DragMode  = {default=0};
	__property Enabled  = {default=1};
	__property Font  = {stored=IsFontStored};
	__property Controls::TImageList* Images = {read=FImages, write=SetImages};
	__property THTMLStatusPanels* Panels = {read=FPanels, write=SetPanels};
	__property ParentColor  = {default=0};
	__property ParentFont  = {default=0};
	__property ParentShowHint  = {default=1};
	__property Picturecontainer::TPictureContainer* PictureContainer = {read=FContainer, write=FContainer};
	__property PopupMenu ;
	__property ShowHint ;
	__property bool SimplePanel = {read=FSimplePanel, write=SetSimplePanel, nodefault};
	__property AnsiString SimpleText = {read=FSimpleText, write=SetSimpleText};
	__property bool SizeGrip = {read=FSizeGrip, write=SetSizeGrip, default=1};
	__property Graphics::TColor URLColor = {read=FURLColor, write=FURLColor, nodefault};
	__property bool UseSystemFont = {read=FUseSystemFont, write=SetUseSystemFont, default=1};
	__property Visible  = {default=1};
	__property OnClick ;
	__property OnContextPopup ;
	__property OnDblClick ;
	__property OnDragDrop ;
	__property OnDragOver ;
	__property OnEndDock ;
	__property OnStartDock ;
	__property OnResize ;
	__property OnEndDrag ;
	__property Classes::TNotifyEvent OnHint = {read=FOnHint, write=FOnHint};
	__property OnMouseDown ;
	__property OnMouseMove ;
	__property OnMouseUp ;
	__property TDrawPanelEvent OnDrawPanel = {read=FOnDrawPanel, write=FOnDrawPanel};
	__property TPanelClick OnPanelClick = {read=FOnPanelClick, write=FOnPanelClick};
	__property TPanelClick OnPanelRightClick = {read=FOnPanelRightClick, write=FOnPanelRightClick};
	__property TPanelClick OnPanelDblClick = {read=FOnPanelDblClick, write=FOnPanelDblClick};
	__property OnStartDrag ;
	__property TAnchorClick OnAnchorClick = {read=FAnchorClick, write=FAnchorClick};
	__property TAnchorClick OnAnchorEnter = {read=FAnchorEnter, write=FAnchorEnter};
	__property TAnchorClick OnAnchorExit = {read=FAnchorExit, write=FAnchorExit};
	__property AnsiString Version = {read=GetVersion, write=SetVersion};
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall THTMLStatusBar(HWND ParentWindow) : Controls::TWinControl(ParentWindow) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION THTMLStatusPanels : public Classes::TCollection 
{
	typedef Classes::TCollection inherited;
	
public:
	THTMLStatusPanel* operator[](int Index) { return Items[Index]; }
	
private:
	THTMLStatusBar* FStatusBar;
	HIDESBASE THTMLStatusPanel* __fastcall GetItem(int Index);
	HIDESBASE void __fastcall SetItem(int Index, THTMLStatusPanel* Value);
	
protected:
	DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
	virtual void __fastcall Update(Classes::TCollectionItem* Item);
	
public:
	__fastcall THTMLStatusPanels(THTMLStatusBar* StatusBar);
	HIDESBASE THTMLStatusPanel* __fastcall Add(void);
	__property THTMLStatusPanel* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
public:
	#pragma option push -w-inl
	/* TCollection.Destroy */ inline __fastcall virtual ~THTMLStatusPanels(void) { }
	#pragma option pop
	
};


struct TGaugeSettings
{
	
public:
	Graphics::TColor Level0Color;
	Graphics::TColor Level0ColorTo;
	Graphics::TColor Level1Color;
	Graphics::TColor Level1ColorTo;
	Graphics::TColor Level2Color;
	Graphics::TColor Level2ColorTo;
	Graphics::TColor Level3Color;
	Graphics::TColor Level3ColorTo;
	int Level1Perc;
	int Level2Perc;
	Graphics::TColor BorderColor;
	bool ShowBorder;
	bool Stacked;
	bool ShowPercentage;
	Graphics::TFont* Font;
	bool CompletionSmooth;
	bool ShowGradient;
	int Steps;
	int Position;
	Graphics::TColor BackgroundColor;
	TGaugeOrientation Orientation;
	bool IsPercent;
	AnsiString Suffix;
	AnsiString Prefix;
} ;

//-- var, const, procedure ---------------------------------------------------
static const Shortint MAJ_VER = 0x1;
static const Shortint MIN_VER = 0x3;
static const Shortint REL_VER = 0x0;
static const Shortint BLD_VER = 0x1;
extern PACKAGE void __fastcall DrawRectangle(Graphics::TCanvas* Canvas, const Types::TRect &R, Graphics::TColor aColor);
extern PACKAGE void __fastcall DrawGradient(Graphics::TCanvas* Canvas, Graphics::TColor FromColor, Graphics::TColor ToColor, int Steps, const Types::TRect &R, bool Direction);
extern PACKAGE void __fastcall DivideInSegment(Graphics::TCanvas* Canvas, const Types::TRect &R, int Position);
extern PACKAGE void __fastcall DrawGauge(Graphics::TCanvas* Canvas, const Types::TRect &R, int Position, const TGaugeSettings &Settings);

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

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

⌨️ 快捷键说明

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