wxjoystickwxjoystick allows an application to control one or more joysticks. derived from include files <wx/joystick.h> see also members
wxjoystick::wxjoystick
wxjoystick::wxjoystickwxjoystick(int joystick = wxjoystick1) constructor. joystick may be one of wxjoystick1, wxjoystick2, indicating the joystick controller of interest.
wxjoystick::~wxjoystick~wxjoystick() destroys the wxjoystick object.
wxjoystick::getbuttonstateint 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.
wxjoystick::getmanufactureridint getmanufacturerid() const returns the manufacturer id.
wxjoystick::getmovementthresholdint getmovementthreshold() const returns the movement threshold, the number of steps outside which the joystick is deemed to have moved.
wxjoystick::getnumberaxesint getnumberaxes() const returns the number of axes for this joystick.
wxjoystick::getnumberbuttonsint getnumberbuttons() const returns the number of buttons for this joystick.
wxjoystick::getnumberjoysticksstatic int getnumberjoysticks() returns the number of joysticks currently attached to the computer.
wxjoystick::getpollingmaxint getpollingmax() const returns the maximum polling frequency.
wxjoystick::getpollingminint getpollingmin() const returns the minimum polling frequency.
wxjoystick::getproductidint getproductid() const returns the product id for the joystick.
wxjoystick::getproductnamewxstring getproductname() const returns the product name for the joystick.
wxjoystick::getpositionwxpoint getposition() const returns the x, y position of the joystick.
wxjoystick::getpovpositionint 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.
wxjoystick::getpovctspositionint getpovctsposition() const returns the point-of-view position, expressed in continuous, one-hundredth of a degree units. returns -1 on error.
wxjoystick::getruddermaxint getruddermax() const returns the maximum rudder position.
wxjoystick::getrudderminint getruddermin() const returns the minimum rudder position.
wxjoystick::getrudderpositionint getrudderposition() const returns the rudder position.
wxjoystick::getumaxint getumax() const returns the maximum u position.
wxjoystick::getuminint getumin() const returns the minimum u position.
wxjoystick::getupositionint getuposition() const gets the position of the fifth axis of the joystick, if it exists.
wxjoystick::getvmaxint getvmax() const returns the maximum v position.
wxjoystick::getvminint getvmin() const returns the minimum v position.
wxjoystick::getvpositionint getvposition() const gets the position of the sixth axis of the joystick, if it exists.
wxjoystick::getxmaxint getxmax() const returns the maximum x position.
wxjoystick::getxminint getxmin() const returns the minimum x position.
wxjoystick::getymaxint getymax() const returns the maximum y position.
wxjoystick::getyminint getymin() const returns the minimum y position.
wxjoystick::getzmaxint getzmax() const returns the maximum z position.
wxjoystick::getzminint getzmin() const returns the minimum z position.
wxjoystick::getzpositionint getzposition() const returns the z position of the joystick.
wxjoystick::haspovbool haspov() const returns true if the joystick has a point of view control.
wxjoystick::haspov4dirbool haspov4dir() const returns true if the joystick point-of-view supports discrete values (centered, forward, backward, left, and right).
wxjoystick::haspovctsbool haspovcts() const returns true if the joystick point-of-view supports continuous degree bearings.
wxjoystick::hasrudderbool hasrudder() const returns true if there is a rudder attached to the computer.
wxjoystick::hasubool hasu() const returns true if the joystick has a u axis.
wxjoystick::hasvbool hasv() const returns true if the joystick has a v axis.
wxjoystick::haszbool hasz() const returns true if the joystick has a z axis.
wxjoystick::isokbool isok() const returns true if the joystick is functioning.
wxjoystick::releasecapturebool releasecapture() releases the capture set by setcapture. return value true if the capture release succeeded. see also wxjoystick::setcapture, wxjoystickevent
wxjoystick::setcapturebool 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
wxjoystick::setmovementthresholdvoid setmovementthreshold(int threshold) sets the movement threshold, the number of steps outside which the joystick is deemed to have moved.
|