+//-----------------------------------------------------------------------------
+// wxSpinCtrlGTKBase - Base class for GTK versions of the wxSpinCtrl[Double]
+//
+// This class manages a double valued GTK spinctrl through the DoGet/SetXXX
+// functions that are made public as Get/SetXXX functions for int or double
+// for the wxSpinCtrl and wxSpinCtrlDouble classes respectively to avoid
+// function ambiguity.
+//-----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxSpinCtrlGTKBase : public wxSpinCtrlBase
+{
+public:
+ wxSpinCtrlGTKBase() : m_value(0) {}
+
+ bool Create(wxWindow *parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& value = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxSP_ARROW_KEYS,
+ double min = 0, double max = 100, double initial = 0, double inc = 1,
+ const wxString& name = _T("wxSpinCtrlGTKBase"));
+
+ // wxSpinCtrl(Double) methods call DoXXX functions of the same name
+
+ // accessors
+ // T GetValue() const
+ // T GetMin() const
+ // T GetMax() const
+ // T GetIncrement() const
+ virtual bool GetSnapToTicks() const;
+
+ // operations
+ virtual void SetValue(const wxString& value);
+ // void SetValue(T val)
+ // void SetRange(T minVal, T maxVal)
+ // void SetIncrement(T inc)
+ void SetSnapToTicks( bool snap_to_ticks );
+
+ // Select text in the textctrl
+ void SetSelection(long from, long to);
+
+ static wxVisualAttributes
+ GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);
+
+ // implementation
+ void OnChar( wxKeyEvent &event );
+
+ double m_value; // public for GTK callback function
+
+protected:
+
+ double DoGetValue() const;
+ double DoGetMin() const;
+ double DoGetMax() const;
+ double DoGetIncrement() const;
+
+ void DoSetValue(double val);
+ void DoSetValue(const wxString& strValue);
+ void DoSetRange(double min_val, double max_val);
+ void DoSetIncrement(double inc);
+
+ void GtkDisableEvents() const;
+ void GtkEnableEvents() const;