From c26873c8ef31e10b8e518792c8b6b67c3b10b144 Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Mon, 6 Oct 2008 15:38:30 +0000 Subject: [PATCH] Remove use of wxPG_EDITOR macro git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56127 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/propgrid/editors.h | 2 +- include/wx/propgrid/propgriddefs.h | 2 +- include/wx/propgrid/props.h | 6 +++--- src/propgrid/editors.cpp | 2 +- src/propgrid/property.cpp | 6 +++--- src/propgrid/props.cpp | 6 +++--- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/include/wx/propgrid/editors.h b/include/wx/propgrid/editors.h index daa34f2e7a..d9d6b0729d 100644 --- a/include/wx/propgrid/editors.h +++ b/include/wx/propgrid/editors.h @@ -92,7 +92,7 @@ public: /** Returns pointer to the name of the editor. For example, - wxPG_EDITOR(TextCtrl) has name "TextCtrl". This method is autogenerated + wxPGEditor_TextCtrl has name "TextCtrl". This method is autogenerated for custom editors. */ virtual wxString GetName() const = 0; diff --git a/include/wx/propgrid/propgriddefs.h b/include/wx/propgrid/propgriddefs.h index 729da90381..54ffdb262a 100644 --- a/include/wx/propgrid/propgriddefs.h +++ b/include/wx/propgrid/propgriddefs.h @@ -427,7 +427,7 @@ enum wxPG_SETVALUE_FLAGS #ifndef SWIG -// Editor accessor. +// Editor accessor (for backwards compatiblity use only). #define wxPG_EDITOR(T) wxPGEditor_##T // Declare editor class, with optional part. diff --git a/include/wx/propgrid/props.h b/include/wx/propgrid/props.h index 5c38115056..903d831329 100644 --- a/include/wx/propgrid/props.h +++ b/include/wx/propgrid/props.h @@ -169,9 +169,9 @@ void CLASSNAME::Init( wxColour colour ) \ wxString CLASSNAME::GetValueAsString( int argFlags ) const \ { \ const wxPGEditor* editor = GetEditorClass(); \ - if ( editor != wxPG_EDITOR(Choice) && \ - editor != wxPG_EDITOR(ChoiceAndButton) && \ - editor != wxPG_EDITOR(ComboBox) ) \ + if ( editor != wxPGEditor_Choice && \ + editor != wxPGEditor_ChoiceAndButton && \ + editor != wxPGEditor_ComboBox ) \ argFlags |= wxPG_PROPERTY_SPECIFIC; \ return wxSystemColourProperty::GetValueAsString(argFlags); \ } \ diff --git a/src/propgrid/editors.cpp b/src/propgrid/editors.cpp index a9ab7a67a2..2f0f236f8e 100644 --- a/src/propgrid/editors.cpp +++ b/src/propgrid/editors.cpp @@ -1113,7 +1113,7 @@ wxPGWindowList wxPGChoiceAndButtonEditor::CreateControls( wxPropertyGrid* propGr ch_sz.x -= wxPG_TEXTCTRL_AND_BUTTON_SPACING; #endif - wxWindow* ch = wxPG_EDITOR(Choice)->CreateControls(propGrid,property, + wxWindow* ch = wxPGEditor_Choice->CreateControls(propGrid,property, pos,ch_sz).m_primary; #ifdef __WXMSW__ diff --git a/src/propgrid/property.cpp b/src/propgrid/property.cpp index a99c5ad8b9..1022055d36 100644 --- a/src/propgrid/property.cpp +++ b/src/propgrid/property.cpp @@ -880,7 +880,7 @@ void wxPGProperty::OnCustomPaint( wxDC& dc, const wxPGEditor* wxPGProperty::DoGetEditorClass() const { - return wxPG_EDITOR(TextCtrl); + return wxPGEditor_TextCtrl; } // Default extra property event handling - that is, none at all. @@ -1387,11 +1387,11 @@ const wxPGEditor* wxPGProperty::GetEditorClass() const { // TextCtrlAndButton -> ComboBoxAndButton if ( editor->IsKindOf(CLASSINFO(wxPGTextCtrlAndButtonEditor)) ) - editor = wxPG_EDITOR(ChoiceAndButton); + editor = wxPGEditor_ChoiceAndButton; // TextCtrl -> ComboBox else if ( editor->IsKindOf(CLASSINFO(wxPGTextCtrlEditor)) ) - editor = wxPG_EDITOR(ComboBox); + editor = wxPGEditor_ComboBox; } return editor; diff --git a/src/propgrid/props.cpp b/src/propgrid/props.cpp index eaf5dcd208..ba0c468b1a 100644 --- a/src/propgrid/props.cpp +++ b/src/propgrid/props.cpp @@ -747,10 +747,10 @@ const wxPGEditor* wxBoolProperty::DoGetEditorClass() const // Select correct editor control. #if wxPG_INCLUDE_CHECKBOX if ( !(m_flags & wxPG_PROP_USE_CHECKBOX) ) - return wxPG_EDITOR(Choice); - return wxPG_EDITOR(CheckBox); + return wxPGEditor_Choice; + return wxPGEditor_CheckBox; #else - return wxPG_EDITOR(Choice); + return wxPGEditor_Choice; #endif } -- 2.45.2