]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/spinbutt.tex
added and documented wxDC::DrawCheckMark()
[wxWidgets.git] / docs / latex / wx / spinbutt.tex
CommitLineData
a660d684
KB
1\section{\class{wxSpinButton}}\label{wxspinbutton}
2
3A wxSpinButton has two small up and down (or left and right) arrow buttons. It is often
4used next to a text control for increment and decrementing a value.
5
6\wxheading{Derived from}
7
8\helpref{wxControl}{wxcontrol}\\
9\helpref{wxWindow}{wxwindow}\\
10\helpref{wxEvtHandler}{wxevthandler}\\
11\helpref{wxObject}{wxobject}
12
954b8ae6
JS
13\wxheading{Include files}
14
15<wx/spinbutt.h>
16
a660d684
KB
17\wxheading{Window styles}
18
19\twocolwidtha{5cm}
20\begin{twocollist}\itemsep=0pt
21\twocolitem{\windowstyle{wxSP\_HORIZONTAL}}{Specifies a horizontal spin button.}
22\twocolitem{\windowstyle{wxSP\_VERTICAL}}{Specifies a vertical spin button.}
23\twocolitem{\windowstyle{wxSP\_ARROW\_KEYS}}{The user can use arrow keys.}
24\twocolitem{\windowstyle{wxSP\_WRAP}}{The value wraps at the minimum and maximum.}
25\end{twocollist}
26
27See also \helpref{window styles overview}{windowstyles}.
28
a660d684
KB
29\wxheading{Event handling}
30
31To process input from a spin button, use one of these event handler macros to direct input to member
32functions that take a \helpref{wxScrollEvent}{wxscrollevent} argument:
33
34\twocolwidtha{7cm}
35\begin{twocollist}
36\twocolitem{{\bf EVT\_SPIN(id, func)}}{Catch all scroll commands.}
e4628635
RR
37\twocolitem{{\bf EVT\_SPIN\_UP(id, func)}}{Catch up (or left) commands. Win32 only. }
38\twocolitem{{\bf EVT\_SPIN\_DOWN(id, func)}}{Catch down (or right) commands. Win32 only. }
a660d684
KB
39\twocolitem{{\bf EVT\_COMMAND\_TOP(id, func)}}{Catch a command to put the scroll thumb at the maximum position.}
40\twocolitem{{\bf EVT\_COMMAND\_SCROLL(id, func)}}{Catch all scroll commands.}
41\twocolitem{{\bf EVT\_COMMAND\_TOP(id, func)}}{Catch a command to put the scroll thumb at the maximum position.}
42\twocolitem{{\bf EVT\_COMMAND\_BOTTOM(id, func)}}{Catch a command to put the scroll thumb at the maximum position.}
43\twocolitem{{\bf EVT\_COMMAND\_LINEUP(id, func)}}{Catch a line up command.}
44\twocolitem{{\bf EVT\_COMMAND\_LINEDOWN(id, func)}}{Catch a line down command.}
45\twocolitem{{\bf EVT\_COMMAND\_PAGEUP(id, func)}}{Catch a page up command.}
46\twocolitem{{\bf EVT\_COMMAND\_PAGEDOWN(id, func)}}{Catch a page down command.}
47\twocolitem{{\bf EVT\_COMMAND\_THUMBTRACK(id, func)}}{Catch a thumbtrack command (continuous movement of the scroll thumb).}
48\end{twocollist}%
49
50\wxheading{See also}
51
52\helpref{Event handling overview}{eventhandlingoverview}
53
54\latexignore{\rtfignore{\wxheading{Members}}}
55
56\membersection{wxSpinButton::wxSpinButton}\label{wxspinbuttonconstr}
57
58\func{}{wxSpinButton}{\void}
59
60Default constructor.
61
eaaa6a06 62\func{}{wxSpinButton}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp
a660d684 63\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
eaaa6a06 64\param{long}{ style = wxSP\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
a660d684
KB
65\param{const wxString\& }{name = ``spinButton"}}
66
67Constructor, creating and showing a spin button.
68
69\wxheading{Parameters}
70
71\docparam{parent}{Parent window. Must not be NULL.}
72
73\docparam{id}{Window identifier. A value of -1 indicates a default value.}
74
75\docparam{pos}{Window position. If the position (-1, -1) is specified then a default position is chosen.}
76
77\docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.}
78
79\docparam{style}{Window style. See \helpref{wxSpinButton}{wxspinbutton}.}
80
81\docparam{validator}{Window validator.}
82
83\docparam{name}{Window name.}
84
85\wxheading{See also}
86
87\helpref{wxSpinButton::Create}{wxspinbuttoncreate}, \helpref{wxValidator}{wxvalidator}
88
89\membersection{wxSpinButton::\destruct{wxSpinButton}}
90
91\func{void}{\destruct{wxSpinButton}}{\void}
92
93Destructor, destroying the spin button.
94
95\membersection{wxSpinButton::Create}\label{wxspinbuttoncreate}
96
eaaa6a06 97\func{bool}{Create}{\param{wxWindow*}{ parent}, \param{wxWindowID }{id},\rtfsp
a660d684 98\param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
eaaa6a06 99\param{long}{ style = wxSP\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
a660d684
KB
100\param{const wxString\& }{name = ``spinButton"}}
101
102Scrollbar creation function called by the spin button constructor.
103See \helpref{wxSpinButton::wxSpinButton}{wxspinbuttonconstr} for details.
104
105\membersection{wxSpinButton::GetMax}\label{wxspinbuttongetmax}
106
107\constfunc{int}{GetMax}{\void}
108
109Returns the maximum permissable value.
110
111\wxheading{See also}
112
113\helpref{wxSpinButton::SetRange}{wxspinbuttonsetrange}
114
115\membersection{wxSpinButton::GetMin}\label{wxspinbuttongetmin}
116
117\constfunc{int}{GetMin}{\void}
118
119Returns the minimum permissable value.
120
121\wxheading{See also}
122
123\helpref{wxSpinButton::SetRange}{wxspinbuttonsetrange}
124
125\membersection{wxSpinButton::GetValue}\label{wxspinbuttongetvalue}
126
127\constfunc{int}{GetValue}{\void}
128
129Returns the current spin button value.
130
131\wxheading{See also}
132
133\helpref{wxSpinButton::SetValue}{wxspinbuttonsetvalue}
134
135\membersection{wxSpinButton::SetRange}\label{wxspinbuttonsetrange}
136
eaaa6a06 137\func{void}{SetRange}{\param{int}{ min}, \param{int}{ max}}
a660d684
KB
138
139Sets the range of the spin button.
140
141\wxheading{Parameters}
142
143\docparam{min}{The minimum value for the spin button.}
144
145\docparam{max}{The maximum value for the spin button.}
146
147\wxheading{See also}
148
149\helpref{wxSpinButton::GetMin}{wxspinbuttongetmin}, \helpref{wxSpinButton::GetMax}{wxspinbuttongetmax}
150
151\membersection{wxSpinButton::SetValue}\label{wxspinbuttonsetvalue}
152
eaaa6a06 153\func{void}{SetValue}{\param{int}{ value}}
a660d684
KB
154
155Sets the value of the spin button.
156
157\wxheading{Parameters}
158
159\docparam{value}{The value for the spin button.}
160
161\wxheading{See also}
162
163\helpref{wxSpinButton::GetValue}{wxspinbuttongetvalue}
164