]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/bookctrl.cpp
associate the outline view with the impl, fixes #13748
[wxWidgets.git] / src / common / bookctrl.cpp
index 9f0e284652550a55169d1529220b9825783bb5ee..9ec08bad1c9d98829693abcd4aab3e1e4d32c163 100644 (file)
@@ -431,6 +431,18 @@ int wxBookCtrlBase::GetNextPage(bool forward) 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 )