]> git.saurik.com Git - wxWidgets.git/blame - interface/wx/generic/spinctrg.h
add support for loading wxListCtrl items and wxImageLists from XRC (closes #10647)
[wxWidgets.git] / interface / wx / generic / spinctrg.h
CommitLineData
42561c3c
VZ
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}
a946542e 24 @appearance{spinctrldouble.png}
42561c3c
VZ
25
26 @see wxSpinButton, wxSpinCtrl, wxControl
27*/
28class wxSpinCtrlDouble : public wxControl
29{
30public:
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
dc1b07fd
FM
46 Window position.
47 If ::wxDefaultPosition is specified then a default position is chosen.
42561c3c 48 @param size
dc1b07fd
FM
49 Window size.
50 If ::wxDefaultSize is specified then a default size is chosen.
42561c3c
VZ
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 */
5267aefd 79 bool Create(wxWindow* parent, wxWindowID id = wxID_ANY,
42561c3c
VZ
80 const wxString& value = wxEmptyString,
81 const wxPoint& pos = wxDefaultPosition,
82 const wxSize& size = wxDefaultSize,
5267aefd 83 long style = wxSP_ARROW_KEYS, double min = 0, double max = 100,
42561c3c 84 double initial = 0, double inc = 1,
5267aefd 85 const wxString& name = "wxSpinCtrlDouble");
42561c3c
VZ
86
87 /**
88 Gets the number of digits in the display.
89 */
5267aefd 90 unsigned int GetDigits() const;
42561c3c
VZ
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 */
5267aefd 115 void SetDigits(unsigned int digits);
42561c3c
VZ
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 */
adaaa686 130 virtual void SetValue(const wxString& text);
42561c3c
VZ
131
132 /**
133 Sets the value of the spin control.
134 */
135 void SetValue(double value);
136};
137