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
This commit is contained in:
Kevin Hock
2005-01-18 15:08:15 +00:00
parent 1e6eb02501
commit 687706f5e7
44 changed files with 151 additions and 149 deletions

View File

@@ -239,7 +239,7 @@ void SwitchView::OnFocus(wxFocusEvent& event) {
wxScrollBar *hscroll = m_dyn_sash->GetHScrollBar(this); wxScrollBar *hscroll = m_dyn_sash->GetHScrollBar(this);
wxScrollBar *vscroll = m_dyn_sash->GetVScrollBar(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(); m_view->SetFocus();
} else { } else {
event.Skip(); event.Skip();

View File

@@ -1558,11 +1558,11 @@ void wxFrameLayout::FirePluginEvent( cbPluginEvent& event )
{ {
bool isInputEvt = true; bool isInputEvt = true;
#if wxCHECK_VERSION(2,3,0) #if wxCHECK_VERSION(2,3,0)
if ( event.m_eventType != cbEVT_PL_LEFT_DOWN && if ( event.GetEventType() != cbEVT_PL_LEFT_DOWN &&
event.m_eventType != cbEVT_PL_LEFT_UP && event.GetEventType() != cbEVT_PL_LEFT_UP &&
event.m_eventType != cbEVT_PL_RIGHT_DOWN && event.GetEventType() != cbEVT_PL_RIGHT_DOWN &&
event.m_eventType != cbEVT_PL_RIGHT_UP && event.GetEventType() != cbEVT_PL_RIGHT_UP &&
event.m_eventType != cbEVT_PL_MOTION ) event.GetEventType() != cbEVT_PL_MOTION )
isInputEvt = false; isInputEvt = false;
#else #else
switch ( event.m_eventType ) switch ( event.m_eventType )

View File

@@ -1180,7 +1180,7 @@ void wxDynamicSashWindowLeaf::OnScroll(wxScrollEvent &WXUNUSED(event)) {
} }
void wxDynamicSashWindowLeaf::OnFocus(wxFocusEvent &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(); m_child->SetFocus();
} }
} }

View File

@@ -371,7 +371,7 @@ void TestGLCanvas::OnKeyDown( wxKeyEvent& event )
if (!m_TimeInitialized) if (!m_TimeInitialized)
{ {
m_TimeInitialized = 1; m_TimeInitialized = 1;
m_xsynct = event.m_timeStamp; m_xsynct = event.GetTimestamp();
m_gsynct = wxStopWatch(&m_secbase); m_gsynct = wxStopWatch(&m_secbase);
m_Key = evkey; m_Key = evkey;
@@ -380,7 +380,7 @@ void TestGLCanvas::OnKeyDown( wxKeyEvent& event )
m_LastRedraw = 0; m_LastRedraw = 0;
} }
unsigned long currTime = event.m_timeStamp - m_xsynct; unsigned long currTime = event.GetTimestamp() - m_xsynct;
if (evkey != m_Key) if (evkey != m_Key)
{ {

View File

@@ -905,15 +905,15 @@ void MyAutoTimedScrollingWindow::OnScroll(wxScrollWinEvent& event)
// FIXME: the cursor also moves when the scrollbar arrows are clicked // FIXME: the cursor also moves when the scrollbar arrows are clicked
if (HasCapture()) { if (HasCapture()) {
if (event.GetOrientation() == wxHORIZONTAL) { if (event.GetOrientation() == wxHORIZONTAL) {
if (event.m_eventType == wxEVT_SCROLLWIN_LINEUP) { if (event.GetEventType() == wxEVT_SCROLLWIN_LINEUP) {
--m_cursor.x; --m_cursor.x;
} else if (event.m_eventType == wxEVT_SCROLLWIN_LINEDOWN) { } else if (event.GetEventType() == wxEVT_SCROLLWIN_LINEDOWN) {
++m_cursor.x; ++m_cursor.x;
} }
} else if (event.GetOrientation() == wxVERTICAL) { } else if (event.GetOrientation() == wxVERTICAL) {
if (event.m_eventType == wxEVT_SCROLLWIN_LINEUP) { if (event.GetEventType() == wxEVT_SCROLLWIN_LINEUP) {
--m_cursor.y; --m_cursor.y;
} else if (event.m_eventType == wxEVT_SCROLLWIN_LINEDOWN) { } else if (event.GetEventType() == wxEVT_SCROLLWIN_LINEDOWN) {
++m_cursor.y; ++m_cursor.y;
} }
} }

View File

@@ -64,7 +64,7 @@ bool wxChoiceBase::SetStringSelection(const wxString& s)
void wxChoiceBase::Command(wxCommandEvent& event) void wxChoiceBase::Command(wxCommandEvent& event)
{ {
SetSelection(event.m_commandInt); SetSelection(event.GetInt());
(void)ProcessEvent(event); (void)ProcessEvent(event);
} }

View File

@@ -118,7 +118,7 @@ void wxListBoxBase::DeselectAll(int itemToLeaveSelected)
void wxListBoxBase::Command(wxCommandEvent& event) void wxListBoxBase::Command(wxCommandEvent& event)
{ {
SetSelection(event.m_commandInt, event.m_extraLong != 0); SetSelection(event.GetInt(), event.GetExtraLong() != 0);
(void)ProcessEvent(event); (void)ProcessEvent(event);
} }

View File

@@ -2033,7 +2033,7 @@ void wxWindowBase::AdjustForParentClientOrigin(int& x, int& y, int sizeFlags) co
void wxWindowBase::UpdateWindowUI(long flags) void wxWindowBase::UpdateWindowUI(long flags)
{ {
wxUpdateUIEvent event(GetId()); wxUpdateUIEvent event(GetId());
event.m_eventObject = this; event.SetEventObject(this);
if ( GetEventHandler()->ProcessEvent(event) ) if ( GetEventHandler()->ProcessEvent(event) )
{ {
@@ -2155,7 +2155,7 @@ void wxWindowBase::OnSysColourChanged(wxSysColourChangedEvent& event)
if ( !win->IsTopLevel() ) if ( !win->IsTopLevel() )
{ {
wxSysColourChangedEvent event2; wxSysColourChangedEvent event2;
event.m_eventObject = win; event.SetEventObject(win);
win->GetEventHandler()->ProcessEvent(event2); win->GetEventHandler()->ProcessEvent(event2);
} }

View File

@@ -1175,14 +1175,14 @@ void wxScrollHelper::HandleOnMouseWheel(wxMouseEvent& event)
newEvent.SetPosition(0); newEvent.SetPosition(0);
newEvent.SetOrientation(wxVERTICAL); newEvent.SetOrientation(wxVERTICAL);
newEvent.m_eventObject = m_win; newEvent.SetEventObject(m_win);
if (event.IsPageScroll()) if (event.IsPageScroll())
{ {
if (lines > 0) if (lines > 0)
newEvent.m_eventType = wxEVT_SCROLLWIN_PAGEUP; newEvent.SetEventType(wxEVT_SCROLLWIN_PAGEUP);
else else
newEvent.m_eventType = wxEVT_SCROLLWIN_PAGEDOWN; newEvent.SetEventType(wxEVT_SCROLLWIN_PAGEDOWN);
m_win->GetEventHandler()->ProcessEvent(newEvent); m_win->GetEventHandler()->ProcessEvent(newEvent);
} }
@@ -1190,9 +1190,9 @@ void wxScrollHelper::HandleOnMouseWheel(wxMouseEvent& event)
{ {
lines *= event.GetLinesPerAction(); lines *= event.GetLinesPerAction();
if (lines > 0) if (lines > 0)
newEvent.m_eventType = wxEVT_SCROLLWIN_LINEUP; newEvent.SetEventType(wxEVT_SCROLLWIN_LINEUP);
else else
newEvent.m_eventType = wxEVT_SCROLLWIN_LINEDOWN; newEvent.SetEventType(wxEVT_SCROLLWIN_LINEDOWN);
int times = abs(lines); int times = abs(lines);
for (; times > 0; times--) for (; times > 0; times--)

View File

@@ -243,7 +243,7 @@ void wxVListBox::SendSelectedEvent()
wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, GetId()); wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, GetId());
event.SetEventObject(this); event.SetEventObject(this);
event.m_commandInt = m_current; event.SetInt(m_current);
(void)GetEventHandler()->ProcessEvent(event); (void)GetEventHandler()->ProcessEvent(event);
} }
@@ -602,7 +602,7 @@ void wxVListBox::OnLeftDClick(wxMouseEvent& event)
{ {
wxCommandEvent event(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, GetId()); wxCommandEvent event(wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, GetId());
event.SetEventObject(this); event.SetEventObject(this);
event.m_commandInt = item; event.SetInt(item);
(void)GetEventHandler()->ProcessEvent(event); (void)GetEventHandler()->ProcessEvent(event);
} }

View File

@@ -194,7 +194,7 @@ gtk_listbox_button_release_callback( GtkWidget * WXUNUSED(widget),
n = -1; n = -1;
} }
event.m_commandInt = n; event.SetInt(n);
listbox->GetEventHandler()->ProcessEvent( event ); listbox->GetEventHandler()->ProcessEvent( event );
@@ -320,7 +320,7 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis
{ {
n = -1; n = -1;
} }
new_event.m_commandInt = n; new_event.SetInt(n);
listbox->GetEventHandler()->ProcessEvent( new_event ); listbox->GetEventHandler()->ProcessEvent( new_event );
} }
} }
@@ -393,7 +393,7 @@ static void gtk_listitem_select_cb( GtkWidget *widget,
n = -1; n = -1;
} }
event.m_commandInt = n; event.SetInt(n);
// No longer required with new code in wxLB_SINGLE // No longer required with new code in wxLB_SINGLE
// listbox->GetEventHandler()->AddPendingEvent( event ); // listbox->GetEventHandler()->AddPendingEvent( event );

