File: slider.tex

package info (click to toggle)
wxwidgets2.8 2.8.10.1-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 239,052 kB
  • ctags: 289,550
  • sloc: cpp: 1,838,857; xml: 396,717; python: 282,506; ansic: 126,171; makefile: 51,406; sh: 14,581; asm: 299; sql: 258; lex: 194; perl: 139; yacc: 128; pascal: 95; php: 39; lisp: 38; tcl: 24; haskell: 20; java: 18; cs: 18; erlang: 17; ruby: 16; ada: 9; ml: 9; csh: 9
file content (359 lines) | stat: -rw-r--r-- 9,161 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
\section{\class{wxSlider}}\label{wxslider}

A slider is a control with a handle which can be pulled
back and forth to change the value.

On Windows, the track bar control is used.

Slider events are handled in the same way as a scrollbar.

\wxheading{Derived from}

\helpref{wxControl}{wxcontrol}\\
\helpref{wxWindow}{wxwindow}\\
\helpref{wxEvtHandler}{wxevthandler}\\
\helpref{wxObject}{wxobject}

\wxheading{Include files}

<wx/slider.h>

\wxheading{Window styles}

\twocolwidtha{5cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{\windowstyle{wxSL\_HORIZONTAL}}{Displays the slider horizontally (this is the default).}
\twocolitem{\windowstyle{wxSL\_VERTICAL}}{Displays the slider vertically.}
\twocolitem{\windowstyle{wxSL\_AUTOTICKS}}{Displays tick marks.}
\twocolitem{\windowstyle{wxSL\_LABELS}}{Displays minimum, maximum and value labels.}
\twocolitem{\windowstyle{wxSL\_LEFT}}{Displays ticks on the left and forces the slider to be vertical.}
\twocolitem{\windowstyle{wxSL\_RIGHT}}{Displays ticks on the right and forces the slider to be vertical.}
\twocolitem{\windowstyle{wxSL\_TOP}}{Displays ticks on the top.}
\twocolitem{\windowstyle{wxSL\_BOTTOM}}{Displays ticks on the bottom (this is the default).}
\twocolitem{\windowstyle{wxSL\_SELRANGE}}{Allows the user to select a range on the slider. Windows only.}
\twocolitem{\windowstyle{wxSL\_INVERSE}}{Inverses the mininum and maximum endpoints on the slider. Not compatible with wxSL\_SELRANGE.}
\end{twocollist}

See also \helpref{window styles overview}{windowstyles}.

\input scrolevt.inc

\wxheading{See also}

\helpref{Event handling overview}{eventhandlingoverview}, \helpref{wxScrollBar}{wxscrollbar}

\latexignore{\rtfignore{\wxheading{Members}}}

\membersection{wxSlider::wxSlider}\label{wxsliderctor}

\func{}{wxSlider}{\void}

Default slider.

\func{}{wxSlider}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{int }{value },\rtfsp
\param{int}{ minValue}, \param{int}{ maxValue},\rtfsp
\param{const wxPoint\& }{point = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
\param{long}{ style = wxSL\_HORIZONTAL},\rtfsp
\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
\param{const wxString\& }{name = ``slider"}}

Constructor, creating and showing a slider.

\wxheading{Parameters}

\docparam{parent}{Parent window. Must not be NULL.}

\docparam{id}{Window identifier. A value of -1 indicates a default value.}

\docparam{value}{Initial position for the slider.}

\docparam{minValue}{Minimum slider position.}

\docparam{maxValue}{Maximum slider position.}

\docparam{size}{Window size. If the default size (-1, -1) is specified then a default size is chosen.}

\docparam{style}{Window style. See \helpref{wxSlider}{wxslider}.}

\docparam{validator}{Window validator.}

\docparam{name}{Window name.}

\wxheading{See also}

\helpref{wxSlider::Create}{wxslidercreate}, \helpref{wxValidator}{wxvalidator}

\membersection{wxSlider::\destruct{wxSlider}}\label{wxsliderdtor}

\func{void}{\destruct{wxSlider}}{\void}

Destructor, destroying the slider.

\membersection{wxSlider::ClearSel}\label{wxsliderclearsel}

\func{void}{ClearSel}{\void}

Clears the selection, for a slider with the {\bf wxSL\_SELRANGE} style.

\wxheading{Remarks}

Windows 95 only.

\membersection{wxSlider::ClearTicks}\label{wxsliderclearticks}

\func{void}{ClearTicks}{\void}

Clears the ticks.

\wxheading{Remarks}

Windows 95 only.

\membersection{wxSlider::Create}\label{wxslidercreate}

\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id}, \param{int }{value },\rtfsp
\param{int}{ minValue}, \param{int}{ maxValue},\rtfsp
\param{const wxPoint\& }{point = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize},\rtfsp
\param{long}{ style = wxSL\_HORIZONTAL},\rtfsp
\param{const wxValidator\& }{validator = wxDefaultValidator},\rtfsp
\param{const wxString\& }{name = ``slider"}}

Used for two-step slider construction. See \helpref{wxSlider::wxSlider}{wxsliderctor}\rtfsp
for further details.

\membersection{wxSlider::GetLineSize}\label{wxslidergetlinesize}

\constfunc{int}{GetLineSize}{\void}

Returns the line size.

\wxheading{See also}

\helpref{wxSlider::SetLineSize}{wxslidersetlinesize}

\membersection{wxSlider::GetMax}\label{wxslidergetmax}

\constfunc{int}{GetMax}{\void}

Gets the maximum slider value.

\wxheading{See also}

\helpref{wxSlider::GetMin}{wxslidergetmin}, \helpref{wxSlider::SetRange}{wxslidersetrange}

\membersection{wxSlider::GetMin}\label{wxslidergetmin}

\constfunc{int}{GetMin}{\void}

Gets the minimum slider value.

\wxheading{See also}

\helpref{wxSlider::GetMin}{wxslidergetmin}, \helpref{wxSlider::SetRange}{wxslidersetrange}

\membersection{wxSlider::GetPageSize}\label{wxslidergetpagesize}

\constfunc{int}{GetPageSize}{\void}

Returns the page size.

\wxheading{See also}

\helpref{wxSlider::SetPageSize}{wxslidersetpagesize}

\membersection{wxSlider::GetSelEnd}\label{wxslidergetselend}

\constfunc{int}{GetSelEnd}{\void}

Returns the selection end point.

\wxheading{Remarks}

Windows 95 only.

\wxheading{See also}

\helpref{wxSlider::GetSelStart}{wxslidergetselstart}, \helpref{wxSlider::SetSelection}{wxslidersetselection}

\membersection{wxSlider::GetSelStart}\label{wxslidergetselstart}

\constfunc{int}{GetSelStart}{\void}

Returns the selection start point.

\wxheading{Remarks}

Windows 95 only.

\wxheading{See also}

\helpref{wxSlider::GetSelEnd}{wxslidergetselend}, \helpref{wxSlider::SetSelection}{wxslidersetselection}

\membersection{wxSlider::GetThumbLength}\label{wxslidergetthumblength}

\constfunc{int}{GetThumbLength}{\void}

Returns the thumb length.

\wxheading{Remarks}

Windows 95 only.

\wxheading{See also}

\helpref{wxSlider::SetThumbLength}{wxslidersetthumblength}

\membersection{wxSlider::GetTickFreq}\label{wxslidergettickfreq}

\constfunc{int}{GetTickFreq}{\void}

Returns the tick frequency.

\wxheading{Remarks}

Windows 95 only.

\wxheading{See also}

\helpref{wxSlider::SetTickFreq}{wxslidersettickfreq}

\membersection{wxSlider::GetValue}\label{wxslidergetvalue}

\constfunc{int}{GetValue}{\void}

Gets the current slider value.

\wxheading{See also}

\helpref{wxSlider::GetMin}{wxslidergetmin}, \helpref{wxSlider::GetMax}{wxslidergetmax},\rtfsp
\helpref{wxSlider::SetValue}{wxslidersetvalue}

\membersection{wxSlider::SetLineSize}\label{wxslidersetlinesize}

\func{void}{SetLineSize}{\param{int }{lineSize}}

Sets the line size for the slider.

\wxheading{Parameters}

\docparam{lineSize}{The number of steps the slider moves when the user moves it up or down a line.}

\wxheading{See also}

\helpref{wxSlider::GetLineSize}{wxslidergetlinesize}

\membersection{wxSlider::SetPageSize}\label{wxslidersetpagesize}

\func{void}{SetPageSize}{\param{int }{pageSize}}

Sets the page size for the slider.

\wxheading{Parameters}

\docparam{pageSize}{The number of steps the slider moves when the user pages up or down.}

\wxheading{See also}

\helpref{wxSlider::GetPageSize}{wxslidergetpagesize}

\membersection{wxSlider::SetRange}\label{wxslidersetrange}

\func{void}{SetRange}{\param{int}{ minValue}, \param{int}{ maxValue}}

Sets the minimum and maximum slider values.

\wxheading{See also}

\helpref{wxSlider::GetMin}{wxslidergetmin}, \helpref{wxSlider::GetMax}{wxslidergetmax}

\membersection{wxSlider::SetSelection}\label{wxslidersetselection}

\func{void}{SetSelection}{\param{int }{startPos}, \param{int }{endPos}}

Sets the selection.

\wxheading{Parameters}

\docparam{startPos}{The selection start position.}

\docparam{endPos}{The selection end position.}

\wxheading{Remarks}

Windows 95 only.

\wxheading{See also}

\helpref{wxSlider::GetSelStart}{wxslidergetselstart}, \helpref{wxSlider::GetSelEnd}{wxslidergetselend}

\membersection{wxSlider::SetThumbLength}\label{wxslidersetthumblength}

\func{void}{SetThumbLength}{\param{int }{len}}

Sets the slider thumb length.

\wxheading{Parameters}

\docparam{len}{The thumb length.}

\wxheading{Remarks}

Windows 95 only.

\wxheading{See also}

\helpref{wxSlider::GetThumbLength}{wxslidergetthumblength}

\membersection{wxSlider::SetTick}\label{wxslidersettick}

\func{void}{SetTick}{\param{int}{ tickPos}}

Sets a tick position.

\wxheading{Parameters}

\docparam{tickPos}{The tick position.}

\wxheading{Remarks}

Windows 95 only.

\wxheading{See also}

\helpref{wxSlider::SetTickFreq}{wxslidersettickfreq}

\membersection{wxSlider::SetTickFreq}\label{wxslidersettickfreq}

\func{void}{SetTickFreq}{\param{int }{n}, \param{int }{pos}}

Sets the tick mark frequency and position.

\wxheading{Parameters}

\docparam{n}{Frequency. For example, if the frequency is set to two, a tick mark is displayed for
every other increment in the slider's range.}

\docparam{pos}{Position. Must be greater than zero. TODO: what is this for?}

\wxheading{Remarks}

Windows 95 only.

\wxheading{See also}

\helpref{wxSlider::GetTickFreq}{wxslidergettickfreq}

\membersection{wxSlider::SetValue}\label{wxslidersetvalue}

\func{void}{SetValue}{\param{int}{ value}}

Sets the slider position.

\wxheading{Parameters}

\docparam{value}{The slider position.}

\wxheading{See also}

\helpref{wxSlider::GetValue}{wxslidergetvalue}