+// template which associates the correct event object with the event type
+
+#if !wxEVENTS_COMPATIBILITY_2_8
+
+template <typename Event>
+class WXDLLIMPEXP_BASE wxTypedEventType
+{
+public:
+ typedef Event CorrespondingEvent;
+
+ wxTypedEventType(wxEventType type) { m_type = type; }
+
+ // used for static event tables
+ operator const wxEventType&() const { return m_type; }
+
+private:
+ wxEventType m_type;
+};
+
+// Due to a bug in older wx versions wxSpinEvents were being sent with type of
+// wxEVT_SCROLL_LINEUP, wxEVT_SCROLL_LINEDOWN and wxEVT_SCROLL_THUMBTRACK. But
+// with the type-safe events in place, these event types are associated with
+// wxScrollEvent. To allow handling of spin events, new event types have been
+// defined in spinbutt.h/spinnbuttcmn.cpp. To maintain backward compatibility
+// the spin event types are being initialized with the scroll event types. But
+// this presents as with the same static initialization order problem we also
+// have for the static event tables. So we use the same solution and the
+// template definition below holds a reference to a wxEventType.
+template <typename Event>
+class WXDLLIMPEXP_BASE wxTypedEventTypeReference
+{
+public:
+ typedef Event CorrespondingEvent;
+
+ wxTypedEventTypeReference(const wxEventType& type) : m_type(type) { }
+
+ // used for static event tables
+ operator const wxEventType&() const { return m_type; }
+
+private:
+ const wxEventType &m_type;
+};
+
+#endif // !wxEVENTS_COMPATIBILITY_2_8
+
+// These are needed for the functor definitions
+typedef void (wxEvtHandler::*wxEventFunction)(wxEvent&);
+
+// We had some trouble (specifically with eVC for ARM WinCE build) with using
+// wxEventFunction in the past so we had introduced wxObjectEventFunction which
+// used to be a typedef for a member of wxObject and not wxEvtHandler to work
+// around this but as eVC is not really supported any longer we now only keep
+// this for backwards compatibility and, despite its name, this is a typedef
+// for wxEvtHandler member now -- but if we have the same problem with another
+// compiler we can restore its old definition for it.
+typedef wxEventFunction wxObjectEventFunction;
+
+
+// the functors which will be stored in the static/dynamic tables
+class WXDLLIMPEXP_BASE wxEventFunctor
+{
+public:
+ virtual ~wxEventFunctor();
+
+ // this operator is used to actually invoke the event handler
+ virtual void operator()(wxEvtHandler *, wxEvent &) = 0;
+
+ // this function tests whether this functor is matched, for the purpose of
+ // finding it in an event table in Disconnect(), by the given func
+ virtual bool Matches(const wxEventFunctor& func) const = 0;
+
+ virtual wxEvtHandler *GetHandler() const { return NULL; }
+
+ virtual wxObjectEventFunction GetMethod() const { return NULL; }
+};
+
+// A plain method functor
+class WXDLLIMPEXP_BASE wxObjectEventFunctor : public wxEventFunctor
+{
+public:
+ wxObjectEventFunctor(wxObjectEventFunction method, wxEvtHandler *handler)
+ {
+ m_handler = handler;
+ m_method = method;
+ }
+
+ virtual void operator()(wxEvtHandler *handler, wxEvent& event)
+ {
+ wxEvtHandler * const realHandler = m_handler ? m_handler : handler;
+
+ (realHandler->*m_method)(event);
+ }
+
+ virtual bool Matches(const wxEventFunctor& other) const
+ {
+ wxEvtHandler * const handler = other.GetHandler();
+
+ return (m_handler == handler || !handler) &&
+ (m_method == other.GetMethod());
+ }
+
+ virtual wxEvtHandler *GetHandler() const { return m_handler; }
+ virtual wxObjectEventFunction GetMethod() const { return m_method; }
+
+private:
+ wxEvtHandler *m_handler;
+ wxObjectEventFunction m_method;
+};
+
+// Create a functor for the legacy events: handler can be NULL and its default
+// value is used by the event table macros
+
+inline wxObjectEventFunctor *
+wxNewEventFunctor(const wxEventType& WXUNUSED(evtType),
+ wxObjectEventFunction method,
+ wxEvtHandler *handler = NULL)
+{
+ return new wxObjectEventFunctor(method, handler);
+}
+
+inline wxObjectEventFunctor
+wxConstructEventFunctor(const wxEventType& WXUNUSED(evtType),
+ wxObjectEventFunction method,
+ wxEvtHandler *handler)
+{
+ return wxObjectEventFunctor(method, handler);
+}
+
+#if !wxEVENTS_COMPATIBILITY_2_8
+
+template <typename EventType>
+class WXDLLIMPEXP_BASE wxEventFunctorFunction : public wxEventFunctor
+{
+public:
+ wxEventFunctorFunction(void (*handler)(typename EventType::CorrespondingEvent &))
+ {
+ m_handler = handler;
+ }
+
+ virtual void operator()(wxEvtHandler *WXUNUSED(handler), wxEvent& event)
+ {
+ // Protect against wrong event i.e. wxMouseEvent evt(wxEVT_PAINT):
+ wxASSERT( dynamic_cast< typename EventType::CorrespondingEvent * >( &event ) != NULL );
+
+ // Will throw a std::bad_cast exception in release build:
+ ( *m_handler )( dynamic_cast< typename EventType::CorrespondingEvent & >( event ));
+ }
+
+ virtual bool Matches( const wxEventFunctor &right ) const
+ {
+ wxEventFunctorFunction const &other = dynamic_cast< wxEventFunctorFunction const & >( right );
+
+ return m_handler == other.m_handler || other.m_handler == NULL;
+ }
+
+private:
+ void ( *m_handler )( typename EventType::CorrespondingEvent & );
+};
+
+
+template <typename EventType, typename Class, typename Derived>
+class WXDLLIMPEXP_BASE wxEventFunctorMethod : public wxEventFunctor
+{
+public:
+ wxEventFunctorMethod( void ( Class::*method )( typename EventType::CorrespondingEvent & ),
+ Derived *handler )
+ {
+ m_handler = handler;
+ m_method = method;
+ }
+
+ virtual void operator () ( wxEvtHandler *handler, wxEvent &event )
+ {
+ // Compile-time type check 1: This requires Derived to derive from or
+ // be of the same type as Class
+ Class *realHandler = m_handler;
+
+ if( m_handler == NULL )
+ {
+ // Verify that the handler does indeed derive from the class
+ // containing the handler method
+ wxASSERT( dynamic_cast< Class * >( handler) != NULL );
+
+ realHandler = dynamic_cast< Class * >( handler );
+ }
+
+ // Protect against wrong event i.e. wxMouseEvent evt(wxEVT_PAINT):
+ wxASSERT( dynamic_cast< typename EventType::CorrespondingEvent * >( &event ) != NULL );
+
+ // Will throw a std::bad_cast exception in release build:
+ ( realHandler->*m_method )( dynamic_cast< typename EventType::CorrespondingEvent & >( event ));
+ }
+
+ virtual bool Matches( const wxEventFunctor &right ) const
+ {
+ wxEventFunctorMethod const &other = dynamic_cast< wxEventFunctorMethod const & >( right );
+
+ return (( m_handler == other.m_handler || other.m_handler == NULL ) &&
+ ( m_method == other.m_method || other.m_method == NULL ));
+ }
+
+ virtual wxEvtHandler *GetHandler() const
+ {
+ // This makes sure Derived derives from wxEvtHandler (it is still
+ // possible and even ok if Class does not derive from wxEvtHandler. In
+ // this case Derived would end up using multiple inheritance: class
+ // Derived : public wxEvtHandler, public Class { } where Class contains
+ // the method to call, but wxEvtHandler contains the wxTrackable and
+ // code for weak ref support
+ return m_handler;
+ }
+
+ virtual wxObjectEventFunction GetMethod() const
+ {
+ return reinterpret_cast<wxObjectEventFunction>(m_method);
+ }
+
+private:
+ Derived *m_handler;
+ void (Class::*m_method)(typename EventType::CorrespondingEvent&);
+};
+
+
+template <typename EventType, typename Functor>
+class WXDLLIMPEXP_BASE wxEventFunctorAdapter : public wxEventFunctor
+{
+public:
+ wxEventFunctorAdapter( Functor &functor )
+ {
+ m_functor = functor;
+ }
+
+ virtual void operator () ( wxEvtHandler *WXUNUSED( handler ), wxEvent &event )
+ {
+ // Protect against wrong event i.e. wxMouseEvent evt(wxEVT_PAINT):
+ wxASSERT( dynamic_cast< typename EventType::CorrespondingEvent * >( &event ) != NULL );
+
+ // Will throw a std::bad_cast exception in release build:
+ m_functor( dynamic_cast< typename EventType::CorrespondingEvent & >( event ));
+ }
+
+ virtual bool Matches( const wxEventFunctor &right ) const
+ {
+ wxEventFunctorAdapter const &other = dynamic_cast< wxEventFunctorAdapter const & >( right );
+
+ return m_functor == other.m_functor;
+ }
+
+private:
+ Functor m_functor;
+};
+
+//
+// Create functors for the templatized events (needed in wxEvtHandler::Connect):
+//
+
+// Create a functor for functions:
+
+template <typename EventType>
+inline wxEventFunctorFunction<EventType> *
+wxNewEventFunctor(const EventType &,
+ void (*function)(typename EventType::CorrespondingEvent&))
+{
+ return new wxEventFunctorFunction<EventType>(function);
+}
+
+// Create a functor for methods:
+
+template <typename EventType, typename Class>
+inline wxEventFunctorMethod<EventType, Class, Class> *
+wxNewEventFunctor(const EventType &,
+ void (Class::*method)(typename EventType::CorrespondingEvent&))
+{
+ return new wxEventFunctorMethod<EventType, Class, Class>(method, NULL);
+}
+
+template <typename EventType, typename Class, typename Derived>
+inline wxEventFunctorMethod<EventType, Class, Derived> *
+wxNewEventFunctor(const EventType &,
+ void (Class::*method)(typename EventType::CorrespondingEvent &),
+ Derived *handler )
+{
+ return new wxEventFunctorMethod<EventType, Class, Derived>(method, handler);
+}
+
+// Create a functor for arbitrary functors (like boost::function):
+template <typename EventType, typename Functor>
+inline wxEventFunctorAdapter<EventType, Functor> *
+wxNewEventFunctor(const EventType &,
+ Functor& functor )
+{
+ return new wxEventFunctorAdapter<EventType, Functor>(functor);
+}
+
+//
+// Construct functors for the templatized events (needed in wxEvtHandler::Disconnect):
+//
+
+// Construct a functor for functions:
+
+template <typename EventType>
+inline wxEventFunctorFunction<EventType>
+wxConstructEventFunctor(const EventType &,
+ void (*function)(typename EventType::CorrespondingEvent&))
+{
+ return wxEventFunctorFunction<EventType>(function);
+}
+
+// Construct a functor for methods:
+
+template <typename EventType, typename Class>
+inline wxEventFunctorMethod<EventType, Class, Class>
+wxConstructEventFunctor(const EventType &,
+ void (Class::*method)(typename EventType::CorrespondingEvent&))
+{
+ return wxEventFunctorMethod<EventType, Class, Class>(method, NULL);
+}
+
+template <typename EventType, typename Class, typename Derived>
+inline wxEventFunctorMethod<EventType, Class, Derived>
+wxConstructEventFunctor(const EventType &,
+ void (Class::*method)(typename EventType::CorrespondingEvent&),
+ Derived *handler)
+{
+ return wxEventFunctorMethod<EventType, Class, Derived>(method, handler);
+}
+
+// Construct a functor for arbitrary functors (like boost:function):
+
+template <typename EventType, typename Functor>
+inline wxEventFunctorAdapter<EventType, Functor>
+wxConstructEventFunctor(const EventType &,
+ Functor& functor)
+{
+ return wxEventFunctorAdapter<EventType, Functor>(functor);
+}
+
+#endif // !wxEVENTS_COMPATIBILITY_2_8
+
+// many, but not all, standard event types
+
+ // some generic events
+extern WXDLLIMPEXP_BASE const wxEventType wxEVT_NULL;
+extern WXDLLIMPEXP_BASE const wxEventType wxEVT_FIRST;
+extern WXDLLIMPEXP_BASE const wxEventType wxEVT_USER_FIRST;
+
+ // Need events declared to do this
+class WXDLLIMPEXP_FWD_CORE wxCommandEvent;
+class WXDLLIMPEXP_FWD_CORE wxMouseEvent;
+class WXDLLIMPEXP_FWD_CORE wxFocusEvent;
+class WXDLLIMPEXP_FWD_CORE wxChildFocusEvent;
+class WXDLLIMPEXP_FWD_CORE wxKeyEvent;
+class WXDLLIMPEXP_FWD_CORE wxNavigationKeyEvent;
+class WXDLLIMPEXP_FWD_CORE wxSetCursorEvent;
+class WXDLLIMPEXP_FWD_CORE wxScrollEvent;
+class WXDLLIMPEXP_FWD_CORE wxScrollWinEvent;
+class WXDLLIMPEXP_FWD_CORE wxSizeEvent;
+class WXDLLIMPEXP_FWD_CORE wxMoveEvent;
+class WXDLLIMPEXP_FWD_CORE wxCloseEvent;
+class WXDLLIMPEXP_FWD_CORE wxActivateEvent;
+class WXDLLIMPEXP_FWD_CORE wxWindowCreateEvent;
+class WXDLLIMPEXP_FWD_CORE wxWindowDestroyEvent;
+class WXDLLIMPEXP_FWD_CORE wxShowEvent;
+class WXDLLIMPEXP_FWD_CORE wxIconizeEvent;
+class WXDLLIMPEXP_FWD_CORE wxMaximizeEvent;
+class WXDLLIMPEXP_FWD_CORE wxMouseCaptureChangedEvent;
+class WXDLLIMPEXP_FWD_CORE wxMouseCaptureLostEvent;
+class WXDLLIMPEXP_FWD_CORE wxPaintEvent;
+class WXDLLIMPEXP_FWD_CORE wxEraseEvent;
+class WXDLLIMPEXP_FWD_CORE wxNcPaintEvent;
+class WXDLLIMPEXP_FWD_CORE wxMenuEvent;
+class WXDLLIMPEXP_FWD_CORE wxContextMenuEvent;
+class WXDLLIMPEXP_FWD_CORE wxSysColourChangedEvent;
+class WXDLLIMPEXP_FWD_CORE wxDisplayChangedEvent;
+class WXDLLIMPEXP_FWD_CORE wxQueryNewPaletteEvent;
+class WXDLLIMPEXP_FWD_CORE wxPaletteChangedEvent;
+class WXDLLIMPEXP_FWD_CORE wxJoystickEvent;
+class WXDLLIMPEXP_FWD_CORE wxDropFilesEvent;
+class WXDLLIMPEXP_FWD_CORE wxInitDialogEvent;
+class WXDLLIMPEXP_FWD_CORE wxIdleEvent;
+class WXDLLIMPEXP_FWD_CORE wxUpdateUIEvent;
+class WXDLLIMPEXP_FWD_CORE wxClipboardTextEvent;
+class WXDLLIMPEXP_FWD_CORE wxHelpEvent;
+
+
+ // Command events
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SLIDER_UPDATED, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEvent)
+
+// wxEVT_COMMAND_SCROLLBAR_UPDATED is deprecated, use wxEVT_SCROLL... events
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SCROLLBAR_UPDATED, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_VLBOX_SELECTED, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOOL_RCLICKED, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TOOL_ENTER, wxCommandEvent)
+
+ // Mouse event types
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LEFT_DOWN, wxMouseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LEFT_UP, wxMouseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MIDDLE_DOWN, wxMouseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MIDDLE_UP, wxMouseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_RIGHT_DOWN, wxMouseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_RIGHT_UP, wxMouseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOTION, wxMouseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_ENTER_WINDOW, wxMouseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LEAVE_WINDOW, wxMouseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_LEFT_DCLICK, wxMouseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MIDDLE_DCLICK, wxMouseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_RIGHT_DCLICK, wxMouseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SET_FOCUS, wxFocusEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_KILL_FOCUS, wxFocusEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHILD_FOCUS, wxChildFocusEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOUSEWHEEL, wxMouseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX1_DOWN, wxMouseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX1_UP, wxMouseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX1_DCLICK, wxMouseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX2_DOWN, wxMouseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX2_UP, wxMouseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_AUX2_DCLICK, wxMouseEvent)
+
+ // Character input event type
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHAR, wxKeyEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CHAR_HOOK, wxKeyEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_NAVIGATION_KEY, wxNavigationKeyEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_KEY_DOWN, wxKeyEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_KEY_UP, wxKeyEvent)
+#if wxUSE_HOTKEY
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_HOTKEY, wxKeyEvent)
+#endif
+ // Set cursor event
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SET_CURSOR, wxSetCursorEvent)
+
+ // wxScrollBar and wxSlider event identifiers
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_TOP, wxScrollEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_BOTTOM, wxScrollEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_LINEUP, wxScrollEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_LINEDOWN, wxScrollEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_PAGEUP, wxScrollEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_PAGEDOWN, wxScrollEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_THUMBTRACK, wxScrollEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_THUMBRELEASE, wxScrollEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLL_CHANGED, wxScrollEvent)
+
+ // Scroll events from wxWindow
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_TOP, wxScrollWinEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_BOTTOM, wxScrollWinEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_LINEUP, wxScrollWinEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_LINEDOWN, wxScrollWinEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_PAGEUP, wxScrollWinEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_PAGEDOWN, wxScrollWinEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_THUMBTRACK, wxScrollWinEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SCROLLWIN_THUMBRELEASE, wxScrollWinEvent)
+
+ // System events
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SIZE, wxSizeEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOVE, wxMoveEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CLOSE_WINDOW, wxCloseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_END_SESSION, wxCloseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_QUERY_END_SESSION, wxCloseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_ACTIVATE_APP, wxActivateEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_ACTIVATE, wxActivateEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CREATE, wxWindowCreateEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_DESTROY, wxWindowDestroyEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SHOW, wxShowEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_ICONIZE, wxIconizeEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MAXIMIZE, wxMaximizeEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOUSE_CAPTURE_CHANGED, wxMouseCaptureChangedEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOUSE_CAPTURE_LOST, wxMouseCaptureLostEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_PAINT, wxPaintEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_ERASE_BACKGROUND, wxEraseEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_NC_PAINT, wxNcPaintEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MENU_OPEN, wxMenuEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MENU_CLOSE, wxMenuEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MENU_HIGHLIGHT, wxMenuEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_CONTEXT_MENU, wxContextMenuEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SYS_COLOUR_CHANGED, wxSysColourChangedEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_DISPLAY_CHANGED, wxDisplayChangedEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_QUERY_NEW_PALETTE, wxQueryNewPaletteEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_PALETTE_CHANGED, wxPaletteChangedEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_JOY_BUTTON_DOWN, wxJoystickEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_JOY_BUTTON_UP, wxJoystickEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_JOY_MOVE, wxJoystickEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_JOY_ZMOVE, wxJoystickEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_DROP_FILES, wxDropFilesEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_INIT_DIALOG, wxInitDialogEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_BASE, wxEVT_IDLE, wxIdleEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_UPDATE_UI, wxUpdateUIEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_SIZING, wxSizeEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOVING, wxMoveEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOVE_START, wxMoveEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_MOVE_END, wxMoveEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_HIBERNATE, wxActivateEvent)
+
+ // Clipboard events
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_COPY, wxClipboardTextEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_CUT, wxClipboardTextEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_TEXT_PASTE, wxClipboardTextEvent)
+
+ // Generic command events
+ // Note: a click is a higher-level event than button down/up
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_LEFT_CLICK, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_LEFT_DCLICK, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_RIGHT_CLICK, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_RIGHT_DCLICK, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_SET_FOCUS, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_KILL_FOCUS, wxCommandEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_COMMAND_ENTER, wxCommandEvent)
+
+ // Help events
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_HELP, wxHelpEvent)
+wxDECLARE_EXPORTED_EVENT(WXDLLIMPEXP_CORE, wxEVT_DETAILED_HELP, wxHelpEvent)