Added wxAuiNotebook::GetPageText, GetPageBitmap
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43703 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
0eb69691e1
commit
c3e016e45e
@ -87,6 +87,12 @@ Returns the associated art provider.
|
||||
|
||||
Returns the page specified by the given index.
|
||||
|
||||
\membersection{wxAuiNotebook::GetPageBitmap}\label{wxauinotebookgetpagebitmap}
|
||||
|
||||
\constfunc{wxBitmap}{GetPageBitmap}{\param{size\_t }{page}}
|
||||
|
||||
Returns the tab bitmap for the page.
|
||||
|
||||
\membersection{wxAuiNotebook::GetPageCount}\label{wxauinotebookgetpagecount}
|
||||
|
||||
\constfunc{size\_t}{GetPageCount}{\void}
|
||||
@ -99,6 +105,12 @@ Returns the number of pages in the notebook.
|
||||
|
||||
Returns the page index for the specified window. If the window is not found in the notebook, wxNOT_FOUND is returned.
|
||||
|
||||
\membersection{wxAuiNotebook::GetPageText}\label{wxauinotebookgetpagetext}
|
||||
|
||||
\constfunc{wxString}{GetPageText}{\param{size\_t }{page}}
|
||||
|
||||
Returns the tab label for the page.
|
||||
|
||||
\membersection{wxAuiNotebook::GetSelection}\label{wxauinotebookgetselection}
|
||||
|
||||
\constfunc{int}{GetSelection}{\void}
|
||||
|
@ -398,6 +398,7 @@ public:
|
||||
int GetIdxFromWindow(wxWindow* page) const;
|
||||
size_t GetPageCount() const;
|
||||
wxAuiNotebookPage& GetPage(size_t idx);
|
||||
const wxAuiNotebookPage& GetPage(size_t idx) const;
|
||||
wxAuiNotebookPageArray& GetPages();
|
||||
void SetNormalFont(const wxFont& normal_font);
|
||||
void SetSelectedFont(const wxFont& selected_font);
|
||||
@ -511,9 +512,14 @@ public:
|
||||
void SetWindowStyleFlag(long style);
|
||||
|
||||
bool SetPageText(size_t page, const wxString& text);
|
||||
wxString GetPageText(size_t page_idx) const;
|
||||
|
||||
bool SetPageBitmap(size_t page, const wxBitmap& bitmap);
|
||||
wxBitmap GetPageBitmap(size_t page_idx) const;
|
||||
|
||||
size_t SetSelection(size_t new_page);
|
||||
int GetSelection() const;
|
||||
|
||||
size_t GetPageCount() const;
|
||||
wxWindow* GetPage(size_t page_idx) const;
|
||||
|
||||
|
@ -1454,6 +1454,13 @@ wxAuiNotebookPage& wxAuiTabContainer::GetPage(size_t idx)
|
||||
return m_pages[idx];
|
||||
}
|
||||
|
||||
const wxAuiNotebookPage& wxAuiTabContainer::GetPage(size_t idx) const
|
||||
{
|
||||
wxASSERT_MSG(idx < m_pages.GetCount(), wxT("Invalid Page index"));
|
||||
|
||||
return m_pages[idx];
|
||||
}
|
||||
|
||||
wxAuiNotebookPageArray& wxAuiTabContainer::GetPages()
|
||||
{
|
||||
return m_pages;
|
||||
@ -2733,6 +2740,16 @@ bool wxAuiNotebook::SetPageText(size_t page_idx, const wxString& text)
|
||||
return true;
|
||||
}
|
||||
|
||||
// returns the page caption
|
||||
wxString wxAuiNotebook::GetPageText(size_t page_idx) const
|
||||
{
|
||||
if (page_idx >= m_tabs.GetPageCount())
|
||||
return wxEmptyString;
|
||||
|
||||
// update our own tab catalog
|
||||
const wxAuiNotebookPage& page_info = m_tabs.GetPage(page_idx);
|
||||
return page_info.caption;
|
||||
}
|
||||
|
||||
bool wxAuiNotebook::SetPageBitmap(size_t page_idx, const wxBitmap& bitmap)
|
||||
{
|
||||
@ -2760,6 +2777,16 @@ bool wxAuiNotebook::SetPageBitmap(size_t page_idx, const wxBitmap& bitmap)
|
||||
return true;
|
||||
}
|
||||
|
||||
// returns the page bitmap
|
||||
wxBitmap wxAuiNotebook::GetPageBitmap(size_t page_idx) const
|
||||
{
|
||||
if (page_idx >= m_tabs.GetPageCount())
|
||||
return wxBitmap();
|
||||
|
||||
// update our own tab catalog
|
||||
const wxAuiNotebookPage& page_info = m_tabs.GetPage(page_idx);
|
||||
return page_info.bitmap;
|
||||
}
|
||||
|
||||
// GetSelection() returns the index of the currently active page
|
||||
int wxAuiNotebook::GetSelection() const
|
||||
|
Loading…
Reference in New Issue
Block a user