From 432968bf3d888547cc88478199cdd9da37109be8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?W=C5=82odzimierz=20Skiba?= Date: Wed, 16 Feb 2005 18:02:48 +0000 Subject: [PATCH] 'Compatibility' fix for connecting events. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/event.h | 4 +++- include/wx/xti.h | 13 +++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/include/wx/event.h b/include/wx/event.h index d2515fc74d..332f501a4d 100644 --- a/include/wx/event.h +++ b/include/wx/event.h @@ -49,6 +49,8 @@ class WXDLLIMPEXP_BASE wxList; class WXDLLIMPEXP_CORE wxWindowBase; #endif // wxUSE_GUI +class WXDLLIMPEXP_BASE wxEvtHandler; + // ---------------------------------------------------------------------------- // Event types // ---------------------------------------------------------------------------- @@ -2095,7 +2097,7 @@ private: // event handler and related classes // ============================================================================ -typedef void (wxObject::*wxObjectEventFunction)(wxEvent&); +typedef void (wxEvtHandler::*wxObjectEventFunction)(wxEvent&); // we can't have ctors nor base struct in backwards compatibility mode or // otherwise we won't be able to initialize the objects with an agregate, so diff --git a/include/wx/xti.h b/include/wx/xti.h index c2e3b87d0d..3bf18e703d 100644 --- a/include/wx/xti.h +++ b/include/wx/xti.h @@ -90,8 +90,9 @@ class WXDLLIMPEXP_BASE wxDynamicClassInfo; class WXDLLIMPEXP_BASE wxHashTable; class WXDLLIMPEXP_BASE wxObjectRefData; class WXDLLIMPEXP_BASE wxEvent; +class WXDLLIMPEXP_BASE wxEvtHandler; -typedef void (wxObject::*wxObjectEventFunction)(wxEvent&); +typedef void (wxEvtHandler::*wxObjectEventFunction)(wxEvent&); #if wxUSE_FUNC_TEMPLATE_POINTER # define wxTO_STRING(type) wxToStringConverter @@ -243,7 +244,7 @@ void wxSetToString( wxString &s , const wxBitset &data ) if ( data.test( value ) ) { // this could also be done by the templated calls - if ( !s.IsEmpty() ) + if ( !s.empty() ) s +=wxT("|") ; s += edata->GetEnumMemberNameByIndex(i) ; } @@ -303,7 +304,7 @@ void wxFlagsToString( wxString &s , const e& data ) // clear the flags we just set dataValue &= ~value ; // this could also be done by the templated calls - if ( !s.IsEmpty() ) + if ( !s.empty() ) s +=wxT("|") ; s += edata->GetEnumMemberNameByIndex(i) ; } @@ -1974,7 +1975,7 @@ private : #define IMPLEMENT_DYNAMIC_CLASS_NO_WXOBJECT_NO_BASE_XTI( name , unit ) \ const wxClassInfo* name::ms_classParents[] = { NULL } ; \ - wxClassInfo name::ms_classInfo(name::ms_classParents , wxT("") , wxT(#name), \ + wxClassInfo name::ms_classInfo(name::ms_classParents , wxEmptyString , wxT(#name), \ (int) sizeof(name), \ (wxObjectConstructorFn) 0 , \ name::GetPropertiesStatic(),name::GetHandlersStatic(),0 , 0 , \ @@ -1985,7 +1986,7 @@ private : #define IMPLEMENT_DYNAMIC_CLASS_NO_WXOBJECT_XTI( name , basename, unit ) \ const wxClassInfo* name::ms_classParents[] = { &basename::ms_classInfo ,NULL } ; \ - wxClassInfo name::ms_classInfo(name::ms_classParents , wxT("") , wxT(#name), \ + wxClassInfo name::ms_classInfo(name::ms_classParents , wxEmptyString , wxT(#name), \ (int) sizeof(name), \ (wxObjectConstructorFn) 0 , \ name::GetPropertiesStatic(),name::GetHandlersStatic(),0 , 0 , \ @@ -2030,7 +2031,7 @@ private : wxObject* wxVariantToObjectConverter##name ( wxxVariant &data ) { return data.wxTEMPLATED_MEMBER_CALL(Get , name*) ; } \ wxObject* wxVariantOfPtrToObjectConverter##name ( wxxVariant &data ) { return data.wxTEMPLATED_MEMBER_CALL(Get , name*) ; } \ wxxVariant wxObjectToVariantConverter##name ( wxObject *data ) { return wxxVariant( dynamic_cast (data) ) ; } \ - wxClassInfo name::ms_classInfo(name::ms_classParents , wxT("") , wxT(#name), \ + wxClassInfo name::ms_classInfo(name::ms_classParents , wxEmptyString , wxT(#name), \ (int) sizeof(name), \ (wxObjectConstructorFn) 0 , \ name::GetPropertiesStatic(),name::GetHandlersStatic(),0 , 0 , \ -- 2.45.2