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