Replace WX_PG_IMPLEMENT_PROPERTY_CLASS macro with simplified wxPG_IMPLEMENT_PROPERTY_CLASS macro.
New macro have no obsolete parameters and its name conforms to the naming standard (prefixed with wx). Closes #15541 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78444 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2541,12 +2541,18 @@ private:
|
|||||||
|
|
||||||
// Implements sans constructor function. Also, first arg is class name, not
|
// Implements sans constructor function. Also, first arg is class name, not
|
||||||
// property name.
|
// property name.
|
||||||
#define WX_PG_IMPLEMENT_PROPERTY_CLASS_PLAIN(PROPNAME,T,EDITOR) \
|
#define wxPG_IMPLEMENT_PROPERTY_CLASS_PLAIN(PROPNAME, EDITOR) \
|
||||||
const wxPGEditor* PROPNAME::DoGetEditorClass() const \
|
const wxPGEditor* PROPNAME::DoGetEditorClass() const \
|
||||||
{ \
|
{ \
|
||||||
return wxPGEditor_##EDITOR; \
|
return wxPGEditor_##EDITOR; \
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if WXWIN_COMPATIBILITY_3_0
|
||||||
|
// This macro is deprecated. Use wxPG_IMPLEMENT_PROPERTY_CLASS_PLAIN instead.
|
||||||
|
#define WX_PG_IMPLEMENT_PROPERTY_CLASS_PLAIN(PROPNAME,T,EDITOR) \
|
||||||
|
wxPG_IMPLEMENT_PROPERTY_CLASS_PLAIN(PROPNAME, EDITOR)
|
||||||
|
#endif // WXWIN_COMPATIBILITY_3_0
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
/** @class wxPGRootProperty
|
/** @class wxPGRootProperty
|
||||||
|
@@ -34,9 +34,16 @@ class wxPGArrayEditorDialog;
|
|||||||
// Property class implementation helper macros.
|
// Property class implementation helper macros.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#define wxPG_IMPLEMENT_PROPERTY_CLASS(NAME, UPCLASS, EDITOR) \
|
||||||
|
wxIMPLEMENT_DYNAMIC_CLASS(NAME, UPCLASS) \
|
||||||
|
wxPG_IMPLEMENT_PROPERTY_CLASS_PLAIN(NAME, EDITOR)
|
||||||
|
|
||||||
|
#if WXWIN_COMPATIBILITY_3_0
|
||||||
|
// This macro is deprecated. Use wxPG_IMPLEMENT_PROPERTY_CLASS instead.
|
||||||
#define WX_PG_IMPLEMENT_PROPERTY_CLASS(NAME, UPCLASS, T, T_AS_ARG, EDITOR) \
|
#define WX_PG_IMPLEMENT_PROPERTY_CLASS(NAME, UPCLASS, T, T_AS_ARG, EDITOR) \
|
||||||
IMPLEMENT_DYNAMIC_CLASS(NAME, UPCLASS) \
|
IMPLEMENT_DYNAMIC_CLASS(NAME, UPCLASS) \
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS_PLAIN(NAME, T, EDITOR)
|
WX_PG_IMPLEMENT_PROPERTY_CLASS_PLAIN(NAME, T, EDITOR)
|
||||||
|
#endif // WXWIN_COMPATIBILITY_3_0
|
||||||
|
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -849,8 +856,7 @@ WX_PG_DECLARE_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAM, class)
|
|||||||
#define WX_PG_IMPLEMENT_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAME, \
|
#define WX_PG_IMPLEMENT_ARRAYSTRING_PROPERTY_WITH_VALIDATOR(PROPNAME, \
|
||||||
DELIMCHAR, \
|
DELIMCHAR, \
|
||||||
CUSTBUTTXT) \
|
CUSTBUTTXT) \
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(PROPNAME, wxArrayStringProperty, \
|
wxPG_IMPLEMENT_PROPERTY_CLASS(PROPNAME, wxArrayStringProperty, \
|
||||||
wxArrayString, const wxArrayString&, \
|
|
||||||
TextCtrlAndButton) \
|
TextCtrlAndButton) \
|
||||||
PROPNAME::PROPNAME( const wxString& label, \
|
PROPNAME::PROPNAME( const wxString& label, \
|
||||||
const wxString& name, \
|
const wxString& name, \
|
||||||
|
@@ -611,8 +611,7 @@ static const long gs_fp_es_weight_values[] = {
|
|||||||
// Class body is in advprops.h
|
// Class body is in advprops.h
|
||||||
|
|
||||||
|
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxFontProperty,wxPGProperty,
|
wxPG_IMPLEMENT_PROPERTY_CLASS(wxFontProperty,wxPGProperty,TextCtrlAndButton)
|
||||||
wxFont,const wxFont&,TextCtrlAndButton)
|
|
||||||
|
|
||||||
|
|
||||||
wxFontProperty::wxFontProperty( const wxString& label, const wxString& name,
|
wxFontProperty::wxFontProperty( const wxString& label, const wxString& name,
|
||||||
@@ -903,8 +902,7 @@ IMPLEMENT_VARIANT_OBJECT_EXPORTED_SHALLOWCMP(wxColourPropertyValue, WXDLLIMPEXP_
|
|||||||
|
|
||||||
// Class body is in advprops.h
|
// Class body is in advprops.h
|
||||||
|
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxSystemColourProperty,wxEnumProperty,
|
wxPG_IMPLEMENT_PROPERTY_CLASS(wxSystemColourProperty,wxEnumProperty,Choice)
|
||||||
wxColourPropertyValue,const wxColourPropertyValue&,Choice)
|
|
||||||
|
|
||||||
|
|
||||||
void wxSystemColourProperty::Init( int type, const wxColour& colour )
|
void wxSystemColourProperty::Init( int type, const wxColour& colour )
|
||||||
@@ -1603,8 +1601,8 @@ static const unsigned long gs_cp_es_normcolour_colours[] = {
|
|||||||
wxPG_COLOUR(0,0,0)
|
wxPG_COLOUR(0,0,0)
|
||||||
};
|
};
|
||||||
|
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxColourProperty, wxSystemColourProperty,
|
wxPG_IMPLEMENT_PROPERTY_CLASS(wxColourProperty, wxSystemColourProperty,
|
||||||
wxColour, const wxColour&, TextCtrlAndButton)
|
TextCtrlAndButton)
|
||||||
|
|
||||||
static wxPGChoices gs_wxColourProperty_choicesCache;
|
static wxPGChoices gs_wxColourProperty_choicesCache;
|
||||||
|
|
||||||
@@ -1960,8 +1958,8 @@ void wxImageFileProperty::OnCustomPaint( wxDC& dc,
|
|||||||
|
|
||||||
#include "wx/choicdlg.h"
|
#include "wx/choicdlg.h"
|
||||||
|
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxMultiChoiceProperty,wxPGProperty,
|
wxPG_IMPLEMENT_PROPERTY_CLASS(wxMultiChoiceProperty,wxPGProperty,
|
||||||
wxArrayInt,const wxArrayInt&,TextCtrlAndButton)
|
TextCtrlAndButton)
|
||||||
|
|
||||||
wxMultiChoiceProperty::wxMultiChoiceProperty( const wxString& label,
|
wxMultiChoiceProperty::wxMultiChoiceProperty( const wxString& label,
|
||||||
const wxString& name,
|
const wxString& name,
|
||||||
@@ -2172,11 +2170,8 @@ bool wxMultiChoiceProperty::StringToValue( wxVariant& variant, const wxString& t
|
|||||||
#define dtCtrl TextCtrl
|
#define dtCtrl TextCtrl
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxDateProperty,
|
wxPG_IMPLEMENT_PROPERTY_CLASS(wxDateProperty,wxPGProperty,
|
||||||
wxPGProperty,
|
dtCtrl)
|
||||||
wxDateTime,
|
|
||||||
const wxDateTime&,
|
|
||||||
dtCtrl)
|
|
||||||
|
|
||||||
|
|
||||||
wxString wxDateProperty::ms_defaultDateFormat;
|
wxString wxDateProperty::ms_defaultDateFormat;
|
||||||
|
@@ -2790,8 +2790,7 @@ void wxPGProperty::SubPropsChanged( int oldSelInd )
|
|||||||
// wxPGRootProperty
|
// wxPGRootProperty
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxPGRootProperty, wxPGProperty,
|
wxPG_IMPLEMENT_PROPERTY_CLASS(wxPGRootProperty, wxPGProperty, TextCtrl)
|
||||||
none, none, TextCtrl)
|
|
||||||
|
|
||||||
wxPGRootProperty::wxPGRootProperty( const wxString& name )
|
wxPGRootProperty::wxPGRootProperty( const wxString& name )
|
||||||
: wxPGProperty()
|
: wxPGProperty()
|
||||||
@@ -2812,8 +2811,7 @@ wxPGRootProperty::~wxPGRootProperty()
|
|||||||
// wxPropertyCategory
|
// wxPropertyCategory
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxPropertyCategory, wxPGProperty,
|
wxPG_IMPLEMENT_PROPERTY_CLASS(wxPropertyCategory, wxPGProperty, TextCtrl)
|
||||||
none, none, TextCtrl)
|
|
||||||
|
|
||||||
void wxPropertyCategory::Init()
|
void wxPropertyCategory::Init()
|
||||||
{
|
{
|
||||||
|
@@ -60,8 +60,7 @@
|
|||||||
// wxStringProperty
|
// wxStringProperty
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxStringProperty,wxPGProperty,
|
wxPG_IMPLEMENT_PROPERTY_CLASS(wxStringProperty,wxPGProperty,TextCtrl)
|
||||||
wxString,const wxString&,TextCtrl)
|
|
||||||
|
|
||||||
wxStringProperty::wxStringProperty( const wxString& label,
|
wxStringProperty::wxStringProperty( const wxString& label,
|
||||||
const wxString& name,
|
const wxString& name,
|
||||||
@@ -221,8 +220,7 @@ bool wxNumericPropertyValidator::Validate(wxWindow* parent)
|
|||||||
// wxIntProperty
|
// wxIntProperty
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxIntProperty,wxPGProperty,
|
wxPG_IMPLEMENT_PROPERTY_CLASS(wxIntProperty,wxPGProperty,TextCtrl)
|
||||||
long,long,TextCtrl)
|
|
||||||
|
|
||||||
wxIntProperty::wxIntProperty( const wxString& label, const wxString& name,
|
wxIntProperty::wxIntProperty( const wxString& label, const wxString& name,
|
||||||
long value ) : wxPGProperty(label,name)
|
long value ) : wxPGProperty(label,name)
|
||||||
@@ -609,8 +607,7 @@ static const char* const gs_uintTemplates64[wxPG_UINT_TEMPLATE_MAX] = {
|
|||||||
"%" wxLongLongFmtSpec "o"
|
"%" wxLongLongFmtSpec "o"
|
||||||
};
|
};
|
||||||
|
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxUIntProperty,wxPGProperty,
|
wxPG_IMPLEMENT_PROPERTY_CLASS(wxUIntProperty,wxPGProperty,TextCtrl)
|
||||||
long,unsigned long,TextCtrl)
|
|
||||||
|
|
||||||
void wxUIntProperty::Init()
|
void wxUIntProperty::Init()
|
||||||
{
|
{
|
||||||
@@ -773,8 +770,7 @@ bool wxUIntProperty::DoSetAttribute( const wxString& name, wxVariant& value )
|
|||||||
// wxFloatProperty
|
// wxFloatProperty
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxFloatProperty,wxPGProperty,
|
wxPG_IMPLEMENT_PROPERTY_CLASS(wxFloatProperty,wxPGProperty,TextCtrl)
|
||||||
double,double,TextCtrl)
|
|
||||||
|
|
||||||
wxFloatProperty::wxFloatProperty( const wxString& label,
|
wxFloatProperty::wxFloatProperty( const wxString& label,
|
||||||
const wxString& name,
|
const wxString& name,
|
||||||
@@ -1113,8 +1109,7 @@ wxVariant wxBoolProperty::DoGetAttribute( const wxString& name ) const
|
|||||||
// wxEnumProperty
|
// wxEnumProperty
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxEnumProperty, wxPGProperty,
|
wxPG_IMPLEMENT_PROPERTY_CLASS(wxEnumProperty,wxPGProperty,Choice)
|
||||||
long, const long*, Choice)
|
|
||||||
|
|
||||||
wxEnumProperty::wxEnumProperty( const wxString& label, const wxString& name, const wxChar* const* labels,
|
wxEnumProperty::wxEnumProperty( const wxString& label, const wxString& name, const wxChar* const* labels,
|
||||||
const long* values, int value ) : wxPGProperty(label,name)
|
const long* values, int value ) : wxPGProperty(label,name)
|
||||||
@@ -1352,8 +1347,7 @@ int wxEnumProperty::GetIndex() const
|
|||||||
// wxEditEnumProperty
|
// wxEditEnumProperty
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxEditEnumProperty, wxPGProperty,
|
wxPG_IMPLEMENT_PROPERTY_CLASS(wxEditEnumProperty, wxPGProperty, ComboBox)
|
||||||
wxString, const wxString&, ComboBox)
|
|
||||||
|
|
||||||
wxEditEnumProperty::wxEditEnumProperty( const wxString& label, const wxString& name, const wxChar* const* labels,
|
wxEditEnumProperty::wxEditEnumProperty( const wxString& label, const wxString& name, const wxChar* const* labels,
|
||||||
const long* values, const wxString& value )
|
const long* values, const wxString& value )
|
||||||
@@ -1440,8 +1434,7 @@ bool wxEditEnumProperty::ValidateValue(
|
|||||||
// wxFlagsProperty
|
// wxFlagsProperty
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxFlagsProperty, wxPGProperty,
|
wxPG_IMPLEMENT_PROPERTY_CLASS(wxFlagsProperty, wxPGProperty, TextCtrl)
|
||||||
long, long, TextCtrl)
|
|
||||||
|
|
||||||
void wxFlagsProperty::Init()
|
void wxFlagsProperty::Init()
|
||||||
{
|
{
|
||||||
@@ -1893,8 +1886,7 @@ bool wxPGFileDialogAdapter::DoShowDialog( wxPropertyGrid* propGrid, wxPGProperty
|
|||||||
// wxFileProperty
|
// wxFileProperty
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxFileProperty,wxPGProperty,
|
wxPG_IMPLEMENT_PROPERTY_CLASS(wxFileProperty,wxPGProperty,TextCtrlAndButton)
|
||||||
wxString,const wxString&,TextCtrlAndButton)
|
|
||||||
|
|
||||||
wxFileProperty::wxFileProperty( const wxString& label, const wxString& name,
|
wxFileProperty::wxFileProperty( const wxString& label, const wxString& name,
|
||||||
const wxString& value ) : wxPGProperty(label,name)
|
const wxString& value ) : wxPGProperty(label,name)
|
||||||
@@ -2132,8 +2124,7 @@ bool wxPGLongStringDialogAdapter::DoShowDialog( wxPropertyGrid* propGrid, wxPGPr
|
|||||||
// wxLongStringProperty
|
// wxLongStringProperty
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxLongStringProperty,wxPGProperty,
|
wxPG_IMPLEMENT_PROPERTY_CLASS(wxLongStringProperty,wxPGProperty,TextCtrlAndButton)
|
||||||
wxString,const wxString&,TextCtrlAndButton)
|
|
||||||
|
|
||||||
wxLongStringProperty::wxLongStringProperty( const wxString& label, const wxString& name,
|
wxLongStringProperty::wxLongStringProperty( const wxString& label, const wxString& name,
|
||||||
const wxString& value ) : wxPGProperty(label,name)
|
const wxString& value ) : wxPGProperty(label,name)
|
||||||
@@ -2631,11 +2622,9 @@ wxPGArrayStringEditorDialog::OnCustomNewAction(wxString* resString)
|
|||||||
// wxArrayStringProperty
|
// wxArrayStringProperty
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
|
|
||||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxArrayStringProperty, // Property name
|
wxPG_IMPLEMENT_PROPERTY_CLASS(wxArrayStringProperty, // Property name
|
||||||
wxPGProperty, // Property we inherit from
|
wxPGProperty, // Property we inherit from
|
||||||
wxArrayString, // Value type name
|
TextCtrlAndButton) // Initial editor
|
||||||
const wxArrayString&, // Value type, as given in constructor
|
|
||||||
TextCtrlAndButton) // Initial editor
|
|
||||||
|
|
||||||
wxArrayStringProperty::wxArrayStringProperty( const wxString& label,
|
wxArrayStringProperty::wxArrayStringProperty( const wxString& label,
|
||||||
const wxString& name,
|
const wxString& name,
|
||||||
|
Reference in New Issue
Block a user