/**
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;
#ifndef SWIG
-// Editor accessor.
+// Editor accessor (for backwards compatiblity use only).
#define wxPG_EDITOR(T) wxPGEditor_##T
// Declare editor class, with optional part.
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); \
} \
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__
const wxPGEditor* wxPGProperty::DoGetEditorClass() const
{
- return wxPG_EDITOR(TextCtrl);
+ return wxPGEditor_TextCtrl;
}
// Default extra property event handling - that is, none at all.
{
// 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;
// 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
}