X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/58cc15871d1a5ec5a6cc17f50be3e2006f57571f..1ff3e9aae5dfdf2cfeba4d8ec44c0640626f98ad:/src/common/event.cpp?ds=sidebyside diff --git a/src/common/event.cpp b/src/common/event.cpp index 18e2386db0..9896674c61 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -413,11 +413,6 @@ wxEvent& wxEvent::operator=(const wxEvent& src) // wxCommandEvent // ---------------------------------------------------------------------------- -#ifdef __VISUALC__ - // 'this' : used in base member initializer list (for m_commandString) - #pragma warning(disable:4355) -#endif - wxCommandEvent::wxCommandEvent(wxEventType commandType, int theId) : wxEvent(theId, commandType) { @@ -429,10 +424,6 @@ wxCommandEvent::wxCommandEvent(wxEventType commandType, int theId) m_propagationLevel = wxEVENT_PROPAGATE_MAX; } -#ifdef __VISUALC__ - #pragma warning(default:4355) -#endif - wxString wxCommandEvent::GetString() const { if (m_eventType != wxEVT_COMMAND_TEXT_UPDATED || !m_eventObject) @@ -563,10 +554,10 @@ wxMouseEvent::wxMouseEvent(wxEventType commandType) m_clickCount = -1; + m_wheelAxis = wxMOUSE_WHEEL_VERTICAL; m_wheelRotation = 0; m_wheelDelta = 0; m_linesPerAction = 0; - m_wheelAxis = 0; } void wxMouseEvent::Assign(const wxMouseEvent& event) @@ -744,22 +735,28 @@ wxKeyEvent::wxKeyEvent(wxEventType type) #if wxUSE_UNICODE m_uniChar = WXK_NONE; #endif + + InitPropagation(); } wxKeyEvent::wxKeyEvent(const wxKeyEvent& evt) : wxEvent(evt), wxKeyboardState(evt) { - m_x = evt.m_x; - m_y = evt.m_y; + DoAssignMembers(evt); - m_keyCode = evt.m_keyCode; - m_rawCode = evt.m_rawCode; - m_rawFlags = evt.m_rawFlags; + InitPropagation(); +} -#if wxUSE_UNICODE - m_uniChar = evt.m_uniChar; -#endif +wxKeyEvent::wxKeyEvent(wxEventType eventType, const wxKeyEvent& evt) + : wxEvent(evt), + wxKeyboardState(evt) +{ + DoAssignMembers(evt); + + m_eventType = eventType; + + InitPropagation(); } bool wxKeyEvent::IsKeyInCategory(int category) const