added SendPageChanging/ChangedEvent() functions; fixed wxCocoa build broken by wxNotebook::ChangePage() change

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41764 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2006-10-08 23:41:52 +00:00
parent dd1c16314e
commit a570e8f8fe
8 changed files with 62 additions and 39 deletions

View File

@@ -89,7 +89,7 @@ WX_DEFINE_LIST(wxGtkNotebookPagesList)
extern "C" {
static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget),
GtkNotebookPage *WXUNUSED(page),
GtkNotebookPage *WXUNUSED(gpage),
guint page,
wxNotebook *notebook )
{
@@ -118,12 +118,7 @@ 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,
@@ -136,10 +131,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);
}
}