1 \section{\class{wxJoystick
}}\label{wxjoystick
}
3 wxJoystick allows an application to control one or more joysticks.
5 \wxheading{Derived from
}
7 \helpref{wxObject
}{wxobject
}
9 \wxheading{Include files
}
15 \helpref{wxJoystickEvent
}{wxjoystickevent
}
17 \latexignore{\rtfignore{\wxheading{Members
}}}
19 \membersection{wxJoystick::wxJoystick
}\label{wxjoystickconstr
}
21 \func{}{wxJoystick
}{\param{int
}{ joystick = wxJOYSTICK1
}}
23 Constructor.
{\it joystick
} may be one of wxJOYSTICK1, wxJOYSTICK2, indicating the joystick
24 controller of interest.
26 \membersection{wxJoystick::
\destruct{wxJoystick
}}
28 \func{}{\destruct{wxJoystick
}}{\void}
30 Destroys the wxJoystick object.
32 \membersection{wxJoystick::GetButtonState
}\label{wxjoystickgetbuttonstate
}
34 \constfunc{int
}{GetButtonState
}{\void}
36 Returns the state of the joystick buttons. A bitlist of wxJOY
\_BUTTONn identifiers,
37 where n is
1,
2,
3 or
4.
39 \membersection{wxJoystick::GetManufacturerId
}\label{wxjoystickgetmanufacturerid
}
41 \constfunc{int
}{GetManufacturerId
}{\void}
43 Returns the manufacturer id.
45 \membersection{wxJoystick::GetMovementThreshold
}\label{wxjoystickgetmovementthreshold
}
47 \constfunc{int
}{GetMovementThreshold
}{\void}
49 Returns the movement threshold, the number of steps outside which the joystick is deemed to have
52 \membersection{wxJoystick::GetNumberAxes
}\label{wxjoystickgetnumberaxes
}
54 \constfunc{int
}{GetNumberAxes
}{\void}
56 Returns the number of axes for this joystick.
58 \membersection{wxJoystick::GetNumberButtons
}\label{wxjoystickgetnumberbuttons
}
60 \constfunc{int
}{GetNumberButtons
}{\void}
62 Returns the number of buttons for this joystick.
64 \membersection{wxJoystick::GetNumberJoysticks
}\label{wxjoystickgetnumberjoysticks
}
66 \constfunc{int
}{GetNumberJoysticks
}{\void}
68 Returns the number of joysticks currently attached to the computer.
70 \membersection{wxJoystick::GetPollingMax
}\label{wxjoystickgetpollingmax
}
72 \constfunc{int
}{GetPollingMax
}{\void}
74 Returns the maximum polling frequency.
76 \membersection{wxJoystick::GetPollingMin
}\label{wxjoystickgetpollingmin
}
78 \constfunc{int
}{GetPollingMin
}{\void}
80 Returns the minimum polling frequency.
82 \membersection{wxJoystick::GetProductId
}\label{wxjoystickgetproductid
}
84 \constfunc{int
}{GetProductId
}{\void}
86 Returns the product id for the joystick.
88 \membersection{wxJoystick::GetProductName
}\label{wxjoystickgetproductname
}
90 \constfunc{wxString
}{GetProductName
}{\void}
92 Returns the product name for the joystick.
94 \membersection{wxJoystick::GetPosition
}\label{wxjoystickgetposition
}
96 \constfunc{wxPoint
}{GetPosition
}{\void}
98 Returns the x, y position of the joystick.
100 \membersection{wxJoystick::GetPOVPosition
}\label{wxjoystickgetpovposition
}
102 \constfunc{int
}{GetPOVPosition
}{\void}
104 Returns the point-of-view position, expressed in discrete units.
106 \membersection{wxJoystick::GetPOVCTSPosition
}\label{wxjoystickgetpovctsposition
}
108 \constfunc{int
}{GetPOVCTSPosition
}{\void}
110 Returns the point-of-view position, expressed in continuous, one-hundredth of a degree units.
112 \membersection{wxJoystick::GetRudderMax
}\label{wxjoystickgetruddermax
}
114 \constfunc{int
}{GetRudderMax
}{\void}
116 Returns the maximum rudder position.
118 \membersection{wxJoystick::GetRudderMin
}\label{wxjoystickgetruddermin
}
120 \constfunc{int
}{GetRudderMin
}{\void}
122 Returns the minimum rudder position.
124 \membersection{wxJoystick::GetRudderPosition
}\label{wxjoystickgetrudderposition
}
126 \constfunc{int
}{GetRudderPosition
}{\void}
128 Returns the rudder position.
130 \membersection{wxJoystick::GetUMax
}\label{wxjoystickgetumax
}
132 \constfunc{int
}{GetUMax
}{\void}
134 Returns the maximum U position.
136 \membersection{wxJoystick::GetUMin
}\label{wxjoystickgetumin
}
138 \constfunc{int
}{GetUMin
}{\void}
140 Returns the minimum U position.
142 \membersection{wxJoystick::GetUPosition
}\label{wxjoystickgetuposition
}
144 \constfunc{int
}{GetUPosition
}{\void}
146 Gets the position of the fifth axis of the joystick, if it exists.
148 \membersection{wxJoystick::GetVMax
}\label{wxjoystickgetvmax
}
150 \constfunc{int
}{GetVMax
}{\void}
152 Returns the maximum V position.
154 \membersection{wxJoystick::GetVMin
}\label{wxjoystickgetvmin
}
156 \constfunc{int
}{GetVMin
}{\void}
158 Returns the minimum V position.
160 \membersection{wxJoystick::GetVPosition
}\label{wxjoystickgetvposition
}
162 \constfunc{int
}{GetVPosition
}{\void}
164 Gets the position of the sixth axis of the joystick, if it exists.
166 \membersection{wxJoystick::GetXMax
}\label{wxjoystickgetxmax
}
168 \constfunc{int
}{GetXMax
}{\void}
170 Returns the maximum x position.
172 \membersection{wxJoystick::GetXMin
}\label{wxjoystickgetxmin
}
174 \constfunc{int
}{GetXMin
}{\void}
176 Returns the minimum x position.
178 \membersection{wxJoystick::GetYMax
}\label{wxjoystickgetymax
}
180 \constfunc{int
}{GetYMax
}{\void}
182 Returns the maximum y position.
184 \membersection{wxJoystick::GetYMin
}\label{wxjoystickgetymin
}
186 \constfunc{int
}{GetYMin
}{\void}
188 Returns the minimum y position.
190 \membersection{wxJoystick::GetZMax
}\label{wxjoystickgetzmax
}
192 \constfunc{int
}{GetZMax
}{\void}
194 Returns the maximum z position.
196 \membersection{wxJoystick::GetZMin
}\label{wxjoystickgetzmin
}
198 \constfunc{int
}{GetXMin
}{\void}
200 Returns the minimum z position.
202 \membersection{wxJoystick::GetZPosition
}\label{wxjoystickgetzposition
}
204 \constfunc{int
}{GetZPosition
}{\void}
206 Returns the z position of the joystick.
208 \membersection{wxJoystick::HasPOV
}\label{wxjoystickhaspov
}
210 \constfunc{bool
}{HasPOV
}{\void}
212 Returns TRUE if the joystick has a point of view control.
214 \membersection{wxJoystick::HasPOV4Dir
}\label{wxjoystickhaspovfdir
}
216 \constfunc{bool
}{HasPOV4Dir
}{\void}
218 Returns TRUE if the joystick point-of-view supports discrete values (centered, forward, backward, left, and right).
220 \membersection{wxJoystick::HasPOVCTS
}\label{wxjoystickhaspovcts
}
222 \constfunc{bool
}{HasPOVCTS
}{\void}
224 Returns TRUE if the joystick point-of-view supports continuous degree bearings.
226 \membersection{wxJoystick::HasRudder
}\label{wxjoystickhasrudder
}
228 \constfunc{bool
}{HasRudder
}{\void}
230 Returns TRUE if there is a rudder attached to the computer.
232 \membersection{wxJoystick::HasU
}\label{wxjoystickhasu
}
234 \constfunc{bool
}{HasU
}{\void}
236 Returns TRUE if the joystick has a U axis.
238 \membersection{wxJoystick::HasV
}\label{wxjoystickhasv
}
240 \constfunc{bool
}{HasV
}{\void}
242 Returns TRUE if the joystick has a V axis.
244 \membersection{wxJoystick::HasZ
}\label{wxjoystickhasz
}
246 \constfunc{bool
}{HasZ
}{\void}
248 Returns TRUE if the joystick has a Z axis.
250 \membersection{wxJoystick::IsOk
}\label{wxjoystickisok
}
252 \constfunc{bool
}{IsOk
}{\void}
254 Returns TRUE if the joystick is functioning.
256 \membersection{wxJoystick::ReleaseCapture
}\label{wxjoystickreleasecapture
}
258 \func{bool
}{ReleaseCapture
}{\void}
260 Releases the capture set by
{\bf SetCapture
}.
262 \wxheading{Return value
}
264 TRUE if the capture release succeeded.
268 \helpref{wxJoystick::SetCapture
}{wxjoysticksetcapture
},
\helpref{wxJoystickEvent
}{wxjoystickevent
}
270 \membersection{wxJoystick::SetCapture
}\label{wxjoysticksetcapture
}
272 \func{bool
}{SetCapture
}{\param{wxWindow*
}{ win
},
\param{int
}{ pollingFreq =
0}}
274 Sets the capture to direct joystick events to
{\it win
}.
276 \wxheading{Parameters
}
278 \docparam{win
}{The window that will receive joystick events.
}
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.
}
283 \wxheading{Return value
}
285 TRUE if the capture succeeded.
289 \helpref{wxJoystick::ReleaseCapture
}{wxjoystickreleasecapture
},
\helpref{wxJoystickEvent
}{wxjoystickevent
}
291 \membersection{wxJoystick::SetMovementThreshold
}\label{wxjoysticksetmovementthreshold
}
293 \func{void
}{SetMovementThreshold
}{\param{int
}{ threshold
}}
295 Sets the movement threshold, the number of steps outside which the joystick is deemed to have