X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1d6fcbcc7088e9c104b3dc5b4704a07f728d55ae..ea58aac5808a7617dd68c94b651ad70e038a324f:/src/gtk1/notebook.cpp diff --git a/src/gtk1/notebook.cpp b/src/gtk1/notebook.cpp index 7c51c6d91b..37fa1fd8e5 100644 --- a/src/gtk1/notebook.cpp +++ b/src/gtk1/notebook.cpp @@ -118,16 +118,10 @@ static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget), } else { - wxNotebookEvent eventChanging( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, - notebook->GetId(), page, old ); - eventChanging.SetEventObject( notebook ); - - if ( (notebook->GetEventHandler()->ProcessEvent(eventChanging)) && - !eventChanging.IsAllowed() ) + if ( !notebook->SendPageChangingEvent(page) ) { - /* program doesn't allow the page change */ - g_signal_stop_emission_by_name (notebook->m_widget, - "switch_page"); + // program doesn't allow the page change + gtk_signal_emit_stop_by_name(GTK_OBJECT(notebook->m_widget), "switch_page"); } else // change allowed { @@ -136,10 +130,7 @@ static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget), // not really changed in GTK+ notebook->m_selection = page; - wxNotebookEvent eventChanged( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, - notebook->GetId(), page, old ); - eventChanged.SetEventObject( notebook ); - notebook->GetEventHandler()->ProcessEvent( eventChanged ); + notebook->SendPageChangedEvent(old); } } @@ -258,7 +249,7 @@ static gint gtk_notebook_key_press_callback( GtkWidget *widget, GdkEventKey *gdk event.SetCurrentFocus( notebook ); wxNotebookPage *client = notebook->GetPage(sel); - if ( !client->GetEventHandler()->ProcessEvent( event ) ) + if ( !client->HandleWindowEvent( event ) ) { client->SetFocus(); } @@ -296,9 +287,9 @@ static void wxInsertChildInNotebook( wxNotebook* parent, wxWindow* child ) // wxNotebook //----------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxNotebook,wxControl) +IMPLEMENT_DYNAMIC_CLASS(wxNotebook,wxBookCtrlBase) -BEGIN_EVENT_TABLE(wxNotebook, wxControl) +BEGIN_EVENT_TABLE(wxNotebook, wxBookCtrlBase) EVT_NAVIGATION_KEY(wxNotebook::OnNavigationKey) END_EVENT_TABLE()