- Add wxAUI_TB_PLAIN_BACKGROUND wxAuiToolBar style (Allann Jones).
- Make wxGenericDataViewCtrl::SetFont() really work (Laurent Poujoulat).
- Remove wxLogWindow::OnFrameCreate(), it was never called anyhow.
+- Added wxBookCtrlBase::FindPage() (troelsk).
- Added wxDocument::Activate() (troelsk).
- Added wxDocManager::FindDocumentByPath() (troelsk).
}
}
+ // return the index of the given page or wxNOT_FOUND
+ int FindPage(const wxWindow* page) const;
+
// hit test: returns which page is hit and, optionally, where (icon, label)
virtual int HitTest(const wxPoint& WXUNUSED(pt),
long * WXUNUSED(flags) = NULL) const
*/
virtual int ChangeSelection(size_t page) = 0;
+ /**
+ Returns the index of the specified tab window or @c wxNOT_FOUND
+ if not found.
+
+ @param page One of the control pages.
+ @return The zero-based tab index or @c wxNOT_FOUND if not found.
+
+ @since 2.9.5
+ */
+ int FindPage(const wxWindow* page) const;
+
//@}
return nPage;
}
+int wxBookCtrlBase::FindPage(const wxWindow* page) const
+{
+ const size_t nCount = m_pages.size();
+ for ( size_t nPage = 0; nPage < nCount; nPage++ )
+ {
+ if ( m_pages[nPage] == page )
+ return (int)nPage;
+ }
+
+ return wxNOT_FOUND;
+}
+
bool wxBookCtrlBase::DoSetSelectionAfterInsertion(size_t n, bool bSelect)
{
if ( bSelect )