- return m_sel;
-}
-
-void wxNotebook::ChangePage(int nPage)
-{
- wxCHECK_RET( IS_VALID_PAGE(nPage), _T("invalid notebook page") );
-
- if ( (size_t)nPage == m_sel )
- {
- // nothing to do
- return;
- }
-
- wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, m_windowId);
- event.SetSelection(nPage);
- event.SetOldSelection(m_sel);
- event.SetEventObject(this);
- if ( GetEventHandler()->ProcessEvent(event) && !event.IsAllowed() )
- {
- // program doesn't allow the page change
- return;
- }
-
- SetSelection(nPage);
-