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