]> git.saurik.com Git - wxWidgets.git/commitdiff
Added convenience form of wxEvtHandler::Connect, only one id; changed
authorJulian Smart <julian@anthemion.co.uk>
Mon, 21 Dec 1998 09:59:58 +0000 (09:59 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 21 Dec 1998 09:59:58 +0000 (09:59 +0000)
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

include/wx/event.h
src/common/config.cpp
src/common/event.cpp

index aa5431881ceec299963503a8c8f35e95c6744e0b..05bc7792367f3ca3465f8a03b7355ea756c543df 100644 (file)
@@ -1075,11 +1075,16 @@ class WXDLLEXPORT wxEvtHandler: public wxObject
 
   virtual bool ProcessEvent(wxEvent& event);
   virtual bool SearchEventTable(wxEventTable& table, wxEvent& event);
 
   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 );
                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 );
 
                
   bool SearchDynamicEventTable( wxEvent& event );
 
index 9f25a1f05b1602d63ff24fcbf7813cf90692f083..1510e939a72c3c6fd3f1c00786ceca49c34cdfae 100644 (file)
@@ -42,7 +42,7 @@
 // we must include (one of) these files for wxConfigBase::Create
 #if defined(__WXMSW__) && defined(wxCONFIG_WIN32_NATIVE)
   #ifdef __WIN32__
 // we must include (one of) these files for wxConfigBase::Create
 #if defined(__WXMSW__) && defined(wxCONFIG_WIN32_NATIVE)
   #ifdef __WIN32__
-    #include  <wx/msw/iniconf.h>
+    #include  <wx/msw/regconf.h>
   #else  //WIN16
     #include  <wx/msw/iniconf.h>
   #endif
   #else  //WIN16
     #include  <wx/msw/iniconf.h>
   #endif
index 402ee199c2ee9578d5b14cc34468f11b8090eb75..14f9904a0f17bc6b50c8e88abd2c8739f2cc8913 100644 (file)
@@ -398,7 +398,7 @@ bool wxEvtHandler::SearchEventTable(wxEventTable& table, wxEvent& event)
 }
 
 void wxEvtHandler::Connect( int id, int lastId,
 }
 
 void wxEvtHandler::Connect( int id, int lastId,
-                            int eventType,
+                            wxEventType eventType,
                     wxObjectEventFunction func,
                     wxObject *userData )
 {
                     wxObjectEventFunction func,
                     wxObject *userData )
 {