]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/generic/grideditors.h
Fix crash when auto-sizing a wxDataViewCtrl column.
[wxWidgets.git] / include / wx / generic / grideditors.h
index aa0fd7af43fe76b50b7a167e5e8ff7f5dd6aed7e..a81ab84c473c3dff2bc1feaf1fd614ad20224f8f 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Michael Bedward (based on code by Julian Smart, Robin Dunn)
 // Modified by: Santiago Palacios
 // Created:     1/08/1999
-// RCS-ID:      $Id$
 // Copyright:   (c) Michael Bedward
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -52,7 +51,7 @@ private:
 class WXDLLIMPEXP_ADV wxGridCellTextEditor : public wxGridCellEditor
 {
 public:
-    wxGridCellTextEditor();
+    wxEXPLICIT wxGridCellTextEditor(size_t maxChars = 0);
 
     virtual void Create(wxWindow* parent,
                         wxWindowID id,
@@ -75,9 +74,9 @@ public:
 
     // parameters string format is "max_width"
     virtual void SetParameters(const wxString& params);
+    virtual void SetValidator(const wxValidator& validator);
 
-    virtual wxGridCellEditor *Clone() const
-        { return new wxGridCellTextEditor; }
+    virtual wxGridCellEditor *Clone() const;
 
     // added GetValue so we can get the value which is in the control
     virtual wxString GetValue() const;
@@ -92,8 +91,9 @@ protected:
     void DoReset(const wxString& startValue);
 
 private:
-    size_t   m_maxChars;        // max number of chars allowed
-    wxString m_value;
+    size_t                   m_maxChars;        // max number of chars allowed
+    wxScopedPtr<wxValidator> m_validator;
+    wxString                 m_value;
 
     wxDECLARE_NO_COPY_CLASS(wxGridCellTextEditor);
 };