// get the panel which represents the given page
virtual wxWindow *GetPage(size_t n) { 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(wxBookCtrl *, this)->GetPage(n);
+ }
+
// get the currently selected page or wxNOT_FOUND if none
virtual int GetSelection() const = 0;
// set the currently selected page, return the index of the previously
// selected one (or -1 on error)
//
- // NB: this function will _not_ generate PAGE_CHANGING/ED events
+ // NB: this function will generate PAGE_CHANGING/ED events
virtual int SetSelection(size_t n) = 0;