📄 advofficepager.hpp
字号:
HIDESBASE MESSAGE void __fastcall CMMouseEnter(Messages::TMessage &Msg);
HIDESBASE MESSAGE void __fastcall CMDesignHitTest(Messages::TWMMouse &Msg);
HIDESBASE MESSAGE void __fastcall CMHintShow(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TWMNCHitTest &Msg);
HIDESBASE MESSAGE void __fastcall CMDialogChar(Messages::TWMKey &Message);
HIDESBASE MESSAGE void __fastcall WMKeyDown(Messages::TWMKey &Message);
HIDESBASE MESSAGE void __fastcall CMDialogKey(Messages::TWMKey &Message);
MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMSetFocus &Message);
HIDESBASE MESSAGE void __fastcall CMFocusChanged(Controls::TCMFocusChanged &Message);
void __fastcall OnTabSettingsChanged(System::TObject* Sender);
void __fastcall OnButtonSettingChanged(System::TObject* Sender);
void __fastcall OnCloseButtonClick(System::TObject* Sender);
void __fastcall OnPageListButtonClick(System::TObject* Sender);
void __fastcall OnPageListMenuClick(System::TObject* Sender);
void __fastcall OnScrollPrevButtonClick(System::TObject* Sender);
void __fastcall OnScrollNextButtonClick(System::TObject* Sender);
void __fastcall SubclassProc(Messages::TMessage &Msg);
void __fastcall OnEnterTab(int PageIndex);
void __fastcall OnExitTab(int PageIndex);
void __fastcall SetPagePosition(TAdvOfficePage* AdvPage);
void __fastcall SetAllPagesPosition(void);
void __fastcall SetOfficePagerStyler(const TCustomAdvOfficePagerStyler* Value);
int __fastcall GetAdvOfficePageCount(void);
TAdvOfficePage* __fastcall GetAdvPages(int index);
Menus::TPopupMenu* __fastcall GetPopupMenuEx(void);
void __fastcall SetPopupMenuEx(const Menus::TPopupMenu* Value);
void __fastcall SetShowNonSelectedTabs(const bool Value);
TAdvOfficePage* __fastcall GetActivePage(void);
int __fastcall GetActivePageIndex(void);
void __fastcall SetActivePage(const TAdvOfficePage* Value);
void __fastcall SetActivePageIndex(const int Value);
void __fastcall SetTabSettings(const TPagerTabSettings* Value);
void __fastcall SetImages(const Imglist::TCustomImageList* Value);
void __fastcall SetDisabledImages(const Imglist::TCustomImageList* Value);
AnsiString __fastcall GetVersion();
void __fastcall SetVersion(const AnsiString Value);
void __fastcall SetOfficeHint(const Advhintinfo::TAdvHintInfo* Value);
void __fastcall SetTabPosition(const Comctrls::TTabPosition Value);
void __fastcall SetAntiAlias(const Advgdip::TAntiAlias Value);
void __fastcall SetButtonSettings(const TPageButtonSettings* Value);
void __fastcall SetPageListMenu(const Menus::TPopupMenu* Value);
void __fastcall SetCloseOnTab(const bool Value);
void __fastcall SetRotateTabLeftRight(const bool Value);
void __fastcall SetPageMargin(const int Value);
protected:
virtual void __fastcall AlignControls(Controls::TControl* AControl, Types::TRect &ARect);
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 WndProc(Messages::TMessage &Msg);
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);
DYNAMIC void __fastcall DragOver(System::TObject* Source, int X, int Y, Controls::TDragState State, bool &Accept);
virtual void __fastcall AdjustClientRect(Types::TRect &Rect);
void __fastcall DrawTab(int PageIndex);
void __fastcall DrawAllTabs(void);
void __fastcall DrawTabScrollButtons(void);
virtual void __fastcall Paint(void);
DYNAMIC void __fastcall SetChildOrder(Classes::TComponent* Child, int Order);
void __fastcall SetAdvPageBounds(TAdvOfficePage* AdvPage, int &ALeft, int &ATop, int &AWidth, int &AHeight);
void __fastcall UpdateMe(int PropID);
void __fastcall ChangeActivePage(int PageIndex);
void __fastcall UpdateTabScroller(void);
void __fastcall ScrollLeftBtnClick(void);
void __fastcall ScrollRightBtnClick(void);
void __fastcall ShowShortCutHintOfAllPages(void);
void __fastcall HideShortCutHintOfAllPages(void);
Advglowbutton::TShortCutHintWindow* __fastcall CreateShortCutHintWin(void);
void __fastcall DestroyShortCutHintWin(Advglowbutton::TShortCutHintWindow* ShortCutWin);
void __fastcall InitializeAndUpdateButtons(void);
bool __fastcall AnyButtonVisible(void);
bool __fastcall CanShowTab(int PageIndex);
int __fastcall GetVisibleTabCount(void);
void __fastcall InvalidateTab(int PageIndex);
Types::TRect __fastcall GetAdvPageRect();
Types::TRect __fastcall GetButtonsRect();
Types::TRect __fastcall GetTabsArea();
Types::TRect __fastcall GetTabsRect();
Types::TRect __fastcall GetTabRect(int StartIndex, int PageIndex, bool ConsiderTabScroller)/* overload */;
Types::TRect __fastcall GetTabRect(int PageIndex)/* overload */;
Types::TRect __fastcall GetTabRect(TAdvOfficePage* Page)/* overload */;
int __fastcall PTOnTab(int X, int Y);
Types::TRect __fastcall GetCloseButtonRect();
Types::TRect __fastcall GetPageListRect();
Types::TRect __fastcall GetTabScrollerRect();
Types::TRect __fastcall GetTabScrollerLeftRect();
Types::TRect __fastcall GetTabScrollerRightRect();
bool __fastcall PtOnTabScrollLeftBtn(int X, int Y);
bool __fastcall PtOnTabScrollRightBtn(int X, int Y);
public:
__fastcall virtual TAdvOfficePager(Classes::TComponent* AOwner);
virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
virtual void __fastcall CreateWnd(void);
__fastcall virtual ~TAdvOfficePager(void);
DYNAMIC void __fastcall GetChildren(Classes::TGetChildProc Proc, Classes::TComponent* Root);
virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
void __fastcall Init(void);
DYNAMIC void __fastcall DragDrop(System::TObject* Source, int X, int Y);
int __fastcall GetVersionNr(void);
int __fastcall AddAdvPage(TAdvOfficePage* AdvPage)/* overload */;
int __fastcall AddAdvPage(AnsiString PageCaption)/* overload */;
void __fastcall RemoveAdvPage(TAdvOfficePage* AdvPage);
void __fastcall MoveAdvPage(int CurIndex, int NewIndex);
TAdvOfficePage* __fastcall FindNextPage(TAdvOfficePage* CurPage, bool GoForward, bool CheckTabVisible);
void __fastcall SelectNextPage(bool GoForward);
int __fastcall IndexOfPage(TAdvOfficePage* AdvPage);
__property int ActivePageIndex = {read=GetActivePageIndex, write=SetActivePageIndex, nodefault};
__property int AdvPageCount = {read=GetAdvOfficePageCount, nodefault};
__property TAdvOfficePage* AdvPages[int index] = {read=GetAdvPages};
__published:
__property TCustomAdvOfficePagerStyler* AdvOfficePagerStyler = {read=FOfficePagerStyler, write=SetOfficePagerStyler};
__property Align = {default=0};
__property Anchors = {default=3};
__property TAdvOfficePage* ActivePage = {read=GetActivePage, write=SetActivePage};
__property Advgdip::TAntiAlias AntiAlias = {read=FAntiAlias, write=SetAntiAlias, default=1};
__property TPageButtonSettings* ButtonSettings = {read=FButtonSettings, write=SetButtonSettings};
__property Constraints ;
__property bool CloseOnTab = {read=FCloseOnTab, write=SetCloseOnTab, default=0};
__property Imglist::TCustomImageList* DisabledImages = {read=FDisabledImages, write=SetDisabledImages};
__property bool FreeOnClose = {read=FFreeOnClose, write=FFreeOnClose, default=0};
__property Imglist::TCustomImageList* Images = {read=FImages, write=SetImages};
__property Advhintinfo::TAdvHintInfo* OfficeHint = {read=FOfficeHint, write=SetOfficeHint};
__property int PageMargin = {read=FPageMargin, write=SetPageMargin, default=1};
__property Menus::TPopupMenu* PageListMenu = {read=FPageListMenu, write=SetPageListMenu};
__property Menus::TPopupMenu* PopupMenu = {read=GetPopupMenuEx, write=SetPopupMenuEx};
__property bool RotateTabLeftRight = {read=FRotateTabLeftRight, write=SetRotateTabLeftRight, default=1};
__property bool ShowNonSelectedTabs = {read=FShowNonSelectedTabs, write=SetShowNonSelectedTabs, default=0};
__property bool ShowTabHint = {read=FShowTabHint, write=FShowTabHint, default=0};
__property ShowHint ;
__property Comctrls::TTabPosition TabPosition = {read=FTabPosition, write=SetTabPosition, default=0};
__property TPagerTabSettings* TabSettings = {read=FTabSettings, write=SetTabSettings};
__property bool TabReorder = {read=FTabReorder, write=FTabReorder, nodefault};
__property bool ShowShortCutHints = {read=FShowShortCutHints, write=FShowShortCutHints, nodefault};
__property AnsiString Version = {read=GetVersion, write=SetVersion, stored=false};
__property Visible = {default=1};
__property Classes::TNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
__property TTabChangingEvent OnChanging = {read=FOnChanging, write=FOnChanging};
__property TOnClosePage OnClosePage = {read=FOnClosePage, write=FOnClosePage};
__property TOnClosedPage OnClosedPage = {read=FOnClosedPage, write=FOnClosedPage};
__property OnDragDrop ;
__property OnDragOver ;
__property OnEndDrag ;
__property OnEnter ;
__property OnExit ;
__property TOnPageListClick OnPageListClick = {read=FOnPageListClick, write=FOnPageListClick};
__property TTabMovedEvent OnTabMoved = {read=FOnTabMoved, write=FOnTabMoved};
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property OnResize ;
__property OnStartDrag ;
__property TabOrder = {default=-1};
__property TabStop = {default=0};
public:
#pragma option push -w-inl
/* TWinControl.CreateParented */ inline __fastcall TAdvOfficePager(HWND ParentWindow) : Controls::TCustomControl(ParentWindow) { }
#pragma option pop
};
class PASCALIMPLEMENTATION TAdvOfficePage : public Controls::TCustomControl
{
typedef Controls::TCustomControl inherited;
private:
bool FTabVisible;
TAdvOfficePager* FAdvOfficePager;
AnsiString FCaption;
bool FTabEnabled;
int FImageIndex;
Extctrls::TTimer* FTimer;
int FTimeInc;
int FStepHover;
int FStepPush;
TGlowState FGlowState;
AnsiString FTabHint;
Advhintinfo::TAdvHintInfo* FOfficeHint;
Gdipicture::TGDIPPicture* FIPicture;
Gdipicture::TGDIPPicture* FIDisabledPicture;
bool FUpdatingParent;
Advglowbutton::TShortCutHintWindow* FShortCutHint;
Advglowbutton::TShortCutHintPos FShortCutHintPos;
AnsiString FShortCutHintText;
Classes::TNotifyEvent FOnShow;
void __fastcall TimerProc(System::TObject* Sender);
HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
HIDESBASE MESSAGE void __fastcall CMVisibleChanged(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMShowingChanged(Messages::TMessage &Message);
MESSAGE void __fastcall CMControlChange(Controls::TCMControlChange &Message);
HIDESBASE MESSAGE void __fastcall CMControlListChange(Controls::TCMControlListChange &Message);
HIDESBASE MESSAGE void __fastcall WMEraseBkGnd(Messages::TWMEraseBkgnd &Message);
void __fastcall PictureChanged(System::TObject* Sender);
void __fastcall SetAdvOfficePager(const TAdvOfficePager* Value);
void __fastcall SetTabVisible(const bool Value);
void __fastcall SetCaption(const AnsiString Value);
void __fastcall SetTabEnabled(const bool Value);
void __fastcall SetImageIndex(const int Value);
void __fastcall SetOfficeHint(const Advhintinfo::TAdvHintInfo* Value);
void __fastcall SetDisabledPicture(const Gdipicture::TGDIPPicture* Value);
void __fastcall SetPicture(const Gdipicture::TGDIPPicture* Value);
int __fastcall GetPageIndex(void);
void __fastcall SetPageIndex(const int Value);
protected:
virtual void __fastcall AlignControls(Controls::TControl* AControl, Types::TRect &ARect);
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);
virtual void __fastcall ReadState(Classes::TReader* Reader);
virtual void __fastcall AdjustClientRect(Types::TRect &Rect);
public:
__fastcall virtual TAdvOfficePage(Classes::TComponent* AOwner);
__fastcall virtual ~TAdvOfficePage(void);
virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
void __fastcall ShowShortCutHint(void);
void __fastcall HideShortCutHint(void);
__property TAdvOfficePager* AdvOfficePager = {read=FAdvOfficePager, write=SetAdvOfficePager};
__published:
__property AnsiString Caption = {read=FCaption, write=SetCaption};
__property Gdipicture::TGDIPPicture* DisabledPicture = {read=FIDisabledPicture, write=SetDisabledPicture};
__property int ImageIndex = {read=FImageIndex, write=SetImageIndex, default=-1};
__property Gdipicture::TGDIPPicture* Picture = {read=FIPicture, write=SetPicture};
__property AnsiString TabHint = {read=FTabHint, write=FTabHint};
__property bool TabVisible = {read=FTabVisible, write=SetTabVisible, default=1};
__property bool TabEnabled = {read=FTabEnabled, write=SetTabEnabled, default=1};
__property ShowHint ;
__property Advhintinfo::TAdvHintInfo* OfficeHint = {read=FOfficeHint, write=SetOfficeHint};
__property int PageIndex = {read=GetPageIndex, write=SetPageIndex, stored=false, nodefault};
__property AnsiString ShortCutHint = {read=FShortCutHintText, write=FShortCutHintText};
__property Advglowbutton::TShortCutHintPos ShortCutHintPos = {read=FShortCutHintPos, write=FShortCutHintPos, default=1};
__property Classes::TNotifyEvent OnShow = {read=FOnShow, write=FOnShow};
__property PopupMenu ;
__property OnContextPopup ;
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property OnDragOver ;
__property OnDragDrop ;
__property OnEndDrag ;
__property OnStartDrag ;
__property OnExit ;
__property OnEnter ;
public:
#pragma option push -w-inl
/* TWinControl.CreateParented */ inline __fastcall TAdvOfficePage(HWND ParentWindow) : Controls::TCustomControl(ParentWindow) { }
#pragma option pop
};
//-- var, const, procedure ---------------------------------------------------
static const Shortint GLOWSPEED = 0x32;
static const Shortint IMG_SPACE = 0x2;
static const Shortint DropDownSectWidth = 0xd;
static const Shortint DEFAULT_TABHEIGHT = 0x1a;
static const Shortint ADVPAGE_OFFSET = 0x1;
static const Shortint SCROLLER_SIZE = 0x20;
static const Shortint PAGEBUTTON_SIZE = 0x12;
static const Shortint MAJ_VER = 0x1;
static const Shortint MIN_VER = 0x2;
static const Shortint REL_VER = 0x1;
static const Shortint BLD_VER = 0x2;
} /* namespace Advofficepager */
using namespace Advofficepager;
#pragma pack(pop)
#pragma option pop
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // Advofficepager
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -