From eafd76b02ce9662d48e56ce2769c97af46139bc1 Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Mon, 9 Apr 2007 16:43:23 +0000 Subject: [PATCH] Replace direct calls to ProcessEvent() with GetEventHandler()->ProcessEvent(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/buttonbar.cpp | 2 +- src/generic/datectlg.cpp | 6 +++--- src/generic/listbkg.cpp | 6 +++--- src/generic/treectlg.cpp | 10 +++++----- src/motif/frame.cpp | 2 +- src/msw/tabctrl.cpp | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/generic/buttonbar.cpp b/src/generic/buttonbar.cpp index 091dfd01b1..512352bf79 100644 --- a/src/generic/buttonbar.cpp +++ b/src/generic/buttonbar.cpp @@ -549,7 +549,7 @@ void wxButtonToolBar::OnLeftUp(wxMouseEvent& event) { wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, tool->GetId()); event.SetEventObject(tool->GetButton()); - if (!ProcessEvent(event)) + if (!GetEventHandler()->ProcessEvent(event)) event.Skip(); } } diff --git a/src/generic/datectlg.cpp b/src/generic/datectlg.cpp index fbdbdb8bb6..2626290a3b 100644 --- a/src/generic/datectlg.cpp +++ b/src/generic/datectlg.cpp @@ -199,10 +199,10 @@ public: cev.SetEventObject(datePicker); cev.SetId(datePicker->GetId()); cev.SetDate(dt); - GetParent()->ProcessEvent(cev); + GetParent()->GetEventHandler()->ProcessEvent(cev); wxDateEvent event(datePicker, dt, wxEVT_DATE_CHANGED); - datePicker->GetParent()->ProcessEvent(event); + datePicker->GetParent()->GetEventHandler()->ProcessEvent(event); } private: @@ -515,7 +515,7 @@ void wxDatePickerCtrlGeneric::OnText(wxCommandEvent &ev) { ev.SetEventObject(this); ev.SetId(GetId()); - GetParent()->ProcessEvent(ev); + GetParent()->GetEventHandler()->ProcessEvent(ev); // We'll create an additional event if the date is valid. // If the date isn't valid, the user's probably in the middle of typing diff --git a/src/generic/listbkg.cpp b/src/generic/listbkg.cpp index ec18b7eb32..eae7c13d3c 100644 --- a/src/generic/listbkg.cpp +++ b/src/generic/listbkg.cpp @@ -329,7 +329,7 @@ wxListbook::InsertPage(size_t n, if (GetPageCount() == 1) { wxSizeEvent sz(GetSize(), GetId()); - ProcessEvent(sz); + GetEventHandler()->ProcessEvent(sz); } return true; } @@ -363,7 +363,7 @@ wxWindow *wxListbook::DoRemovePage(size_t page) if (GetPageCount() == 0) { wxSizeEvent sz(GetSize(), GetId()); - ProcessEvent(sz); + GetEventHandler()->ProcessEvent(sz); } } @@ -380,7 +380,7 @@ bool wxListbook::DeleteAllPages() m_selection = -1; wxSizeEvent sz(GetSize(), GetId()); - ProcessEvent(sz); + GetEventHandler()->ProcessEvent(sz); return true; } diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp index 258e1c36d9..10360a4abf 100644 --- a/src/generic/treectlg.cpp +++ b/src/generic/treectlg.cpp @@ -1480,7 +1480,7 @@ wxTreeItemId wxGenericTreeCtrl::DoInsertAfter(const wxTreeItemId& parentId, void wxGenericTreeCtrl::SendDeleteEvent(wxGenericTreeItem *item) { wxTreeEvent event(wxEVT_COMMAND_TREE_DELETE_ITEM, this, item); - ProcessEvent( event ); + GetEventHandler()->ProcessEvent( event ); } // Don't leave edit or selection on a child which is about to disappear @@ -1599,7 +1599,7 @@ void wxGenericTreeCtrl::Expand(const wxTreeItemId& itemId) wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_EXPANDING, this, item); - if ( ProcessEvent( event ) && !event.IsAllowed() ) + if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() ) { // cancelled by program return; @@ -1611,7 +1611,7 @@ void wxGenericTreeCtrl::Expand(const wxTreeItemId& itemId) RefreshSubtree(item); event.SetEventType(wxEVT_COMMAND_TREE_ITEM_EXPANDED); - ProcessEvent( event ); + GetEventHandler()->ProcessEvent( event ); } void wxGenericTreeCtrl::Collapse(const wxTreeItemId& itemId) @@ -1625,7 +1625,7 @@ void wxGenericTreeCtrl::Collapse(const wxTreeItemId& itemId) return; wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_COLLAPSING, this, item); - if ( ProcessEvent( event ) && !event.IsAllowed() ) + if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() ) { // cancelled by program return; @@ -1648,7 +1648,7 @@ void wxGenericTreeCtrl::Collapse(const wxTreeItemId& itemId) RefreshSubtree(item); event.SetEventType(wxEVT_COMMAND_TREE_ITEM_COLLAPSED); - ProcessEvent( event ); + GetEventHandler()->ProcessEvent( event ); } void wxGenericTreeCtrl::CollapseAndReset(const wxTreeItemId& item) diff --git a/src/motif/frame.cpp b/src/motif/frame.cpp index c4555bb150..d0d2f3b70c 100644 --- a/src/motif/frame.cpp +++ b/src/motif/frame.cpp @@ -536,7 +536,7 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event) { wxSysColourChangedEvent event2; event2.SetEventObject( m_frameStatusBar ); - m_frameStatusBar->ProcessEvent(event2); + m_frameStatusBar->GetEventHandler()->ProcessEvent(event2); } // Propagate the event to the non-top-level children diff --git a/src/msw/tabctrl.cpp b/src/msw/tabctrl.cpp index 21eb96131e..d55fd09bca 100644 --- a/src/msw/tabctrl.cpp +++ b/src/msw/tabctrl.cpp @@ -149,7 +149,7 @@ bool wxTabCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result) event.SetInt(idCtrl) ; event.SetSelection(idCtrl); - return ProcessEvent(event); + return GetEventHandler()->ProcessEvent(event); } // Responds to colour changes, and passes event on to children. -- 2.45.2