]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/joystick.tex
1. added code to dyntbar to allow bitmap loading from windows resources
[wxWidgets.git] / docs / latex / wx / joystick.tex
CommitLineData
fe604ccd
JS
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
954b8ae6
JS
9\wxheading{Include files}
10
11<wx/joystick.h>
12
fe604ccd
JS
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
23Constructor. {\it joystick} may be one of wxJOYSTICK1, wxJOYSTICK2, indicating the joystick
24controller of interest.
25
26\membersection{wxJoystick::\destruct{wxJoystick}}
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. A bitlist of wxJOY\_BUTTONn identifiers,
37where n is 1, 2, 3 or 4.
38
39\membersection{wxJoystick::GetManufacturerId}\label{wxjoystickgetmanufacturerid}
40
41\constfunc{int}{GetManufacturerId}{\void}
42
43Returns the manufacturer id.
44
45\membersection{wxJoystick::GetMovementThreshold}\label{wxjoystickgetmovementthreshold}
46
47\constfunc{int}{GetMovementThreshold}{\void}
48
49Returns the movement threshold, the number of steps outside which the joystick is deemed to have
50moved.
51
52\membersection{wxJoystick::GetNumberAxes}\label{wxjoystickgetnumberaxes}
53
54\constfunc{int}{GetNumberAxes}{\void}
55
56Returns the number of axes for this joystick.
57
58\membersection{wxJoystick::GetNumberButtons}\label{wxjoystickgetnumberbuttons}
59
60\constfunc{int}{GetNumberButtons}{\void}
61
62Returns the number of buttons for this joystick.
63
64\membersection{wxJoystick::GetNumberJoysticks}\label{wxjoystickgetnumberjoysticks}
65
66\constfunc{int}{GetNumberJoysticks}{\void}
67
68Returns the number of joysticks currently attached to the computer.
69
70\membersection{wxJoystick::GetPollingMax}\label{wxjoystickgetpollingmax}
71
72\constfunc{int}{GetPollingMax}{\void}
73
74Returns the maximum polling frequency.
75
76\membersection{wxJoystick::GetPollingMin}\label{wxjoystickgetpollingmin}
77
78\constfunc{int}{GetPollingMin}{\void}
79
80Returns the minimum polling frequency.
81
82\membersection{wxJoystick::GetProductId}\label{wxjoystickgetproductid}
83
84\constfunc{int}{GetProductId}{\void}
85
86Returns the product id for the joystick.
87
88\membersection{wxJoystick::GetProductName}\label{wxjoystickgetproductname}
89
90\constfunc{wxString}{GetProductName}{\void}
91
92Returns the product name for the joystick.
93
94\membersection{wxJoystick::GetPosition}\label{wxjoystickgetposition}
95
96\constfunc{wxPoint}{GetPosition}{\void}
97
98Returns the x, y position of the joystick.
99
100\membersection{wxJoystick::GetPOVPosition}\label{wxjoystickgetpovposition}
101
102\constfunc{int}{GetPOVPosition}{\void}
103
104Returns the point-of-view position, expressed in discrete units.
105
106\membersection{wxJoystick::GetPOVCTSPosition}\label{wxjoystickgetpovctsposition}
107
108\constfunc{int}{GetPOVCTSPosition}{\void}
109
110Returns 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
116Returns the maximum rudder position.
117
118\membersection{wxJoystick::GetRudderMin}\label{wxjoystickgetruddermin}
119
120\constfunc{int}{GetRudderMin}{\void}
121
122Returns the minimum rudder position.
123
124\membersection{wxJoystick::GetRudderPosition}\label{wxjoystickgetrudderposition}
125
126\constfunc{int}{GetRudderPosition}{\void}
127
128Returns the rudder position.
129
130\membersection{wxJoystick::GetUMax}\label{wxjoystickgetumax}
131
132\constfunc{int}{GetUMax}{\void}
133
134Returns the maximum U position.
135
136\membersection{wxJoystick::GetUMin}\label{wxjoystickgetumin}
137
138\constfunc{int}{GetUMin}{\void}
139
140Returns the minimum U position.
141
142\membersection{wxJoystick::GetUPosition}\label{wxjoystickgetuposition}
143
144\constfunc{int}{GetUPosition}{\void}
145
146Gets 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
152Returns the maximum V position.
153
f7bd2698 154\membersection{wxJoystick::GetVMin}\label{wxjoystickgetvmin}
fe604ccd 155
f7bd2698 156\constfunc{int}{GetVMin}{\void}
fe604ccd 157
f7bd2698 158Returns the minimum V position.
fe604ccd
JS
159
160\membersection{wxJoystick::GetVPosition}\label{wxjoystickgetvposition}
161
162\constfunc{int}{GetVPosition}{\void}
163
164Gets 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
170Returns the maximum x position.
171
172\membersection{wxJoystick::GetXMin}\label{wxjoystickgetxmin}
173
174\constfunc{int}{GetXMin}{\void}
175
176Returns the minimum x position.
177
178\membersection{wxJoystick::GetYMax}\label{wxjoystickgetymax}
179
180\constfunc{int}{GetYMax}{\void}
181
182Returns the maximum y position.
183
184\membersection{wxJoystick::GetYMin}\label{wxjoystickgetymin}
185
186\constfunc{int}{GetYMin}{\void}
187
188Returns the minimum y position.
189
190\membersection{wxJoystick::GetZMax}\label{wxjoystickgetzmax}
191
192\constfunc{int}{GetZMax}{\void}
193
194Returns the maximum z position.
195
196\membersection{wxJoystick::GetZMin}\label{wxjoystickgetzmin}
197
198\constfunc{int}{GetXMin}{\void}
199
200Returns the minimum z position.
201
202\membersection{wxJoystick::GetZPosition}\label{wxjoystickgetzposition}
203
204\constfunc{int}{GetZPosition}{\void}
205
206Returns the z position of the joystick.
207
208\membersection{wxJoystick::HasPOV}\label{wxjoystickhaspov}
209
210\constfunc{bool}{HasPOV}{\void}
211
212Returns TRUE if the joystick has a point of view control.
213
214\membersection{wxJoystick::HasPOV4Dir}\label{wxjoystickhaspovfdir}
215
216\constfunc{bool}{HasPOV4Dir}{\void}
217
218Returns 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
224Returns 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
230Returns TRUE if there is a rudder attached to the computer.
231
232\membersection{wxJoystick::HasU}\label{wxjoystickhasu}
233
234\constfunc{bool}{HasU}{\void}
235
236Returns TRUE if the joystick has a U axis.
237
238\membersection{wxJoystick::HasV}\label{wxjoystickhasv}
239
240\constfunc{bool}{HasV}{\void}
241
242Returns TRUE if the joystick has a V axis.
243
244\membersection{wxJoystick::HasZ}\label{wxjoystickhasz}
245
246\constfunc{bool}{HasZ}{\void}
247
248Returns TRUE if the joystick has a Z axis.
249
250\membersection{wxJoystick::IsOk}\label{wxjoystickisok}
251
252\constfunc{bool}{IsOk}{\void}
253
254Returns TRUE if the joystick is functioning.
255
256\membersection{wxJoystick::ReleaseCapture}\label{wxjoystickreleasecapture}
257
258\func{bool}{ReleaseCapture}{\void}
259
260Releases the capture set by {\bf SetCapture}.
261
262\wxheading{Return value}
263
264TRUE 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
274Sets 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
281threshold. If greater than zero, events are received every {\it pollingFreq} milliseconds.}
282
283\wxheading{Return value}
284
285TRUE 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
295Sets the movement threshold, the number of steps outside which the joystick is deemed to have
296moved.
297
298