]>
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{spinctrldouble.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.
47 If ::wxDefaultPosition is specified then a default position is chosen.
50 If ::wxDefaultSize is specified then a default size is chosen.
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
= wxT("wxSpinCtrlDouble"));
76 Creation function called by the spin control constructor.
77 See wxSpinCtrlDouble() for details.
79 bool Create(wxWindow
* parent
, wxWindowID id
= wxID_ANY
,
80 const wxString
& value
= wxEmptyString
,
81 const wxPoint
& pos
= wxDefaultPosition
,
82 const wxSize
& size
= wxDefaultSize
,
83 long style
= wxSP_ARROW_KEYS
, double min
= 0, double max
= 100,
84 double initial
= 0, double inc
= 1,
85 const wxString
& name
= "wxSpinCtrlDouble");
88 Gets the number of digits in the display.
90 unsigned int GetDigits() const;
93 Gets the increment value.
95 double GetIncrement() const;
98 Gets maximal allowable value.
100 double GetMax() const;
103 Gets minimal allowable value.
105 double GetMin() const;
108 Gets the value of the spin control.
110 double GetValue() const;
113 Sets the number of digits in the display.
115 void SetDigits(unsigned int digits
);
118 Sets the increment value.
120 void SetIncrement(double inc
);
123 Sets range of allowable values.
125 void SetRange(double minVal
, double maxVal
);
128 Sets the value of the spin control. Use the variant using double instead.
130 virtual void SetValue(const wxString
& text
);
133 Sets the value of the spin control.
135 void SetValue(double value
);