X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/608754c4a3f53e4f9bb98d9f2c1a20e6fd4c3a80..e3c55eb333d273693ed2aea23da909b33e9e5484:/include/wx/generic/grid.h diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index d8d1805a18..e2f9693a20 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -79,7 +79,9 @@ class WXDLLIMPEXP_ADV wxGridSelection; class WXDLLEXPORT wxCheckBox; class WXDLLEXPORT wxComboBox; class WXDLLEXPORT wxTextCtrl; +#if wxUSE_SPINCTRL class WXDLLEXPORT wxSpinCtrl; +#endif // ---------------------------------------------------------------------------- // macros @@ -460,10 +462,19 @@ public: virtual wxString GetValue() const; protected: +#if wxUSE_SPINCTRL wxSpinCtrl *Spin() const { return (wxSpinCtrl *)m_control; } +#endif // if HasRange(), we use wxSpinCtrl - otherwise wxTextCtrl - bool HasRange() const { return m_min != m_max; } + bool HasRange() const + { +#if wxUSE_SPINCTRL + return m_min != m_max; +#else + return false; +#endif + } // string representation of m_valueOld wxString GetString() const @@ -1139,11 +1150,11 @@ public: // and may be overridden by the user virtual void DrawCellHighlight( wxDC& dc, const wxGridCellAttr *attr ); - void DrawRowLabels( wxDC& dc, const wxArrayInt& rows ); - void DrawRowLabel( wxDC& dc, int row ); + virtual void DrawRowLabels( wxDC& dc, const wxArrayInt& rows ); + virtual void DrawRowLabel( wxDC& dc, int row ); - void DrawColLabels( wxDC& dc, const wxArrayInt& cols ); - void DrawColLabel( wxDC& dc, int col ); + virtual void DrawColLabels( wxDC& dc, const wxArrayInt& cols ); + virtual void DrawColLabel( wxDC& dc, int col ); // ------ Cell text drawing functions