📄 advtoolbar.hpp
字号:
__property bool UseBevel = {read=FUseBevel, write=SetUseBevel, default=0};
__property Graphics::TColor BorderColor = {read=FBorderColor, write=SetBorderColor, default=536870911
};
__property Graphics::TColor BorderColorHot = {read=FBorderColorHot, write=SetBorderColorHot, default=536870911
};
__property TGradientBackground* ColorHot = {read=FColorHot, write=SetColorHot};
__property Graphics::TFont* CaptionFont = {read=FCaptionFont, write=SetCaptionFont};
__property TContainerAppearance* ContainerAppearance = {read=FContainerAppearance, write=SetContainerAppearance
};
__property TVistaTextBackground* PagerCaption = {read=FPagerCaption, write=SetPagerCaption};
__property TTabAppearance* TabAppearance = {read=FTabAppearance, write=SetTabAppearance};
__property TVistaBackground* PageAppearance = {read=FPageAppearance, write=SetPageAppearance};
__property TGroupAppearance* GroupAppearance = {read=FGroupAppearance, write=SetGroupAppearance};
__property Advstyleif::TTMSStyle TMSStyle = {read=FTMSStyle, write=FTMSStyle, nodefault};
void __fastcall Change(int PropID);
void __fastcall LoadPropFromFile(TextFile &F);
void __fastcall SavePropToFile(TextFile &F);
public:
__fastcall virtual TCustomAdvToolBarStyler(Classes::TComponent* AOwner);
__fastcall virtual ~TCustomAdvToolBarStyler(void);
virtual void __fastcall Loaded(void);
void __fastcall AddControl(Controls::TCustomControl* AControl);
void __fastcall RemoveControl(Controls::TCustomControl* AControl);
virtual void __fastcall Assign(Classes::TPersistent* Source);
__property Advmenus::TCustomAdvMenuStyler* AdvMenuStyler = {read=FAdvMenuStyler, write=SetAdvMenuStyler
};
__property Advglowbutton::TGlowButtonAppearance* GlowButtonAppearance = {read=FGlowButtonAppearance
, write=SetGlowButtonAppearance};
__property Advglowbutton::TGlowButtonAppearance* CompactGlowButtonAppearance = {read=FCompactGlowButtonAppearance
, write=SetCompactGlowButtonAppearance};
};
typedef void __fastcall (__closure *TOnDeleteItemEvent)(System::TObject* Sender, int Index);
class DELPHICLASS TRowCollectionItem;
class DELPHICLASS TAdvCustomToolBar;
class PASCALIMPLEMENTATION TRowCollectionItem : public Classes::TCollectionItem
{
typedef Classes::TCollectionItem inherited;
private:
TDbgList* FToolBarList;
Windows::TRect FRowRect;
int __fastcall GetHeight(void);
Windows::TRect __fastcall GetRowRect();
protected:
int __fastcall GetSpace(TAdvCustomToolBar* FirstAdvToolBar, TAdvCustomToolBar* SecondAdvToolBar);
void __fastcall SetRowRect(const Windows::TRect &R);
__property TDbgList* ToolBarList = {read=FToolBarList};
public:
__fastcall virtual TRowCollectionItem(Classes::TCollection* Collection);
__fastcall virtual ~TRowCollectionItem(void);
void __fastcall ArrangeToolBars(void);
bool __fastcall IsAllowed(TAdvCustomToolBar* aAdvToolBar);
int __fastcall AddToolBar(TAdvCustomToolBar* aAdvToolBar);
void __fastcall RemoveToolBar(TAdvCustomToolBar* aAdvToolBar, bool DeleteIfEmpty);
void __fastcall SetToolBarLeftAndWidth(TAdvCustomToolBar* aAdvToolBar, int &ALeft, int &AWidth);
void __fastcall SetToolBarTopAndHeight(TAdvCustomToolBar* aAdvToolBar, int &ATop, int &AHeight);
__property int Height = {read=GetHeight, nodefault};
__property Windows::TRect RowRect = {read=GetRowRect};
};
class DELPHICLASS TRowCollection;
class DELPHICLASS TAdvDockPanel;
class DELPHICLASS TPersistence;
#pragma option push -b-
enum TPersistenceLocation { plRegistry, plIniFile };
#pragma option pop
class PASCALIMPLEMENTATION TPersistence : public Classes::TPersistent
{
typedef Classes::TPersistent inherited;
private:
Classes::TComponent* FOwner;
AnsiString FKey;
AnsiString FSection;
TPersistenceLocation FLocation;
bool FEnabled;
Classes::TNotifyEvent FOnChange;
void __fastcall SetEnabled(const bool Value);
void __fastcall SetKey(const AnsiString Value);
void __fastcall SetLocation(const TPersistenceLocation Value);
void __fastcall SetSection(const AnsiString Value);
protected:
void __fastcall Change(void);
public:
__fastcall TPersistence(Classes::TComponent* AOwner);
__fastcall virtual ~TPersistence(void);
virtual void __fastcall Assign(Classes::TPersistent* Source);
__published:
__property TPersistenceLocation Location = {read=FLocation, write=SetLocation, nodefault};
__property AnsiString Key = {read=FKey, write=SetKey};
__property AnsiString Section = {read=FSection, write=SetSection};
__property bool Enabled = {read=FEnabled, write=SetEnabled, nodefault};
__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
};
class PASCALIMPLEMENTATION TAdvDockPanel : public Controls::TCustomControl
{
typedef Controls::TCustomControl inherited;
private:
TCustomAdvToolBarStyler* FInternalToolBarStyler;
TCustomAdvToolBarStyler* FToolBarStyler;
TCustomAdvToolBarStyler* FCurrentToolBarStyler;
TDockAlign FDockAlign;
TRowCollection* FRows;
int FOffSetY;
int FOffSetX;
TDbgList* FToolBars;
TDbgList* FHiddenToolBars;
Graphics::TBitmap* FMyImage;
TPersistence* FPersistence;
int FMinimumSize;
bool FLockHeight;
bool FPropertiesLoaded;
bool FUseRunTimeHeight;
HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
HIDESBASE MESSAGE void __fastcall CMVisibleChanged(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMShowingChanged(Messages::TMessage &Message);
void __fastcall OnPersistenceChange(System::TObject* Sender);
void __fastcall SetToolBarStyler(const TCustomAdvToolBarStyler* Value);
TDockAlign __fastcall GetAlign(void);
HIDESBASE void __fastcall SetAlign(const TDockAlign Value);
int __fastcall GetAdvToolBarCount(void);
TAdvCustomToolBar* __fastcall GetAdvToolBars(int index);
int __fastcall GetRowCount(void);
void __fastcall SetPersistence(const TPersistence* Value);
AnsiString __fastcall GetVersion();
void __fastcall SetVersion(const AnsiString Value);
void __fastcall SetMinimumSize(const int Value);
Menus::TPopupMenu* __fastcall GetPopupMenuEx(void);
void __fastcall SetPopupMenuEx(const Menus::TPopupMenu* Value);
void __fastcall SetLockHeight(const bool Value);
void __fastcall SetUseRunTimeHeight(const bool Value);
protected:
void __fastcall UpdateMe(int PropID);
virtual void __fastcall AlignControls(Controls::TControl* AControl, Windows::TRect &ARect);
virtual void __fastcall CreateWnd(void);
virtual void __fastcall Loaded(void);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
virtual void __fastcall SetParent(Controls::TWinControl* AParent);
virtual void __fastcall Paint(void);
Graphics::TBitmap* __fastcall GetMyImage(void);
int __fastcall IsAllowedInAnyRow(TAdvCustomToolBar* aAdvToolBar);
int __fastcall AddToolBar(TAdvCustomToolBar* aAdvToolBar);
void __fastcall RemoveToolBar(TAdvCustomToolBar* aAdvToolBar);
void __fastcall UpdateToolBarVisibility(TAdvCustomToolBar* aAdvToolBar);
void __fastcall SetToolBarFullSize(TAdvCustomToolBar* aAdvToolBar);
void __fastcall SetToolBarBounds(TAdvCustomToolBar* aAdvToolBar, int &ALeft, int &ATop, int &AWidth
, int &AHeight);
__property TRowCollection* Rows = {read=FRows};
__property int OffSetX = {read=FOffSetX, default=1};
__property int OffSetY = {read=FOffSetY, default=0};
__property TDbgList* ToolBars = {read=FToolBars};
public:
__fastcall virtual TAdvDockPanel(Classes::TComponent* AOwner);
virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
__fastcall virtual ~TAdvDockPanel(void);
virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
void __fastcall SaveToolBarsPosition(void);
void __fastcall LoadToolBarsPosition(void);
int __fastcall GetVersionNr(void);
__property int RowCount = {read=GetRowCount, nodefault};
__property int AdvToolBarCount = {read=GetAdvToolBarCount, nodefault};
__property TAdvCustomToolBar* AdvToolBars[int index] = {read=GetAdvToolBars};
__published:
__property TDockAlign Align = {read=GetAlign, write=SetAlign, default=1};
__property int MinimumSize = {read=FMinimumSize, write=SetMinimumSize, nodefault};
__property bool LockHeight = {read=FLockHeight, write=SetLockHeight, nodefault};
__property TPersistence* Persistence = {read=FPersistence, write=SetPersistence};
__property Menus::TPopupMenu* PopupMenu = {read=GetPopupMenuEx, write=SetPopupMenuEx};
__property TCustomAdvToolBarStyler* ToolBarStyler = {read=FToolBarStyler, write=SetToolBarStyler};
__property bool UseRunTimeHeight = {read=FUseRunTimeHeight, write=SetUseRunTimeHeight, nodefault};
__property AnsiString Version = {read=GetVersion, write=SetVersion};
__property Visible ;
public:
#pragma option push -w-inl
/* TWinControl.CreateParented */ inline __fastcall TAdvDockPanel(HWND ParentWindow) : Controls::TCustomControl(
ParentWindow) { }
#pragma option pop
};
class PASCALIMPLEMENTATION TRowCollection : public Classes::TCollection
{
typedef Classes::TCollection inherited;
private:
TAdvDockPanel* FOwner;
Classes::TPersistent* FMyOwner;
Classes::TNotifyEvent FOnChange;
TOnDeleteItemEvent FOnDeleteItem;
int FOffSetY;
int FOffSetX;
void __fastcall SetParentSize(void);
HIDESBASE TRowCollectionItem* __fastcall GetItem(int Index);
HIDESBASE void __fastcall SetItem(int Index, const TRowCollectionItem* Value);
protected:
void __fastcall DeleteMeIfEmpty(TRowCollectionItem* AItem);
void __fastcall SetRowsPosition(void);
void __fastcall SetToolBarFullSize(TAdvCustomToolBar* aAdvToolBar);
void __fastcall UpdateToolBarVisibility(TAdvCustomToolBar* aAdvToolBar);
__property int OffSetX = {read=FOffSetX, default=2};
__property int OffSetY = {read=FOffSetY, default=1};
public:
__fastcall TRowCollection(TAdvDockPanel* AOwner);
__property TRowCollectionItem* Items[int Index] = {read=GetItem, write=SetItem/*, default*/};
HIDESBASE TRowCollectionItem* __fastcall Add(void);
HIDESBASE TRowCollectionItem* __fastcall Insert(int Index);
DYNAMIC Classes::TPersistent* __fastcall GetOwner(void);
__property Classes::TPersistent* Owner = {read=FMyOwner};
int __fastcall IsToolBarAlreadyAdded(TAdvCustomToolBar* aAdvToolBar);
void __fastcall SetToolBarTopAndHeight(TAdvCustomToolBar* aAdvToolBar, int &ATop, int &AHeight);
void __fastcall SetToolBarLeftAndWidth(TAdvCustomToolBar* aAdvToolBar, int &ALeft, int &AWidth);
void __fastcall MoveToolBarToRow(TAdvCustomToolBar* aAdvToolBar, int ARowIndex);
__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
__property TOnDeleteItemEvent OnDeleteItem = {read=FOnDeleteItem, write=FOnDeleteItem};
public:
#pragma option push -w-inl
/* TCollection.Destroy */ inline __fastcall virtual ~TRowCollection(void) { }
#pragma option pop
};
class DELPHICLASS TAdvCustomToolBarControl;
class PASCALIMPLEMENTATION TAdvCustomToolBarControl : public Controls::TGraphicControl
{
typedef Controls::TGraphicControl inherited;
private:
TAdvCustomToolBar* FAdvToolBar;
TDockAlign FPosition;
void __fastcall SetPosition(const TDockAlign Value);
protected:
virtual void __fastcall ReadState(Classes::TReader* Reader);
virtual void __fastcall SetAdvToolBar(const TAdvCustomToolBar* Value);
__property TDockAlign Position = {read=FPosition, write=SetPosition, nodefault};
public:
__fastcall virtual TAdvCustomToolBarControl(Classes::TComponent* AOwner);
__fastcall virtual ~TAdvCustomToolBarControl(void);
__property TAdvCustomToolBar* AdvToolBar = {read=FAdvToolBar, write=SetAdvToolBar};
};
#pragma option push -b-
enum TAdvToolButtonStyle { tasButton, tasCheck };
#pragma option pop
#pragma option push -b-
enum TAdvButtonState { absUp, absDisabled, absDown, absDropDown, absExclusive };
#pragma option pop
class DELPHICLASS TAdvToolBarButtonDrawPosition;
class PASCALIMPLEMENTATION TAdvToolBarButtonDrawPosition : public Classes::TPersistent
{
typedef Classes::TPersistent inherited;
private:
bool FEnabled;
int FTextX;
int FTextY;
int FImageX;
int FImageY;
Classes::TNotifyEvent FOnChange;
void __fastcall SetEnabled(const bool Value);
void __fastcall SetImageX(const int Value);
void __fastcall SetImageY(const int Value);
void __fastcall SetTextX(const int Value);
void __fastcall SetTextY(const int Value);
protected:
void __fastcall Changed(void);
public:
__fastcall TAdvToolBarButtonDrawPosition(void);
virtual void __fastcall Assign(Classes::TPersistent* Source);
__published:
__property bool Enabled = {read=FEnabled, write=SetEnabled, default=0};
__property int TextX = {read=FTextX, write=SetTextX, default=0};
__property int TextY = {read=FTextY, write=SetTextY, default=0};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -