+//-----------------------------------------------------------------------------
+// wxSpinCtrl - An integer valued spin control
+//-----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxSpinCtrl : public wxSpinCtrlGTKBase
+{
+public:
+ wxSpinCtrl() {}
+ wxSpinCtrl(wxWindow *parent,
+ wxWindowID id = wxID_ANY,
+ const wxString& value = wxEmptyString,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize,
+ long style = wxSP_ARROW_KEYS,
+ int min = 0, int max = 100, int initial = 0,
+ const wxString& name = _T("wxSpinCtrl"))
+ {
+ Create(parent, id, value, pos, size, style, min, max, initial, name);
+ }
+
+ 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,
+ int min = 0, int max = 100, int initial = 0,
+ const wxString& name = _T("wxSpinCtrl"))
+ {
+ return wxSpinCtrlGTKBase::Create(parent, id, value, pos, size, style, min, max, initial, 1, name);
+ }
+
+ // accessors
+ int GetValue() const { return int(DoGetValue() + 0.5); }
+ int GetMin() const { return int(DoGetMin() + 0.5); }
+ int GetMax() const { return int(DoGetMax() + 0.5); }
+ int GetIncrement() const { return int(DoGetIncrement() + 0.5); }
+
+ // operations
+ void SetValue(const wxString& value) { wxSpinCtrlGTKBase::SetValue(value); } // visibility problem w/ gcc
+ void SetValue( int value ) { DoSetValue(value); }
+ void SetRange( int minVal, int maxVal ) { DoSetRange(minVal, maxVal); }
+ void SetIncrement( double inc ) { DoSetIncrement(inc); }
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxSpinCtrl)
+};
+
+//-----------------------------------------------------------------------------
+// wxSpinCtrlDouble - a double valued spin control
+//-----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxSpinCtrlDouble : public wxSpinCtrlGTKBase
+{
+public:
+ wxSpinCtrlDouble() {}
+ wxSpinCtrlDouble(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("wxSpinCtrlDouble"))
+ {
+ Create(parent, id, value, pos, size, style, min, max, initial, inc, name);
+ }
+
+ 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("wxSpinCtrlDouble"))
+ {
+ return wxSpinCtrlGTKBase::Create(parent, id, value, pos, size, style, min, max, initial, inc, name);
+ }
+
+ // accessors
+ double GetValue() const { return DoGetValue(); }
+ double GetMin() const { return DoGetMin(); }
+ double GetMax() const { return DoGetMax(); }
+ double GetIncrement() const { return DoGetIncrement(); }
+ unsigned GetDigits() const;
+
+ // operations
+ void SetValue(const wxString& value) { wxSpinCtrlGTKBase::SetValue(value); } // visibility problem w/ gcc
+ void SetValue(double value) { DoSetValue(value); }
+ void SetRange(double minVal, double maxVal) { DoSetRange(minVal, maxVal); }
+ void SetIncrement(double inc) { DoSetIncrement(inc); }
+ void SetDigits(unsigned digits);
+
+private:
+ DECLARE_DYNAMIC_CLASS(wxSpinCtrlDouble)
+};
+