]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/gauge.tex
more LaTeX error fixes
[wxWidgets.git] / docs / latex / wx / gauge.tex
CommitLineData
a660d684
KB
1\section{\class{wxGauge}}\label{wxgauge}
2
3A gauge is a horizontal or vertical bar which shows a quantity (often time).
23ac7605
RR
4
5wxGauge supports two working modes: determinate and indeterminate progress.
6
7The first is the usual working mode (see \helpref{SetValue}{wxgaugesetvalue}
8and \helpref{SetRange}{wxgaugesetrange}) while the second can be used when
9the program is doing some processing but you don't know how much progress is
10being done.
11In this case, you can periodically call the \helpref{Pulse}{wxgaugepulse}
12function to make the progress bar switch to indeterminate mode (graphically
13it's usually a set of blocks which move or bounce in the bar control).
14
15wxGauge supports dynamic switch between these two work modes.
16
a660d684
KB
17There are no user commands for the gauge.
18
19\wxheading{Derived from}
20
21\helpref{wxControl}{wxcontrol}\\
22\helpref{wxWindow}{wxwindow}\\
9dff4182 23\helpref{wxEvtHandler}{wxevthandler}\\
a660d684
KB
24\helpref{wxObject}{wxobject}
25
954b8ae6
JS
26\wxheading{Include files}
27
28<wx/gauge.h>
29
a7af285d
VZ
30\wxheading{Library}
31
32\helpref{wxCore}{librarieslist}
33
a660d684
KB
34\wxheading{Window styles}
35
36\twocolwidtha{5cm}
37\begin{twocollist}\itemsep=0pt
38\twocolitem{\windowstyle{wxGA\_HORIZONTAL}}{Creates a horizontal gauge.}
39\twocolitem{\windowstyle{wxGA\_VERTICAL}}{Creates a vertical gauge.}
0a4e3323
VZ
40%\twocolitem{\windowstyle{wxGA\_PROGRESSBAR}}{Obsolete, doesn't do anything any more}
41\twocolitem{\windowstyle{wxGA\_SMOOTH}}{Creates smooth progress bar with one pixel wide update step (not supported by all platforms).}
a660d684
KB
42\end{twocollist}
43
44See also \helpref{window styles overview}{windowstyles}.
45
5de76427
JS
46\wxheading{Event handling}
47
48wxGauge is read-only so generates no events.
49
a660d684
KB
50\wxheading{See also}
51
52\helpref{wxSlider}{wxslider}, \helpref{wxScrollBar}{wxscrollbar}
53
54\latexignore{\rtfignore{\wxheading{Members}}}
55
0a4e3323 56
f0e8a2d0 57\membersection{wxGauge::wxGauge}\label{wxgaugector}
a660d684
KB
58
59\func{}{wxGauge}{\void}
60
61Default constructor.
62
eaaa6a06
JS
63\func{}{wxGauge}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp
64\param{int}{ range}, \param{const wxPoint\& }{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
65\param{long}{ style = wxGA\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``gauge"}}
a660d684
KB
66
67Constructor, creating and showing a gauge.
68
69\wxheading{Parameters}
70
71\docparam{parent}{Window parent.}
72
73\docparam{id}{Window identifier.}
74
23ac7605 75\docparam{range}{Integer range (maximum value) of the gauge. It is ignored when the gauge is used in indeterminate mode.}
a660d684
KB
76
77\docparam{pos}{Window position.}
78
79\docparam{size}{Window size.}
80
81\docparam{style}{Gauge style. See \helpref{wxGauge}{wxgauge}.}
82
83\docparam{name}{Window name.}
84
a660d684
KB
85\wxheading{See also}
86
87\helpref{wxGauge::Create}{wxgaugecreate}
88
0a4e3323 89
f0e8a2d0 90\membersection{wxGauge::\destruct{wxGauge}}\label{wxgaugedtor}
a660d684
KB
91
92\func{}{\destruct{wxGauge}}{\void}
93
94Destructor, destroying the gauge.
95
0a4e3323 96
a660d684
KB
97\membersection{wxGauge::Create}\label{wxgaugecreate}
98
eaaa6a06
JS
99\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id},\rtfsp
100\param{int}{ range}, \param{const wxPoint\& }{ pos = wxDefaultPosition}, \param{const wxSize\&}{ size = wxDefaultSize},\rtfsp
101\param{long}{ style = wxGA\_HORIZONTAL}, \param{const wxValidator\& }{validator = wxDefaultValidator}, \param{const wxString\& }{name = ``gauge"}}
a660d684 102
f0e8a2d0 103Creates the gauge for two-step construction. See \helpref{wxGauge::wxGauge}{wxgaugector}\rtfsp
a660d684
KB
104for further details.
105
0a4e3323 106
a660d684
KB
107\membersection{wxGauge::GetBezelFace}\label{wxgaugegetbezelface}
108
109\constfunc{int}{GetBezelFace}{\void}
110
111Returns the width of the 3D bezel face.
112
113\wxheading{Remarks}
114
0a4e3323 115This method is not implemented (returns $0$) for most platforms.
a660d684
KB
116
117\wxheading{See also}
118
119\helpref{wxGauge::SetBezelFace}{wxgaugesetbezelface}
120
0a4e3323 121
a660d684
KB
122\membersection{wxGauge::GetRange}\label{wxgaugegetrange}
123
124\constfunc{int}{GetRange}{\void}
125
126Returns the maximum position of the gauge.
127
128\wxheading{See also}
129
130\helpref{wxGauge::SetRange}{wxgaugesetrange}
131
0a4e3323 132
a660d684
KB
133\membersection{wxGauge::GetShadowWidth}\label{wxgaugegetshadowwidth}
134
135\constfunc{int}{GetShadowWidth}{\void}
136
137Returns the 3D shadow margin width.
138
139\wxheading{Remarks}
140
0a4e3323 141This method is not implemented (returns $0$) for most platforms.
a660d684
KB
142
143\wxheading{See also}
144
145\helpref{wxGauge::SetShadowWidth}{wxgaugesetshadowwidth}
146
0a4e3323 147
a660d684
KB
148\membersection{wxGauge::GetValue}\label{wxgaugegetvalue}
149
150\constfunc{int}{GetValue}{\void}
151
152Returns the current position of the gauge.
153
154\wxheading{See also}
155
156\helpref{wxGauge::SetValue}{wxgaugesetvalue}
157
0a4e3323
VZ
158
159\membersection{wxGauge::IsVertical}\label{wxgaugeisvertical}
160
161\constfunc{bool}{IsVertical}{\void}
162
163Returns \true if the gauge is vertical (has \texttt{wxGA\_VERTICAL} style) and
164\false otherwise.
165
166
a660d684
KB
167\membersection{wxGauge::SetBezelFace}\label{wxgaugesetbezelface}
168
eaaa6a06 169\func{void}{SetBezelFace}{\param{int }{width}}
a660d684
KB
170
171Sets the 3D bezel face width.
172
173\wxheading{Remarks}
174
0a4e3323 175This method is not implemented (doesn't do anything) for most platforms.
a660d684
KB
176
177\wxheading{See also}
178
179\helpref{wxGauge::GetBezelFace}{wxgaugegetbezelface}
180
0a4e3323 181
a660d684
KB
182\membersection{wxGauge::SetRange}\label{wxgaugesetrange}
183
eaaa6a06 184\func{void}{SetRange}{\param{int }{range}}
a660d684
KB
185
186Sets the range (maximum value) of the gauge.
23ac7605 187This function makes the gauge switch to determinate mode, if it's not already.
a660d684
KB
188
189\wxheading{See also}
190
191\helpref{wxGauge::GetRange}{wxgaugegetrange}
192
0a4e3323 193
a660d684
KB
194\membersection{wxGauge::SetShadowWidth}\label{wxgaugesetshadowwidth}
195
eaaa6a06 196\func{void}{SetShadowWidth}{\param{int }{width}}
a660d684
KB
197
198Sets the 3D shadow width.
199
200\wxheading{Remarks}
201
0a4e3323
VZ
202This method is not implemented (doesn't do anything) for most platforms.
203
a660d684
KB
204
205\membersection{wxGauge::SetValue}\label{wxgaugesetvalue}
206
eaaa6a06 207\func{void}{SetValue}{\param{int }{pos}}
a660d684 208
0836334e
VZ
209Sets the position of the gauge. The \arg{pos} must be between $0$ and the gauge
210range as returned by \helpref{GetRange}{wxgaugegetrange}, inclusive.
211
212This function makes the gauge switch to determinate mode, if it was in
213indeterminate mode before.
a660d684
KB
214
215\wxheading{Parameters}
216
217\docparam{pos}{Position for the gauge level.}
218
219\wxheading{See also}
220
221\helpref{wxGauge::GetValue}{wxgaugegetvalue}
222
223
23ac7605
RR
224\membersection{wxGauge::Pulse}\label{wxgaugepulse}
225
226\func{void}{Pulse}{\void}
227
228Switch the gauge to indeterminate mode (if required) and makes the gauge move
229a bit to indicate the user that some progress has been made.
230
231Note that after calling this function the value returned by \helpref{GetValue}{wxgaugegetvalue}
232is undefined and thus you need to explicitely call \helpref{SetValue}{wxgaugesetvalue} if you
233want to restore the determinate mode.
b67a86d5 234