git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58694
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
virtual wxEvent *Clone() const { return new MyEvent; }
};
virtual wxEvent *Clone() const { return new MyEvent; }
};
-#define EVT_MYEVENT(func) wx__DECLARE_EVT0(MyEventType, &func)
+typedef void (wxEvtHandler::*MyEventFunction)(MyEvent&);
+#define MyEventHandler(func) wxEVENT_HANDLER_CAST(MyEventFunction, func)
+#define EVT_MYEVENT(func) \
+ wx__DECLARE_EVT0(MyEventType, MyEventHandler(func))
class AnotherEvent : public wxEvent
{
class AnotherEvent : public wxEvent
{
EVT_IDLE(MyClassWithEventTable::OnIdle)
EVT_MYEVENT(MyClassWithEventTable::OnMyEvent)
EVT_IDLE(MyClassWithEventTable::OnIdle)
EVT_MYEVENT(MyClassWithEventTable::OnMyEvent)
+#if !wxEVENTS_COMPATIBILITY_2_8
EVT_MYEVENT(MyClassWithEventTable::OnEvent)
EVT_MYEVENT(MyClassWithEventTable::OnEvent)
// this shouldn't compile:
//EVT_MYEVENT(MyClassWithEventTable::OnIdle)
// this shouldn't compile:
//EVT_MYEVENT(MyClassWithEventTable::OnIdle)