From d53f610c1c224b6a0f58e4009b2bce553b1ff7b9 Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Fri, 19 Sep 2008 17:24:34 +0000 Subject: [PATCH] Eliminated WX_PG_DECLARE/IMPLEMENT_DERIVED_PROPERTY_CLASS git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55743 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/propgrid/props.h | 16 +++------------- src/propgrid/advprops.cpp | 4 +--- src/propgrid/props.cpp | 2 +- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/include/wx/propgrid/props.h b/include/wx/propgrid/props.h index 08c1d9228f..b323220dca 100644 --- a/include/wx/propgrid/props.h +++ b/include/wx/propgrid/props.h @@ -36,14 +36,6 @@ WX_PG_IMPLEMENT_PROPERTY_CLASS_PLAIN(NAME,T,EDITOR) #define WX_PG_IMPLEMENT_PROPERTY_CLASS(NAME,UPNAME,T,T_AS_ARG,EDITOR) \ WX_PG_IMPLEMENT_PROPERTY_CLASS2(NAME,NAME,UPNAME,T,T_AS_ARG,EDITOR) -#define WX_PG_DECLARE_DERIVED_PROPERTY_CLASS(CLASSNAME) \ -DECLARE_DYNAMIC_CLASS(CLASSNAME) - -// Derived property class is one that inherits from an existing working property -// class, but assumes same value and editor type. -#define WX_PG_IMPLEMENT_DERIVED_PROPERTY_CLASS(NAME,UPNAME,T_AS_ARG) \ -IMPLEMENT_DYNAMIC_CLASS(NAME, UPNAME) - // ----------------------------------------------------------------------- #define wxPG_NO_ESCAPE wxPG_PROP_NO_ESCAPE // No escape sequences @@ -52,7 +44,7 @@ IMPLEMENT_DYNAMIC_CLASS(NAME, UPNAME) #define WX_PG_DECLARE_STRING_PROPERTY_WITH_DECL(NAME, DECL) \ DECL NAME : public wxLongStringProperty \ { \ - WX_PG_DECLARE_DERIVED_PROPERTY_CLASS(NAME) \ + DECLARE_DYNAMIC_CLASS(NAME) \ public: \ NAME( const wxString& name = wxPG_LABEL, \ const wxString& label = wxPG_LABEL, \ @@ -66,8 +58,7 @@ public: \ WX_PG_DECLARE_STRING_PROPERTY_WITH_DECL(NAME, class) \ #define WX_PG_IMPLEMENT_STRING_PROPERTY_WITH_VALIDATOR(NAME, FLAGS) \ -WX_PG_IMPLEMENT_DERIVED_PROPERTY_CLASS(NAME,wxLongStringProperty,\ - const wxString&) \ +IMPLEMENT_DYNAMIC_CLASS(NAME,wxLongStringProperty) \ NAME::NAME( const wxString& name, \ const wxString& label, \ const wxString& value ) \ @@ -160,8 +151,7 @@ WX_PG_DECLARE_CUSTOM_COLOUR_PROPERTY_WITH_DECL(CLASSNAME, class) #define WX_PG_IMPLEMENT_CUSTOM_COLOUR_PROPERTY(CLASSNAME,\ LABELS,VALUES,COLOURS) \ static wxPGChoices gs_##CLASSNAME##_choicesCache; \ -WX_PG_IMPLEMENT_DERIVED_PROPERTY_CLASS(CLASSNAME, wxSystemColourProperty, \ - const wxColourPropertyValue&) \ +IMPLEMENT_DYNAMIC_CLASS(CLASSNAME, wxSystemColourProperty) \ CLASSNAME::CLASSNAME( const wxString& label, const wxString& name, \ const wxColourPropertyValue& value ) \ : wxSystemColourProperty(label, name, LABELS, VALUES, \ diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index da269ea3f4..f2b6021dca 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -1551,9 +1551,7 @@ const wxString& wxPGGetDefaultImageWildcard() return wxPGGlobalVars->m_pDefaultImageWildcard; } -WX_PG_IMPLEMENT_DERIVED_PROPERTY_CLASS(wxImageFileProperty, - wxFileProperty, - const wxString&) +IMPLEMENT_DYNAMIC_CLASS(wxImageFileProperty, wxFileProperty) wxImageFileProperty::wxImageFileProperty( const wxString& label, const wxString& name, const wxString& value ) diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index 9c5433f1d0..f7938b40d0 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -1534,7 +1534,7 @@ void wxFlagsProperty::ChildChanged( wxVariant& thisValue, int childIndex, wxVari // wxDirProperty // ----------------------------------------------------------------------- -WX_PG_IMPLEMENT_DERIVED_PROPERTY_CLASS(wxDirProperty,wxLongStringProperty,const wxString&) +IMPLEMENT_DYNAMIC_CLASS(wxDirProperty, wxLongStringProperty) wxDirProperty::wxDirProperty( const wxString& name, const wxString& label, const wxString& value ) : wxLongStringProperty(name,label,value) -- 2.45.2