From 97c58531bf6912d5b6214b4bd6298466ebcb87ca Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 9 Oct 2005 17:26:09 +0000 Subject: [PATCH] made GetPage() not virtual because it doesn't need to be virtual and this allows to have const overload of it git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35861 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/bookctrl.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/wx/bookctrl.h b/include/wx/bookctrl.h index d46bc4b879..95e79de2ab 100644 --- a/include/wx/bookctrl.h +++ b/include/wx/bookctrl.h @@ -73,14 +73,14 @@ public: virtual size_t GetPageCount() const { return m_pages.size(); } // get the panel which represents the given page - virtual wxWindow *GetPage(size_t n) { return m_pages[n]; } + wxWindow *GetPage(size_t n) { return m_pages[n]; } + wxWindow *GetPage(size_t n) const { return m_pages[n]; } // get the current page or NULL if none wxWindow *GetCurrentPage() const { - int n = GetSelection(); - return n == wxNOT_FOUND ? NULL - : wx_const_cast(wxBookCtrlBase *, this)->GetPage(n); + const int n = GetSelection(); + return n == wxNOT_FOUND ? NULL : GetPage(n); } // get the currently selected page or wxNOT_FOUND if none @@ -191,6 +191,7 @@ protected: // Always rely on GetBestSize, which will look at all the pages virtual void SetInitialBestSize(const wxSize& WXUNUSED(size)) { } + // the array of all pages of this control wxArrayPages m_pages; -- 2.45.2