From f6a3e0bad5017aa9c54d0a5a687853a0263b46bf Mon Sep 17 00:00:00 2001 From: Francesco Montorsi Date: Wed, 4 Feb 2009 17:49:22 +0000 Subject: [PATCH] fix the new wxThreadEvent class adopting the new type-safe conventions for event classes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/event.h | 7 ++++--- src/common/event.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/wx/event.h b/include/wx/event.h index b92e213cd6..029719fb26 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -114,7 +114,7 @@ extern WXDLLIMPEXP_BASE wxEventType wxNewEventType(); // Define/Declare a wxEventType-based event type and initialize it with a // predefined event type. (Only used for wxEVT_SPIN_XXX for backward // compatibility) - + #define wxDEFINE_EVENT_ALIAS( name, type, value ) \ const wxEventType name = value; @@ -133,7 +133,7 @@ extern WXDLLIMPEXP_BASE wxEventType wxNewEventType(); #else // Define/Declare a templatized event type with the corresponding event as // a nested typedef: - + #define wxDEFINE_EVENT( name, type ) \ const wxEventTypeTag< type > name( wxNewEventType() ); @@ -516,6 +516,7 @@ extern WXDLLIMPEXP_BASE const wxEventType wxEVT_USER_FIRST; // Need events declared to do this class WXDLLIMPEXP_FWD_CORE wxCommandEvent; +class WXDLLIMPEXP_FWD_CORE wxThreadEvent; class WXDLLIMPEXP_FWD_CORE wxMouseEvent; class WXDLLIMPEXP_FWD_CORE wxFocusEvent; class WXDLLIMPEXP_FWD_CORE wxChildFocusEvent; @@ -575,7 +576,7 @@ wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED, wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOOL_ENTER, wxCommandEvent) // Thread events -wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_THREAD, wxCommandEvent) +wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_THREAD, wxThreadEvent) // Mouse event types wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LEFT_DOWN, wxMouseEvent) diff --git a/src/common/event.cpp b/src/common/event.cpp index 13adaf0aaa..6aff4544f4 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -319,7 +319,7 @@ wxDEFINE_EVENT( wxEVT_HELP, wxHelpEvent ) wxDEFINE_EVENT( wxEVT_DETAILED_HELP, wxHelpEvent ) // Thread event -DEFINE_EVENT_TYPE(wxEVT_COMMAND_THREAD) +wxDEFINE_EVENT( wxEVT_COMMAND_THREAD, wxThreadEvent ) #endif // wxUSE_GUI