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:
parent
5ffda80677
commit
35b53a8c30
@ -2541,12 +2541,18 @@ private:
|
||||
|
||||
// Implements sans constructor function. Also, first arg is class name, not
|
||||
// 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 \
|
||||
{ \
|
||||
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
|
||||
|
@ -34,9 +34,16 @@ class wxPGArrayEditorDialog;
|
||||
// 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) \
|
||||
IMPLEMENT_DYNAMIC_CLASS(NAME, UPCLASS) \
|
||||
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, \
|
||||
DELIMCHAR, \
|
||||
CUSTBUTTXT) \
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(PROPNAME, wxArrayStringProperty, \
|
||||
wxArrayString, const wxArrayString&, \
|
||||
wxPG_IMPLEMENT_PROPERTY_CLASS(PROPNAME, wxArrayStringProperty, \
|
||||
TextCtrlAndButton) \
|
||||
PROPNAME::PROPNAME( const wxString& label, \
|
||||
const wxString& name, \
|
||||
|
@ -611,8 +611,7 @@ static const long gs_fp_es_weight_values[] = {
|
||||
// Class body is in advprops.h
|
||||
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxFontProperty,wxPGProperty,
|
||||
wxFont,const wxFont&,TextCtrlAndButton)
|
||||
wxPG_IMPLEMENT_PROPERTY_CLASS(wxFontProperty,wxPGProperty,TextCtrlAndButton)
|
||||
|
||||
|
||||
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
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxSystemColourProperty,wxEnumProperty,
|
||||
wxColourPropertyValue,const wxColourPropertyValue&,Choice)
|
||||
wxPG_IMPLEMENT_PROPERTY_CLASS(wxSystemColourProperty,wxEnumProperty,Choice)
|
||||
|
||||
|
||||
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)
|
||||
};
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxColourProperty, wxSystemColourProperty,
|
||||
wxColour, const wxColour&, TextCtrlAndButton)
|
||||
wxPG_IMPLEMENT_PROPERTY_CLASS(wxColourProperty, wxSystemColourProperty,
|
||||
TextCtrlAndButton)
|
||||
|
||||
static wxPGChoices gs_wxColourProperty_choicesCache;
|
||||
|
||||
@ -1960,8 +1958,8 @@ void wxImageFileProperty::OnCustomPaint( wxDC& dc,
|
||||
|
||||
#include "wx/choicdlg.h"
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxMultiChoiceProperty,wxPGProperty,
|
||||
wxArrayInt,const wxArrayInt&,TextCtrlAndButton)
|
||||
wxPG_IMPLEMENT_PROPERTY_CLASS(wxMultiChoiceProperty,wxPGProperty,
|
||||
TextCtrlAndButton)
|
||||
|
||||
wxMultiChoiceProperty::wxMultiChoiceProperty( const wxString& label,
|
||||
const wxString& name,
|
||||
@ -2172,11 +2170,8 @@ bool wxMultiChoiceProperty::StringToValue( wxVariant& variant, const wxString& t
|
||||
#define dtCtrl TextCtrl
|
||||
#endif
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxDateProperty,
|
||||
wxPGProperty,
|
||||
wxDateTime,
|
||||
const wxDateTime&,
|
||||
dtCtrl)
|
||||
wxPG_IMPLEMENT_PROPERTY_CLASS(wxDateProperty,wxPGProperty,
|
||||
dtCtrl)
|
||||
|
||||
|
||||
wxString wxDateProperty::ms_defaultDateFormat;
|
||||
|
@ -2790,8 +2790,7 @@ void wxPGProperty::SubPropsChanged( int oldSelInd )
|
||||
// wxPGRootProperty
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxPGRootProperty, wxPGProperty,
|
||||
none, none, TextCtrl)
|
||||
wxPG_IMPLEMENT_PROPERTY_CLASS(wxPGRootProperty, wxPGProperty, TextCtrl)
|
||||
|
||||
wxPGRootProperty::wxPGRootProperty( const wxString& name )
|
||||
: wxPGProperty()
|
||||
@ -2812,8 +2811,7 @@ wxPGRootProperty::~wxPGRootProperty()
|
||||
// wxPropertyCategory
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxPropertyCategory, wxPGProperty,
|
||||
none, none, TextCtrl)
|
||||
wxPG_IMPLEMENT_PROPERTY_CLASS(wxPropertyCategory, wxPGProperty, TextCtrl)
|
||||
|
||||
void wxPropertyCategory::Init()
|
||||
{
|
||||
|
@ -60,8 +60,7 @@
|
||||
// wxStringProperty
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxStringProperty,wxPGProperty,
|
||||
wxString,const wxString&,TextCtrl)
|
||||
wxPG_IMPLEMENT_PROPERTY_CLASS(wxStringProperty,wxPGProperty,TextCtrl)
|
||||
|
||||
wxStringProperty::wxStringProperty( const wxString& label,
|
||||
const wxString& name,
|
||||
@ -221,8 +220,7 @@ bool wxNumericPropertyValidator::Validate(wxWindow* parent)
|
||||
// wxIntProperty
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxIntProperty,wxPGProperty,
|
||||
long,long,TextCtrl)
|
||||
wxPG_IMPLEMENT_PROPERTY_CLASS(wxIntProperty,wxPGProperty,TextCtrl)
|
||||
|
||||
wxIntProperty::wxIntProperty( const wxString& label, const wxString& name,
|
||||
long value ) : wxPGProperty(label,name)
|
||||
@ -609,8 +607,7 @@ static const char* const gs_uintTemplates64[wxPG_UINT_TEMPLATE_MAX] = {
|
||||
"%" wxLongLongFmtSpec "o"
|
||||
};
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxUIntProperty,wxPGProperty,
|
||||
long,unsigned long,TextCtrl)
|
||||
wxPG_IMPLEMENT_PROPERTY_CLASS(wxUIntProperty,wxPGProperty,TextCtrl)
|
||||
|
||||
void wxUIntProperty::Init()
|
||||
{
|
||||
@ -773,8 +770,7 @@ bool wxUIntProperty::DoSetAttribute( const wxString& name, wxVariant& value )
|
||||
// wxFloatProperty
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxFloatProperty,wxPGProperty,
|
||||
double,double,TextCtrl)
|
||||
wxPG_IMPLEMENT_PROPERTY_CLASS(wxFloatProperty,wxPGProperty,TextCtrl)
|
||||
|
||||
wxFloatProperty::wxFloatProperty( const wxString& label,
|
||||
const wxString& name,
|
||||
@ -1113,8 +1109,7 @@ wxVariant wxBoolProperty::DoGetAttribute( const wxString& name ) const
|
||||
// wxEnumProperty
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxEnumProperty, wxPGProperty,
|
||||
long, const long*, Choice)
|
||||
wxPG_IMPLEMENT_PROPERTY_CLASS(wxEnumProperty,wxPGProperty,Choice)
|
||||
|
||||
wxEnumProperty::wxEnumProperty( const wxString& label, const wxString& name, const wxChar* const* labels,
|
||||
const long* values, int value ) : wxPGProperty(label,name)
|
||||
@ -1352,8 +1347,7 @@ int wxEnumProperty::GetIndex() const
|
||||
// wxEditEnumProperty
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxEditEnumProperty, wxPGProperty,
|
||||
wxString, const wxString&, ComboBox)
|
||||
wxPG_IMPLEMENT_PROPERTY_CLASS(wxEditEnumProperty, wxPGProperty, ComboBox)
|
||||
|
||||
wxEditEnumProperty::wxEditEnumProperty( const wxString& label, const wxString& name, const wxChar* const* labels,
|
||||
const long* values, const wxString& value )
|
||||
@ -1440,8 +1434,7 @@ bool wxEditEnumProperty::ValidateValue(
|
||||
// wxFlagsProperty
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxFlagsProperty, wxPGProperty,
|
||||
long, long, TextCtrl)
|
||||
wxPG_IMPLEMENT_PROPERTY_CLASS(wxFlagsProperty, wxPGProperty, TextCtrl)
|
||||
|
||||
void wxFlagsProperty::Init()
|
||||
{
|
||||
@ -1893,8 +1886,7 @@ bool wxPGFileDialogAdapter::DoShowDialog( wxPropertyGrid* propGrid, wxPGProperty
|
||||
// wxFileProperty
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxFileProperty,wxPGProperty,
|
||||
wxString,const wxString&,TextCtrlAndButton)
|
||||
wxPG_IMPLEMENT_PROPERTY_CLASS(wxFileProperty,wxPGProperty,TextCtrlAndButton)
|
||||
|
||||
wxFileProperty::wxFileProperty( const wxString& label, const wxString& name,
|
||||
const wxString& value ) : wxPGProperty(label,name)
|
||||
@ -2132,8 +2124,7 @@ bool wxPGLongStringDialogAdapter::DoShowDialog( wxPropertyGrid* propGrid, wxPGPr
|
||||
// wxLongStringProperty
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxLongStringProperty,wxPGProperty,
|
||||
wxString,const wxString&,TextCtrlAndButton)
|
||||
wxPG_IMPLEMENT_PROPERTY_CLASS(wxLongStringProperty,wxPGProperty,TextCtrlAndButton)
|
||||
|
||||
wxLongStringProperty::wxLongStringProperty( const wxString& label, const wxString& name,
|
||||
const wxString& value ) : wxPGProperty(label,name)
|
||||
@ -2631,11 +2622,9 @@ wxPGArrayStringEditorDialog::OnCustomNewAction(wxString* resString)
|
||||
// wxArrayStringProperty
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
WX_PG_IMPLEMENT_PROPERTY_CLASS(wxArrayStringProperty, // Property name
|
||||
wxPGProperty, // Property we inherit from
|
||||
wxArrayString, // Value type name
|
||||
const wxArrayString&, // Value type, as given in constructor
|
||||
TextCtrlAndButton) // Initial editor
|
||||
wxPG_IMPLEMENT_PROPERTY_CLASS(wxArrayStringProperty, // Property name
|
||||
wxPGProperty, // Property we inherit from
|
||||
TextCtrlAndButton) // Initial editor
|
||||
|
||||
wxArrayStringProperty::wxArrayStringProperty( const wxString& label,
|
||||
const wxString& name,
|
||||
|
Loading…
Reference in New Issue
Block a user