View File

@@ -3350,7 +3350,7 @@ bool wxWindowGTK::Show( bool show )
gtk_widget_hide( m_widget ); gtk_widget_hide( m_widget );
wxShowEvent eventShow(GetId(), show); wxShowEvent eventShow(GetId(), show);
eventShow.m_eventObject = this; eventShow.SetEventObject(this);
GetEventHandler()->ProcessEvent(eventShow); GetEventHandler()->ProcessEvent(eventShow);

View File

@@ -194,7 +194,7 @@ gtk_listbox_button_release_callback( GtkWidget * WXUNUSED(widget),
n = -1; n = -1;
} }
event.m_commandInt = n; event.SetInt(n);
listbox->GetEventHandler()->ProcessEvent( event ); listbox->GetEventHandler()->ProcessEvent( event );
@@ -320,7 +320,7 @@ gtk_listbox_key_press_callback( GtkWidget *widget, GdkEventKey *gdk_event, wxLis
{ {
n = -1; n = -1;
} }
new_event.m_commandInt = n; new_event.SetInt(n);
listbox->GetEventHandler()->ProcessEvent( new_event ); listbox->GetEventHandler()->ProcessEvent( new_event );
} }
} }
@@ -393,7 +393,7 @@ static void gtk_listitem_select_cb( GtkWidget *widget,
n = -1; n = -1;
} }
event.m_commandInt = n; event.SetInt(n);
// No longer required with new code in wxLB_SINGLE // No longer required with new code in wxLB_SINGLE
// listbox->GetEventHandler()->AddPendingEvent( event ); // listbox->GetEventHandler()->AddPendingEvent( event );

View File

@@ -3350,7 +3350,7 @@ bool wxWindowGTK::Show( bool show )
gtk_widget_hide( m_widget ); gtk_widget_hide( m_widget );
wxShowEvent eventShow(GetId(), show); wxShowEvent eventShow(GetId(), show);
eventShow.m_eventObject = this; eventShow.SetEventObject(this);
GetEventHandler()->ProcessEvent(eventShow); GetEventHandler()->ProcessEvent(eventShow);

View File

