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