X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/657a8a359826e46a7fc458216403f54deca34989..c099b53353ec8c689681a1bc8f5117a584e4098d:/include/wx/event.h?ds=sidebyside diff --git a/include/wx/event.h b/include/wx/event.h index 51b34461ce..cc363146e4 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -381,7 +381,7 @@ struct HandlerImpl // allowed to handle different events in the same handler taking wxEvent&, for // example template - + class wxEventFunctorMethod : public wxEventFunctor, private wxPrivate::HandlerImpl @@ -399,7 +399,7 @@ public: typedef typename wxPrivate::EventClassOf::type EventClass; - wxEventFunctorMethod(void (Class::*method)(EventArg&), ObjClass *handler) + wxEventFunctorMethod(void (Class::*method)(EventArg&), EventHandler *handler) { wxASSERT_MSG( handler || this->IsEvtHandler(), "handlers defined in non-wxEvtHandler-derived classes " @@ -457,7 +457,7 @@ public: } private: - ObjClass *m_handler; + EventHandler *m_handler; void (Class::*m_method)(EventArg&); }; @@ -486,29 +486,29 @@ wxMakeEventFunctor(const EventTag&, Functor func) // Create functors for methods: template - -inline wxEventFunctorMethod * + +inline wxEventFunctorMethod * wxNewEventFunctor(const EventTag&, void (Class::*method)(EventArg&), - ObjClass *handler) + EventHandler *handler) { - return new wxEventFunctorMethod( + return new wxEventFunctorMethod( method, handler); } template - -inline wxEventFunctorMethod + +inline wxEventFunctorMethod wxMakeEventFunctor(const EventTag&, void (Class::*method)(EventArg&), - ObjClass *handler) + EventHandler *handler) { - return wxEventFunctorMethod( + return wxEventFunctorMethod( method, handler); } // Special case for the wxNewEventFunctor() calls used inside the event table -// macros: they don't specify the handler so ObjClass can't be deduced +// macros: they don't specify the handler so EventHandler can't be deduced template inline wxEventFunctorMethod * wxNewEventFunctor(const EventTag&, void (Class::*method)(EventArg&)) @@ -518,7 +518,7 @@ wxNewEventFunctor(const EventTag&, void (Class::*method)(EventArg&)) } template - + inline wxEventFunctorMethod wxMakeEventFunctor(const EventTag&, void (Class::*method)(EventArg&)) { @@ -3005,32 +3005,32 @@ public: } - // Bind a method of a class (called on the specified eventSink which must + // Bind a method of a class (called on the specified handler which must // be convertible to this class) object to an event: - template + template void Bind(const EventTag &eventType, void (Class::*method)(EventArg &), - ObjClass *eventSink, + EventHandler *handler, int winid = wxID_ANY, int lastId = wxID_ANY, wxObject *userData = NULL) { DoConnect(winid, lastId, eventType, - wxNewEventFunctor(eventType, method, eventSink), + wxNewEventFunctor(eventType, method, handler), userData); } - template + template bool Unbind(const EventTag &eventType, void (Class::*method)(EventArg&), - ObjClass *eventSink, + EventHandler *handler, int winid = wxID_ANY, int lastId = wxID_ANY, wxObject *userData = NULL ) { return DoDisconnect(winid, lastId, eventType, - wxMakeEventFunctor(eventType, method, eventSink), + wxMakeEventFunctor(eventType, method, handler), userData); } #endif // !wxEVENTS_COMPATIBILITY_2_8 @@ -3156,7 +3156,7 @@ protected: virtual void *DoGetClientData() const; // Search tracker objects for event connection with this sink - wxEventConnectionRef *FindRefInTrackerList(wxEvtHandler *eventSink); + wxEventConnectionRef *FindRefInTrackerList(wxEvtHandler *handler); private: // pass the event to wxTheApp instance, called from TryAfter()