@@ -1241,7 +1241,7 @@ bool wxApp::MacSendKeyDownEvent( wxWindow* focus , long keymessage , long modifi
event.m_x = wherex; event.m_x = wherex;
event.m_y = wherey; event.m_y = wherey;
event.m_timeStamp = when; event.SetTimestamp(when);
event.SetEventObject(focus); event.SetEventObject(focus);
handled = focus->GetEventHandler()->ProcessEvent( event ) ; handled = focus->GetEventHandler()->ProcessEvent( event ) ;
if ( handled && event.GetSkipped() ) if ( handled && event.GetSkipped() )
@@ -1366,7 +1366,7 @@ bool wxApp::MacSendKeyUpEvent( wxWindow* focus , long keymessage , long modifier
event.m_x = wherex; event.m_x = wherex;
event.m_y = wherey; event.m_y = wherey;
event.m_timeStamp = when; event.SetTimestamp(when);
event.SetEventObject(focus); event.SetEventObject(focus);
handled = focus->GetEventHandler()->ProcessEvent( event ) ; handled = focus->GetEventHandler()->ProcessEvent( event ) ;

View File

@@ -864,7 +864,7 @@ void wxListBox::OnChar(wxKeyEvent& event)
n = -1; n = -1;
} }
event.m_commandInt = n; event.SetInt(n);
GetEventHandler()->ProcessEvent(event); GetEventHandler()->ProcessEvent(event);
} }
@@ -891,7 +891,7 @@ void wxListBox::OnChar(wxKeyEvent& event)
event.SetClientData( GetClientData(line) ); event.SetClientData( GetClientData(line) );
event.SetString( GetString(line) ); event.SetString( GetString(line) );
event.m_commandInt = line ; event.SetInt(line);
GetEventHandler()->ProcessEvent(event); GetEventHandler()->ProcessEvent(event);
} }

View File

@@ -92,7 +92,7 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS
void wxScrollBar::Command(wxCommandEvent& event) void wxScrollBar::Command(wxCommandEvent& event)
{ {
SetThumbPosition(event.m_commandInt); SetThumbPosition(event.GetInt());
ProcessCommand(event); ProcessCommand(event);
} }

View File

@@ -211,7 +211,7 @@ static pascal OSStatus KeyboardEventHandler( EventHandlerCallRef handler , Event
event.m_x = point.h; event.m_x = point.h;
event.m_y = point.v; event.m_y = point.v;
event.m_timeStamp = when; event.SetTimestamp(when);
wxWindow* focus = wxWindow::FindFocus() ; wxWindow* focus = wxWindow::FindFocus() ;
event.SetEventObject(focus); event.SetEventObject(focus);

View File

@@ -2512,29 +2512,29 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect)
void wxWindowMac::MacOnScroll(wxScrollEvent &event ) 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; wxScrollWinEvent wevent;
wevent.SetPosition(event.GetPosition()); wevent.SetPosition(event.GetPosition());
wevent.SetOrientation(event.GetOrientation()); wevent.SetOrientation(event.GetOrientation());
wevent.m_eventObject = this; wevent.SetEventObject(this);
if (event.m_eventType == wxEVT_SCROLL_TOP) if (event.GetEventType() == wxEVT_SCROLL_TOP)
wevent.m_eventType = wxEVT_SCROLLWIN_TOP; wevent.SetEventType( wxEVT_SCROLLWIN_TOP );
else if (event.m_eventType == wxEVT_SCROLL_BOTTOM) else if (event.GetEventType() == wxEVT_SCROLL_BOTTOM)
wevent.m_eventType = wxEVT_SCROLLWIN_BOTTOM; wevent.SetEventType( wxEVT_SCROLLWIN_BOTTOM );
else if (event.m_eventType == wxEVT_SCROLL_LINEUP) else if (event.GetEventType() == wxEVT_SCROLL_LINEUP)
wevent.m_eventType = wxEVT_SCROLLWIN_LINEUP; wevent.SetEventType( wxEVT_SCROLLWIN_LINEUP );
else if (event.m_eventType == wxEVT_SCROLL_LINEDOWN) else if (event.GetEventType() == wxEVT_SCROLL_LINEDOWN)
wevent.m_eventType = wxEVT_SCROLLWIN_LINEDOWN; wevent.SetEventType( wxEVT_SCROLLWIN_LINEDOWN );
else if (event.m_eventType == wxEVT_SCROLL_PAGEUP) else if (event.GetEventType() == wxEVT_SCROLL_PAGEUP)
wevent.m_eventType = wxEVT_SCROLLWIN_PAGEUP; wevent.SetEventType( wxEVT_SCROLLWIN_PAGEUP );
else if (event.m_eventType == wxEVT_SCROLL_PAGEDOWN) else if (event.GetEventType() == wxEVT_SCROLL_PAGEDOWN)
wevent.m_eventType = wxEVT_SCROLLWIN_PAGEDOWN; wevent.SetEventType( wxEVT_SCROLLWIN_PAGEDOWN );
else if (event.m_eventType == wxEVT_SCROLL_THUMBTRACK) else if (event.GetEventType() == wxEVT_SCROLL_THUMBTRACK)
wevent.m_eventType = wxEVT_SCROLLWIN_THUMBTRACK; wevent.SetEventType( wxEVT_SCROLLWIN_THUMBTRACK );
else if (event.m_eventType == wxEVT_SCROLL_THUMBRELEASE) else if (event.GetEventType() == wxEVT_SCROLL_THUMBRELEASE)
wevent.m_eventType = wxEVT_SCROLLWIN_THUMBRELEASE; wevent.SetEventType( wxEVT_SCROLLWIN_THUMBRELEASE );
GetEventHandler()->ProcessEvent(wevent); GetEventHandler()->ProcessEvent(wevent);
} }
@@ -2845,7 +2845,7 @@ bool wxWindowMac::MacDoRedraw( WXHRGN updatergnr , long time )
{ {
// paint the window itself // paint the window itself
wxPaintEvent event; wxPaintEvent event;
event.m_timeStamp = time ; event.SetTimestamp(time);
event.SetEventObject(this); event.SetEventObject(this);
handled = GetEventHandler()->ProcessEvent(event); handled = GetEventHandler()->ProcessEvent(event);

View File

@@ -1479,7 +1479,7 @@ void wxApp::MacHandleModifierEvents( WXEVENTREF evr )
event.m_x = ev->where.h; event.m_x = ev->where.h;
event.m_y = ev->where.v; event.m_y = ev->where.v;
event.m_timeStamp = ev->when; event.SetTimestamp( ev->when );
wxWindow* focus = wxWindow::FindFocus() ; wxWindow* focus = wxWindow::FindFocus() ;
event.SetEventObject(focus); event.SetEventObject(focus);
@@ -1953,7 +1953,7 @@ bool wxApp::MacSendKeyDownEvent( wxWindow* focus , long keymessage , long modifi
event.m_x = wherex; event.m_x = wherex;
event.m_y = wherey; event.m_y = wherey;
event.m_timeStamp = when; event.SetTimestamp(when);
event.SetEventObject(focus); event.SetEventObject(focus);
handled = focus->GetEventHandler()->ProcessEvent( event ) ; handled = focus->GetEventHandler()->ProcessEvent( event ) ;
if ( handled && event.GetSkipped() ) if ( handled && event.GetSkipped() )
@@ -2080,7 +2080,7 @@ bool wxApp::MacSendKeyUpEvent( wxWindow* focus , long keymessage , long modifier
event.m_x = wherex; event.m_x = wherex;
event.m_y = wherey; event.m_y = wherey;
event.m_timeStamp = when; event.SetTimestamp(when);
event.SetEventObject(focus); event.SetEventObject(focus);
handled = focus->GetEventHandler()->ProcessEvent( event ) ; handled = focus->GetEventHandler()->ProcessEvent( event ) ;
@@ -2219,7 +2219,7 @@ void wxApp::MacHandleOSEvent( WXEVENTREF evr )
event.m_metaDown = ev->modifiers & cmdKey; event.m_metaDown = ev->modifiers & cmdKey;
event.m_x = ev->where.h; event.m_x = ev->where.h;
event.m_y = ev->where.v; event.m_y = ev->where.v;
event.m_timeStamp = ev->when; event.SetTimestamp( ev->when );
event.SetEventObject(this); event.SetEventObject(this);
if ( wxWindow::s_lastMouseWindow ) if ( wxWindow::s_lastMouseWindow )
@@ -2322,7 +2322,7 @@ void wxApp::MacHandleMouseMovedEvent(wxInt32 x , wxInt32 y ,wxUint32 modifiers ,
event.m_x = x; event.m_x = x;
event.m_y = y; event.m_y = y;
event.m_timeStamp = timestamp; event.SetTimestamp(timestamp);
if ( wxWindow::s_lastMouseWindow ) if ( wxWindow::s_lastMouseWindow )
{ {

View File

@@ -909,7 +909,7 @@ void wxListBox::MacDoClick()
n = -1; n = -1;
} }
event.m_commandInt = n; event.SetInt(n);
GetEventHandler()->ProcessEvent(event); GetEventHandler()->ProcessEvent(event);
} }
@@ -990,7 +990,7 @@ void wxListBox::OnChar(wxKeyEvent& event)
n = -1; n = -1;
} }
event.m_commandInt = n; event.SetInt(n);
GetEventHandler()->ProcessEvent(event); GetEventHandler()->ProcessEvent(event);
} }
@@ -1017,7 +1017,7 @@ void wxListBox::OnChar(wxKeyEvent& event)
event.SetClientData( GetClientData(line) ); event.SetClientData( GetClientData(line) );
event.SetString( GetString(line) ); event.SetString( GetString(line) );
event.m_commandInt = line ; event.SetInt(line);
GetEventHandler()->ProcessEvent(event); GetEventHandler()->ProcessEvent(event);
} }

