+void EvtHandlerTestCase::BuiltinConnect()
+{
+ handler.Connect(wxEVT_IDLE, wxIdleEventHandler(MyHandler::OnIdle));
+ handler.Disconnect(wxEVT_IDLE, wxIdleEventHandler(MyHandler::OnIdle));
+
+ handler.Connect(wxEVT_IDLE, wxIdleEventHandler(MyHandler::OnIdle), NULL, &handler);
+ handler.Disconnect(wxEVT_IDLE, wxIdleEventHandler(MyHandler::OnIdle), NULL, &handler);
+
+ // using casts like this is even uglier than using wxIdleEventHandler but
+ // it should still continue to work for compatibility
+ handler.Connect(wxEVT_IDLE, (wxObjectEventFunction)(wxEventFunction)&MyHandler::OnIdle);
+ handler.Disconnect(wxEVT_IDLE, (wxObjectEventFunction)(wxEventFunction)&MyHandler::OnIdle);
+
+#ifdef wxHAS_EVENT_BIND
+ handler.Bind(wxEVT_IDLE, GlobalOnIdle);
+ handler.Unbind(wxEVT_IDLE, GlobalOnIdle);
+
+ IdleFunctor f;
+ handler.Bind(wxEVT_IDLE, f);
+ handler.Unbind(wxEVT_IDLE, f);
+
+ handler.Bind(wxEVT_IDLE, &MyHandler::OnIdle, &handler);
+ handler.Unbind(wxEVT_IDLE, &MyHandler::OnIdle, &handler);
+
+ handler.Bind(wxEVT_IDLE, &MyHandler::StaticOnIdle);
+ handler.Unbind(wxEVT_IDLE, &MyHandler::StaticOnIdle);
+#endif // wxHAS_EVENT_BIND
+}
+
+void EvtHandlerTestCase::LegacyConnect()
+{
+ handler.Connect( LegacyEventType, (wxObjectEventFunction)&MyHandler::OnEvent );
+ handler.Connect( 0, LegacyEventType, (wxObjectEventFunction)&MyHandler::OnEvent );
+ handler.Connect( 0, 0, LegacyEventType, (wxObjectEventFunction)&MyHandler::OnEvent );