File: joystick.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 (304 lines) | stat: -rw-r--r-- 8,067 bytes parent folder | download | duplicates (3)
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
\section{\class{wxJoystick}}\label{wxjoystick}

wxJoystick allows an application to control one or more joysticks.

\wxheading{Derived from}

\helpref{wxObject}{wxobject}

\wxheading{Include files}

<wx/joystick.h>

\wxheading{See also}

\helpref{wxJoystickEvent}{wxjoystickevent}

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

\membersection{wxJoystick::wxJoystick}\label{wxjoystickctor}

\func{}{wxJoystick}{\param{int}{ joystick = wxJOYSTICK1}}

Constructor. {\it joystick} may be one of wxJOYSTICK1, wxJOYSTICK2, indicating the joystick
controller of interest.

\membersection{wxJoystick::\destruct{wxJoystick}}\label{wxjoystickdtor}

\func{}{\destruct{wxJoystick}}{\void}

Destroys the wxJoystick object.

\membersection{wxJoystick::GetButtonState}\label{wxjoystickgetbuttonstate}

\constfunc{int}{GetButtonState}{\void}

Returns the state of the joystick buttons. Every button is mapped to a single
bit in the returned integer, with the first button being mapped to the least
significant bit, and so on.
A bitlist of wxJOY\_BUTTONn identifiers, where n is 1, 2, 3 or 4 
is available for historical reasons.

\membersection{wxJoystick::GetManufacturerId}\label{wxjoystickgetmanufacturerid}

\constfunc{int}{GetManufacturerId}{\void}

Returns the manufacturer id.

\membersection{wxJoystick::GetMovementThreshold}\label{wxjoystickgetmovementthreshold}

\constfunc{int}{GetMovementThreshold}{\void}

Returns the movement threshold, the number of steps outside which the joystick is deemed to have
moved.

\membersection{wxJoystick::GetNumberAxes}\label{wxjoystickgetnumberaxes}

\constfunc{int}{GetNumberAxes}{\void}

Returns the number of axes for this joystick.

\membersection{wxJoystick::GetNumberButtons}\label{wxjoystickgetnumberbuttons}

\constfunc{int}{GetNumberButtons}{\void}

Returns the number of buttons for this joystick.

\membersection{wxJoystick::GetNumberJoysticks}\label{wxjoystickgetnumberjoysticks}

\func{static int}{GetNumberJoysticks}{\void}

Returns the number of joysticks currently attached to the computer.

\membersection{wxJoystick::GetPollingMax}\label{wxjoystickgetpollingmax}

\constfunc{int}{GetPollingMax}{\void}

Returns the maximum polling frequency.

\membersection{wxJoystick::GetPollingMin}\label{wxjoystickgetpollingmin}

\constfunc{int}{GetPollingMin}{\void}

Returns the minimum polling frequency.

\membersection{wxJoystick::GetProductId}\label{wxjoystickgetproductid}

\constfunc{int}{GetProductId}{\void}

Returns the product id for the joystick.

\membersection{wxJoystick::GetProductName}\label{wxjoystickgetproductname}

\constfunc{wxString}{GetProductName}{\void}

Returns the product name for the joystick.

\membersection{wxJoystick::GetPosition}\label{wxjoystickgetposition}

\constfunc{wxPoint}{GetPosition}{\void}

Returns the x, y position of the joystick.

\membersection{wxJoystick::GetPOVPosition}\label{wxjoystickgetpovposition}

\constfunc{int}{GetPOVPosition}{\void}

Returns the point-of-view position, expressed in continuous, one-hundredth of a degree units,
but limited to return 0, 9000, 18000 or 27000.
Returns -1 on error.

\membersection{wxJoystick::GetPOVCTSPosition}\label{wxjoystickgetpovctsposition}

\constfunc{int}{GetPOVCTSPosition}{\void}

Returns the point-of-view position, expressed in continuous, one-hundredth of a degree units.
Returns -1 on error.

\membersection{wxJoystick::GetRudderMax}\label{wxjoystickgetruddermax}

\constfunc{int}{GetRudderMax}{\void}

Returns the maximum rudder position.

\membersection{wxJoystick::GetRudderMin}\label{wxjoystickgetruddermin}

\constfunc{int}{GetRudderMin}{\void}

Returns the minimum rudder position.

\membersection{wxJoystick::GetRudderPosition}\label{wxjoystickgetrudderposition}

\constfunc{int}{GetRudderPosition}{\void}

Returns the rudder position.

\membersection{wxJoystick::GetUMax}\label{wxjoystickgetumax}

\constfunc{int}{GetUMax}{\void}

Returns the maximum U position.

\membersection{wxJoystick::GetUMin}\label{wxjoystickgetumin}

\constfunc{int}{GetUMin}{\void}

Returns the minimum U position.

