Applied patches by Scott Pleiter:
[ 643866 ] small wxGrid API changes adds GetValue to the gridcelleditors to facilitate querying values from the editors, also changes several methods to virtuals to simplify inheritance. [ 643867 ] wxGrid cell LNF & behaviour patch Enables the grid to render its cells grey when the grid control is disabled. Also fixes several problems when making the gridcelleditors visible. Improves the layout of multi-line row/column labels. Changes the CellEditor show from a MOUSE_DOWN to a MOUSE_UP, this stops the editor starting when creating a selection beginging in the currently selected cell. [ 643868 ] wxGrid rendering tweaks, improves look. Draw the row/column using system colours. Change the default wxGrid settings to have a more neutral starting point - grey lines, non-bold label font, black/white selection etc. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -357,6 +357,10 @@ public:
|
||||
// create a new object which is the copy of this one
|
||||
virtual wxGridCellEditor *Clone() const = 0;
|
||||
|
||||
// DJC MAPTEK
|
||||
// added GetValue so we can get the value which is in the control
|
||||
virtual wxString GetValue() const = 0;
|
||||
|
||||
protected:
|
||||
// the dtor is private because only DecRef() can delete us
|
||||
virtual ~wxGridCellEditor();
|
||||
@@ -405,6 +409,9 @@ public:
|
||||
virtual wxGridCellEditor *Clone() const
|
||||
{ return new wxGridCellTextEditor; }
|
||||
|
||||
// DJC MAPTEK
|
||||
// added GetValue so we can get the value which is in the control
|
||||
virtual wxString GetValue() const;
|
||||
protected:
|
||||
wxTextCtrl *Text() const { return (wxTextCtrl *)m_control; }
|
||||
|
||||
@@ -441,6 +448,9 @@ public:
|
||||
|
||||
virtual wxGridCellEditor *Clone() const
|
||||
{ return new wxGridCellNumberEditor(m_min, m_max); }
|
||||
// DJC MAPTEK
|
||||
// added GetValue so we can get the value which is in the control
|
||||
virtual wxString GetValue() const;
|
||||
|
||||
protected:
|
||||
wxSpinCtrl *Spin() const { return (wxSpinCtrl *)m_control; }
|
||||
@@ -516,6 +526,9 @@ public:
|
||||
|
||||
virtual wxGridCellEditor *Clone() const
|
||||
{ return new wxGridCellBoolEditor; }
|
||||
// DJC MAPTEK
|
||||
// added GetValue so we can get the value which is in the control
|
||||
virtual wxString GetValue() const;
|
||||
|
||||
protected:
|
||||
wxCheckBox *CBox() const { return (wxCheckBox *)m_control; }
|
||||
@@ -552,11 +565,16 @@ public:
|
||||
virtual void SetParameters(const wxString& params);
|
||||
|
||||
virtual wxGridCellEditor *Clone() const;
|
||||
// DJC MAPTEK
|
||||
// added GetValue so we can get the value which is in the control
|
||||
virtual wxString GetValue() const;
|
||||
|
||||
protected:
|
||||
wxComboBox *Combo() const { return (wxComboBox *)m_control; }
|
||||
|
||||
private:
|
||||
// DJC - (MAPTEK) you at least need access to m_choices if you
|
||||
// wish to override this class
|
||||
protected:
|
||||
wxString m_startValue;
|
||||
wxArrayString m_choices;
|
||||
bool m_allowOthers;
|
||||
@@ -1416,12 +1434,13 @@ public:
|
||||
void RegisterDataType(const wxString& typeName,
|
||||
wxGridCellRenderer* renderer,
|
||||
wxGridCellEditor* editor);
|
||||
wxGridCellEditor* GetDefaultEditorForCell(int row, int col) const;
|
||||
// DJC MAPTEK
|
||||
virtual wxGridCellEditor* GetDefaultEditorForCell(int row, int col) const;
|
||||
wxGridCellEditor* GetDefaultEditorForCell(const wxGridCellCoords& c) const
|
||||
{ return GetDefaultEditorForCell(c.GetRow(), c.GetCol()); }
|
||||
wxGridCellRenderer* GetDefaultRendererForCell(int row, int col) const;
|
||||
wxGridCellEditor* GetDefaultEditorForType(const wxString& typeName) const;
|
||||
wxGridCellRenderer* GetDefaultRendererForType(const wxString& typeName) const;
|
||||
virtual wxGridCellRenderer* GetDefaultRendererForCell(int row, int col) const;
|
||||
virtual wxGridCellEditor* GetDefaultEditorForType(const wxString& typeName) const;
|
||||
virtual wxGridCellRenderer* GetDefaultRendererForType(const wxString& typeName) const;
|
||||
|
||||
// grid may occupy more space than needed for its rows/columns, this
|
||||
// function allows to set how big this extra space is
|
||||
|
Reference in New Issue
Block a user