advofficestatusbar.hpp
来自「TMSPack基本上涵盖了Delphi所有的基础控件」· HPP 代码 · 共 696 行 · 第 1/3 页
HPP
696 行
Controls::TImageList* FDisabledImages;
Advgdip::TAntiAlias FAntiAlias;
int FStretchPanel;
#pragma pack(push,1)
Types::TPoint FHitTest;
#pragma pack(pop)
int FSizePanel;
int FSizeDownX;
int FSizeWidth;
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);
int __fastcall PanelFixedSize(void);
int __fastcall OnPanelBorder(int x);
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 WMSetCursor(Messages::TWMSetCursor &Msg);
HIDESBASE MESSAGE void __fastcall CMDesignHitTest(Messages::TWMMouse &Msg);
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);
void __fastcall SetAntiAlias(const Advgdip::TAntiAlias 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);
void __fastcall AutoSizePanels(void);
void __fastcall SetStretchPanel(const int Value);
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 Advgdip::TAntiAlias AntiAlias = {read=FAntiAlias, write=SetAntiAlias, default=1};
__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 int StretchPanel = {read=FStretchPanel, write=SetStretchPanel, default=-1};
__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 = 0x2;
static const Shortint REL_VER = 0x0;
static const Shortint BLD_VER = 0x4;
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 + =
减小字号Ctrl + -
显示快捷键?