// event table
// ----------------------------------------------------------------------------
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED)
-DEFINE_EVENT_TYPE(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING)
-
-BEGIN_EVENT_TABLE(wxNotebook, wxControl)
+BEGIN_EVENT_TABLE(wxNotebook, wxBookCtrlBase)
EVT_NOTEBOOK_PAGE_CHANGED(wxID_ANY, wxNotebook::OnSelChange)
EVT_SIZE(wxNotebook::OnSize)
EVT_SET_FOCUS(wxNotebook::OnSetFocus)
EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey)
END_EVENT_TABLE()
-IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxControl)
-IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxNotifyEvent)
+IMPLEMENT_DYNAMIC_CLASS(wxNotebook, wxBookCtrlBase)
// ============================================================================
// implementation
if (nPage != (size_t)m_nSelection)
{
- wxNotebookEvent vEvent( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
+ wxBookCtrlEvent vEvent( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
,m_windowId
);
vEvent.SetSelection(nPage);
vEvent.SetOldSelection(m_nSelection);
vEvent.SetEventObject(this);
- if (!GetEventHandler()->ProcessEvent(vEvent) || vEvent.IsAllowed())
+ if (!HandleWindowEvent(vEvent) || vEvent.IsAllowed())
{
//
// Program allows the page change
//
vEvent.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED);
- GetEventHandler()->ProcessEvent(vEvent);
+ HandleWindowEvent(vEvent);
::WinSendMsg( GetHWND()
,BKM_TURNTOPAGE
return (bool)::WinSendMsg( m_hWnd
,BKM_SETTABTEXT
,MPFROMLONG((ULONG)m_alPageId[nPage])
- ,MPFROMP(rsStrText.c_str())
+ ,MPFROMP((const char*)rsStrText.c_str())
);
} // end of wxNotebook::SetPageText
} // end of wxNotebook::OnSize
void wxNotebook::OnSelChange (
- wxNotebookEvent& rEvent
+ wxBookCtrlEvent& rEvent
)
{
//
wxWindow* pPage = m_pages[m_nSelection];
- if (!pPage->GetEventHandler()->ProcessEvent(rEvent))
+ if (!pPage->HandleWindowEvent(rEvent))
{
pPage->SetFocus();
}
if (pParent)
{
rEvent.SetCurrentFocus(this);
- pParent->GetEventHandler()->ProcessEvent(rEvent);
+ pParent->HandleWindowEvent(rEvent);
}
}
}