📄 advtabset.hpp
字号:
void __fastcall SetBackgroundColor(Graphics::TColor Value);
void __fastcall SetDitherBackground(bool Value);
void __fastcall SetAutoScroll(bool Value);
void __fastcall SetStartMargin(int Value);
void __fastcall SetEndMargin(int Value);
void __fastcall SetTabIndex(int Value);
void __fastcall SetFirstIndex(int Value);
void __fastcall SetTabList(Classes::TStrings* Value);
void __fastcall SetTabStyle(TTabStyle Value);
void __fastcall SetTabHeight(int Value);
void __fastcall SetSelectedColorTo(Graphics::TColor Value);
void __fastcall SetUnSelectedColorTo(Graphics::TColor Value);
void __fastcall SetTextColor(Graphics::TColor Value);
void __fastcall SetTabBorderColor(Graphics::TColor Value);
void __fastcall SetTabBackGround(const Graphics::TBitmap* Value);
void __fastcall SetTabBackGroundSelected(const Graphics::TBitmap* Value);
void __fastcall SetGradientDirection(TGradientDirection Value);
void __fastcall SetHoverGradientDirection(TGradientDirection value);
void __fastcall SetTabMargin(TTabMargin* Value);
void __fastcall SetTabOverlap(TTabOverlapSize Value);
void __fastcall SetImages(Imglist::TCustomImageList* value);
void __fastcall SetAdvTabStyle(TAdvTabStyle Value);
void __fastcall SetTabPosition(TAdvTabPosition Value);
void __fastcall SetCloseButtonAt(TCloseButtonPos Value);
void __fastcall SetLowerSelected(int Value);
void __fastcall SetShowScroller(TShowScroller Value);
HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
HIDESBASE MESSAGE void __fastcall CMSysColorChange(Messages::TMessage &Message);
HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
void __fastcall CreateBrushPattern(Graphics::TBitmap* Bitmap);
int __fastcall CalcTabPositions(int Start, int Stop, Graphics::TCanvas* Canvas, int First);
void __fastcall CreateScroller(void);
void __fastcall InitBitmaps(void);
void __fastcall DoneBitmaps(void);
void __fastcall CreateEdgeParts(void);
void __fastcall FixTabPos(void);
MESSAGE void __fastcall WMGetDlgCode(Messages::TWMNoParams &Message);
HIDESBASE MESSAGE void __fastcall CMDialogChar(Messages::TWMKey &Message);
void __fastcall ScrollClick(System::TObject* Sender);
void __fastcall ReadIntData(Classes::TReader* Reader);
void __fastcall ReadBoolData(Classes::TReader* Reader);
void __fastcall SetSoftTop(const bool Value);
void __fastcall DrawCloseGlyph(Graphics::TCanvas* Canvas, const Types::TPoint &P, bool IsEnable);
void __fastcall DrawCloseButton(Graphics::TCanvas* Canvas, const Types::TRect &Rect, bool Active);
void __fastcall DrawHoverCloseButton(const Types::TRect &Rect);
void __fastcall DrawDownCloseButton(const Types::TRect &Rect);
bool __fastcall IsOnButton(int TabIndex, int X, int Y)/* overload */;
bool __fastcall IsOnButton(int TabIndex, int X, int Y, Types::TRect &aRect)/* overload */;
void __fastcall TabMarginChange(TMarginSize NewValue, TMarginSize OldValue, int Index);
void __fastcall SetOriginalTabWidth(void);
void __fastcall IncTabWidth(int w);
void __fastcall DrawCrossAtTabSet(bool IsEnable);
void __fastcall DrawCloseButtonAtTabSet(bool IsEnable);
void __fastcall DrawDownCloseButtonAtTabSet(void);
bool __fastcall IsOnCloseButtonAtTabSet(int X, int Y);
void __fastcall CloseButtonClick(void);
void __fastcall SetActiveFont(const Graphics::TFont* Value);
AnsiString __fastcall GetVersion();
void __fastcall SetVersion(const AnsiString Value);
int __fastcall GetVersionNr(void);
void __fastcall CloseGlyphOnChange(System::TObject* Sender);
void __fastcall SetCloseGlyph(const Graphics::TBitmap* Value);
protected:
virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
HIDESBASE MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
DYNAMIC void __fastcall DragOver(System::TObject* Source, int X, int Y, Controls::TDragState State, bool &Accept);
virtual void __fastcall Paint(void);
virtual void __fastcall DrawTab(Graphics::TCanvas* TabCanvas, const Types::TRect &R, int Index, bool Selected);
bool __fastcall CanChange(int NewIndex);
virtual void __fastcall MeasureTab(int Index, int &TabWidth);
virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
void __fastcall AdjustTabWidth(void);
__property Classes::TStringList* DuplicateTabs = {read=FDuplicateTabs};
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation AOperation);
virtual void __fastcall Loaded(void);
__property TScroller* Scroller = {read=FScroller};
__property Classes::TStrings* Tabs = {read=FTabs, write=SetTabList};
__property TTabStyle Style = {read=FStyle, write=SetTabStyle, default=1};
__property bool DitherBackground = {read=FDitherBackground, write=SetDitherBackground, default=0};
public:
DYNAMIC void __fastcall GetChildren(Classes::TGetChildProc Proc, Classes::TComponent* Root);
__fastcall virtual TAdvTabSet(Classes::TComponent* AOwner);
__fastcall virtual ~TAdvTabSet(void);
int __fastcall ItemAtPos(const Types::TPoint &Pos);
Types::TRect __fastcall ItemRect(int Item);
int __fastcall ItemWidth(int Index);
Types::TRect __fastcall MinClientRect()/* overload */;
Types::TRect __fastcall MinClientRect(bool IncludeScroller)/* overload */;
Types::TRect __fastcall MinClientRect(int TabCount, bool IncludeScroller = false)/* overload */;
HIDESBASE void __fastcall SelectNext(bool Direction);
DYNAMIC void __fastcall DragDrop(System::TObject* Source, int X, int Y);
__property Canvas ;
__property int FirstIndex = {read=FFirstIndex, write=SetFirstIndex, default=0};
__property int VersionNr = {read=GetVersionNr, nodefault};
__published:
__property Align = {default=0};
__property Anchors = {default=3};
__property bool AutoScroll = {read=FAutoScroll, write=SetAutoScroll, default=1};
__property Graphics::TFont* ActiveFont = {read=FActiveFont, write=SetActiveFont};
__property Graphics::TColor BackgroundColor = {read=FBackgroundColor, write=SetBackgroundColor, default=-16777201};
__property Graphics::TBitmap* CloseGlyph = {read=FCloseGlyph, write=SetCloseGlyph};
__property Constraints ;
__property DragCursor = {default=-12};
__property DragKind = {default=0};
__property DragMode = {default=0};
__property Enabled = {default=1};
__property int EndMargin = {read=FEndMargin, write=SetEndMargin, default=5};
__property Font ;
__property ParentShowHint = {default=1};
__property PopupMenu ;
__property ShowHint ;
__property int StartMargin = {read=FStartMargin, write=SetStartMargin, default=5};
__property Graphics::TColor SelectedColor = {read=FSelectedColor, write=SetSelectedColor, default=-16777201};
__property bool SoftTop = {read=FSoftTop, write=SetSoftTop, default=0};
__property TTabCollection* AdvTabs = {read=FAdvTabs, write=FAdvTabs};
__property bool FreeOnClose = {read=FFreeOnClose, write=FFreeOnClose, nodefault};
__property Graphics::TColor SelectedColorTo = {read=FSelectedColorTo, write=SetSelectedColorTo, default=536870911};
__property Graphics::TColor UnSelectedColorTo = {read=FUnSelectedColorTo, write=SetUnSelectedColorTo, default=536870911};
__property Graphics::TColor TextColor = {read=FTextColor, write=SetTextColor, default=0};
__property Graphics::TColor TabBorderColor = {read=FTabBorderColor, write=SetTabBorderColor, default=8421504};
__property Graphics::TBitmap* TabBackGround = {read=FTabBackGround, write=SetTabBackGround};
__property Graphics::TBitmap* TabBackGroundSelected = {read=FTabBackGroundSelected, write=SetTabBackGroundSelected};
__property TGradientDirection GradientDirection = {read=FGradientDirection, write=SetGradientDirection, nodefault};
__property TGradientDirection HoverGradientDirection = {read=FHoverGradientDirection, write=SetHoverGradientDirection, default=0};
__property Graphics::TColor TabHoverColor = {read=FTabHoverColor, write=FTabHoverColor, default=536870911};
__property Graphics::TColor TabHoverColorTo = {read=FTabHoverColorTo, write=FTabHoverColorTo, default=536870911};
__property Graphics::TColor TabHoverBorder = {read=FTabHoverBorder, write=FTabHoverBorder, default=536870911};
__property TTabMargin* TabMargin = {read=FTabMargin, write=SetTabMargin};
__property TTabOverlapSize TabOverlap = {read=FTabOverlap, write=SetTabOverlap, nodefault};
__property bool ShowFocus = {read=FShowFocus, write=FShowFocus, default=0};
__property Imglist::TCustomImageList* Images = {read=FImages, write=SetImages};
__property TAdvTabStyle TabStyle = {read=FAdvTabStyle, write=SetAdvTabStyle, default=0};
__property TAdvTabPosition TabPosition = {read=FTabPosition, write=SetTabPosition, default=2};
__property TCloseButtonPos CloseButtonAt = {read=FCloseButtonAt, write=SetCloseButtonAt, default=0};
__property bool TabRearrange = {read=FTabRearrange, write=FTabRearrange, default=0};
__property TTabMovedEvent OnTabMoved = {read=FOnTabMoved, write=FOnTabMoved};
__property TTabCloseEvent OnTabClose = {read=FOnTabClose, write=FOnTabClose};
__property TCanCloseEvent OnCanClose = {read=FOnCanClose, write=FOnCanClose};
__property TShowScroller ShowScroller = {read=FShowScroller, write=SetShowScroller, default=1};
__property int LowerSelected = {read=FLowerSelected, write=SetLowerSelected, default=2};
__property AnsiString Version = {read=GetVersion, write=SetVersion};
__property int TabHeight = {read=FOwnerDrawHeight, write=SetTabHeight, default=20};
__property int TabIndex = {read=FTabIndex, write=SetTabIndex, default=-1};
__property Graphics::TColor UnselectedColor = {read=FUnselectedColor, write=SetUnselectedColor, default=-16777211};
__property Visible = {default=1};
__property int VisibleTabs = {read=FVisibleTabs, nodefault};
__property OnClick ;
__property TTabChangeEvent OnChange = {read=FOnChange, write=FOnChange};
__property TTabChangedEvent OnChanged = {read=FOnChanged, write=FOnChanged};
__property OnDragDrop ;
__property OnDragOver ;
__property OnEndDock ;
__property OnEndDrag ;
__property OnEnter ;
__property OnExit ;
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property TMeasureTabEvent OnMeasureTab = {read=FOnMeasureTab, write=FOnMeasureTab};
__property OnStartDock ;
__property OnStartDrag ;
__property TDrawTabSetBackgroundEvent OnDrawTabSetBackground = {read=FOnDrawTabSetBackground, write=FOnDrawTabSetBackground};
public:
#pragma option push -w-inl
/* TWinControl.CreateParented */ inline __fastcall TAdvTabSet(HWND ParentWindow) : Controls::TCustomControl(ParentWindow) { }
#pragma option pop
};
class PASCALIMPLEMENTATION TTabList : public Classes::TStringList
{
typedef Classes::TStringList inherited;
private:
TAdvTabSet* Tabs;
public:
virtual void __fastcall Insert(int Index, const AnsiString S);
virtual void __fastcall Delete(int Index);
virtual int __fastcall Add(const AnsiString S);
virtual void __fastcall Put(int Index, const AnsiString S);
virtual void __fastcall Clear(void);
virtual void __fastcall AddStrings(Classes::TStrings* Strings);
public:
#pragma option push -w-inl
/* TStringList.Destroy */ inline __fastcall virtual ~TTabList(void) { }
#pragma option pop
public:
#pragma option push -w-inl
/* TObject.Create */ inline __fastcall TTabList(void) : Classes::TStringList() { }
#pragma option pop
};
#pragma option push -b-
enum TEdgePart { epSelectedLeft, epUnselectedLeft, epSelectedRight, epUnselectedRight };
#pragma option pop
#pragma option push -b-
enum TEdgeType { etNone, etFirstIsSel, etFirstNotSel, etLastIsSel, etLastNotSel, etNotSelToSel, etSelToNotSel, etNotSelToNotSel };
#pragma option pop
class PASCALIMPLEMENTATION TTabCollectionItem : public Classes::TCollectionItem
{
typedef Classes::TCollectionItem inherited;
private:
AnsiString FCaption;
bool FVisible;
bool FShowClose;
int FTag;
System::TObject* FObject;
Graphics::TColor FTextColor;
Graphics::TColor FTabColor;
Graphics::TColor FTabColorTo;
TGradientDirection FTabGradientDirection;
TGradientDirection FHoverGradientDirection;
int FImageIndex;
int FIndexInAdvTabSet;
bool FEnable;
void __fastcall SetCaption(const AnsiString Value);
void __fastcall SetVisible(const bool Value);
void __fastcall SetShowClose(const bool Value);
void __fastcall SetTextColor(const Graphics::TColor Value);
void __fastcall SetTabColor(const Graphics::TColor Value);
void __fastcall SetTabColorTo(const Graphics::TColor Value);
void __fastcall SetTabGradientDirection(TGradientDirection value);
void __fastcall SetHoverGradientDirection(TGradientDirection value);
void __fastcall SetImageIndex(const int Value);
void __fastcall SetEnable(const bool Value);
protected:
virtual AnsiString __fastcall GetDisplayName();
virtual void __fastcall SetIndex(int Value);
public:
bool __fastcall MoveItemInTabSetTo(int ItemIndexOfTabSet);
__fastcall virtual TTabCollectionItem(Classes::TCollection* Collection);
__fastcall virtual ~TTabCollectionItem(void);
virtual void __fastcall Assign(Classes::TPersistent* Source);
__property System::TObject* AObject = {read=FObject, write=FObject};
__published:
__property AnsiString Caption = {read=FCaption, write=SetCaption};
__property bool Enable = {read=FEnable, write=SetEnable, nodefault};
__property bool Visible = {read=FVisible, write=SetVisible, nodefault};
__property bool ShowClose = {read=FShowClose, write=SetShowClose, nodefault};
__property Graphics::TColor TextColor = {read=FTextColor, write=SetTextColor, default=0};
__property Graphics::TColor TabColor = {read=FTabColor, write=SetTabColor, nodefault};
__property Graphics::TColor TabColorTo = {read=FTabColorTo, write=SetTabColorTo, nodefault};
__property TGradientDirection HoverGradientDirection = {read=FHoverGradientDirection, write=SetHoverGradientDirection, default=0};
__property TGradientDirection TabGradientDirection = {read=FTabGradientDirection, write=SetTabGradientDirection, default=0};
__property int ImageIndex = {read=FImageIndex, write=SetImageIndex, nodefault};
__property int Tag = {read=FTag, write=FTag, nodefault};
};
//-- var, const, procedure ---------------------------------------------------
static const Shortint CloseButtonWidth = 0xe;
static const Shortint CloseButtonHeight = 0xd;
static const Shortint ScrollLength = 0x18;
static const Shortint ScrollWidth = 0xd;
static const Shortint MAJ_VER = 0x1;
static const Shortint MIN_VER = 0x5;
static const Shortint REL_VER = 0x2;
static const Shortint BLD_VER = 0x0;
} /* namespace Advtabset */
using namespace Advtabset;
#pragma pack(pop)
#pragma option pop
#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif // Advtabset
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -