- // the same as AddPage(), but adds the page at the specified position
- virtual bool InsertPage(int nPage,
- wxNotebookPage *pPage,
- const wxString& strText,
- bool bSelect = FALSE,
- int imageId = -1) = 0;
-
- // set the currently selected page, return the index of the previously
- // selected one (or -1 on error)
- //
- // NB: this function will _not_ generate wxEVT_NOTEBOOK_PAGE_xxx events
- virtual int SetSelection(int nPage) = 0;
-
- // cycle thru the tabs
- void AdvanceSelection(bool forward = TRUE)
- {
- int nPage = GetNextPage(forward);
- if ( nPage != -1 )
- SetSelection(nPage);
- }
-
-protected:
- // remove the page and return a pointer to it
- virtual wxNotebookPage *DoRemovePage(int page);
- // return the minimum size large enough to display the largest page entirely
- virtual wxSize DoGetBestSize() const;
-
- // common part of all ctors
- void Init();
-
- // get the next page wrapping if we reached the end
- int GetNextPage(bool forward) const;