View File

@@ -102,7 +102,7 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS
void wxScrollBar::Command(wxCommandEvent& event) void wxScrollBar::Command(wxCommandEvent& event)
{ {
SetThumbPosition(event.m_commandInt); SetThumbPosition(event.GetInt());
ProcessCommand(event); ProcessCommand(event);
} }

View File

@@ -211,7 +211,7 @@ static pascal OSStatus KeyboardEventHandler( EventHandlerCallRef handler , Event
event.m_x = point.h; event.m_x = point.h;
event.m_y = point.v; event.m_y = point.v;
event.m_timeStamp = when; event.SetTimestamp(when);
wxWindow* focus = wxWindow::FindFocus() ; wxWindow* focus = wxWindow::FindFocus() ;
event.SetEventObject(focus); event.SetEventObject(focus);
@@ -971,7 +971,7 @@ void wxTopLevelWindowMac::MacFireMouseEvent(
event.m_x += m_x; event.m_x += m_x;
event.m_y += m_y; event.m_y += m_y;
event.m_timeStamp = timestamp; event.SetTimestamp(timestamp);
event.SetEventObject(this); event.SetEventObject(this);
if ( wxTheApp->s_captureWindow ) if ( wxTheApp->s_captureWindow )
{ {
@@ -1051,7 +1051,7 @@ void wxTopLevelWindowMac::MacActivate( long timestamp , bool inIsActivating )
s_macDeactivateWindow=NULL; s_macDeactivateWindow=NULL;
MacDelayedDeactivation(timestamp); MacDelayedDeactivation(timestamp);
wxActivateEvent event(wxEVT_ACTIVATE, inIsActivating , m_windowId); wxActivateEvent event(wxEVT_ACTIVATE, inIsActivating , m_windowId);
event.m_timeStamp = timestamp ; event.SetTimestamp(timestamp);
event.SetEventObject(this); event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event); GetEventHandler()->ProcessEvent(event);

View File

@@ -1303,29 +1303,29 @@ void wxWindowMac::ScrollWindow(int dx, int dy, const wxRect *rect)
void wxWindowMac::MacOnScroll(wxScrollEvent &event ) 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; wxScrollWinEvent wevent;
wevent.SetPosition(event.GetPosition()); wevent.SetPosition(event.GetPosition());
wevent.SetOrientation(event.GetOrientation()); wevent.SetOrientation(event.GetOrientation());
wevent.m_eventObject = this; wevent.SetEventObject(this);
if (event.m_eventType == wxEVT_SCROLL_TOP) if (event.GetEventType() == wxEVT_SCROLL_TOP)
wevent.m_eventType = wxEVT_SCROLLWIN_TOP; wevent.SetEventType( wxEVT_SCROLLWIN_TOP );
else if (event.m_eventType == wxEVT_SCROLL_BOTTOM) else if (event.GetEventType() == wxEVT_SCROLL_BOTTOM)
wevent.m_eventType = wxEVT_SCROLLWIN_BOTTOM; wevent.SetEventType( wxEVT_SCROLLWIN_BOTTOM );
else if (event.m_eventType == wxEVT_SCROLL_LINEUP) else if (event.GetEventType() == wxEVT_SCROLL_LINEUP)
wevent.m_eventType = wxEVT_SCROLLWIN_LINEUP; wevent.SetEventType( wxEVT_SCROLLWIN_LINEUP );
else if (event.m_eventType == wxEVT_SCROLL_LINEDOWN) else if (event.GetEventType() == wxEVT_SCROLL_LINEDOWN)
wevent.m_eventType = wxEVT_SCROLLWIN_LINEDOWN; wevent.SetEventType( wxEVT_SCROLLWIN_LINEDOWN );
else if (event.m_eventType == wxEVT_SCROLL_PAGEUP) else if (event.GetEventType() == wxEVT_SCROLL_PAGEUP)
wevent.m_eventType = wxEVT_SCROLLWIN_PAGEUP; wevent.SetEventType( wxEVT_SCROLLWIN_PAGEUP );
else if (event.m_eventType == wxEVT_SCROLL_PAGEDOWN) else if (event.GetEventType() == wxEVT_SCROLL_PAGEDOWN)
wevent.m_eventType = wxEVT_SCROLLWIN_PAGEDOWN; wevent.SetEventType( wxEVT_SCROLLWIN_PAGEDOWN );
else if (event.m_eventType == wxEVT_SCROLL_THUMBTRACK) else if (event.GetEventType() == wxEVT_SCROLL_THUMBTRACK)
wevent.m_eventType = wxEVT_SCROLLWIN_THUMBTRACK; wevent.SetEventType( wxEVT_SCROLLWIN_THUMBTRACK );
else if (event.m_eventType == wxEVT_SCROLL_THUMBRELEASE) else if (event.GetEventType() == wxEVT_SCROLL_THUMBRELEASE)
wevent.m_eventType = wxEVT_SCROLLWIN_THUMBRELEASE; wevent.SetEventType( wxEVT_SCROLLWIN_THUMBRELEASE );
GetEventHandler()->ProcessEvent(wevent); GetEventHandler()->ProcessEvent(wevent);
} }
@@ -1805,7 +1805,7 @@ void wxWindowMac::MacRedraw( WXHRGN updatergnr , long time, bool erase)
} }
wxPaintEvent event; wxPaintEvent event;
event.m_timeStamp = time ; event.SetTimestamp(time);
event.SetEventObject(this); event.SetEventObject(this);
GetEventHandler()->ProcessEvent(event); GetEventHandler()->ProcessEvent(event);

