// implementation
// ============================================================================
-IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl)
+IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxBookCtrlBase)
IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent)
// ----------------------------------------------------------------------------
m_sizePad = GetRenderer()->GetTabPadding();
- SetBestSize(size);
+ SetInitialSize(size);
CreateInputHandler(wxINP_HANDLER_NOTEBOOK);
return m_sel;
}
- wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, m_windowId);
- if (flags & SetSelection_SendEvent)
+ if ( flags & SetSelection_SendEvent )
{
- // event handling
- event.SetSelection(nPage);
- event.SetOldSelection(m_sel);
- event.SetEventObject(this);
- if ( GetEventHandler()->ProcessEvent(event) && !event.IsAllowed() )
+ if ( !SendPageChangingEvent(nPage) )
{
// program doesn't allow the page change
return m_sel;
m_pages[m_sel]->Show();
}
- if (flags & SetSelection_SendEvent)
+ if ( flags & SetSelection_SendEvent )
{
// event handling
- event.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED);
- GetEventHandler()->ProcessEvent(event);
+ SendPageChangedEvent(selOld);
}
return selOld;