X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a1725c45adde0db77b9c9c93ea03d6b47148807..4c200e8d87728306b219822d9c07e28526cd8649:/src/common/event.cpp diff --git a/src/common/event.cpp b/src/common/event.cpp index d4cc3c54d4..3a27b933f5 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -545,8 +545,36 @@ wxKeyEvent::wxKeyEvent(wxEventType type) m_altDown = FALSE; m_keyCode = 0; m_scanCode = 0; +#if wxUSE_UNICODE + m_uniChar = 0; +#endif } +wxKeyEvent::wxKeyEvent(const wxKeyEvent& evt) + : wxEvent(evt) +{ + m_x = evt.m_x; + m_y = evt.m_y; + + m_keyCode = evt.m_keyCode; + + m_controlDown = evt.m_controlDown; + m_shiftDown = evt.m_shiftDown; + m_altDown = evt.m_altDown; + m_metaDown = evt.m_metaDown; + m_scanCode = evt.m_scanCode; + m_rawCode = evt.m_rawCode; + m_rawFlags = evt.m_rawFlags; + +#if wxUSE_UNICODE + m_uniChar = evt.m_uniChar; +#endif +} + +long wxKeyEvent::KeyCode() const +{ + return m_keyCode; +} wxWindowCreateEvent::wxWindowCreateEvent(wxWindow *win) { @@ -605,19 +633,19 @@ wxEvtHandler::~wxEvtHandler() if (m_dynamicEvents) { - wxNode *node = m_dynamicEvents->First(); + wxNode *node = m_dynamicEvents->GetFirst(); while (node) { #if WXWIN_COMPATIBILITY_EVENT_TYPES - wxEventTableEntry *entry = (wxEventTableEntry*)node->Data(); + wxEventTableEntry *entry = (wxEventTableEntry*)node->GetData(); #else // !WXWIN_COMPATIBILITY_EVENT_TYPES - wxDynamicEventTableEntry *entry = (wxDynamicEventTableEntry*)node->Data(); + wxDynamicEventTableEntry *entry = (wxDynamicEventTableEntry*)node->GetData(); #endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES if (entry->m_callbackUserData) delete entry->m_callbackUserData; delete entry; - node = node->Next(); + node = node->GetNext(); } delete m_dynamicEvents; }; @@ -702,10 +730,10 @@ void wxEvtHandler::ProcessPendingEvents() wxENTER_CRIT_SECT( *m_eventsLocker); #endif - wxNode *node = m_pendingEvents->First(); + wxNode *node = m_pendingEvents->GetFirst(); while ( node ) { - wxEvent *event = (wxEvent *)node->Data(); + wxEvent *event = (wxEvent *)node->GetData(); delete node; // In ProcessEvent, new events might get added and @@ -723,7 +751,7 @@ void wxEvtHandler::ProcessPendingEvents() wxENTER_CRIT_SECT( *m_eventsLocker); #endif - node = m_pendingEvents->First(); + node = m_pendingEvents->GetFirst(); } #if defined(__VISAGECPP__) @@ -968,13 +996,13 @@ bool wxEvtHandler::Disconnect( int id, int lastId, wxEventType eventType, if (!m_dynamicEvents) return FALSE; - wxNode *node = m_dynamicEvents->First(); + wxNode *node = m_dynamicEvents->GetFirst(); while (node) { #if WXWIN_COMPATIBILITY_EVENT_TYPES - wxEventTableEntry *entry = (wxEventTableEntry*)node->Data(); + wxEventTableEntry *entry = (wxEventTableEntry*)node->GetData(); #else // !WXWIN_COMPATIBILITY_EVENT_TYPES - wxDynamicEventTableEntry *entry = (wxDynamicEventTableEntry*)node->Data(); + wxDynamicEventTableEntry *entry = (wxDynamicEventTableEntry*)node->GetData(); #endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES if ((entry->m_id == id) && @@ -989,7 +1017,7 @@ bool wxEvtHandler::Disconnect( int id, int lastId, wxEventType eventType, delete entry; return TRUE; } - node = node->Next(); + node = node->GetNext(); } return FALSE; } @@ -1001,13 +1029,13 @@ bool wxEvtHandler::SearchDynamicEventTable( wxEvent& event ) int commandId = event.GetId(); - wxNode *node = m_dynamicEvents->First(); + wxNode *node = m_dynamicEvents->GetFirst(); while (node) { #if WXWIN_COMPATIBILITY_EVENT_TYPES - wxEventTableEntry *entry = (wxEventTableEntry*)node->Data(); + wxEventTableEntry *entry = (wxEventTableEntry*)node->GetData(); #else // !WXWIN_COMPATIBILITY_EVENT_TYPES - wxDynamicEventTableEntry *entry = (wxDynamicEventTableEntry*)node->Data(); + wxDynamicEventTableEntry *entry = (wxDynamicEventTableEntry*)node->GetData(); #endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES if (entry->m_fn) @@ -1030,7 +1058,7 @@ bool wxEvtHandler::SearchDynamicEventTable( wxEvent& event ) return TRUE; } } - node = node->Next(); + node = node->GetNext(); } return FALSE; };