View File

@@ -146,8 +146,8 @@ void wxCheckListBox::DoToggleItem( int n, int x )
event.SetClientObject( GetClientObject(n) ); event.SetClientObject( GetClientObject(n) );
else if( HasClientUntypedData() ) else if( HasClientUntypedData() )
event.SetClientData( GetClientData(n) ); event.SetClientData( GetClientData(n) );
event.m_commandInt = n; event.SetInt(n);
event.m_extraLong = TRUE; event.SetExtraLong(TRUE);
event.SetEventObject(this); event.SetEventObject(this);
event.SetString( GetString( n ) ); event.SetString( GetString( n ) );

View File

@@ -441,8 +441,8 @@ void wxChoiceCallback (Widget w, XtPointer clientData, XtPointer WXUNUSED(ptr))
{ {
wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, item->GetId()); wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, item->GetId());
event.SetEventObject(item); event.SetEventObject(item);
event.m_commandInt = n; event.SetInt(n);
event.m_commandString = item->GetStrings().Item(n)->GetData(); event.SetString( item->GetStrings().Item(n)->GetData() );
if ( item->HasClientObjectData() ) if ( item->HasClientObjectData() )
event.SetClientObject( item->GetClientObject(n) ); event.SetClientObject( item->GetClientObject(n) );
else if ( item->HasClientUntypedData() ) else if ( item->HasClientUntypedData() )

View File

