From: Stefan Csomor Date: Tue, 4 Jul 2006 12:31:47 +0000 (+0000) Subject: wxColour lost its Create method, use direct creation for XTI X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/8e952859a63ff6c6edd1a393ab672c2ea7839d65?ds=sidebyside wxColour lost its Create method, use direct creation for XTI git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/xti.h b/include/wx/xti.h index ca4db5f41c..302b6605ae 100644 --- a/include/wx/xti.h +++ b/include/wx/xti.h @@ -1399,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