From 03ae811e42ea30bd7d627ed3368a4165c3d8d35c Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 18 Mar 2009 09:30:08 +0000 Subject: [PATCH] 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 --- include/wx/event.h | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/include/wx/event.h b/include/wx/event.h index 7af59c38d7..ab5ee9ced1 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -462,12 +462,10 @@ private: }; -// // 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 -// is enough for Disconnect() and we allocate unnecessary heap allocation like -// this) +// is enough for Unbind<>() and we avoid unnecessary heap allocation like this). // Create functors wrapping other functors (including functions): @@ -2978,26 +2976,26 @@ public: // Bind arbitrary functor (including just a function) to an event: template void Bind(const EventTag& eventType, - Functor func, + Functor functor, int winid = wxID_ANY, int lastId = wxID_ANY, wxObject *userData = NULL) { DoConnect(winid, lastId, eventType, - wxNewEventFunctor(eventType, func), + wxNewEventFunctor(eventType, functor), userData); } template bool Unbind(const EventTag& eventType, - Functor func, + Functor functor, int winid = wxID_ANY, int lastId = wxID_ANY, wxObject *userData = NULL) { return DoDisconnect(winid, lastId, eventType, - wxMakeEventFunctor(eventType, func), + wxMakeEventFunctor(eventType, functor), userData); } @@ -3005,31 +3003,29 @@ public: // Bind a method of a class (called on the specified eventSink which must // be convertible to this class) object to an event: - template - + template void Bind(const EventTag &eventType, - void (Class::*func)(EventArg &), + void (Class::*method)(EventArg &), ObjClass *eventSink, int winid = wxID_ANY, int lastId = wxID_ANY, wxObject *userData = NULL) { DoConnect(winid, lastId, eventType, - wxNewEventFunctor(eventType, func, eventSink), + wxNewEventFunctor(eventType, method, eventSink), userData); } - template - + template bool Unbind(const EventTag &eventType, - void (Class::*func)(EventArg&), + void (Class::*method)(EventArg&), ObjClass *eventSink, int winid = wxID_ANY, int lastId = wxID_ANY, wxObject *userData = NULL ) { return DoDisconnect(winid, lastId, eventType, - wxMakeEventFunctor(eventType, func, eventSink), + wxMakeEventFunctor(eventType, method, eventSink), userData); } #endif // !wxEVENTS_COMPATIBILITY_2_8 -- 2.45.2