]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/generic/spinctrg.h
automated ifacecheck fixes
[wxWidgets.git] / interface / wx / generic / spinctrg.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: spinctrg.h
3 // Purpose: interface of wxSpinCtrlDouble
4 // Author: wxWidgets team
5 // RCS-ID: $Id$
6 // Licence: wxWindows license
7 /////////////////////////////////////////////////////////////////////////////
8
9 /**
10 @class wxSpinCtrlDouble
11
12 wxSpinCtrlDouble combines wxTextCtrl and wxSpinButton in one control and
13 displays a real number. (wxSpinCtrl displays an integer.)
14
15 @beginStyleTable
16 @style{wxSP_ARROW_KEYS}
17 The user can use arrow keys to change the value.
18 @style{wxSP_WRAP}
19 The value wraps at the minimum and maximum.
20 @endStyleTable
21
22 @library{wxcore}
23 @category{ctrl}
24 @appearance{spinctrldouble.png}
25
26 @see wxSpinButton, wxSpinCtrl, wxControl
27 */
28 class wxSpinCtrlDouble : public wxControl
29 {
30 public:
31 /**
32 Default constructor.
33 */
34 wxSpinCtrlDouble();
35
36 /**
37 Constructor, creating and showing a spin control.
38
39 @param parent
40 Parent window. Must not be @NULL.
41 @param value
42 Default value (as text).
43 @param id
44 Window identifier. The value wxID_ANY indicates a default value.
45 @param pos
46 Window position. If wxDefaultPosition is specified then a default
47 position is chosen.
48 @param size
49 Window size. If wxDefaultSize is specified then a default size
50 is chosen.
51 @param style
52 Window style. See wxSpinButton.
53 @param min
54 Minimal value.
55 @param max
56 Maximal value.
57 @param initial
58 Initial value.
59 @param inc
60 Increment value.
61 @param name
62 Window name.
63
64 @see Create()
65 */
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"));
74
75 /**
76 Creation function called by the spin control constructor.
77 See wxSpinCtrlDouble() for details.
78 */
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");
86
87 /**
88 Gets the number of digits in the display.
89 */
90 unsigned int GetDigits() const;
91
92 /**
93 Gets the increment value.
94 */
95 double GetIncrement() const;
96
97 /**
98 Gets maximal allowable value.
99 */
100 double GetMax() const;
101
102 /**
103 Gets minimal allowable value.
104 */
105 double GetMin() const;
106
107 /**
108 Gets the value of the spin control.
109 */
110 double GetValue() const;
111
112 /**
113 Sets the number of digits in the display.
114 */
115 void SetDigits(unsigned int digits);
116
117 /**
118 Sets the increment value.
119 */
120 void SetIncrement(double inc);
121
122 /**
123 Sets range of allowable values.
124 */
125 void SetRange(double minVal, double maxVal);
126
127 /**
128 Sets the value of the spin control. Use the variant using double instead.
129 */
130 virtual void SetValue(const wxString& text);
131
132 /**
133 Sets the value of the spin control.
134 */
135 void SetValue(double value);
136 };
137