]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/joystick.tex
Wine fixes
[wxWidgets.git] / docs / latex / wx / joystick.tex
... / ...
CommitLineData
1\section{\class{wxJoystick}}\label{wxjoystick}
2
3wxJoystick 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{wxjoystickctor}
20
21\func{}{wxJoystick}{\param{int}{ joystick = wxJOYSTICK1}}
22
23Constructor. {\it joystick} may be one of wxJOYSTICK1, wxJOYSTICK2, indicating the joystick
24controller of interest.
25
26\membersection{wxJoystick::\destruct{wxJoystick}}\label{wxjoystickdtor}
27
28\func{}{\destruct{wxJoystick}}{\void}
29
30Destroys the wxJoystick object.
31
32\membersection{wxJoystick::GetButtonState}\label{wxjoystickgetbuttonstate}
33
34\constfunc{int}{GetButtonState}{\void}
35
36Returns the state of the joystick buttons. Every button is mapped to a single
37bit in the returned integer, with the first button being mapped to the least
38significant bit, and so on.
39A bitlist of wxJOY\_BUTTONn identifiers, where n is 1, 2, 3 or 4
40is available for historical reasons.
41
42\membersection{wxJoystick::GetManufacturerId}\label{wxjoystickgetmanufacturerid}
43
44\constfunc{int}{GetManufacturerId}{\void}
45
46Returns the manufacturer id.
47
48\membersection{wxJoystick::GetMovementThreshold}\label{wxjoystickgetmovementthreshold}
49
50\constfunc{int}{GetMovementThreshold}{\void}
51
52Returns the movement threshold, the number of steps outside which the joystick is deemed to have
53moved.
54
55\membersection{wxJoystick::GetNumberAxes}\label{wxjoystickgetnumberaxes}
56
57\constfunc{int}{GetNumberAxes}{\void}
58
59Returns the number of axes for this joystick.
60
61\membersection{wxJoystick::GetNumberButtons}\label{wxjoystickgetnumberbuttons}
62
63\constfunc{int}{GetNumberButtons}{\void}
64
65Returns the number of buttons for this joystick.
66
67\membersection{wxJoystick::GetNumberJoysticks}\label{wxjoystickgetnumberjoysticks}
68
69\func{static int}{GetNumberJoysticks}{\void}
70
71Returns the number of joysticks currently attached to the computer.
72
73\membersection{wxJoystick::GetPollingMax}\label{wxjoystickgetpollingmax}
74
75\constfunc{int}{GetPollingMax}{\void}
76
77Returns the maximum polling frequency.
78
79\membersection{wxJoystick::GetPollingMin}\label{wxjoystickgetpollingmin}
80
81\constfunc{int}{GetPollingMin}{\void}
82
83Returns the minimum polling frequency.
84
85\membersection{wxJoystick::GetProductId}\label{wxjoystickgetproductid}
86
87\constfunc{int}{GetProductId}{\void}
88
89Returns the product id for the joystick.
90
91\membersection{wxJoystick::GetProductName}\label{wxjoystickgetproductname}
92
93\constfunc{wxString}{GetProductName}{\void}
94
95Returns the product name for the joystick.
96
97\membersection{wxJoystick::GetPosition}\label{wxjoystickgetposition}
98
99\constfunc{wxPoint}{GetPosition}{\void}
100
101Returns the x, y position of the joystick.
102
103\membersection{wxJoystick::GetPOVPosition}\label{wxjoystickgetpovposition}
104
105\constfunc{int}{GetPOVPosition}{\void}
106
107Returns the point-of-view position, expressed in continuous, one-hundredth of a degree units,
108but limited to return 0, 9000, 18000 or 27000.
109Returns -1 on error.
110
111\membersection{wxJoystick::GetPOVCTSPosition}\label{wxjoystickgetpovctsposition}
112
113\constfunc{int}{GetPOVCTSPosition}{\void}
114
115Returns the point-of-view position, expressed in continuous, one-hundredth of a degree units.
116Returns -1 on error.
117
118\membersection{wxJoystick::GetRudderMax}\label{wxjoystickgetruddermax}
119
120\constfunc{int}{GetRudderMax}{\void}
121
122Returns the maximum rudder position.
123
124\membersection{wxJoystick::GetRudderMin}\label{wxjoystickgetruddermin}
125
126\constfunc{int}{GetRudderMin}{\void}
127
128Returns the minimum rudder position.
129
130\membersection{wxJoystick::GetRudderPosition}\label{wxjoystickgetrudderposition}
131
132\constfunc{int}{GetRudderPosition}{\void}
133
134Returns the rudder position.
135
136\membersection{wxJoystick::GetUMax}\label{wxjoystickgetumax}
137
138\constfunc{int}{GetUMax}{\void}
139
140Returns the maximum U position.
141
142\membersection{wxJoystick::GetUMin}\label{wxjoystickgetumin}
143
144\constfunc{int}{GetUMin}{\void}
145
146Returns the minimum U position.
147
148\membersection{wxJoystick::GetUPosition}\label{wxjoystickgetuposition}
149
150\constfunc{int}{GetUPosition}{\void}
151
152Gets 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
158Returns the maximum V position.
159
160\membersection{wxJoystick::GetVMin}\label{wxjoystickgetvmin}
161
162\constfunc{int}{GetVMin}{\void}
163
164Returns the minimum V position.
165
166\membersection{wxJoystick::GetVPosition}\label{wxjoystickgetvposition}
167
168\constfunc{int}{GetVPosition}{\void}
169
170Gets 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
176Returns the maximum x position.
177
178\membersection{wxJoystick::GetXMin}\label{wxjoystickgetxmin}
179
180\constfunc{int}{GetXMin}{\void}
181
182Returns the minimum x position.
183
184\membersection{wxJoystick::GetYMax}\label{wxjoystickgetymax}
185
186\constfunc{int}{GetYMax}{\void}
187
188Returns the maximum y position.
189
190\membersection{wxJoystick::GetYMin}\label{wxjoystickgetymin}
191
192\constfunc{int}{GetYMin}{\void}
193
194Returns the minimum y position.
195
196\membersection{wxJoystick::GetZMax}\label{wxjoystickgetzmax}
197
198\constfunc{int}{GetZMax}{\void}
199
200Returns the maximum z position.
201
202\membersection{wxJoystick::GetZMin}\label{wxjoystickgetzmin}
203
204\constfunc{int}{GetZMin}{\void}
205
206Returns the minimum z position.
207
208\membersection{wxJoystick::GetZPosition}\label{wxjoystickgetzposition}
209
210\constfunc{int}{GetZPosition}{\void}
211
212Returns the z position of the joystick.
213
214\membersection{wxJoystick::HasPOV}\label{wxjoystickhaspov}
215
216\constfunc{bool}{HasPOV}{\void}
217
218Returns true if the joystick has a point of view control.
219
220\membersection{wxJoystick::HasPOV4Dir}\label{wxjoystickhaspovfdir}
221
222\constfunc{bool}{HasPOV4Dir}{\void}
223
224Returns 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
230Returns 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
236Returns true if there is a rudder attached to the computer.
237
238\membersection{wxJoystick::HasU}\label{wxjoystickhasu}
239
240\constfunc{bool}{HasU}{\void}
241
242Returns true if the joystick has a U axis.
243
244\membersection{wxJoystick::HasV}\label{wxjoystickhasv}
245
246\constfunc{bool}{HasV}{\void}
247
248Returns true if the joystick has a V axis.
249
250\membersection{wxJoystick::HasZ}\label{wxjoystickhasz}
251
252\constfunc{bool}{HasZ}{\void}
253
254Returns true if the joystick has a Z axis.
255
256\membersection{wxJoystick::IsOk}\label{wxjoystickisok}
257
258\constfunc{bool}{IsOk}{\void}
259
260Returns true if the joystick is functioning.
261
262\membersection{wxJoystick::ReleaseCapture}\label{wxjoystickreleasecapture}
263
264\func{bool}{ReleaseCapture}{\void}
265
266Releases the capture set by {\bf SetCapture}.
267
268\wxheading{Return value}
269
270true 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
280Sets 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
287threshold. If greater than zero, events are received every {\it pollingFreq} milliseconds.}
288
289\wxheading{Return value}
290
291true 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
301Sets the movement threshold, the number of steps outside which the joystick is deemed to have
302moved.
303
304