\membersection{wxJoystick::GetUPosition}\label{wxjoystickgetuposition}

\constfunc{int}{GetUPosition}{\void}

Gets the position of the fifth axis of the joystick, if it exists.

\membersection{wxJoystick::GetVMax}\label{wxjoystickgetvmax}

\constfunc{int}{GetVMax}{\void}

Returns the maximum V position.

\membersection{wxJoystick::GetVMin}\label{wxjoystickgetvmin}

\constfunc{int}{GetVMin}{\void}

Returns the minimum V position.

\membersection{wxJoystick::GetVPosition}\label{wxjoystickgetvposition}

\constfunc{int}{GetVPosition}{\void}

Gets the position of the sixth axis of the joystick, if it exists.

\membersection{wxJoystick::GetXMax}\label{wxjoystickgetxmax}

\constfunc{int}{GetXMax}{\void}

Returns the maximum x position.

\membersection{wxJoystick::GetXMin}\label{wxjoystickgetxmin}

\constfunc{int}{GetXMin}{\void}

Returns the minimum x position.

\membersection{wxJoystick::GetYMax}\label{wxjoystickgetymax}

\constfunc{int}{GetYMax}{\void}

Returns the maximum y position.

\membersection{wxJoystick::GetYMin}\label{wxjoystickgetymin}

\constfunc{int}{GetYMin}{\void}

Returns the minimum y position.

\membersection{wxJoystick::GetZMax}\label{wxjoystickgetzmax}

\constfunc{int}{GetZMax}{\void}

Returns the maximum z position.

\membersection{wxJoystick::GetZMin}\label{wxjoystickgetzmin}

\constfunc{int}{GetZMin}{\void}

Returns the minimum z position.

\membersection{wxJoystick::GetZPosition}\label{wxjoystickgetzposition}

\constfunc{int}{GetZPosition}{\void}

Returns the z position of the joystick.

\membersection{wxJoystick::HasPOV}\label{wxjoystickhaspov}

\constfunc{bool}{HasPOV}{\void}

Returns true if the joystick has a point of view control.

\membersection{wxJoystick::HasPOV4Dir}\label{wxjoystickhaspovfdir}

\constfunc{bool}{HasPOV4Dir}{\void}

Returns true if the joystick point-of-view supports discrete values (centered, forward, backward, left, and right).

\membersection{wxJoystick::HasPOVCTS}\label{wxjoystickhaspovcts}

\constfunc{bool}{HasPOVCTS}{\void}

Returns true if the joystick point-of-view supports continuous degree bearings.

\membersection{wxJoystick::HasRudder}\label{wxjoystickhasrudder}

\constfunc{bool}{HasRudder}{\void}

Returns true if there is a rudder attached to the computer.

\membersection{wxJoystick::HasU}\label{wxjoystickhasu}

\constfunc{bool}{HasU}{\void}

Returns true if the joystick has a U axis.

\membersection{wxJoystick::HasV}\label{wxjoystickhasv}

\constfunc{bool}{HasV}{\void}

Returns true if the joystick has a V axis.

\membersection{wxJoystick::HasZ}\label{wxjoystickhasz}

\constfunc{bool}{HasZ}{\void}

Returns true if the joystick has a Z axis.

\membersection{wxJoystick::IsOk}\label{wxjoystickisok}

\constfunc{bool}{IsOk}{\void}

Returns true if the joystick is functioning.

\membersection{wxJoystick::ReleaseCapture}\label{wxjoystickreleasecapture}

\func{bool}{ReleaseCapture}{\void}

Releases the capture set by {\bf SetCapture}.

\wxheading{Return value}

true if the capture release succeeded.

\wxheading{See also}

\helpref{wxJoystick::SetCapture}{wxjoysticksetcapture}, \helpref{wxJoystickEvent}{wxjoystickevent}

\membersection{wxJoystick::SetCapture}\label{wxjoysticksetcapture}

\func{bool}{SetCapture}{\param{wxWindow*}{ win}, \param{int}{ pollingFreq = 0}}

Sets the capture to direct joystick events to {\it win}.

\wxheading{Parameters}

\docparam{win}{The window that will receive joystick events.}

\docparam{pollingFreq}{If zero, movement events are sent when above the
threshold. If greater than zero, events are received every {\it pollingFreq} milliseconds.}

\wxheading{Return value}

true if the capture succeeded.

\wxheading{See also}

\helpref{wxJoystick::ReleaseCapture}{wxjoystickreleasecapture}, \helpref{wxJoystickEvent}{wxjoystickevent}

\membersection{wxJoystick::SetMovementThreshold}\label{wxjoysticksetmovementthreshold}

\func{void}{SetMovementThreshold}{\param{int}{ threshold}}

Sets the movement threshold, the number of steps outside which the joystick is deemed to have
moved.