From 687706f5e722ac8a39172024f794ae0ffbd190e2 Mon Sep 17 00:00:00 2001 From: Kevin Hock Date: Tue, 18 Jan 2005 15:08:15 +0000 Subject: [PATCH] Use event modifiers and accessors rather than m_ variables directly, which are now protected rather than public with 2.4 compatibility disabled git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- .../gizmos/dynsash_switch/dynsash_switch.cpp | 2 +- contrib/src/fl/controlbar.cpp | 10 ++--- contrib/src/gizmos/dynamicsash.cpp | 2 +- samples/opengl/cube/cube.cpp | 4 +- samples/scroll/scroll.cpp | 8 ++-- src/common/choiccmn.cpp | 2 +- src/common/lboxcmn.cpp | 2 +- src/common/wincmn.cpp | 4 +- src/generic/scrlwing.cpp | 10 ++--- src/generic/vlbox.cpp | 4 +- src/gtk/listbox.cpp | 6 +-- src/gtk/window.cpp | 2 +- src/gtk1/listbox.cpp | 6 +-- src/gtk1/window.cpp | 2 +- src/mac/carbon/app.cpp | 4 +- src/mac/carbon/listbox.cpp | 4 +- src/mac/carbon/scrolbar.cpp | 2 +- src/mac/carbon/toplevel.cpp | 2 +- src/mac/carbon/window.cpp | 40 +++++++++---------- src/mac/classic/app.cpp | 10 ++--- src/mac/classic/listbox.cpp | 6 +-- src/mac/classic/scrolbar.cpp | 2 +- src/mac/classic/toplevel.cpp | 6 +-- src/mac/classic/window.cpp | 40 +++++++++---------- src/motif/checklst.cpp | 4 +- src/motif/choice.cpp | 4 +- src/motif/combobox.cpp | 12 +++--- src/motif/combobox_native.cpp | 12 +++--- src/motif/listbox.cpp | 10 ++--- src/motif/radiobox.cpp | 2 +- src/motif/radiobut.cpp | 2 +- src/motif/scrolbar.cpp | 2 +- src/motif/slider.cpp | 4 +- src/motif/window.cpp | 2 +- src/msw/listbox.cpp | 2 +- src/msw/radiobox.cpp | 2 +- src/msw/radiobut.cpp | 2 +- src/msw/scrolbar.cpp | 2 +- src/msw/window.cpp | 30 +++++++------- src/os2/listbox.cpp | 2 +- src/os2/scrolbar.cpp | 2 +- src/os2/window.cpp | 24 +++++------ src/univ/listbox.cpp | 2 +- src/x11/window.cpp | 2 +- 44 files changed, 153 insertions(+), 151 deletions(-) diff --git a/contrib/samples/gizmos/dynsash_switch/dynsash_switch.cpp b/contrib/samples/gizmos/dynsash_switch/dynsash_switch.cpp index 045d6d33b9..2398439427 100644 --- a/contrib/samples/gizmos/dynsash_switch/dynsash_switch.cpp +++ b/contrib/samples/gizmos/dynsash_switch/dynsash_switch.cpp @@ -239,7 +239,7 @@ void SwitchView::OnFocus(wxFocusEvent& event) { wxScrollBar *hscroll = m_dyn_sash->GetHScrollBar(this); wxScrollBar *vscroll = m_dyn_sash->GetVScrollBar(this); - if (event.m_eventObject == hscroll || event.m_eventObject == vscroll) { + if (event.GetEventObject() == hscroll || event.GetEventObject() == vscroll) { m_view->SetFocus(); } else { event.Skip(); diff --git a/contrib/src/fl/controlbar.cpp b/contrib/src/fl/controlbar.cpp index cfe535dc3b..9183ec91d3 100644 --- a/contrib/src/fl/controlbar.cpp +++ b/contrib/src/fl/controlbar.cpp @@ -1558,11 +1558,11 @@ void wxFrameLayout::FirePluginEvent( cbPluginEvent& event ) { bool isInputEvt = true; #if wxCHECK_VERSION(2,3,0) - if ( event.m_eventType != cbEVT_PL_LEFT_DOWN && - event.m_eventType != cbEVT_PL_LEFT_UP && - event.m_eventType != cbEVT_PL_RIGHT_DOWN && - event.m_eventType != cbEVT_PL_RIGHT_UP && - event.m_eventType != cbEVT_PL_MOTION ) + if ( event.GetEventType() != cbEVT_PL_LEFT_DOWN && + event.GetEventType() != cbEVT_PL_LEFT_UP && + event.GetEventType() != cbEVT_PL_RIGHT_DOWN && + event.GetEventType() != cbEVT_PL_RIGHT_UP && + event.GetEventType() != cbEVT_PL_MOTION ) isInputEvt = false; #else switch ( event.m_eventType ) diff --git a/contrib/src/gizmos/dynamicsash.cpp b/contrib/src/gizmos/dynamicsash.cpp index 08d1cecac7..5855cf24b7 100644 --- a/contrib/src/gizmos/dynamicsash.cpp +++ b/contrib/src/gizmos/dynamicsash.cpp @@ -1180,7 +1180,7 @@ void wxDynamicSashWindowLeaf::OnScroll(wxScrollEvent &WXUNUSED(event)) { } void wxDynamicSashWindowLeaf::OnFocus(wxFocusEvent &event) { - if (event.m_eventObject == m_hscroll || event.m_eventObject == m_vscroll) { + if (event.GetEventObject() == m_hscroll || event.GetEventObject() == m_vscroll) { m_child->SetFocus(); } } diff --git a/samples/opengl/cube/cube.cpp b/samples/opengl/cube/cube.cpp index 425865f280..de01375415 100644 --- a/samples/opengl/cube/cube.cpp +++ b/samples/opengl/cube/cube.cpp @@ -371,7 +371,7 @@ void TestGLCanvas::OnKeyDown( wxKeyEvent& event ) if (!m_TimeInitialized) { m_TimeInitialized = 1; - m_xsynct = event.m_timeStamp; + m_xsynct = event.GetTimestamp(); m_gsynct = wxStopWatch(&m_secbase); m_Key = evkey; @@ -380,7 +380,7 @@ void TestGLCanvas::OnKeyDown( wxKeyEvent& event ) m_LastRedraw = 0; } - unsigned long currTime = event.m_timeStamp - m_xsynct; + unsigned long currTime = event.GetTimestamp() - m_xsynct; if (evkey != m_Key) { diff --git a/samples/scroll/scroll.cpp b/samples/scroll/scroll.cpp index 4a9e3aac09..db04ec3db1 100644 --- a/samples/scroll/scroll.cpp +++ b/samples/scroll/scroll.cpp @@ -905,15 +905,15 @@ void MyAutoTimedScrollingWindow::OnScroll(wxScrollWinEvent& event) // FIXME: the cursor also moves when the scrollbar arrows are clicked if (HasCapture()) { if (event.GetOrientation() == wxHORIZONTAL) { - if (event.m_eventType == wxEVT_SCROLLWIN_LINEUP) { + if (event.GetEventType() == wxEVT_SCROLLWIN_LINEUP) { --m_cursor.x; - } else if (event.m_eventType == wxEVT_SCROLLWIN_LINEDOWN) { + } else if (event.GetEventType() == wxEVT_SCROLLWIN_LINEDOWN) { ++m_cursor.x; } } else if (event.GetOrientation() == wxVERTICAL) { - if (event.m_eventType == wxEVT_SCROLLWIN_LINEUP) { + if (event.GetEventType() == wxEVT_SCROLLWIN_LINEUP) { --m_cursor.y; - } else if (event.m_eventType == wxEVT_SCROLLWIN_LINEDOWN) { + } else if (event.GetEventType() == wxEVT_SCROLLWIN_LINEDOWN) { ++m_cursor.y; } } diff --git a/src/common/choiccmn.cpp b/src/common/choiccmn.cpp index a4be5ca35c..d090aafd74 100644 --- a/src/common/choiccmn.cpp +++ b/src/common/choiccmn.cpp @@ -64,7 +64,7 @@ bool wxChoiceBase::SetStringSelection(const wxString& s) void wxChoiceBase::Command(wxCommandEvent& event) { - SetSelection(event.m_commandInt); + SetSelection(event.GetInt()); (void)ProcessEvent(event); } diff --git a/src/common/lboxcmn.cpp b/src/common/lboxcmn.cpp index 26bc095188..1ded1f2bb5 100644 --- a/src/common/lboxcmn.cpp +++ b/src/common/lboxcmn.cpp @@ -118,7 +118,7 @@ void wxListBoxBase::DeselectAll(int itemToLeaveSelected) void wxListBoxBase::Command(wxCommandEvent& event) { - SetSelection(event.m_commandInt, event.m_extraLong != 0); + SetSelection(event.GetInt(), event.GetExtraLong() != 0); (void)ProcessEvent(event); } diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 9ff4cee288..4fb4d5b26f 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -2033,7 +2033,7 @@ void wxWindowBase::AdjustForParentClientOrigin(int& x, int& y, int sizeFlags) co void wxWindowBase::UpdateWindowUI(long flags) { wxUpdateUIEvent event(GetId()); - event.m_eventObject = this; + event.SetEventObject(this); if ( GetEventHandler()->ProcessEvent(event) ) { @@ -2155,7 +2155,7 @@ void wxWindowBase::OnSysColourChanged(wxSysColourChangedEvent& event) if ( !win->IsTopLevel() ) { wxSysColourChangedEvent event2; - event.m_eventObject = win; + event.SetEventObject(win); win->GetEventHandler()->ProcessEvent(event2); } diff --git a/src/generic/scrlwing.cpp b/src/generic/scrlwing.cpp index 1fe62de7bf..e2c3e6694d 100644 --- a/src/generic/scrlwing.cpp +++ b/src/generic/scrlwing.cpp @@ -1175,14 +1175,14 @@ void wxScrollHelper::HandleOnMouseWheel(wxMouseEvent& event) newEvent.SetPosition(0); newEvent.SetOrientation(wxVERTICAL); - newEvent.m_eventObject = m_win; + newEvent.SetEventObject(m_win); if (event.IsPageScroll()) { if (lines > 0) - newEvent.m_eventType = wxEVT_SCROLLWIN_PAGEUP; + newEvent.SetEventType(wxEVT_SCROLLWIN_PAGEUP); else - newEvent.m_eventType = wxEVT_SCROLLWIN_PAGEDOWN; + newEvent.SetEventType(wxEVT_SCROLLWIN_PAGEDOWN); m_win->GetEventHandler()->ProcessEvent(newEvent); } @@ -1190,9 +1190,9 @@ void wxScrollHelper::HandleOnMouseWheel(wxMouseEvent& event) { lines *= event.GetLinesPerAction(); if (lines > 0) - newEvent.m_eventType = wxEVT_SCROLLWIN_LINEUP; + newEvent.SetEventType(wxEVT_SCROLLWIN_LINEUP); else - newEvent.m_eventType = wxEVT_SCROLLWIN_LINEDOWN; + newEvent.SetEventType(wxEVT_SCROLLWIN_LINEDOWN); int times = abs(lines); for (; times > 0; times--) diff --git a/src/generic/vlbox.cpp b/src/generic/vlbox.cpp index 0a08835aa4..2830f19c7b 100644 --- a/src/generic/vlbox.cpp +++ b/src/generic/vlbox.cpp @@ -243,7 +243,7 @@ void wxVListBox::SendSelectedEvent() wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, GetId()); event.SetEventObject(this); - event.m_commandInt = m_current; + event.SetInt(m_current); (void)GetEventHandler()->ProcessEvent(event); } @@ -602,7 +602,7 @@ void wxVListBox::OnLeftDClick(wxMouseEvent& event) { wxCommandEvent event(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, GetId()); event.SetEventObject(this); - event.m_commandInt = item; + event.SetInt(item); (void)GetEventHandler()->ProcessEvent(event); } diff --git a/src/gtk/listbox.cpp b/src/gtk/listbox.cpp index ebfc45da5d..70203eb2db 100644 --- a/src/gtk/listbox.cpp +++ b/src/gtk/listbox.cpp @@ -194,7 +194,7 @@ gtk_listbox_button_release_callback( GtkWidget * WXUNUSED(widget), n = -1; } - event.m_commandInt = n; + event.SetInt(n); listbox->GetEventHandler()->ProcessEvent( event ); @@ -320,7 +320,7 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis { n = -1; } - new_event.m_commandInt = n; + new_event.SetInt(n); listbox->GetEventHandler()->ProcessEvent( new_event ); } } @@ -393,7 +393,7 @@ static void gtk_listitem_select_cb( GtkWidget *widget, n = -1; } - event.m_commandInt = n; + event.SetInt(n); // No longer required with new code in wxLB_SINGLE // listbox->GetEventHandler()->AddPendingEvent( event ); diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 7bc0775d33..c2de0e2f97 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -3350,7 +3350,7 @@ bool wxWindowGTK::Show( bool show ) gtk_widget_hide( m_widget ); wxShowEvent eventShow(GetId(), show); - eventShow.m_eventObject = this; + eventShow.SetEventObject(this); GetEventHandler()->ProcessEvent(eventShow); diff --git a/src/gtk1/listbox.cpp b/src/gtk1/listbox.cpp index ebfc45da5d..70203eb2db 100644 --- a/src/gtk1/listbox.cpp +++ b/src/gtk1/listbox.cpp @@ -194,7 +194,7 @@ gtk_listbox_button_release_callback( GtkWidget * WXUNUSED(widget), n = -1; } - event.m_commandInt = n; + event.SetInt(n); listbox->GetEventHandler()->ProcessEvent( event ); @@ -320,7 +320,7 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis { n = -1; } - new_event.m_commandInt = n; + new_event.SetInt(n); listbox->GetEventHandler()->ProcessEvent( new_event ); } } @@ -393,7 +393,7 @@ static void gtk_listitem_select_cb( GtkWidget *widget, n = -1; } - event.m_commandInt = n; + event.SetInt(n); // No longer required with new code in wxLB_SINGLE // listbox->GetEventHandler()->AddPendingEvent( event ); diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 7bc0775d33..c2de0e2f97 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -3350,7 +3350,7 @@ bool wxWindowGTK::Show( bool show ) gtk_widget_hide( m_widget ); wxShowEvent eventShow(GetId(), show); - eventShow.m_eventObject = this; + eventShow.SetEventObject(this); GetEventHandler()->ProcessEvent(eventShow); diff --git a/src/mac/carbon/app.cpp b/src/mac/carbon/app.cpp index 494ac9592f..b1c20de673 100644 --- a/src/mac/carbon/app.cpp +++ b/src/mac/carbon/app.cpp @@ -1241,7 +1241,7 @@ bool wxApp::MacSendKeyDownEvent( wxWindow* focus , long keymessage , long modifi event.m_x = wherex; event.m_y = wherey; - event.m_timeStamp = when; + event.SetTimestamp(when); event.SetEventObject(focus); handled = focus->GetEventHandler()->ProcessEvent( event ) ; if ( handled && event.GetSkipped() ) @@ -1366,7 +1366,7 @@ bool wxApp::MacSendKeyUpEvent( wxWindow* focus , long keymessage , long modifier event.m_x = wherex; event.m_y = wherey; - event.m_timeStamp = when; + event.SetTimestamp(when); event.SetEventObject(focus); handled = focus->GetEventHandler()->ProcessEvent( event ) ; diff --git a/src/mac/carbon/listbox.cpp b/src/mac/carbon/listbox.cpp index 70035a81c2..502651c1a4 100644 --- a/src/mac/carbon/listbox.cpp +++ b/src/mac/carbon/listbox.cpp @@ -864,7 +864,7 @@ void wxListBox::OnChar(wxKeyEvent& event) n = -1; } - event.m_commandInt = n; + event.SetInt(n); GetEventHandler()->ProcessEvent(event); } @@ -891,7 +891,7 @@ void wxListBox::OnChar(wxKeyEvent& event) event.SetClientData( GetClientData(line) ); event.SetString( GetString(line) ); - event.m_commandInt = line ; + event.SetInt(line); GetEventHandler()->ProcessEvent(event); } diff --git a/src/mac/carbon/scrolbar.cpp b/src/mac/carbon/scrolbar.cpp index d6454cf768..9098a0ad6d 100644 --- a/src/mac/carbon/scrolbar.cpp +++ b/src/mac/carbon/scrolbar.cpp @@ -92,7 +92,7 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS void wxScrollBar::Command(wxCommandEvent& event) { - SetThumbPosition(event.m_commandInt); + SetThumbPosition(event.GetInt()); ProcessCommand(event); } diff --git a/src/mac/carbon/toplevel.cpp b/src/mac/carbon/toplevel.cpp index 1ce8d60fde..f1a4f5fd6a 100644 --- a/src/mac/carbon/toplevel.cpp +++ b/src/mac/carbon/toplevel.cpp @@ -211,7 +211,7 @@ static pascal OSStatus KeyboardEventHandler( EventHandlerCallRef handler , Event event.m_x = point.h; event.m_y = point.v; - event.m_timeStamp = when; + event.SetTimestamp(when); wxWindow* focus = wxWindow::FindFocus() ; event.SetEventObject(focus); diff --git a/src/mac/carbon/window.cpp b/src/mac/carbon/window.cpp index 8472050465..ae3ead93cb 100644 --- a/src/mac/carbon/window.cpp +++ b/src/mac/carbon/window.cpp @@ -2512,29 +2512,29 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect) void wxWindowMac::MacOnScroll(wxScrollEvent &event ) { - if ( event.m_eventObject == m_vScrollBar || event.m_eventObject == m_hScrollBar ) + if ( event.GetEventObject() == m_vScrollBar || event.GetEventObject() == m_hScrollBar ) { wxScrollWinEvent wevent; wevent.SetPosition(event.GetPosition()); wevent.SetOrientation(event.GetOrientation()); - wevent.m_eventObject = this; - - if (event.m_eventType == wxEVT_SCROLL_TOP) - wevent.m_eventType = wxEVT_SCROLLWIN_TOP; - else if (event.m_eventType == wxEVT_SCROLL_BOTTOM) - wevent.m_eventType = wxEVT_SCROLLWIN_BOTTOM; - else if (event.m_eventType == wxEVT_SCROLL_LINEUP) - wevent.m_eventType = wxEVT_SCROLLWIN_LINEUP; - else if (event.m_eventType == wxEVT_SCROLL_LINEDOWN) - wevent.m_eventType = wxEVT_SCROLLWIN_LINEDOWN; - else if (event.m_eventType == wxEVT_SCROLL_PAGEUP) - wevent.m_eventType = wxEVT_SCROLLWIN_PAGEUP; - else if (event.m_eventType == wxEVT_SCROLL_PAGEDOWN) - wevent.m_eventType = wxEVT_SCROLLWIN_PAGEDOWN; - else if (event.m_eventType == wxEVT_SCROLL_THUMBTRACK) - wevent.m_eventType = wxEVT_SCROLLWIN_THUMBTRACK; - else if (event.m_eventType == wxEVT_SCROLL_THUMBRELEASE) - wevent.m_eventType = wxEVT_SCROLLWIN_THUMBRELEASE; + wevent.SetEventObject(this); + + if (event.GetEventType() == wxEVT_SCROLL_TOP) + wevent.SetEventType( wxEVT_SCROLLWIN_TOP ); + else if (event.GetEventType() == wxEVT_SCROLL_BOTTOM) + wevent.SetEventType( wxEVT_SCROLLWIN_BOTTOM ); + else if (event.GetEventType() == wxEVT_SCROLL_LINEUP) + wevent.SetEventType( wxEVT_SCROLLWIN_LINEUP ); + else if (event.GetEventType() == wxEVT_SCROLL_LINEDOWN) + wevent.SetEventType( wxEVT_SCROLLWIN_LINEDOWN ); + else if (event.GetEventType() == wxEVT_SCROLL_PAGEUP) + wevent.SetEventType( wxEVT_SCROLLWIN_PAGEUP ); + else if (event.GetEventType() == wxEVT_SCROLL_PAGEDOWN) + wevent.SetEventType( wxEVT_SCROLLWIN_PAGEDOWN ); + else if (event.GetEventType() == wxEVT_SCROLL_THUMBTRACK) + wevent.SetEventType( wxEVT_SCROLLWIN_THUMBTRACK ); + else if (event.GetEventType() == wxEVT_SCROLL_THUMBRELEASE) + wevent.SetEventType( wxEVT_SCROLLWIN_THUMBRELEASE ); GetEventHandler()->ProcessEvent(wevent); } @@ -2845,7 +2845,7 @@ bool wxWindowMac::MacDoRedraw( WXHRGN updatergnr , long time ) { // paint the window itself wxPaintEvent event; - event.m_timeStamp = time ; + event.SetTimestamp(time); event.SetEventObject(this); handled = GetEventHandler()->ProcessEvent(event); diff --git a/src/mac/classic/app.cpp b/src/mac/classic/app.cpp index 610f33f0b4..d1267be385 100644 --- a/src/mac/classic/app.cpp +++ b/src/mac/classic/app.cpp @@ -1479,7 +1479,7 @@ void wxApp::MacHandleModifierEvents( WXEVENTREF evr ) event.m_x = ev->where.h; event.m_y = ev->where.v; - event.m_timeStamp = ev->when; + event.SetTimestamp( ev->when ); wxWindow* focus = wxWindow::FindFocus() ; event.SetEventObject(focus); @@ -1953,7 +1953,7 @@ bool wxApp::MacSendKeyDownEvent( wxWindow* focus , long keymessage , long modifi event.m_x = wherex; event.m_y = wherey; - event.m_timeStamp = when; + event.SetTimestamp(when); event.SetEventObject(focus); handled = focus->GetEventHandler()->ProcessEvent( event ) ; if ( handled && event.GetSkipped() ) @@ -2080,7 +2080,7 @@ bool wxApp::MacSendKeyUpEvent( wxWindow* focus , long keymessage , long modifier event.m_x = wherex; event.m_y = wherey; - event.m_timeStamp = when; + event.SetTimestamp(when); event.SetEventObject(focus); handled = focus->GetEventHandler()->ProcessEvent( event ) ; @@ -2219,7 +2219,7 @@ void wxApp::MacHandleOSEvent( WXEVENTREF evr ) event.m_metaDown = ev->modifiers & cmdKey; event.m_x = ev->where.h; event.m_y = ev->where.v; - event.m_timeStamp = ev->when; + event.SetTimestamp( ev->when ); event.SetEventObject(this); if ( wxWindow::s_lastMouseWindow ) @@ -2322,7 +2322,7 @@ void wxApp::MacHandleMouseMovedEvent(wxInt32 x , wxInt32 y ,wxUint32 modifiers , event.m_x = x; event.m_y = y; - event.m_timeStamp = timestamp; + event.SetTimestamp(timestamp); if ( wxWindow::s_lastMouseWindow ) { diff --git a/src/mac/classic/listbox.cpp b/src/mac/classic/listbox.cpp index 44b2948d33..f3a37a06b8 100644 --- a/src/mac/classic/listbox.cpp +++ b/src/mac/classic/listbox.cpp @@ -909,7 +909,7 @@ void wxListBox::MacDoClick() n = -1; } - event.m_commandInt = n; + event.SetInt(n); GetEventHandler()->ProcessEvent(event); } @@ -990,7 +990,7 @@ void wxListBox::OnChar(wxKeyEvent& event) n = -1; } - event.m_commandInt = n; + event.SetInt(n); GetEventHandler()->ProcessEvent(event); } @@ -1017,7 +1017,7 @@ void wxListBox::OnChar(wxKeyEvent& event) event.SetClientData( GetClientData(line) ); event.SetString( GetString(line) ); - event.m_commandInt = line ; + event.SetInt(line); GetEventHandler()->ProcessEvent(event); } diff --git a/src/mac/classic/scrolbar.cpp b/src/mac/classic/scrolbar.cpp index 70545c7c8d..6947803c44 100644 --- a/src/mac/classic/scrolbar.cpp +++ b/src/mac/classic/scrolbar.cpp @@ -102,7 +102,7 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS void wxScrollBar::Command(wxCommandEvent& event) { - SetThumbPosition(event.m_commandInt); + SetThumbPosition(event.GetInt()); ProcessCommand(event); } diff --git a/src/mac/classic/toplevel.cpp b/src/mac/classic/toplevel.cpp index efa241a3d1..013c9fbdb2 100644 --- a/src/mac/classic/toplevel.cpp +++ b/src/mac/classic/toplevel.cpp @@ -211,7 +211,7 @@ static pascal OSStatus KeyboardEventHandler( EventHandlerCallRef handler , Event event.m_x = point.h; event.m_y = point.v; - event.m_timeStamp = when; + event.SetTimestamp(when); wxWindow* focus = wxWindow::FindFocus() ; event.SetEventObject(focus); @@ -971,7 +971,7 @@ void wxTopLevelWindowMac::MacFireMouseEvent( event.m_x += m_x; event.m_y += m_y; - event.m_timeStamp = timestamp; + event.SetTimestamp(timestamp); event.SetEventObject(this); if ( wxTheApp->s_captureWindow ) { @@ -1051,7 +1051,7 @@ void wxTopLevelWindowMac::MacActivate( long timestamp , bool inIsActivating ) s_macDeactivateWindow=NULL; MacDelayedDeactivation(timestamp); wxActivateEvent event(wxEVT_ACTIVATE, inIsActivating , m_windowId); - event.m_timeStamp = timestamp ; + event.SetTimestamp(timestamp); event.SetEventObject(this); GetEventHandler()->ProcessEvent(event); diff --git a/src/mac/classic/window.cpp b/src/mac/classic/window.cpp index 57b25ec1dc..351f692cda 100644 --- a/src/mac/classic/window.cpp +++ b/src/mac/classic/window.cpp @@ -1303,29 +1303,29 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect) void wxWindowMac::MacOnScroll(wxScrollEvent &event ) { - if ( event.m_eventObject == m_vScrollBar || event.m_eventObject == m_hScrollBar ) + if ( event.GetEventObject() == m_vScrollBar || event.GetEventObject() == m_hScrollBar ) { wxScrollWinEvent wevent; wevent.SetPosition(event.GetPosition()); wevent.SetOrientation(event.GetOrientation()); - wevent.m_eventObject = this; - - if (event.m_eventType == wxEVT_SCROLL_TOP) - wevent.m_eventType = wxEVT_SCROLLWIN_TOP; - else if (event.m_eventType == wxEVT_SCROLL_BOTTOM) - wevent.m_eventType = wxEVT_SCROLLWIN_BOTTOM; - else if (event.m_eventType == wxEVT_SCROLL_LINEUP) - wevent.m_eventType = wxEVT_SCROLLWIN_LINEUP; - else if (event.m_eventType == wxEVT_SCROLL_LINEDOWN) - wevent.m_eventType = wxEVT_SCROLLWIN_LINEDOWN; - else if (event.m_eventType == wxEVT_SCROLL_PAGEUP) - wevent.m_eventType = wxEVT_SCROLLWIN_PAGEUP; - else if (event.m_eventType == wxEVT_SCROLL_PAGEDOWN) - wevent.m_eventType = wxEVT_SCROLLWIN_PAGEDOWN; - else if (event.m_eventType == wxEVT_SCROLL_THUMBTRACK) - wevent.m_eventType = wxEVT_SCROLLWIN_THUMBTRACK; - else if (event.m_eventType == wxEVT_SCROLL_THUMBRELEASE) - wevent.m_eventType = wxEVT_SCROLLWIN_THUMBRELEASE; + wevent.SetEventObject(this); + + if (event.GetEventType() == wxEVT_SCROLL_TOP) + wevent.SetEventType( wxEVT_SCROLLWIN_TOP ); + else if (event.GetEventType() == wxEVT_SCROLL_BOTTOM) + wevent.SetEventType( wxEVT_SCROLLWIN_BOTTOM ); + else if (event.GetEventType() == wxEVT_SCROLL_LINEUP) + wevent.SetEventType( wxEVT_SCROLLWIN_LINEUP ); + else if (event.GetEventType() == wxEVT_SCROLL_LINEDOWN) + wevent.SetEventType( wxEVT_SCROLLWIN_LINEDOWN ); + else if (event.GetEventType() == wxEVT_SCROLL_PAGEUP) + wevent.SetEventType( wxEVT_SCROLLWIN_PAGEUP ); + else if (event.GetEventType() == wxEVT_SCROLL_PAGEDOWN) + wevent.SetEventType( wxEVT_SCROLLWIN_PAGEDOWN ); + else if (event.GetEventType() == wxEVT_SCROLL_THUMBTRACK) + wevent.SetEventType( wxEVT_SCROLLWIN_THUMBTRACK ); + else if (event.GetEventType() == wxEVT_SCROLL_THUMBRELEASE) + wevent.SetEventType( wxEVT_SCROLLWIN_THUMBRELEASE ); GetEventHandler()->ProcessEvent(wevent); } @@ -1805,7 +1805,7 @@ void wxWindowMac::MacRedraw( WXHRGN updatergnr , long time, bool erase) } wxPaintEvent event; - event.m_timeStamp = time ; + event.SetTimestamp(time); event.SetEventObject(this); GetEventHandler()->ProcessEvent(event); diff --git a/src/motif/checklst.cpp b/src/motif/checklst.cpp index 84a057a818..0d9bb1dc23 100644 --- a/src/motif/checklst.cpp +++ b/src/motif/checklst.cpp @@ -146,8 +146,8 @@ void wxCheckListBox::DoToggleItem( int n, int x ) event.SetClientObject( GetClientObject(n) ); else if( HasClientUntypedData() ) event.SetClientData( GetClientData(n) ); - event.m_commandInt = n; - event.m_extraLong = TRUE; + event.SetInt(n); + event.SetExtraLong(TRUE); event.SetEventObject(this); event.SetString( GetString( n ) ); diff --git a/src/motif/choice.cpp b/src/motif/choice.cpp index 87e7eb7880..bae8a44171 100644 --- a/src/motif/choice.cpp +++ b/src/motif/choice.cpp @@ -441,8 +441,8 @@ void wxChoiceCallback (Widget w, XtPointer clientData, XtPointer WXUNUSED(ptr)) { wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, item->GetId()); event.SetEventObject(item); - event.m_commandInt = n; - event.m_commandString = item->GetStrings().Item(n)->GetData(); + event.SetInt(n); + event.SetString( item->GetStrings().Item(n)->GetData() ); if ( item->HasClientObjectData() ) event.SetClientObject( item->GetClientObject(n) ); else if ( item->HasClientUntypedData() ) diff --git a/src/motif/combobox.cpp b/src/motif/combobox.cpp index 9e052ac94e..01ed1c3816 100644 --- a/src/motif/combobox.cpp +++ b/src/motif/combobox.cpp @@ -318,13 +318,13 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData, { wxCommandEvent event (wxEVT_COMMAND_COMBOBOX_SELECTED, item->GetId()); - event.m_commandInt = cbs->index - 1; - event.m_commandString = item->GetString (event.m_commandInt); + event.SetInt(cbs->index - 1); + event.SetString( item->GetString ( event.GetInt() ) ); if ( item->HasClientObjectData() ) event.SetClientObject( item->GetClientObject(cbs->index - 1) ); else if ( item->HasClientUntypedData() ) event.SetClientData( item->GetClientData(cbs->index - 1) ); - event.m_extraLong = TRUE; + event.SetExtraLong(TRUE); event.SetEventObject(item); item->ProcessCommand (event); break; @@ -332,9 +332,9 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData, case XmCR_VALUE_CHANGED: { wxCommandEvent event (wxEVT_COMMAND_TEXT_UPDATED, item->GetId()); - event.m_commandInt = -1; - event.m_commandString = item->GetValue(); - event.m_extraLong = TRUE; + event.SetInt(-1); + event.SetString( item->GetValue() ); + event.SetExtraLong(TRUE); event.SetEventObject(item); item->ProcessCommand (event); break; diff --git a/src/motif/combobox_native.cpp b/src/motif/combobox_native.cpp index f610a3bfab..a6aad9ebb0 100644 --- a/src/motif/combobox_native.cpp +++ b/src/motif/combobox_native.cpp @@ -378,13 +378,13 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData, wxCommandEvent event (wxEVT_COMMAND_COMBOBOX_SELECTED, item->GetId()); int idx = cbs->item_position; - event.m_commandInt = idx; - event.m_commandString = item->GetString (idx); + event.SetInt(idx); + event.SetString( item->GetString (idx) ); if ( item->HasClientObjectData() ) event.SetClientObject( item->GetClientObject(idx) ); else if ( item->HasClientUntypedData() ) event.SetClientData( item->GetClientData(idx) ); - event.m_extraLong = true; + event.SetExtraLong(true); event.SetEventObject(item); item->GetEventHandler()->ProcessEvent(event); break; @@ -392,9 +392,9 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData, case XmCR_VALUE_CHANGED: { wxCommandEvent event (wxEVT_COMMAND_TEXT_UPDATED, item->GetId()); - event.m_commandInt = -1; - event.m_commandString = item->GetValue(); - event.m_extraLong = true; + event.SetInt(-1); + event.SetString( item->GetValue() ); + event.SetExtraLong(true); event.SetEventObject(item); item->GetEventHandler()->ProcessEvent(event); break; diff --git a/src/motif/listbox.cpp b/src/motif/listbox.cpp index 47016d85bc..6f4520e02e 100644 --- a/src/motif/listbox.cpp +++ b/src/motif/listbox.cpp @@ -546,11 +546,11 @@ void wxListBox::SetString(int N, const wxString& s) void wxListBox::Command (wxCommandEvent & event) { - if (event.m_extraLong) - SetSelection (event.m_commandInt); + if (event.GetExtraLong()) + SetSelection (event.GetInt()); else { - Deselect (event.m_commandInt); + Deselect (event.GetInt()); return; } ProcessCommand (event); @@ -577,8 +577,8 @@ void wxListBoxCallback (Widget WXUNUSED(w), XtPointer clientData, event.SetClientObject( item->GetClientObject(n) ); else if ( item->HasClientUntypedData() ) event.SetClientData( item->GetClientData(n) ); - event.m_commandInt = n; - event.m_extraLong = TRUE; + event.SetInt(n); + event.SetExtraLong(TRUE); event.SetEventObject(item); event.SetString( item->GetString( n ) ); diff --git a/src/motif/radiobox.cpp b/src/motif/radiobox.cpp index c21d758ecd..0c3f955a82 100644 --- a/src/motif/radiobox.cpp +++ b/src/motif/radiobox.cpp @@ -345,7 +345,7 @@ bool wxRadioBox::SetStringSelection (const wxString& s) void wxRadioBox::Command (wxCommandEvent & event) { - SetSelection (event.m_commandInt); + SetSelection (event.GetInt()); ProcessCommand (event); } diff --git a/src/motif/radiobut.cpp b/src/motif/radiobut.cpp index 629a007915..424afc16b5 100644 --- a/src/motif/radiobut.cpp +++ b/src/motif/radiobut.cpp @@ -136,7 +136,7 @@ bool wxRadioButton::GetValue() const void wxRadioButton::Command (wxCommandEvent & event) { - SetValue ( (event.m_commandInt != 0) ); + SetValue ( (event.GetInt() != 0) ); ProcessCommand (event); } diff --git a/src/motif/scrolbar.cpp b/src/motif/scrolbar.cpp index 3d17e927af..bb3f97a8d2 100644 --- a/src/motif/scrolbar.cpp +++ b/src/motif/scrolbar.cpp @@ -107,7 +107,7 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS void wxScrollBar::Command(wxCommandEvent& event) { - SetThumbPosition(event.m_commandInt); + SetThumbPosition(event.GetInt()); ProcessCommand(event); } diff --git a/src/motif/slider.cpp b/src/motif/slider.cpp index fdd2ff7358..4d32280ae4 100644 --- a/src/motif/slider.cpp +++ b/src/motif/slider.cpp @@ -235,7 +235,9 @@ void wxSliderCallback (Widget widget, XtPointer clientData, } wxScrollEvent event(scrollEvent, slider->GetId()); - XtVaGetValues (widget, XmNvalue, &event.m_commandInt, NULL); + int commandInt = event.GetInt(); + XtVaGetValues (widget, XmNvalue, &commandInt, NULL); + event.SetInt(commandInt); event.SetEventObject(slider); slider->GetEventHandler()->ProcessEvent(event); diff --git a/src/motif/window.cpp b/src/motif/window.cpp index c4babdf5db..5722b2175a 100644 --- a/src/motif/window.cpp +++ b/src/motif/window.cpp @@ -1673,7 +1673,7 @@ void wxWindow::OnSysColourChanged(wxSysColourChangedEvent& event) if ( win->GetParent() ) { wxSysColourChangedEvent event2; - event.m_eventObject = win; + event.SetEventObject(win); win->GetEventHandler()->ProcessEvent(event2); } diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index a34af86c41..6e50fde3e0 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -732,7 +732,7 @@ bool wxListBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id)) event.SetExtraLong( HasMultipleSelection() ? IsSelected(n) : true ); } - event.m_commandInt = n; + event.SetInt(n); return GetEventHandler()->ProcessEvent(event); } diff --git a/src/msw/radiobox.cpp b/src/msw/radiobox.cpp index b4fd6df3af..6e928f08ad 100644 --- a/src/msw/radiobox.cpp +++ b/src/msw/radiobox.cpp @@ -315,7 +315,7 @@ bool wxRadioBox::MSWCommand(WXUINT cmd, WXWORD id) void wxRadioBox::Command(wxCommandEvent & event) { - SetSelection (event.m_commandInt); + SetSelection (event.GetInt()); SetFocus(); ProcessCommand(event); } diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp index 2b3b4925cc..c49c960045 100644 --- a/src/msw/radiobut.cpp +++ b/src/msw/radiobut.cpp @@ -237,7 +237,7 @@ bool wxRadioButton::GetValue() const void wxRadioButton::Command (wxCommandEvent& event) { - SetValue(event.m_commandInt != 0); + SetValue(event.GetInt() != 0); ProcessCommand(event); } diff --git a/src/msw/scrolbar.cpp b/src/msw/scrolbar.cpp index ef305d4e54..ecc1eb3dc1 100644 --- a/src/msw/scrolbar.cpp +++ b/src/msw/scrolbar.cpp @@ -365,7 +365,7 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS void wxScrollBar::Command(wxCommandEvent& event) { - SetThumbPosition(event.m_commandInt); + SetThumbPosition(event.GetInt()); ProcessCommand(event); } diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 706f6740be..ed06acf173 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -3545,7 +3545,7 @@ bool wxWindowMSW::HandleKillFocus(WXHWND hwnd) bool wxWindowMSW::HandleShow(bool show, int WXUNUSED(status)) { wxShowEvent event(GetId(), show); - event.m_eventObject = this; + event.SetEventObject(this); return GetEventHandler()->ProcessEvent(event); } @@ -3553,7 +3553,7 @@ bool wxWindowMSW::HandleShow(bool show, int WXUNUSED(status)) bool wxWindowMSW::HandleInitDialog(WXHWND WXUNUSED(hWndFocus)) { wxInitDialogEvent event(GetId()); - event.m_eventObject = this; + event.SetEventObject(this); return GetEventHandler()->ProcessEvent(event); } @@ -3588,7 +3588,7 @@ bool wxWindowMSW::HandleDropFiles(WXWPARAM wParam) DragFinish (hFilesInfo); wxDropFilesEvent event(wxEVT_DROP_FILES, gwFilesDropped, files); - event.m_eventObject = this; + event.SetEventObject(this); POINT dropPoint; DragQueryPoint(hFilesInfo, (LPPOINT) &dropPoint); @@ -4404,7 +4404,7 @@ void wxWindowMSW::InitMouseEvent(wxMouseEvent& event, event.SetTimestamp(::GetMessageTime()); #endif - event.m_eventObject = this; + event.SetEventObject(this); event.SetId(GetId()); #if wxUSE_MOUSEEVENT_HACK @@ -4609,7 +4609,7 @@ wxKeyEvent wxWindowMSW::CreateKeyEvent(wxEventType evType, event.m_controlDown = wxIsCtrlDown(); event.m_altDown = (HIWORD(lParam) & KF_ALTDOWN) == KF_ALTDOWN; - event.m_eventObject = (wxWindow *)this; // const_cast + event.SetEventObject((wxWindow *)this); // const_cast event.m_keyCode = id; #if wxUSE_UNICODE event.m_uniChar = (wxChar) wParam; @@ -4912,32 +4912,32 @@ bool wxWindowMSW::MSWOnScroll(int orientation, WXWORD wParam, wxScrollWinEvent event; event.SetPosition(pos); event.SetOrientation(orientation); - event.m_eventObject = this; + event.SetEventObject(this); switch ( wParam ) { case SB_TOP: - event.m_eventType = wxEVT_SCROLLWIN_TOP; + event.SetEventType(wxEVT_SCROLLWIN_TOP); break; case SB_BOTTOM: - event.m_eventType = wxEVT_SCROLLWIN_BOTTOM; + event.SetEventType(wxEVT_SCROLLWIN_BOTTOM); break; case SB_LINEUP: - event.m_eventType = wxEVT_SCROLLWIN_LINEUP; + event.SetEventType(wxEVT_SCROLLWIN_LINEUP); break; case SB_LINEDOWN: - event.m_eventType = wxEVT_SCROLLWIN_LINEDOWN; + event.SetEventType(wxEVT_SCROLLWIN_LINEDOWN); break; case SB_PAGEUP: - event.m_eventType = wxEVT_SCROLLWIN_PAGEUP; + event.SetEventType(wxEVT_SCROLLWIN_PAGEUP); break; case SB_PAGEDOWN: - event.m_eventType = wxEVT_SCROLLWIN_PAGEDOWN; + event.SetEventType(wxEVT_SCROLLWIN_PAGEDOWN); break; case SB_THUMBPOSITION: @@ -4963,9 +4963,9 @@ bool wxWindowMSW::MSWOnScroll(int orientation, WXWORD wParam, event.SetPosition(scrollInfo.nTrackPos); } - event.m_eventType = wParam == SB_THUMBPOSITION + event.SetEventType( wParam == SB_THUMBPOSITION ? wxEVT_SCROLLWIN_THUMBRELEASE - : wxEVT_SCROLLWIN_THUMBTRACK; + : wxEVT_SCROLLWIN_THUMBTRACK ); break; default: @@ -5333,7 +5333,7 @@ wxKeyboardHook(int nCode, WORD wParam, DWORD lParam) if ( (HIWORD(lParam) & KF_ALTDOWN) == KF_ALTDOWN ) event.m_altDown = true; - event.m_eventObject = NULL; + event.SetEventObject(NULL); event.m_keyCode = id; event.m_shiftDown = wxIsShiftDown(); event.m_controlDown = wxIsCtrlDown(); diff --git a/src/os2/listbox.cpp b/src/os2/listbox.cpp index 7cbcb464b9..8e785dc5d9 100644 --- a/src/os2/listbox.cpp +++ b/src/os2/listbox.cpp @@ -810,7 +810,7 @@ bool wxListBox::OS2Command( { n = -1; } - vEvent.m_commandInt = n; + vEvent.SetInt(n); return GetEventHandler()->ProcessEvent(vEvent); } // end of wxListBox::OS2Command diff --git a/src/os2/scrolbar.cpp b/src/os2/scrolbar.cpp index 8b88e4078c..8837a46404 100644 --- a/src/os2/scrolbar.cpp +++ b/src/os2/scrolbar.cpp @@ -307,7 +307,7 @@ void wxScrollBar::Command ( wxCommandEvent& rEvent ) { - SetThumbPosition(rEvent.m_commandInt); + SetThumbPosition(rEvent.GetInt()); ProcessCommand(rEvent); } // end of wxScrollBar::Command diff --git a/src/os2/window.cpp b/src/os2/window.cpp index 0db6e081e7..9c096f077d 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -3358,7 +3358,7 @@ bool wxWindowOS2::HandleShow( { wxShowEvent vEvent(GetId(), bShow); - vEvent.m_eventObject = this; + vEvent.SetEventObject(this); return GetEventHandler()->ProcessEvent(vEvent); } // end of wxWindowOS2::HandleShow @@ -3368,7 +3368,7 @@ bool wxWindowOS2::HandleInitDialog( { wxInitDialogEvent vEvent(GetId()); - vEvent.m_eventObject = this; + vEvent.SetEventObject(this); return GetEventHandler()->ProcessEvent(vEvent); } // end of wxWindowOS2::HandleInitDialog @@ -3673,7 +3673,7 @@ void wxWindowOS2::OnSysColourChanged( { wxSysColourChangedEvent vEvent; - rEvent.m_eventObject = pWin; + rEvent.SetEventObject(pWin); pWin->GetEventHandler()->ProcessEvent(vEvent); } node = node->GetNext(); @@ -4057,7 +4057,7 @@ void wxWindowOS2::InitMouseEvent( rEvent.m_rightDown = (::WinGetKeyState(HWND_DESKTOP, VK_BUTTON2) & 0x8000) != 0; rEvent.SetTimestamp(s_currentMsg.time); - rEvent.m_eventObject = this; + rEvent.SetEventObject(this); rEvent.SetId(GetId()); #if wxUSE_MOUSEEVENT_HACK @@ -4174,7 +4174,7 @@ wxKeyEvent wxWindowOS2::CreateKeyEvent( vEvent.m_controlDown = IsCtrlDown(); vEvent.m_altDown = (HIWORD(lParam) & KC_ALT) == KC_ALT; - vEvent.m_eventObject = (wxWindow *)this; // const_cast + vEvent.SetEventObject((wxWindow *)this); // const_cast vEvent.m_keyCode = nId; vEvent.m_rawCode = (wxUint32)wParam; vEvent.m_rawFlags = (wxUint32)lParam; @@ -4363,32 +4363,32 @@ bool wxWindowOS2::OS2OnScroll( vEvent.SetPosition(wPos); vEvent.SetOrientation(nOrientation); - vEvent.m_eventObject = this; + vEvent.SetEventObject(this); switch (wParam) { case SB_LINEUP: - vEvent.m_eventType = wxEVT_SCROLLWIN_LINEUP; + vEvent.SetEventType(wxEVT_SCROLLWIN_LINEUP); break; case SB_LINEDOWN: - vEvent.m_eventType = wxEVT_SCROLLWIN_LINEDOWN; + vEvent.SetEventType(wxEVT_SCROLLWIN_LINEDOWN); break; case SB_PAGEUP: - vEvent.m_eventType = wxEVT_SCROLLWIN_PAGEUP; + vEvent.SetEventType(wxEVT_SCROLLWIN_PAGEUP); break; case SB_PAGEDOWN: - vEvent.m_eventType = wxEVT_SCROLLWIN_PAGEDOWN; + vEvent.SetEventType(wxEVT_SCROLLWIN_PAGEDOWN); break; case SB_SLIDERPOSITION: - vEvent.m_eventType = wxEVT_SCROLLWIN_THUMBRELEASE; + vEvent.SetEventType(wxEVT_SCROLLWIN_THUMBRELEASE); break; case SB_SLIDERTRACK: - vEvent.m_eventType = wxEVT_SCROLLWIN_THUMBTRACK; + vEvent.SetEventType(wxEVT_SCROLLWIN_THUMBTRACK); break; default: diff --git a/src/univ/listbox.cpp b/src/univ/listbox.cpp index c7e00cee0c..1188a594b4 100644 --- a/src/univ/listbox.cpp +++ b/src/univ/listbox.cpp @@ -892,7 +892,7 @@ bool wxListBox::SendEvent(wxEventType type, int item) event.SetString(GetString(item)); } - event.m_commandInt = item; + event.SetInt(item); return GetEventHandler()->ProcessEvent(event); } diff --git a/src/x11/window.cpp b/src/x11/window.cpp index 675d1a8b2f..b8e83b9f02 100644 --- a/src/x11/window.cpp +++ b/src/x11/window.cpp @@ -1252,7 +1252,7 @@ void wxWindowX11::OnSysColourChanged(wxSysColourChangedEvent& event) if ( win->GetParent() ) { wxSysColourChangedEvent event2; - event.m_eventObject = win; + event.SetEventObject(win); win->GetEventHandler()->ProcessEvent(event2); } -- 2.45.2