$szTitle = "wxjoystick"; include "./_header.inc"; ?>
wxjoystick allows an application to control one or more joysticks.
derived from
include files
<wx/joystick.h>
see also
members
wxjoystick::wxjoystick
wxjoystick::~wxjoystick
wxjoystick::getbuttonstate
wxjoystick::getmanufacturerid
wxjoystick::getmovementthreshold
wxjoystick::getnumberaxes
wxjoystick::getnumberbuttons
wxjoystick::getnumberjoysticks
wxjoystick::getpollingmax
wxjoystick::getpollingmin
wxjoystick::getproductid
wxjoystick::getproductname
wxjoystick::getposition
wxjoystick::getpovposition
wxjoystick::getpovctsposition
wxjoystick::getruddermax
wxjoystick::getruddermin
wxjoystick::getrudderposition
wxjoystick::getumax
wxjoystick::getumin
wxjoystick::getuposition
wxjoystick::getvmax
wxjoystick::getvmin
wxjoystick::getvposition
wxjoystick::getxmax
wxjoystick::getxmin
wxjoystick::getymax
wxjoystick::getymin
wxjoystick::getzmax
wxjoystick::getzmin
wxjoystick::getzposition
wxjoystick::haspov
wxjoystick::haspov4dir
wxjoystick::haspovcts
wxjoystick::hasrudder
wxjoystick::hasu
wxjoystick::hasv
wxjoystick::hasz
wxjoystick::isok
wxjoystick::releasecapture
wxjoystick::setcapture
wxjoystick::setmovementthreshold
wxjoystick(int joystick = wxjoystick1)
constructor. joystick may be one of wxjoystick1, wxjoystick2, indicating the joystick controller of interest.
~wxjoystick()
destroys the wxjoystick object.
int getbuttonstate() const
returns the state of the joystick buttons. every button is mapped to a single bit in the returned integer, with the first button being mapped to the least significant bit, and so on. a bitlist of wxjoy_buttonn identifiers, where n is 1, 2, 3 or 4 is available for historical reasons.
int getmanufacturerid() const
returns the manufacturer id.
int getmovementthreshold() const
returns the movement threshold, the number of steps outside which the joystick is deemed to have moved.
int getnumberaxes() const
returns the number of axes for this joystick.
int getnumberbuttons() const
returns the number of buttons for this joystick.
static int getnumberjoysticks()
returns the number of joysticks currently attached to the computer.
int getpollingmax() const
returns the maximum polling frequency.
int getpollingmin() const
returns the minimum polling frequency.
int getproductid() const
returns the product id for the joystick.
wxstring getproductname() const
returns the product name for the joystick.
wxpoint getposition() const
returns the x, y position of the joystick.
int getpovposition() const
returns the point-of-view position, expressed in continuous, one-hundredth of a degree units, but limited to return 0, 9000, 18000 or 27000. returns -1 on error.
int getpovctsposition() const
returns the point-of-view position, expressed in continuous, one-hundredth of a degree units. returns -1 on error.
int getruddermax() const
returns the maximum rudder position.
int getruddermin() const
returns the minimum rudder position.
int getrudderposition() const
returns the rudder position.
int getumax() const
returns the maximum u position.
int getumin() const
returns the minimum u position.
int getuposition() const
gets the position of the fifth axis of the joystick, if it exists.
int getvmax() const
returns the maximum v position.
int getvmin() const
returns the minimum v position.
int getvposition() const
gets the position of the sixth axis of the joystick, if it exists.
int getxmax() const
returns the maximum x position.
int getxmin() const
returns the minimum x position.
int getymax() const
returns the maximum y position.
int getymin() const
returns the minimum y position.
int getzmax() const
returns the maximum z position.
int getzmin() const
returns the minimum z position.
int getzposition() const
returns the z position of the joystick.
bool haspov() const
returns true if the joystick has a point of view control.
bool haspov4dir() const
returns true if the joystick point-of-view supports discrete values (centered, forward, backward, left, and right).
bool haspovcts() const
returns true if the joystick point-of-view supports continuous degree bearings.
bool hasrudder() const
returns true if there is a rudder attached to the computer.
bool hasu() const
returns true if the joystick has a u axis.
bool hasv() const
returns true if the joystick has a v axis.
bool hasz() const
returns true if the joystick has a z axis.
bool isok() const
returns true if the joystick is functioning.
bool releasecapture()
releases the capture set by setcapture.
return value
true if the capture release succeeded.
see also
wxjoystick::setcapture, wxjoystickevent
bool setcapture(wxwindow* win, int pollingfreq = 0)
sets the capture to direct joystick events to win.
parameters
win
pollingfreq
return value
true if the capture succeeded.
see also
wxjoystick::releasecapture, wxjoystickevent
void setmovementthreshold(int threshold)
sets the movement threshold, the number of steps outside which the joystick is deemed to have moved.
include "./_footer.inc"; ?>