build fix for wxUSE_VALIDATORS==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -76,7 +76,9 @@ public:
|
||||
|
||||
// parameters string format is "max_width"
|
||||
virtual void SetParameters(const wxString& params) wxOVERRIDE;
|
||||
#if wxUSE_VALIDATORS
|
||||
virtual void SetValidator(const wxValidator& validator);
|
||||
#endif
|
||||
|
||||
virtual wxGridCellEditor *Clone() const wxOVERRIDE;
|
||||
|
||||
@@ -94,7 +96,9 @@ protected:
|
||||
|
||||
private:
|
||||
size_t m_maxChars; // max number of chars allowed
|
||||
#if wxUSE_VALIDATORS
|
||||
wxScopedPtr<wxValidator> m_validator;
|
||||
#endif
|
||||
wxString m_value;
|
||||
|
||||
wxDECLARE_NO_COPY_CLASS(wxGridCellTextEditor);
|
||||
|
@@ -415,11 +415,13 @@ void wxGridCellTextEditor::DoCreate(wxWindow* parent,
|
||||
{
|
||||
Text()->SetMaxLength(m_maxChars);
|
||||
}
|
||||
#if wxUSE_VALIDATORS
|
||||
// validate text in textctrl, if validator is set
|
||||
if ( m_validator )
|
||||
{
|
||||
Text()->SetValidator(*m_validator);
|
||||
}
|
||||
#endif
|
||||
|
||||
wxGridCellEditor::Create(parent, id, evtHandler);
|
||||
}
|
||||
@@ -638,18 +640,22 @@ void wxGridCellTextEditor::SetParameters(const wxString& params)
|
||||
}
|
||||
}
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
void wxGridCellTextEditor::SetValidator(const wxValidator& validator)
|
||||
{
|
||||
m_validator.reset(static_cast<wxValidator*>(validator.Clone()));
|
||||
}
|
||||
#endif
|
||||
|
||||
wxGridCellEditor *wxGridCellTextEditor::Clone() const
|
||||
{
|
||||
wxGridCellTextEditor* editor = new wxGridCellTextEditor(m_maxChars);
|
||||
#if wxUSE_VALIDATORS
|
||||
if ( m_validator )
|
||||
{
|
||||
editor->SetValidator(*m_validator);
|
||||
}
|
||||
#endif
|
||||
return editor;
|
||||
}
|
||||
|
||||
|
@@ -45,6 +45,7 @@
|
||||
#include "wx/statusbr.h"
|
||||
#include "wx/intl.h"
|
||||
#include "wx/frame.h"
|
||||
#include "wx/textctrl.h"
|
||||
#endif
|
||||
|
||||
|
||||
|
@@ -684,8 +684,10 @@ void wxRichTextSizePage::CreateControls()
|
||||
itemButton96->SetToolTip(_("Moves the object to the next paragraph."));
|
||||
m_moveObjectSizer->Add(itemButton96, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxTOP|wxBOTTOM, 5);
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
// Set validators
|
||||
m_positionModeCtrl->SetValidator( wxGenericValidator(& m_positionMode) );
|
||||
#endif
|
||||
////@end wxRichTextSizePage content construction
|
||||
|
||||
if (!sm_enablePositionAndSizeCheckboxes)
|
||||
|
Reference in New Issue
Block a user