Make wxAuiNotebook wxAuiTabCtrl-related methods public

Allow retrieving the active tab control or tab at the given position.

Closes #16262.
This commit is contained in:
Paul Kulchenko
2019-12-07 15:13:06 +01:00
committed by Vadim Zeitlin
parent 0425050ad8
commit 1c754fe71c
2 changed files with 27 additions and 3 deletions

View File

@@ -352,6 +352,10 @@ public:
virtual wxSize DoGetBestSize() const wxOVERRIDE;
wxAuiTabCtrl* GetTabCtrlFromPoint(const wxPoint& pt);
wxAuiTabCtrl* GetActiveTabCtrl();
bool FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx);
protected:
// Common part of all ctors.
void Init();
@@ -381,10 +385,7 @@ protected:
void DoSizing();
void InitNotebook(long style);
wxAuiTabCtrl* GetTabCtrlFromPoint(const wxPoint& pt);
wxWindow* GetTabFrameFromTabCtrl(wxWindow* tabCtrl);
wxAuiTabCtrl* GetActiveTabCtrl();
bool FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx);
void RemoveEmptyTabFrames();
void UpdateHintWindowSize();

View File

@@ -405,6 +405,29 @@ public:
Returns the image index for the given page.
*/
virtual int GetPageImage(size_t nPage) const;
/**
Returns tab control based on point coordinates inside the tab frame.
@since 3.1.4
*/
wxAuiTabCtrl* GetTabCtrlFromPoint(const wxPoint& pt);
/**
Returns active tab control for this notebook.
@since 3.1.4
*/
wxAuiTabCtrl* GetActiveTabCtrl();
/**
Finds tab control associated with a given window and its tab index.
@return @true when the tab control is found, @false otherwise.
@since 3.1.4
*/
bool FindTab(wxWindow* page, wxAuiTabCtrl** ctrl, int* idx);
};