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
This commit is contained in:
@@ -549,7 +549,7 @@ void wxButtonToolBar::OnLeftUp(wxMouseEvent& event)
|
|||||||
{
|
{
|
||||||
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, tool->GetId());
|
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, tool->GetId());
|
||||||
event.SetEventObject(tool->GetButton());
|
event.SetEventObject(tool->GetButton());
|
||||||
if (!ProcessEvent(event))
|
if (!GetEventHandler()->ProcessEvent(event))
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -199,10 +199,10 @@ public:
|
|||||||
cev.SetEventObject(datePicker);
|
cev.SetEventObject(datePicker);
|
||||||
cev.SetId(datePicker->GetId());
|
cev.SetId(datePicker->GetId());
|
||||||
cev.SetDate(dt);
|
cev.SetDate(dt);
|
||||||
GetParent()->ProcessEvent(cev);
|
GetParent()->GetEventHandler()->ProcessEvent(cev);
|
||||||
|
|
||||||
wxDateEvent event(datePicker, dt, wxEVT_DATE_CHANGED);
|
wxDateEvent event(datePicker, dt, wxEVT_DATE_CHANGED);
|
||||||
datePicker->GetParent()->ProcessEvent(event);
|
datePicker->GetParent()->GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -515,7 +515,7 @@ void wxDatePickerCtrlGeneric::OnText(wxCommandEvent &ev)
|
|||||||
{
|
{
|
||||||
ev.SetEventObject(this);
|
ev.SetEventObject(this);
|
||||||
ev.SetId(GetId());
|
ev.SetId(GetId());
|
||||||
GetParent()->ProcessEvent(ev);
|
GetParent()->GetEventHandler()->ProcessEvent(ev);
|
||||||
|
|
||||||
// We'll create an additional event if the date is valid.
|
// 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
|
// If the date isn't valid, the user's probably in the middle of typing
|
||||||
|
@@ -329,7 +329,7 @@ wxListbook::InsertPage(size_t n,
|
|||||||
if (GetPageCount() == 1)
|
if (GetPageCount() == 1)
|
||||||
{
|
{
|
||||||
wxSizeEvent sz(GetSize(), GetId());
|
wxSizeEvent sz(GetSize(), GetId());
|
||||||
ProcessEvent(sz);
|
GetEventHandler()->ProcessEvent(sz);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -363,7 +363,7 @@ wxWindow *wxListbook::DoRemovePage(size_t page)
|
|||||||
if (GetPageCount() == 0)
|
if (GetPageCount() == 0)
|
||||||
{
|
{
|
||||||
wxSizeEvent sz(GetSize(), GetId());
|
wxSizeEvent sz(GetSize(), GetId());
|
||||||
ProcessEvent(sz);
|
GetEventHandler()->ProcessEvent(sz);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -380,7 +380,7 @@ bool wxListbook::DeleteAllPages()
|
|||||||
m_selection = -1;
|
m_selection = -1;
|
||||||
|
|
||||||
wxSizeEvent sz(GetSize(), GetId());
|
wxSizeEvent sz(GetSize(), GetId());
|
||||||
ProcessEvent(sz);
|
GetEventHandler()->ProcessEvent(sz);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@@ -1480,7 +1480,7 @@ wxTreeItemId wxGenericTreeCtrl::DoInsertAfter(const wxTreeItemId& parentId,
|
|||||||
void wxGenericTreeCtrl::SendDeleteEvent(wxGenericTreeItem *item)
|
void wxGenericTreeCtrl::SendDeleteEvent(wxGenericTreeItem *item)
|
||||||
{
|
{
|
||||||
wxTreeEvent event(wxEVT_COMMAND_TREE_DELETE_ITEM, this, 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
|
// 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);
|
wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_EXPANDING, this, item);
|
||||||
|
|
||||||
if ( ProcessEvent( event ) && !event.IsAllowed() )
|
if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() )
|
||||||
{
|
{
|
||||||
// cancelled by program
|
// cancelled by program
|
||||||
return;
|
return;
|
||||||
@@ -1611,7 +1611,7 @@ void wxGenericTreeCtrl::Expand(const wxTreeItemId& itemId)
|
|||||||
RefreshSubtree(item);
|
RefreshSubtree(item);
|
||||||
|
|
||||||
event.SetEventType(wxEVT_COMMAND_TREE_ITEM_EXPANDED);
|
event.SetEventType(wxEVT_COMMAND_TREE_ITEM_EXPANDED);
|
||||||
ProcessEvent( event );
|
GetEventHandler()->ProcessEvent( event );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGenericTreeCtrl::Collapse(const wxTreeItemId& itemId)
|
void wxGenericTreeCtrl::Collapse(const wxTreeItemId& itemId)
|
||||||
@@ -1625,7 +1625,7 @@ void wxGenericTreeCtrl::Collapse(const wxTreeItemId& itemId)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_COLLAPSING, this, item);
|
wxTreeEvent event(wxEVT_COMMAND_TREE_ITEM_COLLAPSING, this, item);
|
||||||
if ( ProcessEvent( event ) && !event.IsAllowed() )
|
if ( GetEventHandler()->ProcessEvent( event ) && !event.IsAllowed() )
|
||||||
{
|
{
|
||||||
// cancelled by program
|
// cancelled by program
|
||||||
return;
|
return;
|
||||||
@@ -1648,7 +1648,7 @@ void wxGenericTreeCtrl::Collapse(const wxTreeItemId& itemId)
|
|||||||
RefreshSubtree(item);
|
RefreshSubtree(item);
|
||||||
|
|
||||||
event.SetEventType(wxEVT_COMMAND_TREE_ITEM_COLLAPSED);
|
event.SetEventType(wxEVT_COMMAND_TREE_ITEM_COLLAPSED);
|
||||||
ProcessEvent( event );
|
GetEventHandler()->ProcessEvent( event );
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxGenericTreeCtrl::CollapseAndReset(const wxTreeItemId& item)
|
void wxGenericTreeCtrl::CollapseAndReset(const wxTreeItemId& item)
|
||||||
|
@@ -536,7 +536,7 @@ void wxFrame::OnSysColourChanged(wxSysColourChangedEvent& event)
|
|||||||
{
|
{
|
||||||
wxSysColourChangedEvent event2;
|
wxSysColourChangedEvent event2;
|
||||||
event2.SetEventObject( m_frameStatusBar );
|
event2.SetEventObject( m_frameStatusBar );
|
||||||
m_frameStatusBar->ProcessEvent(event2);
|
m_frameStatusBar->GetEventHandler()->ProcessEvent(event2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Propagate the event to the non-top-level children
|
// Propagate the event to the non-top-level children
|
||||||
|
@@ -149,7 +149,7 @@ bool wxTabCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
|||||||
event.SetInt(idCtrl) ;
|
event.SetInt(idCtrl) ;
|
||||||
event.SetSelection(idCtrl);
|
event.SetSelection(idCtrl);
|
||||||
|
|
||||||
return ProcessEvent(event);
|
return GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Responds to colour changes, and passes event on to children.
|
// Responds to colour changes, and passes event on to children.
|
||||||
|
Reference in New Issue
Block a user