@@ -318,13 +318,13 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
{ {
wxCommandEvent event (wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEvent event (wxEVT_COMMAND_COMBOBOX_SELECTED,
item->GetId()); item->GetId());
event.m_commandInt = cbs->index - 1; event.SetInt(cbs->index - 1);
event.m_commandString = item->GetString (event.m_commandInt); event.SetString( item->GetString ( event.GetInt() ) );
if ( item->HasClientObjectData() ) if ( item->HasClientObjectData() )
event.SetClientObject( item->GetClientObject(cbs->index - 1) ); event.SetClientObject( item->GetClientObject(cbs->index - 1) );
else if ( item->HasClientUntypedData() ) else if ( item->HasClientUntypedData() )
event.SetClientData( item->GetClientData(cbs->index - 1) ); event.SetClientData( item->GetClientData(cbs->index - 1) );
event.m_extraLong = TRUE; event.SetExtraLong(TRUE);
event.SetEventObject(item); event.SetEventObject(item);
item->ProcessCommand (event); item->ProcessCommand (event);
break; break;
@@ -332,9 +332,9 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
case XmCR_VALUE_CHANGED: case XmCR_VALUE_CHANGED:
{ {
wxCommandEvent event (wxEVT_COMMAND_TEXT_UPDATED, item->GetId()); wxCommandEvent event (wxEVT_COMMAND_TEXT_UPDATED, item->GetId());
event.m_commandInt = -1; event.SetInt(-1);
event.m_commandString = item->GetValue(); event.SetString( item->GetValue() );
event.m_extraLong = TRUE; event.SetExtraLong(TRUE);
event.SetEventObject(item); event.SetEventObject(item);
item->ProcessCommand (event); item->ProcessCommand (event);
break; break;

View File

@@ -378,13 +378,13 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
wxCommandEvent event (wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEvent event (wxEVT_COMMAND_COMBOBOX_SELECTED,
item->GetId()); item->GetId());
int idx = cbs->item_position; int idx = cbs->item_position;
event.m_commandInt = idx; event.SetInt(idx);
event.m_commandString = item->GetString (idx); event.SetString( item->GetString (idx) );
if ( item->HasClientObjectData() ) if ( item->HasClientObjectData() )
event.SetClientObject( item->GetClientObject(idx) ); event.SetClientObject( item->GetClientObject(idx) );
else if ( item->HasClientUntypedData() ) else if ( item->HasClientUntypedData() )
event.SetClientData( item->GetClientData(idx) ); event.SetClientData( item->GetClientData(idx) );
event.m_extraLong = true; event.SetExtraLong(true);
event.SetEventObject(item); event.SetEventObject(item);
item->GetEventHandler()->ProcessEvent(event); item->GetEventHandler()->ProcessEvent(event);
break; break;
@@ -392,9 +392,9 @@ void wxComboBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
case XmCR_VALUE_CHANGED: case XmCR_VALUE_CHANGED:
{ {
wxCommandEvent event (wxEVT_COMMAND_TEXT_UPDATED, item->GetId()); wxCommandEvent event (wxEVT_COMMAND_TEXT_UPDATED, item->GetId());
event.m_commandInt = -1; event.SetInt(-1);
event.m_commandString = item->GetValue(); event.SetString( item->GetValue() );
event.m_extraLong = true; event.SetExtraLong(true);
event.SetEventObject(item); event.SetEventObject(item);
item->GetEventHandler()->ProcessEvent(event); item->GetEventHandler()->ProcessEvent(event);
break; break;

View File

@@ -546,11 +546,11 @@ void wxListBox::SetString(int N, const wxString& s)
void wxListBox::Command (wxCommandEvent & event) void wxListBox::Command (wxCommandEvent & event)
{ {
if (event.m_extraLong) if (event.GetExtraLong())
SetSelection (event.m_commandInt); SetSelection (event.GetInt());
else else
{ {
Deselect (event.m_commandInt); Deselect (event.GetInt());
return; return;
} }
ProcessCommand (event); ProcessCommand (event);
@@ -577,8 +577,8 @@ void wxListBoxCallback (Widget WXUNUSED(w), XtPointer clientData,
event.SetClientObject( item->GetClientObject(n) ); event.SetClientObject( item->GetClientObject(n) );
else if ( item->HasClientUntypedData() ) else if ( item->HasClientUntypedData() )
event.SetClientData( item->GetClientData(n) ); event.SetClientData( item->GetClientData(n) );
event.m_commandInt = n; event.SetInt(n);
event.m_extraLong = TRUE; event.SetExtraLong(TRUE);
event.SetEventObject(item); event.SetEventObject(item);
event.SetString( item->GetString( n ) ); event.SetString( item->GetString( n ) );

View File

@@ -345,7 +345,7 @@ bool wxRadioBox::SetStringSelection (const wxString& s)
void wxRadioBox::Command (wxCommandEvent & event) void wxRadioBox::Command (wxCommandEvent & event)
{ {
SetSelection (event.m_commandInt); SetSelection (event.GetInt());
ProcessCommand (event); ProcessCommand (event);
} }

View File

@@ -136,7 +136,7 @@ bool wxRadioButton::GetValue() const
void wxRadioButton::Command (wxCommandEvent & event) void wxRadioButton::Command (wxCommandEvent & event)
{ {
SetValue ( (event.m_commandInt != 0) ); SetValue ( (event.GetInt() != 0) );
ProcessCommand (event); ProcessCommand (event);
} }

View File

@@ -107,7 +107,7 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS
void wxScrollBar::Command(wxCommandEvent& event) void wxScrollBar::Command(wxCommandEvent& event)
{ {
SetThumbPosition(event.m_commandInt); SetThumbPosition(event.GetInt());
ProcessCommand(event); ProcessCommand(event);
} }

View File

@@ -235,7 +235,9 @@ void wxSliderCallback (Widget widget, XtPointer clientData,
} }
wxScrollEvent event(scrollEvent, slider->GetId()); 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); event.SetEventObject(slider);
slider->GetEventHandler()->ProcessEvent(event); slider->GetEventHandler()->ProcessEvent(event);

View File

@@ -1673,7 +1673,7 @@ void wxWindow::OnSysColourChanged(wxSysColourChangedEvent& event)
if ( win->GetParent() ) if ( win->GetParent() )
{ {
wxSysColourChangedEvent event2; wxSysColourChangedEvent event2;
event.m_eventObject = win; event.SetEventObject(win);
win->GetEventHandler()->ProcessEvent(event2); win->GetEventHandler()->ProcessEvent(event2);
} }

View File

@@ -732,7 +732,7 @@ bool wxListBox::MSWCommand(WXUINT param, WXWORD WXUNUSED(id))
event.SetExtraLong( HasMultipleSelection() ? IsSelected(n) : true ); event.SetExtraLong( HasMultipleSelection() ? IsSelected(n) : true );
} }
event.m_commandInt = n; event.SetInt(n);
return GetEventHandler()->ProcessEvent(event); return GetEventHandler()->ProcessEvent(event);
} }

View File

@@ -315,7 +315,7 @@ bool wxRadioBox::MSWCommand(WXUINT cmd, WXWORD id)
void wxRadioBox::Command(wxCommandEvent & event) void wxRadioBox::Command(wxCommandEvent & event)
{ {
SetSelection (event.m_commandInt); SetSelection (event.GetInt());
SetFocus(); SetFocus();
ProcessCommand(event); ProcessCommand(event);
} }

View File

@@ -237,7 +237,7 @@ bool wxRadioButton::GetValue() const
void wxRadioButton::Command (wxCommandEvent& event) void wxRadioButton::Command (wxCommandEvent& event)
{ {
SetValue(event.m_commandInt != 0); SetValue(event.GetInt() != 0);
ProcessCommand(event); ProcessCommand(event);
} }

View File

@@ -365,7 +365,7 @@ void wxScrollBar::SetScrollbar(int position, int thumbSize, int range, int pageS
void wxScrollBar::Command(wxCommandEvent& event) void wxScrollBar::Command(wxCommandEvent& event)
{ {
SetThumbPosition(event.m_commandInt); SetThumbPosition(event.GetInt());
ProcessCommand(event); ProcessCommand(event);
} }

View File

@@ -3545,7 +3545,7 @@ bool wxWindowMSW::HandleKillFocus(WXHWND hwnd)
bool wxWindowMSW::HandleShow(bool show, int WXUNUSED(status)) bool wxWindowMSW::HandleShow(bool show, int WXUNUSED(status))
{ {
wxShowEvent event(GetId(), show); wxShowEvent event(GetId(), show);
event.m_eventObject = this; event.SetEventObject(this);
return GetEventHandler()->ProcessEvent(event); return GetEventHandler()->ProcessEvent(event);
} }
@@ -3553,7 +3553,7 @@ bool wxWindowMSW::HandleShow(bool show, int WXUNUSED(status))
bool wxWindowMSW::HandleInitDialog(WXHWND WXUNUSED(hWndFocus)) bool wxWindowMSW::HandleInitDialog(WXHWND WXUNUSED(hWndFocus))
{ {
wxInitDialogEvent event(GetId()); wxInitDialogEvent event(GetId());
event.m_eventObject = this; event.SetEventObject(this);
return GetEventHandler()->ProcessEvent(event); return GetEventHandler()->ProcessEvent(event);
} }
@@ -3588,7 +3588,7 @@ bool wxWindowMSW::HandleDropFiles(WXWPARAM wParam)
DragFinish (hFilesInfo); DragFinish (hFilesInfo);
wxDropFilesEvent event(wxEVT_DROP_FILES, gwFilesDropped, files); wxDropFilesEvent event(wxEVT_DROP_FILES, gwFilesDropped, files);
event.m_eventObject = this; event.SetEventObject(this);
POINT dropPoint; POINT dropPoint;
DragQueryPoint(hFilesInfo, (LPPOINT) &dropPoint); DragQueryPoint(hFilesInfo, (LPPOINT) &dropPoint);
@@ -4404,7 +4404,7 @@ void wxWindowMSW::InitMouseEvent(wxMouseEvent& event,
event.SetTimestamp(::GetMessageTime()); event.SetTimestamp(::GetMessageTime());
#endif #endif
event.m_eventObject = this; event.SetEventObject(this);
event.SetId(GetId()); event.SetId(GetId());
#if wxUSE_MOUSEEVENT_HACK #if wxUSE_MOUSEEVENT_HACK
@@ -4609,7 +4609,7 @@ wxKeyEvent wxWindowMSW::CreateKeyEvent(wxEventType evType,
event.m_controlDown = wxIsCtrlDown(); event.m_controlDown = wxIsCtrlDown();
event.m_altDown = (HIWORD(lParam) & KF_ALTDOWN) == KF_ALTDOWN; 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; event.m_keyCode = id;
#if wxUSE_UNICODE #if wxUSE_UNICODE
event.m_uniChar = (wxChar) wParam; event.m_uniChar = (wxChar) wParam;
@@ -4912,32 +4912,32 @@ bool wxWindowMSW::MSWOnScroll(int orientation, WXWORD wParam,
wxScrollWinEvent event; wxScrollWinEvent event;
event.SetPosition(pos); event.SetPosition(pos);
event.SetOrientation(orientation); event.SetOrientation(orientation);
event.m_eventObject = this; event.SetEventObject(this);
switch ( wParam ) switch ( wParam )
{ {
case SB_TOP: case SB_TOP:
event.m_eventType = wxEVT_SCROLLWIN_TOP; event.SetEventType(wxEVT_SCROLLWIN_TOP);
break; break;
case SB_BOTTOM: case SB_BOTTOM:
event.m_eventType = wxEVT_SCROLLWIN_BOTTOM; event.SetEventType(wxEVT_SCROLLWIN_BOTTOM);
break; break;
case SB_LINEUP: case SB_LINEUP:
event.m_eventType = wxEVT_SCROLLWIN_LINEUP; event.SetEventType(wxEVT_SCROLLWIN_LINEUP);
break; break;
case SB_LINEDOWN: case SB_LINEDOWN:
event.m_eventType = wxEVT_SCROLLWIN_LINEDOWN; event.SetEventType(wxEVT_SCROLLWIN_LINEDOWN);
break; break;
case SB_PAGEUP: case SB_PAGEUP:
event.m_eventType = wxEVT_SCROLLWIN_PAGEUP; event.SetEventType(wxEVT_SCROLLWIN_PAGEUP);
break; break;
case SB_PAGEDOWN: case SB_PAGEDOWN:
event.m_eventType = wxEVT_SCROLLWIN_PAGEDOWN; event.SetEventType(wxEVT_SCROLLWIN_PAGEDOWN);
break; break;
case SB_THUMBPOSITION: case SB_THUMBPOSITION:
@@ -4963,9 +4963,9 @@ bool wxWindowMSW::MSWOnScroll(int orientation, WXWORD wParam,
event.SetPosition(scrollInfo.nTrackPos); event.SetPosition(scrollInfo.nTrackPos);
} }
event.m_eventType = wParam == SB_THUMBPOSITION event.SetEventType( wParam == SB_THUMBPOSITION
? wxEVT_SCROLLWIN_THUMBRELEASE ? wxEVT_SCROLLWIN_THUMBRELEASE
: wxEVT_SCROLLWIN_THUMBTRACK; : wxEVT_SCROLLWIN_THUMBTRACK );
break; break;
default: default:
@@ -5333,7 +5333,7 @@ wxKeyboardHook(int nCode, WORD wParam, DWORD lParam)
if ( (HIWORD(lParam) & KF_ALTDOWN) == KF_ALTDOWN ) if ( (HIWORD(lParam) & KF_ALTDOWN) == KF_ALTDOWN )
event.m_altDown = true; event.m_altDown = true;
event.m_eventObject = NULL; event.SetEventObject(NULL);
event.m_keyCode = id; event.m_keyCode = id;
event.m_shiftDown = wxIsShiftDown(); event.m_shiftDown = wxIsShiftDown();
event.m_controlDown = wxIsCtrlDown(); event.m_controlDown = wxIsCtrlDown();

View File

@@ -810,7 +810,7 @@ bool wxListBox::OS2Command(
{ {
n = -1; n = -1;
} }
vEvent.m_commandInt = n; vEvent.SetInt(n);
return GetEventHandler()->ProcessEvent(vEvent); return GetEventHandler()->ProcessEvent(vEvent);
} // end of wxListBox::OS2Command } // end of wxListBox::OS2Command

View File

@@ -307,7 +307,7 @@ void wxScrollBar::Command (
wxCommandEvent& rEvent wxCommandEvent& rEvent
) )
{ {
SetThumbPosition(rEvent.m_commandInt); SetThumbPosition(rEvent.GetInt());
ProcessCommand(rEvent); ProcessCommand(rEvent);
} // end of wxScrollBar::Command } // end of wxScrollBar::Command

View File

@@ -3358,7 +3358,7 @@ bool wxWindowOS2::HandleShow(
{ {
wxShowEvent vEvent(GetId(), bShow); wxShowEvent vEvent(GetId(), bShow);
vEvent.m_eventObject = this; vEvent.SetEventObject(this);
return GetEventHandler()->ProcessEvent(vEvent); return GetEventHandler()->ProcessEvent(vEvent);
} // end of wxWindowOS2::HandleShow } // end of wxWindowOS2::HandleShow
@@ -3368,7 +3368,7 @@ bool wxWindowOS2::HandleInitDialog(
{ {
wxInitDialogEvent vEvent(GetId()); wxInitDialogEvent vEvent(GetId());
vEvent.m_eventObject = this; vEvent.SetEventObject(this);
return GetEventHandler()->ProcessEvent(vEvent); return GetEventHandler()->ProcessEvent(vEvent);
} // end of wxWindowOS2::HandleInitDialog } // end of wxWindowOS2::HandleInitDialog
@@ -3673,7 +3673,7 @@ void wxWindowOS2::OnSysColourChanged(
{ {
wxSysColourChangedEvent vEvent; wxSysColourChangedEvent vEvent;
rEvent.m_eventObject = pWin; rEvent.SetEventObject(pWin);
pWin->GetEventHandler()->ProcessEvent(vEvent); pWin->GetEventHandler()->ProcessEvent(vEvent);
} }
node = node->GetNext(); node = node->GetNext();
@@ -4057,7 +4057,7 @@ void wxWindowOS2::InitMouseEvent(
rEvent.m_rightDown = (::WinGetKeyState(HWND_DESKTOP, VK_BUTTON2) & rEvent.m_rightDown = (::WinGetKeyState(HWND_DESKTOP, VK_BUTTON2) &
0x8000) != 0; 0x8000) != 0;
rEvent.SetTimestamp(s_currentMsg.time); rEvent.SetTimestamp(s_currentMsg.time);
rEvent.m_eventObject = this; rEvent.SetEventObject(this);
rEvent.SetId(GetId()); rEvent.SetId(GetId());
#if wxUSE_MOUSEEVENT_HACK #if wxUSE_MOUSEEVENT_HACK
@@ -4174,7 +4174,7 @@ wxKeyEvent wxWindowOS2::CreateKeyEvent(
vEvent.m_controlDown = IsCtrlDown(); vEvent.m_controlDown = IsCtrlDown();
vEvent.m_altDown = (HIWORD(lParam) & KC_ALT) == KC_ALT; 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_keyCode = nId;
vEvent.m_rawCode = (wxUint32)wParam; vEvent.m_rawCode = (wxUint32)wParam;
vEvent.m_rawFlags = (wxUint32)lParam; vEvent.m_rawFlags = (wxUint32)lParam;
@@ -4363,32 +4363,32 @@ bool wxWindowOS2::OS2OnScroll(
vEvent.SetPosition(wPos); vEvent.SetPosition(wPos);
vEvent.SetOrientation(nOrientation); vEvent.SetOrientation(nOrientation);
vEvent.m_eventObject = this; vEvent.SetEventObject(this);
switch (wParam) switch (wParam)
{ {
case SB_LINEUP: case SB_LINEUP:
vEvent.m_eventType = wxEVT_SCROLLWIN_LINEUP; vEvent.SetEventType(wxEVT_SCROLLWIN_LINEUP);
break; break;
case SB_LINEDOWN: case SB_LINEDOWN:
vEvent.m_eventType = wxEVT_SCROLLWIN_LINEDOWN; vEvent.SetEventType(wxEVT_SCROLLWIN_LINEDOWN);
break; break;
case SB_PAGEUP: case SB_PAGEUP:
vEvent.m_eventType = wxEVT_SCROLLWIN_PAGEUP; vEvent.SetEventType(wxEVT_SCROLLWIN_PAGEUP);
break; break;
case SB_PAGEDOWN: case SB_PAGEDOWN:
vEvent.m_eventType = wxEVT_SCROLLWIN_PAGEDOWN; vEvent.SetEventType(wxEVT_SCROLLWIN_PAGEDOWN);
break; break;
case SB_SLIDERPOSITION: case SB_SLIDERPOSITION:
vEvent.m_eventType = wxEVT_SCROLLWIN_THUMBRELEASE; vEvent.SetEventType(wxEVT_SCROLLWIN_THUMBRELEASE);
break; break;
case SB_SLIDERTRACK: case SB_SLIDERTRACK:
vEvent.m_eventType = wxEVT_SCROLLWIN_THUMBTRACK; vEvent.SetEventType(wxEVT_SCROLLWIN_THUMBTRACK);
break; break;
default: default:

View File

@@ -892,7 +892,7 @@ bool wxListBox::SendEvent(wxEventType type, int item)
event.SetString(GetString(item)); event.SetString(GetString(item));
} }
event.m_commandInt = item; event.SetInt(item);
return GetEventHandler()->ProcessEvent(event); return GetEventHandler()->ProcessEvent(event);
} }

View File

@@ -1252,7 +1252,7 @@ void wxWindowX11::OnSysColourChanged(wxSysColourChangedEvent& event)
if ( win->GetParent() ) if ( win->GetParent() )
{ {
wxSysColourChangedEvent event2; wxSysColourChangedEvent event2;
event.m_eventObject = win; event.SetEventObject(win);
win->GetEventHandler()->ProcessEvent(event2); win->GetEventHandler()->ProcessEvent(event2);
} }