From af498247c5ea024a781d0ef8d30cbbfb44749641 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 15 Apr 2004 22:51:57 +0000 Subject: [PATCH] make XTI compile with VC6 (patch 896614) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26820 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/xti.h | 85 +++++++++++++++++++++++++++++----------- src/common/xti.cpp | 48 ++++++++++++++++------- src/common/xtistrm.cpp | 26 ++++++------ src/generic/dirctrlg.cpp | 8 ++-- src/generic/grid.cpp | 2 +- src/generic/panelg.cpp | 2 +- src/msw/bmpbuttn.cpp | 2 +- src/msw/button.cpp | 4 +- src/msw/checkbox.cpp | 6 +-- src/msw/checklst.cpp | 2 +- src/msw/choice.cpp | 6 +-- src/msw/colour.cpp | 11 ++++-- src/msw/combobox.cpp | 8 ++-- src/msw/dialog.cpp | 4 +- src/msw/font.cpp | 2 +- src/msw/frame.cpp | 4 +- src/msw/gauge95.cpp | 2 +- src/msw/listbox.cpp | 6 +-- src/msw/listctrl.cpp | 2 +- src/msw/menu.cpp | 4 +- src/msw/menuitem.cpp | 8 ++-- src/msw/notebook.cpp | 4 +- src/msw/radiobut.cpp | 6 +-- src/msw/scrolbar.cpp | 2 +- src/msw/slider95.cpp | 2 +- src/msw/spinbutt.cpp | 2 +- src/msw/spinctrl.cpp | 4 +- src/msw/statbmp.cpp | 2 +- src/msw/statbox.cpp | 2 +- src/msw/statline.cpp | 2 +- src/msw/stattext.cpp | 2 +- src/msw/textctrl.cpp | 4 +- src/msw/treectrl.cpp | 2 +- src/msw/window.cpp | 10 ++--- 34 files changed, 175 insertions(+), 111 deletions(-) diff --git a/include/wx/xti.h b/include/wx/xti.h index 72484ba5c4..7c3cf5552e 100644 --- a/include/wx/xti.h +++ b/include/wx/xti.h @@ -49,28 +49,41 @@ // we will move this later to defs.h -#if !wxCHECK_GCC_VERSION( 3 , 4 ) +#if defined(__GNUC__) && !wxCHECK_GCC_VERSION( 3 , 4 ) # define wxUSE_MEMBER_TEMPLATES 0 #endif -#ifdef _MSC_VER -# if _MSC_VER <= 1200 -# define wxUSE_MEMBER_TEMPLATES 0 -# endif +#if defined(_MSC_VER) && _MSC_VER <= 1200 +# define wxUSE_MEMBER_TEMPLATES 0 +# define wxUSE_FUNC_TEMPLATE_POINTER 0 #endif #ifndef wxUSE_MEMBER_TEMPLATES -#define wxUSE_MEMBER_TEMPLATES 1 +# define wxUSE_MEMBER_TEMPLATES 1 +#endif + +#ifndef wxUSE_FUNC_TEMPLATE_POINTER +# define wxUSE_FUNC_TEMPLATE_POINTER 1 #endif #if wxUSE_MEMBER_TEMPLATES -#define wxTEMPLATED_MEMBER_CALL( method , type ) method() -#define wxTEMPLATED_MEMBER_FIX( type ) +# define wxTEMPLATED_MEMBER_CALL( method , type ) method() +# define wxTEMPLATED_MEMBER_FIX( type ) #else -#define wxTEMPLATED_MEMBER_CALL( method , type ) method((type*)NULL) -#define wxTEMPLATED_MEMBER_FIX( type ) type* =NULL +# define wxTEMPLATED_MEMBER_CALL( method , type ) method((type*)NULL) +# define wxTEMPLATED_MEMBER_FIX( type ) type* =NULL #endif +#if defined(_MSC_VER) && _MSC_VER <= 1200 +# define wxTEMPLATED_FUNCTION_FIX( type ) , wxTEMPLATED_MEMBER_FIX(type) +# define wxINFUNC_CLASS_TYPE_FIX( type ) typedef type type; +#else +# define wxTEMPLATED_FUNCTION_FIX( type ) +# define wxINFUNC_CLASS_TYPE_FIX( type ) +#endif + +#define EMPTY_MACROVALUE /**/ + class WXDLLIMPEXP_BASE wxObject; class WXDLLIMPEXP_BASE wxClassInfo; class WXDLLIMPEXP_BASE wxDynamicClassInfo; @@ -80,6 +93,18 @@ class WXDLLIMPEXP_BASE wxEvent; typedef void (wxObject::*wxObjectEventFunction)(wxEvent&); +#if wxUSE_FUNC_TEMPLATE_POINTER +# define wxTO_STRING(type) wxToStringConverter +# define wxTO_STRING_IMP(type) +# define wxFROM_STRING(type) wxFromStringConverter +# define wxFROM_STRING_IMP(type) +#else +# define wxTO_STRING(type) ToString##type +# define wxTO_STRING_IMP(type) inline void ToString##type( const wxxVariant& data , wxString &result ) { wxToStringConverter(data, result); } +# define wxFROM_STRING(type) FromString##type +# define wxFROM_STRING_IMP(type) inline void FromString##type( const wxString& data , wxxVariant &result ) { wxFromStringConverter(data, result); } +#endif + // ---------------------------------------------------------------------------- // Enum Support // @@ -149,7 +174,9 @@ private : } \ void FromLong##e( long data , wxxVariant& result ) { result = wxxVariant((e)data) ;} \ void ToLong##e( const wxxVariant& data , long &result ) { result = (long) data.wxTEMPLATED_MEMBER_CALL(Get , e) ;} \ - wxEnumTypeInfo s_typeInfo##e(wxT_ENUM , &s_enumData##e , &wxToStringConverter , &wxFromStringConverter , &ToLong##e , &FromLong##e , typeid(e).name() ) ; + wxTO_STRING_IMP( e ) \ + wxFROM_STRING_IMP( e ) \ + wxEnumTypeInfo s_typeInfo##e(wxT_ENUM , &s_enumData##e , &wxTO_STRING( e ) , &wxFROM_STRING( e ) , &ToLong##e , &FromLong##e , typeid(e).name() ) ; // ---------------------------------------------------------------------------- // Set Support @@ -234,7 +261,9 @@ void wxSetToString( wxString &s , const wxBitset &data ) } \ void FromLong##SetName( long data , wxxVariant& result ) { result = wxxVariant(SetName((unsigned long)data)) ;} \ void ToLong##SetName( const wxxVariant& data , long &result ) { result = (long) data.wxTEMPLATED_MEMBER_CALL(Get , SetName).to_ulong() ;} \ - wxEnumTypeInfo s_typeInfo##SetName(wxT_SET , &s_enumData##e , &wxToStringConverter , &wxFromStringConverter , &ToLong##SetName , &FromLong##SetName, typeid(SetName).name() ) ; \ + wxTO_STRING_IMP( SetName ) \ + wxFROM_STRING_IMP( SetName ) \ + wxEnumTypeInfo s_typeInfo##SetName(wxT_SET , &s_enumData##e , &wxTO_STRING( SetName ) , &wxFROM_STRING( SetName ) , &ToLong##SetName , &FromLong##SetName, typeid(SetName).name() ) ; \ } template @@ -299,7 +328,9 @@ void wxFlagsToString( wxString &s , const e& data ) } \ void FromLong##e( long data , wxxVariant& result ) { result = wxxVariant(e(data)) ;} \ void ToLong##e( const wxxVariant& data , long &result ) { result = (long) data.wxTEMPLATED_MEMBER_CALL(Get , e).m_data ;} \ - wxEnumTypeInfo s_typeInfo##e(wxT_SET , &s_enumData##e , &wxToStringConverter , &wxFromStringConverter , &ToLong##e , &FromLong##e, typeid(e).name() ) ; + wxTO_STRING_IMP( e ) \ + wxFROM_STRING_IMP( e ) \ + wxEnumTypeInfo s_typeInfo##e(wxT_SET , &s_enumData##e , &wxTO_STRING( e ) , &wxFROM_STRING( e ) , &ToLong##e , &FromLong##e, typeid(e).name() ) ; // ---------------------------------------------------------------------------- // Type Information // ---------------------------------------------------------------------------- @@ -532,8 +563,15 @@ template const wxTypeInfo* wxGetTypeInfo( T * ) { return wxTypeInfo: // this macro is for usage with custom, non-object derived classes and structs, wxPoint is such a custom type +#if wxUSE_FUNC_TEMPLATE_POINTER #define wxCUSTOM_TYPE_INFO( e , toString , fromString ) \ wxCustomTypeInfo s_typeInfo##e(typeid(e).name() , &toString , &fromString) ; +#else +#define wxCUSTOM_TYPE_INFO( e , toString , fromString ) \ + void ToString##e( const wxxVariant& data , wxString &result ) { toString(data, result); } \ + void FromString##e( const wxString& data , wxxVariant &result ) { fromString(data, result); } \ + wxCustomTypeInfo s_typeInfo##e(typeid(e).name() , &ToString##e , &FromString##e) ; +#endif #define wxCOLLECTION_TYPE_INFO( element , collection ) \ wxCollectionTypeInfo s_typeInfo##collection( typeid(element).name() , NULL , NULL , typeid(collection).name() ) ; @@ -600,7 +638,7 @@ public : template T& Get(wxTEMPLATED_MEMBER_FIX(T)) { wxxVariantDataT *dataptr = dynamic_cast*> (m_data) ; - wxASSERT_MSG( dataptr , wxT("Cast not possible") ) ; + wxASSERT_MSG( dataptr , wxString::Format(wxT("Cast to %s not possible"), typeid(T).name()) ) ; return dataptr->Get() ; } @@ -608,13 +646,13 @@ public : template const T& Get(wxTEMPLATED_MEMBER_FIX(T)) const { const wxxVariantDataT *dataptr = dynamic_cast*> (m_data) ; - wxASSERT_MSG( dataptr , wxT("Cast not possible") ) ; + wxASSERT_MSG( dataptr , wxString::Format(wxT("Cast to %s not possible"), typeid(T).name()) ) ; return dataptr->Get() ; } bool IsEmpty() const { return m_data == NULL ; } - template bool HasData() const + template bool HasData(wxTEMPLATED_MEMBER_FIX(T)) const { const wxxVariantDataT *dataptr = dynamic_cast*> (m_data) ; return dataptr != NULL ; @@ -666,10 +704,10 @@ template void wxStringWriteValue( wxString &s , const T &data); template -void wxToStringConverter( const wxxVariant &v, wxString &s) { wxStringWriteValue( s , v.wxTEMPLATED_MEMBER_CALL(Get , T) ) ; } +void wxToStringConverter( const wxxVariant &v, wxString &s wxTEMPLATED_FUNCTION_FIX(T)) { wxStringWriteValue( s , v.wxTEMPLATED_MEMBER_CALL(Get , T) ) ; } template -void wxFromStringConverter( const wxString &s, wxxVariant &v) { T d ; wxStringReadValue( s , d ) ; v = wxxVariant(d) ; } \ +void wxFromStringConverter( const wxString &s, wxxVariant &v wxTEMPLATED_FUNCTION_FIX(T)) { T d ; wxStringReadValue( s , d ) ; v = wxxVariant(d) ; } // ---------------------------------------------------------------------------- // Property Support @@ -726,17 +764,17 @@ private : } ; - #define wxSETTER( property, Klass, valueType, setterMethod ) \ class wxSetter##property : public wxSetter \ { \ public: \ + wxINFUNC_CLASS_TYPE_FIX(Klass) \ wxSetter##property() : wxSetter( wxT(#setterMethod) ) {} \ ~wxSetter##property() {} \ void Set( wxObject *object, const wxxVariant &variantValue ) const \ { \ Klass *obj = dynamic_cast(object) ; \ - if ( variantValue.HasData() ) \ + if ( variantValue.wxTEMPLATED_MEMBER_CALL(HasData, valueType) ) \ obj->setterMethod(variantValue.wxTEMPLATED_MEMBER_CALL(Get , valueType)) ; \ else \ obj->setterMethod(*variantValue.wxTEMPLATED_MEMBER_CALL(Get , valueType*)) ; \ @@ -747,6 +785,7 @@ public: \ class wxGetter##property : public wxGetter \ { \ public : \ + wxINFUNC_CLASS_TYPE_FIX(Klass) \ wxGetter##property() : wxGetter( wxT(#gettermethod) ) {} \ ~wxGetter##property() {} \ void Get( const wxObject *object , wxxVariant &result) const \ @@ -760,12 +799,13 @@ public : \ class wxAdder##property : public wxAdder \ { \ public: \ + wxINFUNC_CLASS_TYPE_FIX(Klass) \ wxAdder##property() : wxAdder( wxT(#addermethod) ) {} \ ~wxAdder##property() {} \ void Add( wxObject *object, const wxxVariant &variantValue ) const \ { \ Klass *obj = dynamic_cast(object) ; \ - if ( variantValue.HasData() ) \ + if ( variantValue.wxTEMPLATED_MEMBER_CALL(HasData, valueType) ) \ obj->addermethod(variantValue.wxTEMPLATED_MEMBER_CALL(Get , valueType)) ; \ else \ obj->addermethod(*variantValue.wxTEMPLATED_MEMBER_CALL(Get , valueType*)) ; \ @@ -776,6 +816,7 @@ public: \ class wxCollectionGetter##property : public wxCollectionGetter \ { \ public : \ + wxINFUNC_CLASS_TYPE_FIX(Klass) \ wxCollectionGetter##property() : wxCollectionGetter( wxT(#gettermethod) ) {} \ ~wxCollectionGetter##property() {} \ void Get( const wxObject *object , wxxVariantArray &result) const \ @@ -1086,7 +1127,7 @@ WX_DECLARE_STRING_HASH_MAP_WITH_DECL( wxPropertyInfo* , wxPropertyInfoMap , clas #define wxHIDE_PROPERTY( pname ) \ static wxPropertyInfo _propertyInfo##pname( first , class_t::GetClassInfoStatic() , wxT(#pname) , typeid(void).name() ,NULL , wxxVariant() , wxPROP_DONT_STREAM , wxEmptyString , wxEmptyString ) ; -#define wxPROPERTY( pname , type , setter , getter ,defaultValue , flags , help , group) \ +#define wxPROPERTY( pname , type , setter , getter , defaultValue , flags , help , group) \ wxSETTER( pname , class_t , type , setter ) \ static wxSetter##pname _setter##pname ; \ wxGETTER( pname , class_t , type , getter ) \ diff --git a/src/common/xti.cpp b/src/common/xti.cpp index 5320362612..4eb4a9fb31 100644 --- a/src/common/xti.cpp +++ b/src/common/xti.cpp @@ -242,17 +242,32 @@ template<> void wxStringWriteValue(wxString &s , const wxString &data ) // built-ins // -wxBuiltInTypeInfo s_typeInfovoid( wxT_VOID , NULL , NULL , typeid(void).name() ) ; -wxBuiltInTypeInfo s_typeInfobool( wxT_BOOL , &wxToStringConverter , &wxFromStringConverter, typeid(bool).name()) ; -wxBuiltInTypeInfo s_typeInfochar( wxT_CHAR , &wxToStringConverter , &wxFromStringConverter, typeid(char).name()) ; -wxBuiltInTypeInfo s_typeInfounsignedchar( wxT_UCHAR , &wxToStringConverter< unsigned char > , &wxFromStringConverter, typeid(unsigned char).name()) ; -wxBuiltInTypeInfo s_typeInfoint( wxT_INT , &wxToStringConverter , &wxFromStringConverter, typeid(int).name()) ; -wxBuiltInTypeInfo s_typeInfounsignedint( wxT_UINT , &wxToStringConverter , &wxFromStringConverter, typeid(unsigned int).name()) ; -wxBuiltInTypeInfo s_typeInfolong( wxT_LONG , &wxToStringConverter , &wxFromStringConverter, typeid(long).name()) ; -wxBuiltInTypeInfo s_typeInfounsignedlong( wxT_ULONG , &wxToStringConverter , &wxFromStringConverter, typeid(unsigned long).name()) ; -wxBuiltInTypeInfo s_typeInfofloat( wxT_FLOAT , &wxToStringConverter , &wxFromStringConverter, typeid(float).name()) ; -wxBuiltInTypeInfo s_typeInfodouble( wxT_DOUBLE , &wxToStringConverter , &wxFromStringConverter, typeid(double).name()) ; -wxBuiltInTypeInfo s_typeInfowxString( wxT_STRING , &wxToStringConverter , &wxFromStringConverter, typeid(wxString).name()) ; +#if wxUSE_FUNC_TEMPLATE_POINTER +#define wxBUILTIN_TYPE_INFO( element , type ) \ + wxBuiltInTypeInfo s_typeInfo##type(element , &wxToStringConverter , &wxFromStringConverter , typeid(type).name()) ; +#else +#define wxBUILTIN_TYPE_INFO( element , type ) \ + void _toString##element( const wxxVariant& data , wxString &result ) { wxToStringConverter(data, result); } \ + void _fromString##element( const wxString& data , wxxVariant &result ) { wxFromStringConverter(data, result); } \ + wxBuiltInTypeInfo s_typeInfo##type(element , &_toString##element , &_fromString##element , typeid(type).name()) ; +#endif + +typedef unsigned char unsigned_char; +typedef unsigned int unsigned_int; +typedef unsigned long unsigned_long; + +wxBuiltInTypeInfo s_typeInfovoid( wxT_VOID , NULL , NULL , typeid(void).name()); +wxBUILTIN_TYPE_INFO( wxT_BOOL , bool); +wxBUILTIN_TYPE_INFO( wxT_CHAR , char); +wxBUILTIN_TYPE_INFO( wxT_UCHAR , unsigned_char); +wxBUILTIN_TYPE_INFO( wxT_INT , int); +wxBUILTIN_TYPE_INFO( wxT_UINT , unsigned_int); +wxBUILTIN_TYPE_INFO( wxT_LONG , long); +wxBUILTIN_TYPE_INFO( wxT_ULONG , unsigned_long); +wxBUILTIN_TYPE_INFO( wxT_FLOAT , float); +wxBUILTIN_TYPE_INFO( wxT_DOUBLE , double); +wxBUILTIN_TYPE_INFO( wxT_STRING , wxString); + // this are compiler induced specialization which are never used anywhere @@ -508,13 +523,16 @@ void wxClassInfo::AddToPropertyCollection(wxObject *object, const wxChar *proper accessor->AddToPropertyCollection( object , value ) ; } -void wxClassInfo::GetProperties( wxPropertyInfoMap &map ) const +// void wxClassInfo::GetProperties( wxPropertyInfoMap &map ) const +// The map parameter (the name map that is) seems something special +// to MSVC and so we use a other name. +void wxClassInfo::GetProperties( wxPropertyInfoMap &infomap ) const { const wxPropertyInfo *pi = GetFirstProperty() ; while( pi ) { - if ( map.find( pi->GetName() ) == map.end() ) - map[pi->GetName()] = (wxPropertyInfo*) pi ; + if ( infomap.find( pi->GetName() ) == infomap.end() ) + infomap[pi->GetName()] = (wxPropertyInfo*) pi ; pi = pi->GetNext() ; } @@ -522,7 +540,7 @@ void wxClassInfo::GetProperties( wxPropertyInfoMap &map ) const const wxClassInfo** parents = GetParents() ; for ( int i = 0 ; parents[i] ; ++ i ) { - parents[i]->GetProperties( map ) ; + parents[i]->GetProperties( infomap ) ; } } diff --git a/src/common/xtistrm.cpp b/src/common/xtistrm.cpp index ffdc588183..6438ed2815 100644 --- a/src/common/xtistrm.cpp +++ b/src/common/xtistrm.cpp @@ -162,22 +162,24 @@ void wxWriter::WriteAllProperties( const wxObject * obj , const wxClassInfo* ci } map.erase( name ) ; } - - for( wxPropertyInfoMap::iterator iter = map.begin() ; iter != map.end() ; ++iter ) - { - const wxPropertyInfo* prop = iter->second ; - if ( prop->GetFlags() & wxPROP_OBJECT_GRAPH ) + { // Extra block for broken compilers + for( wxPropertyInfoMap::iterator iter = map.begin() ; iter != map.end() ; ++iter ) { - WriteOneProperty( obj , prop->GetDeclaringClass() , prop , persister , data ) ; + const wxPropertyInfo* prop = iter->second ; + if ( prop->GetFlags() & wxPROP_OBJECT_GRAPH ) + { + WriteOneProperty( obj , prop->GetDeclaringClass() , prop , persister , data ) ; + } } } - - for( wxPropertyInfoMap::iterator iter = map.begin() ; iter != map.end() ; ++iter ) - { - const wxPropertyInfo* prop = iter->second ; - if ( !(prop->GetFlags() & wxPROP_OBJECT_GRAPH) ) + { // Extra block for broken compilers + for( wxPropertyInfoMap::iterator iter = map.begin() ; iter != map.end() ; ++iter ) { - WriteOneProperty( obj , prop->GetDeclaringClass() , prop , persister , data ) ; + const wxPropertyInfo* prop = iter->second ; + if ( !(prop->GetFlags() & wxPROP_OBJECT_GRAPH) ) + { + WriteOneProperty( obj , prop->GetDeclaringClass() , prop , persister , data ) ; + } } } } diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 77ae7aa640..c20e3d7a9a 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -509,10 +509,10 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxGenericDirCtrl, wxControl,"wx/dirctrl.h") wxBEGIN_PROPERTIES_TABLE(wxGenericDirCtrl) wxHIDE_PROPERTY( Children ) - wxPROPERTY( DefaultPath , wxString , SetDefaultPath , GetDefaultPath , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY( Filter , wxString , SetFilter , GetFilter ,, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) - wxPROPERTY( DefaultFilter , int , SetFilterIndex, GetFilterIndex,, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) - wxPROPERTY_FLAGS( WindowStyle, wxGenericDirCtrlStyle, long, SetWindowStyleFlag, GetWindowStyleFlag, , 0, wxT("Helpstring"), wxT("group") ) + wxPROPERTY( DefaultPath , wxString , SetDefaultPath , GetDefaultPath , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + wxPROPERTY( Filter , wxString , SetFilter , GetFilter , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) + wxPROPERTY( DefaultFilter , int , SetFilterIndex, GetFilterIndex, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) + wxPROPERTY_FLAGS( WindowStyle, wxGenericDirCtrlStyle, long, SetWindowStyleFlag, GetWindowStyleFlag, EMPTY_MACROVALUE , 0, wxT("Helpstring"), wxT("group") ) wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxGenericDirCtrl) diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 13be5b7883..88b416e18b 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -3812,7 +3812,7 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxGrid, wxScrolledWindow,"wx/grid.h") wxBEGIN_PROPERTIES_TABLE(wxGrid) wxHIDE_PROPERTY( Children ) - wxPROPERTY_FLAGS( WindowStyle , wxGridStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxGridStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxGrid) diff --git a/src/generic/panelg.cpp b/src/generic/panelg.cpp index 3bb937f349..9fba59a9fc 100644 --- a/src/generic/panelg.cpp +++ b/src/generic/panelg.cpp @@ -79,7 +79,7 @@ wxEND_FLAGS( wxPanelStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxPanel, wxWindow,"wx/panel.h") wxBEGIN_PROPERTIES_TABLE(wxPanel) - wxPROPERTY_FLAGS( WindowStyle , wxPanelStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxPanelStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style // style wxTAB_TRAVERSAL wxEND_PROPERTIES_TABLE() diff --git a/src/msw/bmpbuttn.cpp b/src/msw/bmpbuttn.cpp index 535ac94e9c..bb2e787838 100644 --- a/src/msw/bmpbuttn.cpp +++ b/src/msw/bmpbuttn.cpp @@ -76,7 +76,7 @@ wxEND_FLAGS( wxBitmapButtonStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxBitmapButton, wxButton,"wx/bmpbuttn.h") wxBEGIN_PROPERTIES_TABLE(wxBitmapButton) - wxPROPERTY_FLAGS( WindowStyle , wxBitmapButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxBitmapButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxBitmapButton) diff --git a/src/msw/button.cpp b/src/msw/button.cpp index 46d520bcf7..21fc5bab19 100644 --- a/src/msw/button.cpp +++ b/src/msw/button.cpp @@ -90,10 +90,10 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxButton, wxControl,"wx/button.h") wxBEGIN_PROPERTIES_TABLE(wxButton) wxEVENT_PROPERTY( Click , wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEvent) - wxPROPERTY( Font , wxFont , SetFont , GetFont , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + wxPROPERTY( Font , wxFont , SetFont , GetFont , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( Label, wxString , SetLabel, GetLabel, wxString(), 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) - wxPROPERTY_FLAGS( WindowStyle , wxButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() diff --git a/src/msw/checkbox.cpp b/src/msw/checkbox.cpp index 494819949d..f596c6a408 100644 --- a/src/msw/checkbox.cpp +++ b/src/msw/checkbox.cpp @@ -93,10 +93,10 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxCheckBox, wxControl,"wx/checkbox.h") wxBEGIN_PROPERTIES_TABLE(wxCheckBox) wxEVENT_PROPERTY( Click , wxEVT_COMMAND_CHECKBOX_CLICKED , wxCommandEvent ) - wxPROPERTY( Font , wxFont , SetFont , GetFont , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + wxPROPERTY( Font , wxFont , SetFont , GetFont , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxString() , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY( Value ,bool, SetValue, GetValue, , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY_FLAGS( WindowStyle , wxCheckBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY( Value ,bool, SetValue, GetValue, EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + wxPROPERTY_FLAGS( WindowStyle , wxCheckBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxCheckBox) diff --git a/src/msw/checklst.cpp b/src/msw/checklst.cpp index 3474192705..bebe3235f3 100644 --- a/src/msw/checklst.cpp +++ b/src/msw/checklst.cpp @@ -114,7 +114,7 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxCheckListBox, wxListBox,"wx/checklst.h") wxBEGIN_PROPERTIES_TABLE(wxCheckListBox) wxEVENT_PROPERTY( Toggle , wxEVT_COMMAND_CHECKLISTBOX_TOGGLED , wxCommandEvent ) - wxPROPERTY_FLAGS( WindowStyle , wxCheckListBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , wxLB_OWNERDRAW /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxCheckListBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , wxLB_OWNERDRAW /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxCheckListBox) diff --git a/src/msw/choice.cpp b/src/msw/choice.cpp index e80ff3b166..1d1cd38aac 100644 --- a/src/msw/choice.cpp +++ b/src/msw/choice.cpp @@ -78,10 +78,10 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxChoice, wxControl,"wx/choice.h") wxBEGIN_PROPERTIES_TABLE(wxChoice) wxEVENT_PROPERTY( Select , wxEVT_COMMAND_CHOICE_SELECTED , wxCommandEvent ) - wxPROPERTY( Font , wxFont , SetFont , GetFont , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + wxPROPERTY( Font , wxFont , SetFont , GetFont , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY( Selection ,int, SetSelection, GetSelection, , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY_FLAGS( WindowStyle , wxChoiceStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY( Selection ,int, SetSelection, GetSelection, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + wxPROPERTY_FLAGS( WindowStyle , wxChoiceStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxChoice) diff --git a/src/msw/colour.cpp b/src/msw/colour.cpp index 60a67d8457..93f059049b 100644 --- a/src/msw/colour.cpp +++ b/src/msw/colour.cpp @@ -53,12 +53,15 @@ template<> void wxStringWriteValue(wxString &s , const wxColour &data ) data.Red(), data.Green(), data.Blue() ); } -IMPLEMENT_DYNAMIC_CLASS_WITH_COPY_AND_STREAMERS_XTI( wxColour , wxObject , "wx/colour.h" , &wxToStringConverter , &wxFromStringConverter) +wxTO_STRING_IMP( wxColour ) +wxFROM_STRING_IMP( wxColour ) + +IMPLEMENT_DYNAMIC_CLASS_WITH_COPY_AND_STREAMERS_XTI( wxColour , wxObject , "wx/colour.h" , &wxTO_STRING( wxColour ) , &wxFROM_STRING( wxColour )) wxBEGIN_PROPERTIES_TABLE(wxColour) - wxREADONLY_PROPERTY( Red, unsigned char, Red, , 0 /*flags*/, wxT("Helpstring"), wxT("group")) - wxREADONLY_PROPERTY( Green, unsigned char, Green, , 0 /*flags*/, wxT("Helpstring"), wxT("group")) - wxREADONLY_PROPERTY( Blue, unsigned char, Blue, , 0 /*flags*/, wxT("Helpstring"), wxT("group")) + wxREADONLY_PROPERTY( Red, unsigned char, Red, EMPTY_MACROVALUE , 0 /*flags*/, wxT("Helpstring"), wxT("group")) + wxREADONLY_PROPERTY( Green, unsigned char, Green, EMPTY_MACROVALUE , 0 /*flags*/, wxT("Helpstring"), wxT("group")) + wxREADONLY_PROPERTY( Blue, unsigned char, Blue, EMPTY_MACROVALUE , 0 /*flags*/, wxT("Helpstring"), wxT("group")) wxEND_PROPERTIES_TABLE() wxCONSTRUCTOR_3( wxColour, unsigned char, Red, unsigned char, Green, unsigned char, Blue ) diff --git a/src/msw/combobox.cpp b/src/msw/combobox.cpp index 26ef863e24..6e07138a37 100644 --- a/src/msw/combobox.cpp +++ b/src/msw/combobox.cpp @@ -98,11 +98,11 @@ wxBEGIN_PROPERTIES_TABLE(wxComboBox) wxEVENT_PROPERTY( TextEnter , wxEVT_COMMAND_TEXT_ENTER , wxCommandEvent ) // TODO DELEGATES - wxPROPERTY( Font , wxFont , SetFont , GetFont , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + wxPROPERTY( Font , wxFont , SetFont , GetFont , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY( Value ,wxString, SetValue, GetValue, , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY( Selection ,int, SetSelection, GetSelection, , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY_FLAGS( WindowStyle , wxComboBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY( Value ,wxString, SetValue, GetValue, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + wxPROPERTY( Selection ,int, SetSelection, GetSelection, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + wxPROPERTY_FLAGS( WindowStyle , wxComboBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxComboBox) diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index eb1db5599b..fdc4bf3a2e 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -92,8 +92,8 @@ wxEND_FLAGS( wxDialogStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxDialog, wxTopLevelWindow,"wx/dialog.h") wxBEGIN_PROPERTIES_TABLE(wxDialog) - wxPROPERTY( Title,wxString, SetTitle, GetTitle, wxString() , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY_FLAGS( WindowStyle , wxDialogStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY( Title, wxString, SetTitle, GetTitle, wxString() , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + wxPROPERTY_FLAGS( WindowStyle , wxDialogStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxDialog) diff --git a/src/msw/font.cpp b/src/msw/font.cpp index ae8752a780..392b305357 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -77,7 +77,7 @@ wxBEGIN_PROPERTIES_TABLE(wxFont) wxPROPERTY( Style, int , SetStyle, GetStyle, (int)wxNORMAL , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontStyle wxPROPERTY( Weight, int , SetWeight, GetWeight, (int)wxNORMAL , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // wxFontWeight wxPROPERTY( Underlined, bool , SetUnderlined, GetUnderlined, false , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY( Face, wxString , SetFaceName, GetFaceName, , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + wxPROPERTY( Face, wxString , SetFaceName, GetFaceName, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( Encoding, wxFontEncoding , SetEncoding, GetEncoding, wxFONTENCODING_DEFAULT , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxEND_PROPERTIES_TABLE() diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 6cf9c3a2d8..45130000d1 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -134,8 +134,8 @@ wxBEGIN_PROPERTIES_TABLE(wxFrame) wxEVENT_PROPERTY( Menu , wxEVT_COMMAND_MENU_SELECTED , wxCommandEvent) wxPROPERTY( Title,wxString, SetTitle, GetTitle, wxString() , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY_FLAGS( WindowStyle , wxFrameStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style - wxPROPERTY( MenuBar , wxMenuBar * , SetMenuBar , GetMenuBar , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + wxPROPERTY_FLAGS( WindowStyle , wxFrameStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY( MenuBar , wxMenuBar * , SetMenuBar , GetMenuBar , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxFrame) diff --git a/src/msw/gauge95.cpp b/src/msw/gauge95.cpp index 2472ee678c..33319d6811 100644 --- a/src/msw/gauge95.cpp +++ b/src/msw/gauge95.cpp @@ -111,7 +111,7 @@ wxBEGIN_PROPERTIES_TABLE(wxGauge95) wxPROPERTY( Range , int , SetRange, GetRange, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( ShadowWidth , int , SetShadowWidth, GetShadowWidth, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( BezelFace , int , SetBezelFace, GetBezelFace, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY_FLAGS( WindowStyle , wxGaugeStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxGaugeStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxGauge95) diff --git a/src/msw/listbox.cpp b/src/msw/listbox.cpp index d4ca4c4c87..39b23695e7 100644 --- a/src/msw/listbox.cpp +++ b/src/msw/listbox.cpp @@ -94,10 +94,10 @@ wxBEGIN_PROPERTIES_TABLE(wxListBox) wxEVENT_PROPERTY( Select , wxEVT_COMMAND_LISTBOX_SELECTED , wxCommandEvent ) wxEVENT_PROPERTY( DoubleClick , wxEVT_COMMAND_LISTBOX_DOUBLECLICKED , wxCommandEvent ) - wxPROPERTY( Font , wxFont , SetFont , GetFont , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + wxPROPERTY( Font , wxFont , SetFont , GetFont , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) - wxPROPERTY( Selection ,int, SetSelection, GetSelection,, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) - wxPROPERTY_FLAGS( WindowStyle , wxListBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY( Selection ,int, SetSelection, GetSelection, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) + wxPROPERTY_FLAGS( WindowStyle , wxListBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxListBox) diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 44321084d7..2ea528e817 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -291,7 +291,7 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxListCtrl, wxControl,"wx/listctrl.h") wxBEGIN_PROPERTIES_TABLE(wxListCtrl) wxEVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent ) - wxPROPERTY_FLAGS( WindowStyle , wxListCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxListCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxListCtrl) diff --git a/src/msw/menu.cpp b/src/msw/menu.cpp index 151427eca6..881f980179 100644 --- a/src/msw/menu.cpp +++ b/src/msw/menu.cpp @@ -137,7 +137,7 @@ template<> void wxCollectionToVariantArray( wxMenuItemList const &theList, wxxVa wxBEGIN_PROPERTIES_TABLE(wxMenu) wxEVENT_PROPERTY( Select , wxEVT_COMMAND_MENU_SELECTED , wxCommandEvent) wxPROPERTY( Title, wxString , SetTitle, GetTitle, wxString(), 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) - wxREADONLY_PROPERTY_FLAGS( MenuStyle , wxMenuStyle , long , GetStyle , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxREADONLY_PROPERTY_FLAGS( MenuStyle , wxMenuStyle , long , GetStyle , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxPROPERTY_COLLECTION( MenuItems , wxMenuItemList , wxMenuItem* , Append , GetMenuItems , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxEND_PROPERTIES_TABLE() @@ -163,7 +163,7 @@ IMPLEMENT_DYNAMIC_CLASS_XTI_CALLBACK(wxMenuBar, wxWindow ,"wx/menu.h",wxMenuBarS IMPLEMENT_DYNAMIC_CLASS_XTI(wxMenuInfo, wxObject , "wx/menu.h" ) wxBEGIN_PROPERTIES_TABLE(wxMenuInfo) - wxREADONLY_PROPERTY( Menu , wxMenu* , GetMenu , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + wxREADONLY_PROPERTY( Menu , wxMenu* , GetMenu , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxREADONLY_PROPERTY( Title , wxString , GetTitle , wxString() , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxEND_PROPERTIES_TABLE() diff --git a/src/msw/menuitem.cpp b/src/msw/menuitem.cpp index 0703b51244..957d0affb1 100644 --- a/src/msw/menuitem.cpp +++ b/src/msw/menuitem.cpp @@ -101,12 +101,12 @@ wxEND_ENUM( wxItemKind ) IMPLEMENT_DYNAMIC_CLASS_XTI_CALLBACK(wxMenuItem, wxObject,"wx/menuitem.h",wxMenuItemStreamingCallback) wxBEGIN_PROPERTIES_TABLE(wxMenuItem) - wxPROPERTY( Parent,wxMenu*, SetMenu, GetMenu, , 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) - wxPROPERTY( Id,int, SetId, GetId, , 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) + wxPROPERTY( Parent,wxMenu*, SetMenu, GetMenu, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) + wxPROPERTY( Id,int, SetId, GetId, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) wxPROPERTY( Text, wxString , SetText, GetText, wxString(), 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) wxPROPERTY( Help, wxString , SetHelp, GetHelp, wxString(), 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) - wxREADONLY_PROPERTY( Kind, wxItemKind , GetKind , , 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) - wxPROPERTY( SubMenu,wxMenu*, SetSubMenu, GetSubMenu, , 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) + wxREADONLY_PROPERTY( Kind, wxItemKind , GetKind , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) + wxPROPERTY( SubMenu,wxMenu*, SetSubMenu, GetSubMenu, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) wxPROPERTY( Enabled , bool , Enable , IsEnabled , wxxVariant((bool)true) , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( Checked , bool , Check , IsChecked , wxxVariant((bool)false) , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( Checkable , bool , SetCheckable , IsCheckable , wxxVariant((bool)false) , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index e4cfd4c2a0..e70911eeeb 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -167,7 +167,7 @@ wxBEGIN_PROPERTIES_TABLE(wxNotebook) wxEVENT_PROPERTY( PageChanged , wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED , wxNotebookEvent ) wxPROPERTY_COLLECTION( PageInfos , wxNotebookPageInfoList , wxNotebookPageInfo* , AddPageInfo , GetPageInfos , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY_FLAGS( WindowStyle , wxNotebookStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxNotebookStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxNotebook) @@ -177,7 +177,7 @@ wxCONSTRUCTOR_5( wxNotebook , wxWindow* , Parent , wxWindowID , Id , wxPoint , P wxBEGIN_PROPERTIES_TABLE(wxNotebookPageInfo) - wxREADONLY_PROPERTY( Page , wxNotebookPage* , GetPage , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + wxREADONLY_PROPERTY( Page , wxNotebookPage* , GetPage , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxREADONLY_PROPERTY( Text , wxString , GetText , wxString() , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxREADONLY_PROPERTY( Selected , bool , GetSelected , false, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) wxREADONLY_PROPERTY( ImageId , int , GetImageId , -1 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) diff --git a/src/msw/radiobut.cpp b/src/msw/radiobut.cpp index 3cf326adf7..2d0a0e4f61 100644 --- a/src/msw/radiobut.cpp +++ b/src/msw/radiobut.cpp @@ -86,10 +86,10 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxRadioButton, wxControl,"wx/radiobut.h") wxBEGIN_PROPERTIES_TABLE(wxRadioButton) wxEVENT_PROPERTY( Click , wxEVT_COMMAND_RADIOBUTTON_SELECTED , wxCommandEvent ) - wxPROPERTY( Font , wxFont , SetFont , GetFont , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + wxPROPERTY( Font , wxFont , SetFont , GetFont , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxString(), 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) - wxPROPERTY( Value ,bool, SetValue, GetValue,, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) - wxPROPERTY_FLAGS( WindowStyle , wxRadioButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY( Value ,bool, SetValue, GetValue, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) + wxPROPERTY_FLAGS( WindowStyle , wxRadioButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxRadioButton) diff --git a/src/msw/scrolbar.cpp b/src/msw/scrolbar.cpp index 50eb08ba2a..820c1fb0d5 100644 --- a/src/msw/scrolbar.cpp +++ b/src/msw/scrolbar.cpp @@ -75,7 +75,7 @@ wxBEGIN_PROPERTIES_TABLE(wxScrollBar) wxPROPERTY( Range , int , SetRange, GetRange, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( ThumbSize , int , SetThumbSize, GetThumbSize, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( PageSize , int , SetPageSize, GetPageSize, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY_FLAGS( WindowStyle , wxScrollBarStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxScrollBarStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxScrollBar) diff --git a/src/msw/slider95.cpp b/src/msw/slider95.cpp index 50b340c87b..7c9e6eab8a 100644 --- a/src/msw/slider95.cpp +++ b/src/msw/slider95.cpp @@ -93,7 +93,7 @@ wxBEGIN_PROPERTIES_TABLE(wxSlider95) wxPROPERTY( PageSize , int , SetPageSize, GetLineSize, 1 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( LineSize , int , SetLineSize, GetLineSize, 1 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( ThumbLength , int , SetThumbLength, GetThumbLength, 1 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY_FLAGS( WindowStyle , wxSliderStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxSliderStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxSlider95) diff --git a/src/msw/spinbutt.cpp b/src/msw/spinbutt.cpp index ee90758b65..d49253743b 100644 --- a/src/msw/spinbutt.cpp +++ b/src/msw/spinbutt.cpp @@ -102,7 +102,7 @@ wxBEGIN_PROPERTIES_TABLE(wxSpinButton) wxPROPERTY( Value , int , SetValue, GetValue, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( Min , int , SetMin, GetMin, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( Max , int , SetMax, GetMax, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY_FLAGS( WindowStyle , wxSpinButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxSpinButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxSpinButton) diff --git a/src/msw/spinctrl.cpp b/src/msw/spinctrl.cpp index 4f2f56cca2..91b80a80e6 100644 --- a/src/msw/spinctrl.cpp +++ b/src/msw/spinctrl.cpp @@ -96,11 +96,11 @@ wxBEGIN_PROPERTIES_TABLE(wxSpinCtrl) wxEVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent ) wxEVENT_PROPERTY( TextEnter , wxEVT_COMMAND_TEXT_ENTER , wxCommandEvent ) - wxPROPERTY( ValueString , wxString , SetValue , GetValue , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) ; + wxPROPERTY( ValueString , wxString , SetValue , GetValue , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) ; wxPROPERTY( Value , int , SetValue, GetValue, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( Min , int , SetMin, GetMin, 0, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) wxPROPERTY( Max , int , SetMax, GetMax, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY_FLAGS( WindowStyle , wxSpinCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxSpinCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style /* TODO PROPERTIES style wxSP_ARROW_KEYS diff --git a/src/msw/statbmp.cpp b/src/msw/statbmp.cpp index a584ebac96..b437dcf26a 100644 --- a/src/msw/statbmp.cpp +++ b/src/msw/statbmp.cpp @@ -80,7 +80,7 @@ wxEND_FLAGS( wxStaticBitmapStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxStaticBitmap, wxControl,"wx/statbmp.h") wxBEGIN_PROPERTIES_TABLE(wxStaticBitmap) - wxPROPERTY_FLAGS( WindowStyle , wxStaticBitmapStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxStaticBitmapStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxStaticBitmap) diff --git a/src/msw/statbox.cpp b/src/msw/statbox.cpp index 5c82943b73..aa35e4e0a8 100644 --- a/src/msw/statbox.cpp +++ b/src/msw/statbox.cpp @@ -80,7 +80,7 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxStaticBox, wxControl,"wx/statbox.h") wxBEGIN_PROPERTIES_TABLE(wxStaticBox) wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxString() , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY_FLAGS( WindowStyle , wxStaticBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxStaticBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style /* TODO PROPERTIES : label diff --git a/src/msw/statline.cpp b/src/msw/statline.cpp index dd44a18ebd..15971dc496 100644 --- a/src/msw/statline.cpp +++ b/src/msw/statline.cpp @@ -85,7 +85,7 @@ wxEND_FLAGS( wxStaticLineStyle ) IMPLEMENT_DYNAMIC_CLASS_XTI(wxStaticLine, wxControl,"wx/statline.h") wxBEGIN_PROPERTIES_TABLE(wxStaticLine) - wxPROPERTY_FLAGS( WindowStyle , wxStaticLineStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxStaticLineStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxStaticLine) diff --git a/src/msw/stattext.cpp b/src/msw/stattext.cpp index f11e04cb19..ad7ef96d15 100644 --- a/src/msw/stattext.cpp +++ b/src/msw/stattext.cpp @@ -74,7 +74,7 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxStaticText, wxControl,"wx/stattext.h") wxBEGIN_PROPERTIES_TABLE(wxStaticText) wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxString() , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY_FLAGS( WindowStyle , wxStaticTextStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxStaticTextStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxStaticText) diff --git a/src/msw/textctrl.cpp b/src/msw/textctrl.cpp index f7c7cb3ada..7b94f8ed30 100644 --- a/src/msw/textctrl.cpp +++ b/src/msw/textctrl.cpp @@ -162,9 +162,9 @@ wxBEGIN_PROPERTIES_TABLE(wxTextCtrl) wxEVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent ) wxEVENT_PROPERTY( TextEnter , wxEVT_COMMAND_TEXT_ENTER , wxCommandEvent ) - wxPROPERTY( Font , wxFont , SetFont , GetFont ,, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) + wxPROPERTY( Font , wxFont , SetFont , GetFont , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) wxPROPERTY( Value , wxString , SetValue, GetValue, wxString() , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) - wxPROPERTY_FLAGS( WindowStyle , wxTextCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxTextCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxTextCtrl) diff --git a/src/msw/treectrl.cpp b/src/msw/treectrl.cpp index dcbb70016a..a488f9c547 100644 --- a/src/msw/treectrl.cpp +++ b/src/msw/treectrl.cpp @@ -526,7 +526,7 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxTreeCtrl, wxControl,"wx/treectrl.h") wxBEGIN_PROPERTIES_TABLE(wxTreeCtrl) wxEVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent ) wxEVENT_RANGE_PROPERTY( TreeEvent , wxEVT_COMMAND_TREE_BEGIN_DRAG , wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK , wxTreeEvent ) - wxPROPERTY_FLAGS( WindowStyle , wxTreeCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY_FLAGS( WindowStyle , wxTreeCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style wxEND_PROPERTIES_TABLE() wxBEGIN_HANDLERS_TABLE(wxTreeCtrl) diff --git a/src/msw/window.cpp b/src/msw/window.cpp index a0eeb08031..3c76c6b551 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -287,11 +287,11 @@ wxBEGIN_PROPERTIES_TABLE(wxWindow) wxEVENT_PROPERTY( Destroy , wxEVT_DESTROY , wxWindowDestroyEvent ) // Always constructor Properties first - wxREADONLY_PROPERTY( Parent,wxWindow*, GetParent, , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) + wxREADONLY_PROPERTY( Parent,wxWindow*, GetParent, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( Id,wxWindowID, SetId, GetId, -1, 0 /*flags*/ , wxT("Helpstring") , wxT("group") ) wxPROPERTY( Position,wxPoint, SetPosition , GetPosition, wxPoint(-1,-1) , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // pos wxPROPERTY( Size,wxSize, SetSize, GetSize, wxSize(-1,-1) , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // size - wxPROPERTY( WindowStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style + wxPROPERTY( WindowStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style // Then all relations of the object graph @@ -299,9 +299,9 @@ wxBEGIN_PROPERTIES_TABLE(wxWindow) // and finally all other properties - wxPROPERTY( ExtraStyle , long , SetExtraStyle , GetExtraStyle , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // extstyle - wxPROPERTY( BackgroundColour , wxColour , SetBackgroundColour , GetBackgroundColour , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // bg - wxPROPERTY( ForegroundColour , wxColour , SetForegroundColour , GetForegroundColour , , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // fg + wxPROPERTY( ExtraStyle , long , SetExtraStyle , GetExtraStyle , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // extstyle + wxPROPERTY( BackgroundColour , wxColour , SetBackgroundColour , GetBackgroundColour , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // bg + wxPROPERTY( ForegroundColour , wxColour , SetForegroundColour , GetForegroundColour , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // fg wxPROPERTY( Enabled , bool , Enable , IsEnabled , wxxVariant((bool)true) , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) wxPROPERTY( Shown , bool , Show , IsShown , wxxVariant((bool)true) , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) #if 0 -- 2.45.2