📄 advofficestatusbar.hpp
字号:
void __fastcall SetColorMirrorTo(const Graphics::TColor Value);
void __fastcall SetTextColor(const Graphics::TColor Value);
void __fastcall SetTextStyle(const Graphics::TFontStyles Value);
void __fastcall SetBorderColorDown(const Graphics::TColor Value);
void __fastcall SetBorderColorHot(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 SetColorMirrorDown(const Graphics::TColor Value);
void __fastcall SetColorMirrorDownTo(const Graphics::TColor Value);
void __fastcall SetColorMirrorHot(const Graphics::TColor Value);
void __fastcall SetColorMirrorHotTo(const Graphics::TColor Value);
void __fastcall SetTextColorDown(const Graphics::TColor Value);
void __fastcall SetTextColorHot(const Graphics::TColor Value);
public:
__fastcall TVistaBackground(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=SetColorMirror, nodefault};
__property Graphics::TColor ColorMirrorTo = {read=FColorMirrorTo, write=SetColorMirrorTo, nodefault};
__property Graphics::TColor ColorMirrorHot = {read=FColorMirrorHot, write=SetColorMirrorHot, nodefault};
__property Graphics::TColor ColorMirrorHotTo = {read=FColorMirrorHotTo, write=SetColorMirrorHotTo, nodefault};
__property Graphics::TColor ColorMirrorDown = {read=FColorMirrorDown, write=SetColorMirrorDown, nodefault};
__property Graphics::TColor ColorMirrorDownTo = {read=FColorMirrorDownTo, write=SetColorMirrorDownTo, nodefault};
__property int Steps = {read=FSteps, write=SetSteps, default=64};
__property Graphics::TColor TextColor = {read=FTextColor, write=SetTextColor, nodefault};
__property Graphics::TColor TextColorHot = {read=FTextColorHot, write=SetTextColorHot, nodefault};
__property Graphics::TColor TextColorDown = {read=FTextColorDown, write=SetTextColorDown, nodefault};
__property Graphics::TFontStyles TextStyle = {read=FTextStyle, write=SetTextStyle, nodefault};
__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
public:
#pragma option push -w-inl
/* TPersistent.Destroy */ inline __fastcall virtual ~TVistaBackground(void) { }
#pragma option pop
};
class PASCALIMPLEMENTATION TCustomAdvOfficeStatusBarStyler : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
TDbgList* FControlList;
bool FAutoThemeAdapt;
int FBlendFactor;
TVistaBackground* FPanelAppearanceLight;
TVistaBackground* FPanelAppearanceDark;
Graphics::TColor FBorderColor;
void __fastcall OnPanelAppearanceChanged(System::TObject* Sender);
void __fastcall SetPanelAppearanceLight(const TVistaBackground* Value);
void __fastcall SetPanelAppearanceDark(const TVistaBackground* Value);
void __fastcall SetBorderColor(const Graphics::TColor Value);
protected:
void __fastcall AddControl(Controls::TWinControl* AControl);
void __fastcall RemoveControl(Controls::TWinControl* AControl);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation);
void __fastcall Change(int PropID);
__property int BlendFactor = {read=FBlendFactor, write=FBlendFactor, nodefault};
__property bool AutoThemeAdapt = {read=FAutoThemeAdapt, write=FAutoThemeAdapt, default=0};
__property Graphics::TColor BorderColor = {read=FBorderColor, write=SetBorderColor, nodefault};
__property TVistaBackground* PanelAppearanceLight = {read=FPanelAppearanceLight, write=SetPanelAppearanceLight};
__property TVistaBackground* PanelAppearanceDark = {read=FPanelAppearanceDark, write=SetPanelAppearanceDark};
public:
__fastcall virtual TCustomAdvOfficeStatusBarStyler(Classes::TComponent* AOwner);
__fastcall virtual ~TCustomAdvOfficeStatusBarStyler(void);
virtual void __fastcall Loaded(void);
virtual void __fastcall Assign(Classes::TPersistent* Source);
};
typedef void __fastcall (__closure *TDrawPanelEvent)(TAdvOfficeStatusBar* StatusBar, TAdvOfficeStatusPanel* Panel, const Types::TRect &Rect);
class PASCALIMPLEMENTATION TAdvOfficeStatusBar : public Controls::TCustomControl
{
typedef Controls::TCustomControl inherited;
private:
TCustomAdvOfficeStatusBarStyler* FInternalOfficeStatusBarStyler;
TCustomAdvOfficeStatusBarStyler* FOfficeStatusBarStyler;
TCustomAdvOfficeStatusBarStyler* FCurrentOfficeStatusBarStyler;
TAdvOfficeStatusPanels* FPanels;
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;
int FHotPanelIndex;
int FDownPanelIndex;
TDummyHintControl* FDummyHintControl;
Controls::TImageList* FDisabledImages;
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(TAdvOfficeStatusPanels* 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 DrawPanelBackGround(TAdvOfficeStatusPanel* Panel, const Types::TRect &R);
void __fastcall DrawSimplePanel(void);
void __fastcall DrawAllPanels(void);
void __fastcall DrawSizeGrip(const Types::TRect &R);
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 WMGetTextLength(Messages::TWMNoParams &Message);
HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
MESSAGE void __fastcall WMTimer(Messages::TWMTimer &Msg);
HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
HIDESBASE MESSAGE void __fastcall WMEraseBkGnd(Messages::TWMEraseBkgnd &Message);
HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TWMNCHitTest &Msg);
HIDESBASE MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMMouseEnter(Messages::TMessage &Msg);
void __fastcall OnPanelsChanged(System::TObject* Sender);
void __fastcall SetUseSystemFont(const bool Value);
void __fastcall SetImages(const Controls::TImageList* Value);
void __fastcall SetOfficeStatusBarStyler(const TCustomAdvOfficeStatusBarStyler* Value);
AnsiString __fastcall GetVersion();
void __fastcall SetVersion(const AnsiString Value);
int __fastcall GetVersionNr(void);
void __fastcall SetDisabledImages(const Controls::TImageList* Value);
protected:
virtual void __fastcall Paint(void);
void __fastcall UpdateMe(int PropID);
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(TAdvOfficeStatusPanel* Panel, const Types::TRect &Rect);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation AOperation);
DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
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);
Types::TRect __fastcall GetSimplePanelRect();
Types::TRect __fastcall GetPanelRect(int Index);
int __fastcall IndexOfPanel(TAdvOfficeStatusPanel* Panel);
bool __fastcall IsFirstPanel(TAdvOfficeStatusPanel* Panel);
bool __fastcall IsLastPanel(TAdvOfficeStatusPanel* Panel);
bool __fastcall HasSizeGrip(void);
void __fastcall InvalidatePanel(int PanelIndex);
public:
__fastcall virtual TAdvOfficeStatusBar(Classes::TComponent* AOwner);
__fastcall virtual ~TAdvOfficeStatusBar(void);
DYNAMIC bool __fastcall ExecuteAction(Classes::TBasicAction* Action);
DYNAMIC void __fastcall FlipChildren(bool AllLevels);
__property int PanelIndex[int x] = {read=GetPanel};
__property Canvas ;
__published:
__property Action ;
__property Anchors = {default=3};
__property BiDiMode ;
__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 Controls::TImageList* DisabledImages = {read=FDisabledImages, write=SetDisabledImages};
__property TAdvOfficeStatusPanels* 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 TCustomAdvOfficeStatusBarStyler* Styler = {read=FOfficeStatusBarStyler, write=SetOfficeStatusBarStyler};
__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 TAdvOfficeStatusBar(HWND ParentWindow) : Controls::TCustomControl(ParentWindow) { }
#pragma option pop
};
class PASCALIMPLEMENTATION TAdvOfficeStatusPanels : public Classes::TCollection
{
typedef Classes::TCollection inherited;
public:
TAdvOfficeStatusPanel* operator[](int Index) { return Items[Index]; }
private:
TAdvOfficeStatusBar* FStatusBar;
Classes::TNotifyEvent FOnChange;
HIDESBASE TAdvOfficeStatusPanel* __fastcall GetItem(int Index);
HIDESBASE void __fastcall SetItem(int Index, TAdvOfficeStatusPanel* Value);
protected:
DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
virtual void __fastcall Update(Classes::TCollectionItem* Item);
void __fastcall Change(void);
__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
public:
__fastcall TAdvOfficeStatusPanels(TAdvOfficeStatusBar* StatusBar);
HIDESBASE TAdvOfficeStatusPanel* __fastcall Add(void);
__property TAdvOfficeStatusPanel* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
public:
#pragma option push -w-inl
/* TCollection.Destroy */ inline __fastcall virtual ~TAdvOfficeStatusPanels(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;
AnsiString Text;
} ;
//-- var, const, procedure ---------------------------------------------------
static const Shortint MAJ_VER = 0x1;
static const Shortint MIN_VER = 0x0;
static const Shortint REL_VER = 0x1;
static const Shortint BLD_VER = 0x0;
static const Shortint GRIP_SIZE = 0xf;
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, Graphics::TBitmap* BkBmp, const Types::TRect &OrgR, const TGaugeSettings &Settings);
extern PACKAGE void __fastcall DrawGauge(Graphics::TCanvas* Canvas, const Types::TRect &R, int Position, const TGaugeSettings &Settings);
} /* namespace Advofficestatusbar */
using namespace Advofficestatusbar;
#pragma pack(pop)
#pragma option pop
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // Advofficestatusbar
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -