compilation fix for wxEVENTS_COMPATIBILITY_2_8 case

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58694 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-02-06 21:54:09 +00:00
parent 2efaf75451
commit bb87b19b16

View File

@@ -36,7 +36,10 @@ public:
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
{ {
@@ -123,7 +126,9 @@ BEGIN_EVENT_TABLE(MyClassWithEventTable, wxEvtHandler)
EVT_IDLE(MyClassWithEventTable::OnIdle) EVT_IDLE(MyClassWithEventTable::OnIdle)
EVT_MYEVENT(MyClassWithEventTable::OnMyEvent) EVT_MYEVENT(MyClassWithEventTable::OnMyEvent)
#if !wxEVENTS_COMPATIBILITY_2_8
EVT_MYEVENT(MyClassWithEventTable::OnEvent) EVT_MYEVENT(MyClassWithEventTable::OnEvent)
#endif
// this shouldn't compile: // this shouldn't compile:
//EVT_MYEVENT(MyClassWithEventTable::OnIdle) //EVT_MYEVENT(MyClassWithEventTable::OnIdle)