Refactor wxKeyEvent copying code.

Avoid duplication between copy ctor and assignment operator.

Also extract the assignment of everything not including the event type in a
reusable function as this can be useful for key event generation code in wxGTK
and possibly other ports.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69890 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-12-02 00:50:16 +00:00
parent edf5822ace
commit dfc7216da7
2 changed files with 18 additions and 20 deletions

View File

@@ -741,16 +741,7 @@ wxKeyEvent::wxKeyEvent(const wxKeyEvent& evt)
: wxEvent(evt),
wxKeyboardState(evt)
{
m_x = evt.m_x;
m_y = evt.m_y;
m_keyCode = evt.m_keyCode;
m_rawCode = evt.m_rawCode;
m_rawFlags = evt.m_rawFlags;
#if wxUSE_UNICODE
m_uniChar = evt.m_uniChar;
#endif
DoAssignMembers(evt);
}
bool wxKeyEvent::IsKeyInCategory(int category) const