no changes, just correct some comments and variable names (see #10594)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59599 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		| @@ -462,12 +462,10 @@ private: | |||||||
| }; | }; | ||||||
|  |  | ||||||
|  |  | ||||||
| // |  | ||||||
| // Create functors for the templatized events, either allocated on the heap for | // Create functors for the templatized events, either allocated on the heap for | ||||||
| // wxNewXXX() variants (this is needed in wxEvtHandler::Connect() to store them | // wxNewXXX() variants (this is needed in wxEvtHandler::Bind<>() to store them | ||||||
| // in dynamic event table) or just by returning them as temporary objects (this | // in dynamic event table) or just by returning them as temporary objects (this | ||||||
| // is enough for Disconnect() and we allocate unnecessary heap allocation like | // is enough for Unbind<>() and we avoid unnecessary heap allocation like this). | ||||||
| // this) |  | ||||||
|  |  | ||||||
|  |  | ||||||
| // Create functors wrapping other functors (including functions): | // Create functors wrapping other functors (including functions): | ||||||
| @@ -2978,26 +2976,26 @@ public: | |||||||
|     // Bind arbitrary functor (including just a function) to an event: |     // Bind arbitrary functor (including just a function) to an event: | ||||||
|     template <typename EventTag, typename Functor> |     template <typename EventTag, typename Functor> | ||||||
|     void Bind(const EventTag& eventType, |     void Bind(const EventTag& eventType, | ||||||
|               Functor func, |               Functor functor, | ||||||
|               int winid = wxID_ANY, |               int winid = wxID_ANY, | ||||||
|               int lastId = wxID_ANY, |               int lastId = wxID_ANY, | ||||||
|               wxObject *userData = NULL) |               wxObject *userData = NULL) | ||||||
|     { |     { | ||||||
|         DoConnect(winid, lastId, eventType, |         DoConnect(winid, lastId, eventType, | ||||||
|                   wxNewEventFunctor(eventType, func), |                   wxNewEventFunctor(eventType, functor), | ||||||
|                   userData); |                   userData); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |  | ||||||
|     template <typename EventTag, typename Functor> |     template <typename EventTag, typename Functor> | ||||||
|     bool Unbind(const EventTag& eventType, |     bool Unbind(const EventTag& eventType, | ||||||
|                 Functor func, |                 Functor functor, | ||||||
|                 int winid = wxID_ANY, |                 int winid = wxID_ANY, | ||||||
|                 int lastId = wxID_ANY, |                 int lastId = wxID_ANY, | ||||||
|                 wxObject *userData = NULL) |                 wxObject *userData = NULL) | ||||||
|     { |     { | ||||||
|         return DoDisconnect(winid, lastId, eventType, |         return DoDisconnect(winid, lastId, eventType, | ||||||
|                             wxMakeEventFunctor(eventType, func), |                             wxMakeEventFunctor(eventType, functor), | ||||||
|                             userData); |                             userData); | ||||||
|     } |     } | ||||||
|  |  | ||||||
| @@ -3005,31 +3003,29 @@ public: | |||||||
|     // Bind a method of a class (called on the specified eventSink which must |     // Bind a method of a class (called on the specified eventSink which must | ||||||
|     // be convertible to this class) object to an event: |     // be convertible to this class) object to an event: | ||||||
|  |  | ||||||
|     template |     template <typename EventTag, typename Class, typename EventArg, typename ObjClass> | ||||||
|       <typename EventTag, typename Class, typename EventArg, typename ObjClass> |  | ||||||
|     void Bind(const EventTag &eventType, |     void Bind(const EventTag &eventType, | ||||||
|               void (Class::*func)(EventArg &), |               void (Class::*method)(EventArg &), | ||||||
|               ObjClass *eventSink, |               ObjClass *eventSink, | ||||||
|               int winid = wxID_ANY, |               int winid = wxID_ANY, | ||||||
|               int lastId = wxID_ANY, |               int lastId = wxID_ANY, | ||||||
|               wxObject *userData = NULL) |               wxObject *userData = NULL) | ||||||
|     { |     { | ||||||
|         DoConnect(winid, lastId, eventType, |         DoConnect(winid, lastId, eventType, | ||||||
|                   wxNewEventFunctor(eventType, func, eventSink), |                   wxNewEventFunctor(eventType, method, eventSink), | ||||||
|                   userData); |                   userData); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     template |     template <typename EventTag, typename Class, typename EventArg, typename ObjClass> | ||||||
|       <typename EventTag, typename Class, typename EventArg, typename ObjClass> |  | ||||||
|     bool Unbind(const EventTag &eventType, |     bool Unbind(const EventTag &eventType, | ||||||
|                 void (Class::*func)(EventArg&), |                 void (Class::*method)(EventArg&), | ||||||
|                 ObjClass *eventSink, |                 ObjClass *eventSink, | ||||||
|                 int winid = wxID_ANY, |                 int winid = wxID_ANY, | ||||||
|                 int lastId = wxID_ANY, |                 int lastId = wxID_ANY, | ||||||
|                 wxObject *userData = NULL ) |                 wxObject *userData = NULL ) | ||||||
|     { |     { | ||||||
|         return DoDisconnect(winid, lastId, eventType, |         return DoDisconnect(winid, lastId, eventType, | ||||||
|                             wxMakeEventFunctor(eventType, func, eventSink), |                             wxMakeEventFunctor(eventType, method, eventSink), | ||||||
|                             userData); |                             userData); | ||||||
|     } |     } | ||||||
| #endif // !wxEVENTS_COMPATIBILITY_2_8 | #endif // !wxEVENTS_COMPATIBILITY_2_8 | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user