]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/joystick.tex
fix warning
[wxWidgets.git] / docs / latex / wx / joystick.tex
1 \section{\class{wxJoystick}}\label{wxjoystick}
2
3 wxJoystick allows an application to control one or more joysticks.
4
5 \wxheading{Derived from}
6
7 \helpref{wxObject}{wxobject}
8
9 \wxheading{Include files}
10
11 <wx/joystick.h>
12
13 \wxheading{See also}
14
15 \helpref{wxJoystickEvent}{wxjoystickevent}
16
17 \latexignore{\rtfignore{\wxheading{Members}}}
18
19 \membersection{wxJoystick::wxJoystick}\label{wxjoystickconstr}
20
21 \func{}{wxJoystick}{\param{int}{ joystick = wxJOYSTICK1}}
22
23 Constructor. {\it joystick} may be one of wxJOYSTICK1, wxJOYSTICK2, indicating the joystick
24 controller of interest.
25
26 \membersection{wxJoystick::\destruct{wxJoystick}}
27
28 \func{}{\destruct{wxJoystick}}{\void}
29
30 Destroys the wxJoystick object.
31
32 \membersection{wxJoystick::GetButtonState}\label{wxjoystickgetbuttonstate}
33
34 \constfunc{int}{GetButtonState}{\void}
35
36 Returns the state of the joystick buttons. Every button is mapped to a single
37 bit in the returned integer, with the first button being mapped to the least
38 significant bit, and so on.
39 A bitlist of wxJOY\_BUTTONn identifiers, where n is 1, 2, 3 or 4
40 is available for historical reasons.
41
42 \membersection{wxJoystick::GetManufacturerId}\label{wxjoystickgetmanufacturerid}
43
44 \constfunc{int}{GetManufacturerId}{\void}
45
46 Returns the manufacturer id.
47
48 \membersection{wxJoystick::GetMovementThreshold}\label{wxjoystickgetmovementthreshold}
49
50 \constfunc{int}{GetMovementThreshold}{\void}
51
52 Returns the movement threshold, the number of steps outside which the joystick is deemed to have
53 moved.
54
55 \membersection{wxJoystick::GetNumberAxes}\label{wxjoystickgetnumberaxes}
56
57 \constfunc{int}{GetNumberAxes}{\void}
58
59 Returns the number of axes for this joystick.
60
61 \membersection{wxJoystick::GetNumberButtons}\label{wxjoystickgetnumberbuttons}
62
63 \constfunc{int}{GetNumberButtons}{\void}
64
65 Returns the number of buttons for this joystick.
66
67 \membersection{wxJoystick::GetNumberJoysticks}\label{wxjoystickgetnumberjoysticks}
68
69 \constfunc{int}{GetNumberJoysticks}{\void}
70
71 Returns the number of joysticks currently attached to the computer.
72
73 \membersection{wxJoystick::GetPollingMax}\label{wxjoystickgetpollingmax}
74
75 \constfunc{int}{GetPollingMax}{\void}
76
77 Returns the maximum polling frequency.
78
79 \membersection{wxJoystick::GetPollingMin}\label{wxjoystickgetpollingmin}
80
81 \constfunc{int}{GetPollingMin}{\void}
82
83 Returns the minimum polling frequency.
84
85 \membersection{wxJoystick::GetProductId}\label{wxjoystickgetproductid}
86
87 \constfunc{int}{GetProductId}{\void}
88
89 Returns the product id for the joystick.
90
91 \membersection{wxJoystick::GetProductName}\label{wxjoystickgetproductname}
92
93 \constfunc{wxString}{GetProductName}{\void}
94
95 Returns the product name for the joystick.
96
97 \membersection{wxJoystick::GetPosition}\label{wxjoystickgetposition}
98
99 \constfunc{wxPoint}{GetPosition}{\void}
100
101 Returns the x, y position of the joystick.
102
103 \membersection{wxJoystick::GetPOVPosition}\label{wxjoystickgetpovposition}
104
105 \constfunc{int}{GetPOVPosition}{\void}
106
107 Returns the point-of-view position, expressed in continuous, one-hundredth of a degree units,
108 but limited to return 0, 9000, 18000 or 27000.
109 Returns -1 on error.
110
111 \membersection{wxJoystick::GetPOVCTSPosition}\label{wxjoystickgetpovctsposition}
112
113 \constfunc{int}{GetPOVCTSPosition}{\void}
114
115 Returns the point-of-view position, expressed in continuous, one-hundredth of a degree units.
116 Returns -1 on error.
117
118 \membersection{wxJoystick::GetRudderMax}\label{wxjoystickgetruddermax}
119
120 \constfunc{int}{GetRudderMax}{\void}
121
122 Returns the maximum rudder position.
123
124 \membersection{wxJoystick::GetRudderMin}\label{wxjoystickgetruddermin}
125
126 \constfunc{int}{GetRudderMin}{\void}
127
128 Returns the minimum rudder position.
129
130 \membersection{wxJoystick::GetRudderPosition}\label{wxjoystickgetrudderposition}
131
132 \constfunc{int}{GetRudderPosition}{\void}
133
134 Returns the rudder position.
135
136 \membersection{wxJoystick::GetUMax}\label{wxjoystickgetumax}
137
138 \constfunc{int}{GetUMax}{\void}
139
140 Returns the maximum U position.
141
142 \membersection{wxJoystick::GetUMin}\label{wxjoystickgetumin}
143
144 \constfunc{int}{GetUMin}{\void}
145
146 Returns the minimum U position.
147
148 \membersection{wxJoystick::GetUPosition}\label{wxjoystickgetuposition}
149
150 \constfunc{int}{GetUPosition}{\void}
151
152 Gets the position of the fifth axis of the joystick, if it exists.
153
154 \membersection{wxJoystick::GetVMax}\label{wxjoystickgetvmax}
155
156 \constfunc{int}{GetVMax}{\void}
157
158 Returns the maximum V position.
159
160 \membersection{wxJoystick::GetVMin}\label{wxjoystickgetvmin}
161
162 \constfunc{int}{GetVMin}{\void}
163
164 Returns the minimum V position.
165
166 \membersection{wxJoystick::GetVPosition}\label{wxjoystickgetvposition}
167
168 \constfunc{int}{GetVPosition}{\void}
169
170 Gets the position of the sixth axis of the joystick, if it exists.
171
172 \membersection{wxJoystick::GetXMax}\label{wxjoystickgetxmax}
173
174 \constfunc{int}{GetXMax}{\void}
175
176 Returns the maximum x position.
177
178 \membersection{wxJoystick::GetXMin}\label{wxjoystickgetxmin}
179
180 \constfunc{int}{GetXMin}{\void}
181
182 Returns the minimum x position.
183
184 \membersection{wxJoystick::GetYMax}\label{wxjoystickgetymax}
185
186 \constfunc{int}{GetYMax}{\void}
187
188 Returns the maximum y position.
189
190 \membersection{wxJoystick::GetYMin}\label{wxjoystickgetymin}
191
192 \constfunc{int}{GetYMin}{\void}
193
194 Returns the minimum y position.
195
196 \membersection{wxJoystick::GetZMax}\label{wxjoystickgetzmax}
197
198 \constfunc{int}{GetZMax}{\void}
199
200 Returns the maximum z position.
201
202 \membersection{wxJoystick::GetZMin}\label{wxjoystickgetzmin}
203
204 \constfunc{int}{GetXMin}{\void}
205
206 Returns the minimum z position.
207
208 \membersection{wxJoystick::GetZPosition}\label{wxjoystickgetzposition}
209
210 \constfunc{int}{GetZPosition}{\void}
211
212 Returns the z position of the joystick.
213
214 \membersection{wxJoystick::HasPOV}\label{wxjoystickhaspov}
215
216 \constfunc{bool}{HasPOV}{\void}
217
218 Returns true if the joystick has a point of view control.
219
220 \membersection{wxJoystick::HasPOV4Dir}\label{wxjoystickhaspovfdir}
221
222 \constfunc{bool}{HasPOV4Dir}{\void}
223
224 Returns true if the joystick point-of-view supports discrete values (centered, forward, backward, left, and right).
225
226 \membersection{wxJoystick::HasPOVCTS}\label{wxjoystickhaspovcts}
227
228 \constfunc{bool}{HasPOVCTS}{\void}
229
230 Returns true if the joystick point-of-view supports continuous degree bearings.
231
232 \membersection{wxJoystick::HasRudder}\label{wxjoystickhasrudder}
233
234 \constfunc{bool}{HasRudder}{\void}
235
236 Returns true if there is a rudder attached to the computer.
237
238 \membersection{wxJoystick::HasU}\label{wxjoystickhasu}
239
240 \constfunc{bool}{HasU}{\void}
241
242 Returns true if the joystick has a U axis.
243
244 \membersection{wxJoystick::HasV}\label{wxjoystickhasv}
245
246 \constfunc{bool}{HasV}{\void}
247
248 Returns true if the joystick has a V axis.
249
250 \membersection{wxJoystick::HasZ}\label{wxjoystickhasz}
251
252 \constfunc{bool}{HasZ}{\void}
253
254 Returns true if the joystick has a Z axis.
255
256 \membersection{wxJoystick::IsOk}\label{wxjoystickisok}
257
258 \constfunc{bool}{IsOk}{\void}
259
260 Returns true if the joystick is functioning.
261
262 \membersection{wxJoystick::ReleaseCapture}\label{wxjoystickreleasecapture}
263
264 \func{bool}{ReleaseCapture}{\void}
265
266 Releases the capture set by {\bf SetCapture}.
267
268 \wxheading{Return value}
269
270 true if the capture release succeeded.
271
272 \wxheading{See also}
273
274 \helpref{wxJoystick::SetCapture}{wxjoysticksetcapture}, \helpref{wxJoystickEvent}{wxjoystickevent}
275
276 \membersection{wxJoystick::SetCapture}\label{wxjoysticksetcapture}
277
278 \func{bool}{SetCapture}{\param{wxWindow*}{ win}, \param{int}{ pollingFreq = 0}}
279
280 Sets the capture to direct joystick events to {\it win}.
281
282 \wxheading{Parameters}
283
284 \docparam{win}{The window that will receive joystick events.}
285
286 \docparam{pollingFreq}{If zero, movement events are sent when above the
287 threshold. If greater than zero, events are received every {\it pollingFreq} milliseconds.}
288
289 \wxheading{Return value}
290
291 true if the capture succeeded.
292
293 \wxheading{See also}
294
295 \helpref{wxJoystick::ReleaseCapture}{wxjoystickreleasecapture}, \helpref{wxJoystickEvent}{wxjoystickevent}
296
297 \membersection{wxJoystick::SetMovementThreshold}\label{wxjoysticksetmovementthreshold}
298
299 \func{void}{SetMovementThreshold}{\param{int}{ threshold}}
300
301 Sets the movement threshold, the number of steps outside which the joystick is deemed to have
302 moved.
303
304