X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8348e2cbf34d68fb39ebd279d72a2fc85dafe101..56c6aab7e6fe6dccd753fd94d07a44ded2ba70d1:/include/wx/xti.h diff --git a/include/wx/xti.h b/include/wx/xti.h index 2eb3e35e22..cf176c4b2f 100644 --- a/include/wx/xti.h +++ b/include/wx/xti.h @@ -13,10 +13,6 @@ #ifndef _WX_XTIH__ #define _WX_XTIH__ -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma interface "xti.h" -#endif - // We want to support properties, event sources and events sinks through // explicit declarations, using templates and specialization to make the // effort as painless as possible. @@ -92,7 +88,7 @@ class WXDLLIMPEXP_BASE wxObjectRefData; class WXDLLIMPEXP_BASE wxEvent; class WXDLLIMPEXP_BASE wxEvtHandler; -typedef void (wxEvtHandler::*wxObjectEventFunction)(wxEvent&); +typedef void (wxObject::*wxObjectEventFunction)(wxEvent&); #if wxUSE_FUNC_TEMPLATE_POINTER # define wxTO_STRING(type) wxToStringConverter @@ -693,7 +689,7 @@ private : wxString m_name ; } ; -#include +#include "wx/dynarray.h" WX_DECLARE_OBJARRAY_WITH_DECL(wxxVariant, wxxVariantArray, class WXDLLIMPEXP_BASE); @@ -772,7 +768,7 @@ class wxSetter##property : public wxSetter \ public: \ wxINFUNC_CLASS_TYPE_FIX(Klass) \ wxSetter##property() : wxSetter( wxT(#setterMethod) ) {} \ - ~wxSetter##property() {} \ + virtual ~wxSetter##property() {} \ void Set( wxObject *object, const wxxVariant &variantValue ) const \ { \ Klass *obj = dynamic_cast(object) ; \ @@ -789,7 +785,7 @@ class wxGetter##property : public wxGetter \ public : \ wxINFUNC_CLASS_TYPE_FIX(Klass) \ wxGetter##property() : wxGetter( wxT(#gettermethod) ) {} \ - ~wxGetter##property() {} \ + virtual ~wxGetter##property() {} \ void Get( const wxObject *object , wxxVariant &result) const \ { \ const Klass *obj = dynamic_cast(object) ; \ @@ -803,7 +799,7 @@ class wxAdder##property : public wxAdder \ public: \ wxINFUNC_CLASS_TYPE_FIX(Klass) \ wxAdder##property() : wxAdder( wxT(#addermethod) ) {} \ - ~wxAdder##property() {} \ + virtual ~wxAdder##property() {} \ void Add( wxObject *object, const wxxVariant &variantValue ) const \ { \ Klass *obj = dynamic_cast(object) ; \ @@ -820,7 +816,7 @@ class wxCollectionGetter##property : public wxCollectionGetter \ public : \ wxINFUNC_CLASS_TYPE_FIX(Klass) \ wxCollectionGetter##property() : wxCollectionGetter( wxT(#gettermethod) ) {} \ - ~wxCollectionGetter##property() {} \ + virtual ~wxCollectionGetter##property() {} \ void Get( const wxObject *object , wxxVariantArray &result) const \ { \ const Klass *obj = dynamic_cast(object) ; \ @@ -877,7 +873,7 @@ class WXDLLIMPEXP_BASE wxGenericPropertyAccessor : public wxPropertyAccessor { public : wxGenericPropertyAccessor( const wxString &propName ) ; - ~wxGenericPropertyAccessor() ; + virtual ~wxGenericPropertyAccessor() ; void RenameProperty( const wxString& WXUNUSED_UNLESS_DEBUG(oldName), const wxString& newName ) @@ -1403,6 +1399,28 @@ struct wxConstructorBridge_3 : public wxConstructorBridge const wxChar *klass::ms_constructorProperties[] = { wxT(#v0) , wxT(#v1) , wxT(#v2) } ; \ const int klass::ms_constructorPropertiesCount = 3 ; +// direct constructor version + +template +struct wxDirectConstructorBridge_3 : public wxDirectConstructorBrigde +{ + void Create(wxObject * &o, wxxVariant *args) + { + o = new Class( + args[0].wxTEMPLATED_MEMBER_CALL(Get , T0) , + args[1].wxTEMPLATED_MEMBER_CALL(Get , T1) , + args[2].wxTEMPLATED_MEMBER_CALL(Get , T2) + ); + } +}; + +#define wxDIRECT_CONSTRUCTOR_3(klass,t0,v0,t1,v1,t2,v2) \ + wxDirectConstructorBridge_3 constructor##klass ; \ + wxConstructorBridge* klass::ms_constructor = &constructor##klass ; \ + const wxChar *klass::ms_constructorProperties[] = { wxT(#v0) , wxT(#v1) , wxT(#v2) } ; \ + const int klass::ms_constructorPropertiesCount = 3; + // 4 params template void wxArrayCollectionToVariantArray( const coll } -#endif +#endif // _WX_XTIH__