From: Julian Smart Date: Mon, 21 Dec 1998 09:59:58 +0000 (+0000) Subject: Added convenience form of wxEvtHandler::Connect, only one id; changed X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d4a23feeb2bb0f497cb2ce41bc54b8cb5d0528fe?ds=inline Added convenience form of wxEvtHandler::Connect, only one id; changed type to wxEventType; fixed my regconf.h mistake in config.cpp (oops) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1251 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/event.h b/include/wx/event.h index aa5431881c..05bc779236 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -1075,11 +1075,16 @@ class WXDLLEXPORT wxEvtHandler: public wxObject virtual bool ProcessEvent(wxEvent& event); virtual bool SearchEventTable(wxEventTable& table, wxEvent& event); - - void Connect( int id, int lastId, - int eventType, + + // Dynamic association of a member function handler with the event handler, id and event type + void Connect( int id, int lastId, wxEventType eventType, wxObjectEventFunction func, wxObject *userData = (wxObject *) NULL ); + + // Convenience function: take just one id + inline void Connect( int id, wxEventType eventType, + wxObjectEventFunction func, + wxObject *userData = (wxObject *) NULL ) { Connect(id, -1, eventType, func, userData); } bool SearchDynamicEventTable( wxEvent& event ); diff --git a/src/common/config.cpp b/src/common/config.cpp index 9f25a1f05b..1510e939a7 100644 --- a/src/common/config.cpp +++ b/src/common/config.cpp @@ -42,7 +42,7 @@ // we must include (one of) these files for wxConfigBase::Create #if defined(__WXMSW__) && defined(wxCONFIG_WIN32_NATIVE) #ifdef __WIN32__ - #include + #include #else //WIN16 #include #endif diff --git a/src/common/event.cpp b/src/common/event.cpp index 402ee199c2..14f9904a0f 100644 --- a/src/common/event.cpp +++ b/src/common/event.cpp @@ -398,7 +398,7 @@ bool wxEvtHandler::SearchEventTable(wxEventTable& table, wxEvent& event) } void wxEvtHandler::Connect( int id, int lastId, - int eventType, + wxEventType eventType, wxObjectEventFunction func, wxObject *userData ) {