]>
git.saurik.com Git - wxWidgets.git/blob - interface/wx/generic/spinctrg.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: interface of wxSpinCtrlDouble
4 // Author: wxWidgets team
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
10 @class wxSpinCtrlDouble
12 wxSpinCtrlDouble combines wxTextCtrl and wxSpinButton in one control and
13 displays a real number. (wxSpinCtrl displays an integer.)
16 @style{wxSP_ARROW_KEYS}
17 The user can use arrow keys to change the value.
19 The value wraps at the minimum and maximum.
24 <!-- @appearance{spinctrd.png} -->
26 @see wxSpinButton, wxSpinCtrl, wxControl
28 class wxSpinCtrlDouble
: public wxControl
37 Constructor, creating and showing a spin control.
40 Parent window. Must not be @NULL.
42 Default value (as text).
44 Window identifier. The value wxID_ANY indicates a default value.
46 Window position. If wxDefaultPosition is specified then a default
49 Window size. If wxDefaultSize is specified then a default size
52 Window style. See wxSpinButton.
66 wxSpinCtrlDouble(wxWindow
* parent
, wxWindowID id
= -1,
67 const wxString
& value
= wxEmptyString
,
68 const wxPoint
& pos
= wxDefaultPosition
,
69 const wxSize
& size
= wxDefaultSize
,
70 long style
= wxSP_ARROW_KEYS
,
71 double min
= 0, double max
= 100,
72 double initial
= 0, double inc
= 1,
73 const wxString
& name
= _T("wxSpinCtrlDouble"));
76 Creation function called by the spin control constructor.
77 See wxSpinCtrlDouble() for details.
79 bool Create(wxWindow
* parent
, wxWindowID id
= -1,
80 const wxString
& value
= wxEmptyString
,
81 const wxPoint
& pos
= wxDefaultPosition
,
82 const wxSize
& size
= wxDefaultSize
,
83 long style
= wxSP_ARROW_KEYS
,
84 double min
= 0, double max
= 100,
85 double initial
= 0, double inc
= 1,
86 const wxString
& name
= _T("wxSpinCtrlDouble"));
89 Gets the number of digits in the display.
91 unsigned GetDigits() const;
94 Gets the increment value.
96 double GetIncrement() const;
99 Gets maximal allowable value.
101 double GetMax() const;
104 Gets minimal allowable value.
106 double GetMin() const;
109 Gets the value of the spin control.
111 double GetValue() const;
114 Sets the number of digits in the display.
116 void SetDigits(unsigned digits
);
119 Sets the increment value.
121 void SetIncrement(double inc
);
124 Sets range of allowable values.
126 void SetRange(double minVal
, double maxVal
);
129 Sets the value of the spin control. Use the variant using double instead.
131 virtual void SetValue(const wxString
& text
);
134 Sets the value of the spin control.
136 void SetValue(double value
);