// generate a new unique event type
extern WXDLLIMPEXP_BASE wxEventType wxNewEventType();
+// FIXME: currently the new events code is disabled because it creates too
+// many problems, it should be reenabled a.s.a.p. or removed
+#undef wxEVENTS_COMPATIBILITY_2_8
+#define wxEVENTS_COMPATIBILITY_2_8 1
+
// macros to create an event type depending on whether type safe events are
// enabled.
extern const expdecl wxEventType name;
#define wxDEFINE_EVENT_REFERENCE( name, type, value ) \
- const wxEventType &name( value );
+ const wxEventType& name = value;
#define wxDECLARE_EXPORTED_EVENT_REFERENCE( expdecl, name, type ) \
- extern const expdecl wxEventType &name;
+ extern const expdecl wxEventType& name;
#define wxDECLARE_LOCAL_EVENT( name, type ) \
wxDECLARE_EXPORTED_EVENT( wxEMPTY_PARAMETER_VALUE, name, type )
wxObjectEventFunction m_method;
};
-// Create a functor for the legacy events: handler can be NULL
+// 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(wxEventType WXUNUSED(evtType),
wxObjectEventFunction method,
- wxEvtHandler *handler)
+ wxEvtHandler *handler = NULL)
{
return new wxObjectEventFunctor(method, handler);
}