advofficepager.hpp
来自「TMSPack基本上涵盖了Delphi所有的基础控件」· HPP 代码 · 共 966 行 · 第 1/4 页
HPP
966 行
Types::TRect __fastcall GetTabScrollerLeftRect();
Types::TRect __fastcall GetTabScrollerRightRect();
bool __fastcall PtOnTabScrollLeftBtn(int X, int Y);
bool __fastcall PtOnTabScrollRightBtn(int X, int Y);
int __fastcall IsActivePageNeighbour(int PageIndex);
int __fastcall GetLeftRoundingOffset(void);
int __fastcall GetRightRoundingOffset(void);
bool __fastcall CanShowCloseButton(void);
bool __fastcall UseOldDrawing(void);
void __fastcall UpdatePageAppearanceOfPages(void);
void __fastcall UpdateTabAppearanceOfPages(void);
__property bool NextPictureChanged = {read=GetNextPictureChanged, write=SetNextPictureChanged, nodefault};
__property bool PrevPictureChanged = {read=GetPrevPictureChanged, write=SetPrevPictureChanged, nodefault};
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);
int __fastcall IndexOfTabAt(int X, int Y);
__property int ActivePageIndex = {read=GetActivePageIndex, write=SetActivePageIndex, nodefault};
__property bool BufferedPages = {read=FBufferedPages, write=FBufferedPages, nodefault};
__property int AdvPageCount = {read=GetAdvOfficePageCount, nodefault};
__property TAdvOfficePage* AdvPages[int index] = {read=GetAdvPages};
__property TPagerTabScroller* TabScroller = {read=FTabScroller};
__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 TCloseOnTabPos CloseOnTabPosition = {read=FCloseOnTabPosition, write=SetCloseOnTabPosition, default=0};
__property Imglist::TCustomImageList* DisabledImages = {read=FDisabledImages, write=SetDisabledImages};
__property bool FreeOnClose = {read=FFreeOnClose, write=FFreeOnClose, default=0};
__property bool Glow = {read=FGlow, write=FGlow, default=1};
__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 TDrawTabEvent OnDrawTab = {read=FOnDrawTab, write=FOnDrawTab};
__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 TTabClickEvent OnTabClick = {read=FOnTabClick, write=FOnTabClick};
__property TTabClickEvent OnTabDblClick = {read=FOnTabDblClick, write=FOnTabDblClick};
__property TTabClickEvent OnTabRightClick = {read=FOnTabRightClick, write=FOnTabRightClick};
__property OnKeyDown ;
__property OnKeyUp ;
__property OnKeyPress ;
__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;
Classes::TNotifyEvent FOnHide;
bool FShowClose;
bool FUseTabAppearance;
TTabAppearance* FTabAppearance;
TVistaBackground* FPageAppearance;
bool FUsePageAppearance;
Graphics::TBitmap* FBkgCache;
bool FValidCache;
WideString FWideCaption;
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 OnTabAppearanceChanged(System::TObject* Sender);
void __fastcall OnPageAppearanceChanged(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);
void __fastcall SetShowClose(const bool Value);
void __fastcall SetTabAppearance(const TTabAppearance* Value);
void __fastcall SetUseTabAppearance(const bool Value);
void __fastcall SetPageAppearance(const TVistaBackground* Value);
void __fastcall SetUsePageAppearance(const bool Value);
void __fastcall SetWideCaption(const WideString 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 WideString WideCaption = {read=FWideCaption, write=SetWideCaption};
__property Gdipicture::TGDIPPicture* DisabledPicture = {read=FIDisabledPicture, write=SetDisabledPicture};
__property int ImageIndex = {read=FImageIndex, write=SetImageIndex, default=-1};
__property TVistaBackground* PageAppearance = {read=FPageAppearance, write=SetPageAppearance};
__property bool UsePageAppearance = {read=FUsePageAppearance, write=SetUsePageAppearance, default=0};
__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 bool ShowClose = {read=FShowClose, write=SetShowClose, 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 TTabAppearance* TabAppearance = {read=FTabAppearance, write=SetTabAppearance};
__property bool UseTabAppearance = {read=FUseTabAppearance, write=SetUseTabAppearance, default=0};
__property Classes::TNotifyEvent OnHide = {read=FOnHide, write=FOnHide};
__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 GLOWSTEP = 0x14;
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 = 0x5;
static const Shortint REL_VER = 0x3;
static const Shortint BLD_VER = 0x0;
extern PACKAGE void __fastcall DrawVistaTab(Graphics::TCanvas* Canvas, const Types::TRect &r, Graphics::TColor CFU, Graphics::TColor CTU, Graphics::TColor CFB, Graphics::TColor CTB, Graphics::TColor PC, Advglowbutton::TGDIPGradient GradientU, Advglowbutton::TGDIPGradient GradientB, bool Enabled, TAdvTabShape Shape, bool Focus, TTabRounding Rounding, bool RotateLeftRight, Comctrls::TTabPosition Direction);
} /* namespace Advofficepager */
using namespace Advofficepager;
#pragma pack(pop)
#pragma option pop
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // Advofficepager
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?