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