*********** wx.Joystick *********** Inheritance diagram for `wx.Joystick`: | .. inheritance-diagram:: wx.Joystick | Description =========== `wx.Joystick` allows an application to control one or more joysticks. .. seealso:: `wx.JoystickEvent <../Events/wx.JoystickEvent.html>`_ Derived From ^^^^^^^^^^^^^ * `wx.Object `_ Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `GetButtonState <#GetButtonState>`_ * `GetManufacturerId <#GetManufacturerId>`_ * `GetMaxAxes <#GetMaxAxes>`_ * `GetMaxButtons <#GetMaxButtons>`_ * `GetMovementThreshold <#GetMovementThreshold>`_ * `GetNumberAxes <#GetNumberAxes>`_ * `GetNumberButtons <#GetNumberButtons>`_ * `GetNumberJoysticks <#GetNumberJoysticks>`_ * `GetPOVCTSPosition <#GetPOVCTSPosition>`_ * `GetPOVPosition <#GetPOVPosition>`_ * `GetPollingMax <#GetPollingMax>`_ * `GetPollingMin <#GetPollingMin>`_ * `GetPosition <#GetPosition>`_ * `GetProductId <#GetProductId>`_ * `GetProductName <#GetProductName>`_ * `GetRudderMax <#GetRudderMax>`_ * `GetRudderMin <#GetRudderMin>`_ * `GetRudderPosition <#GetRudderPosition>`_ * `GetUMax <#GetUMax>`_ * `GetUMin <#GetUMin>`_ * `GetUPosition <#GetUPosition>`_ * `GetVMax <#GetVMax>`_ * `GetVMin <#GetVMin>`_ * `GetVPosition <#GetVPosition>`_ * `GetXMax <#GetXMax>`_ * `GetXMin <#GetXMin>`_ * `GetYMax <#GetYMax>`_ * `GetYMin <#GetYMin>`_ * `GetZMax <#GetZMax>`_ * `GetZMin <#GetZMin>`_ * `GetZPosition <#GetZPosition>`_ * `HasPOV <#HasPOV>`_ * `HasPOV4Dir <#HasPOV4Dir>`_ * `HasPOVCTS <#HasPOVCTS>`_ * `HasRudder <#HasRudder>`_ * `HasU <#HasU>`_ * `HasV <#HasV>`_ * `HasZ <#HasZ>`_ * `IsOk <#IsOk>`_ * `ReleaseCapture <#ReleaseCapture>`_ * `SetCapture <#SetCapture>`_ * `SetMovementThreshold <#SetMovementThreshold>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `ButtonState <#ButtonState>`_ * `ManufacturerId <#ManufacturerId>`_ * `MaxAxes <#MaxAxes>`_ * `MaxButtons <#MaxButtons>`_ * `MovementThreshold <#MovementThreshold>`_ * `NumberAxes <#NumberAxes>`_ * `NumberButtons <#NumberButtons>`_ * `NumberJoysticks <#NumberJoysticks>`_ * `POVCTSPosition <#POVCTSPosition>`_ * `POVPosition <#POVPosition>`_ * `PollingMax <#PollingMax>`_ * `PollingMin <#PollingMin>`_ * `Position <#Position>`_ * `ProductId <#ProductId>`_ * `ProductName <#ProductName>`_ * `RudderMax <#RudderMax>`_ * `RudderMin <#RudderMin>`_ * `RudderPosition <#RudderPosition>`_ * `UMax <#UMax>`_ * `UMin <#UMin>`_ * `UPosition <#UPosition>`_ * `VMax <#VMax>`_ * `VMin <#VMin>`_ * `VPosition <#VPosition>`_ * `XMax <#XMax>`_ * `XMin <#XMin>`_ * `YMax <#YMax>`_ * `YMin <#YMin>`_ * `ZMax <#ZMax>`_ * `ZMin <#ZMin>`_ * `ZPosition <#ZPosition>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__(joystick=wx.JOYSTICK1) Constructor. `joystick` may be one of ``wx.JOYSTICK1``, ``wx.JOYSTICK2``, indicating the joystick controller of interest. **Parameters:** * `joystick` (int) | **Returns:** `wx.Joystick `_ -------- .. method:: GetButtonState() 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. Returns a bitlist of ``wx.JOY_BUTTONn`` identifiers, where n is 1, 2, 3 or 4 is available for historical reasons. | **Returns:** `int` -------- .. method:: GetManufacturerId() Returns the manufacturer id. | **Returns:** `int` -------- .. method:: GetMaxAxes() `No docstrings available for this method.` -------- .. method:: GetMaxButtons() `No docstrings available for this method.` -------- .. method:: GetMovementThreshold() Returns the movement threshold, the number of steps outside which the joystick is deemed to have moved. | **Returns:** `int` -------- .. method:: GetNumberAxes() Returns the number of axes for this joystick. | **Returns:** `int` -------- .. method:: GetNumberButtons() Returns the number of buttons for this joystick. | **Returns:** `int` -------- .. method:: GetNumberJoysticks() Returns the number of joysticks currently attached to the computer. | **Returns:** `int` -------- .. method:: GetPOVCTSPosition() Returns the point-of-view position, expressed in continuous, one-hundredth of a degree units. Returns -1 on error. | **Returns:** `int` -------- .. method:: GetPOVPosition() 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. | **Returns:** `int` -------- .. method:: GetPollingMax() Returns the maximum polling frequency. | **Returns:** `int` -------- .. method:: GetPollingMin() Returns the minimum polling frequency. | **Returns:** `int` -------- .. method:: GetPosition() Returns the x, y position of the joystick. | **Returns:** `wx.Point `_ -------- .. method:: GetProductId() Returns the product id for the joystick. | **Returns:** `int` -------- .. method:: GetProductName() Returns the product name for the joystick. | **Returns:** `string` -------- .. method:: GetRudderMax() Returns the maximum rudder position. | **Returns:** `int` -------- .. method:: GetRudderMin() Returns the minimum rudder position. | **Returns:** `int` -------- .. method:: GetRudderPosition() Returns the rudder position. | **Returns:** `int` -------- .. method:: GetUMax() Returns the maximum U position. | **Returns:** `int` -------- .. method:: GetUMin() Returns the minimum U position. | **Returns:** `int` -------- .. method:: GetUPosition() Gets the position of the fifth axis of the joystick, if it exists. | **Returns:** `int` -------- .. method:: GetVMax() Returns the maximum V position. | **Returns:** `int` -------- .. method:: GetVMin() Returns the minimum V position. | **Returns:** `int` -------- .. method:: GetVPosition() Gets the position of the sixth axis of the joystick, if it exists. | **Returns:** `int` -------- .. method:: GetXMax() Returns the maximum x position. | **Returns:** `int` -------- .. method:: GetXMin() Returns the minimum x position. | **Returns:** `int` -------- .. method:: GetYMax() Returns the maximum y position. | **Returns:** `int` -------- .. method:: GetYMin() Returns the minimum y position. | **Returns:** `int` -------- .. method:: GetZMax() Returns the maximum z position. | **Returns:** `int` -------- .. method:: GetZMin() Returns the minimum z position. | **Returns:** `int` -------- .. method:: GetZPosition() Returns the z position of the joystick. | **Returns:** `int` -------- .. method:: HasPOV() Returns ``True`` if the joystick has a point of view control. | **Returns:** `bool` -------- .. method:: HasPOV4Dir() Returns ``True`` if the joystick point-of-view supports discrete values (centered, forward, backward, left, and right). | **Returns:** `bool` -------- .. method:: HasPOVCTS() Returns ``True`` if the joystick point-of-view supports continuous degree bearings. | **Returns:** `bool` -------- .. method:: HasRudder() Returns ``True`` if there is a rudder attached to the computer. | **Returns:** `bool` -------- .. method:: HasU() Returns ``True`` if the joystick has a U axis. | **Returns:** `bool` -------- .. method:: HasV() Returns ``True`` if the joystick has a V axis. | **Returns:** `bool` -------- .. method:: HasZ() Returns ``True`` if the joystick has a Z axis. | **Returns:** `bool` -------- .. method:: IsOk() Returns ``True`` if the joystick is functioning. | **Returns:** `bool` -------- .. method:: ReleaseCapture() Releases the capture set by `SetCapture <#SetCapture>`_. | **Returns:** `bool` .. seealso:: `SetCapture <#SetCapture>`_, `wx.JoystickEvent <../Events/wx.JoystickEvent.html>`_ -------- .. method:: SetCapture(win, pollingFreq=0) Sets the capture to direct joystick events to `win`. **Parameters:** * `win` (`wx.Window `_): The window that will receive joystick events. * `pollingFreq` (int): If zero, movement events are sent when above the threshold. If greater than zero, events are received every `pollingFreq` milliseconds. | **Returns:** `bool` .. seealso:: `ReleaseCapture <#ReleaseCapture>`_, `wx.JoystickEvent <../Events/wx.JoystickEvent.html>`_ -------- .. method:: SetMovementThreshold(threshold) Sets the movement threshold, the number of steps outside which the joystick is deemed to have moved. **Parameters:** * `threshold` (int) -------- Properties ^^^^^^^^^^ .. attribute:: ButtonState See `GetButtonState <#GetButtonState>`_ .. attribute:: ManufacturerId See `GetManufacturerId <#GetManufacturerId>`_ .. attribute:: MaxAxes See `GetMaxAxes <#GetMaxAxes>`_ .. attribute:: MaxButtons See `GetMaxButtons <#GetMaxButtons>`_ .. attribute:: MovementThreshold See `GetMovementThreshold <#GetMovementThreshold>`_ and `SetMovementThreshold <#SetMovementThreshold>`_ .. attribute:: NumberAxes See `GetNumberAxes <#GetNumberAxes>`_ .. attribute:: NumberButtons See `GetNumberButtons <#GetNumberButtons>`_ .. attribute:: NumberJoysticks See `GetNumberJoysticks <#GetNumberJoysticks>`_ .. attribute:: POVCTSPosition See `GetPOVCTSPosition <#GetPOVCTSPosition>`_ .. attribute:: POVPosition See `GetPOVPosition <#GetPOVPosition>`_ .. attribute:: PollingMax See `GetPollingMax <#GetPollingMax>`_ .. attribute:: PollingMin See `GetPollingMin <#GetPollingMin>`_ .. attribute:: Position See `GetPosition <#GetPosition>`_ .. attribute:: ProductId See `GetProductId <#GetProductId>`_ .. attribute:: ProductName See `GetProductName <#GetProductName>`_ .. attribute:: RudderMax See `GetRudderMax <#GetRudderMax>`_ .. attribute:: RudderMin See `GetRudderMin <#GetRudderMin>`_ .. attribute:: RudderPosition See `GetRudderPosition <#GetRudderPosition>`_ .. attribute:: UMax See `GetUMax <#GetUMax>`_ .. attribute:: UMin See `GetUMin <#GetUMin>`_ .. attribute:: UPosition See `GetUPosition <#GetUPosition>`_ .. attribute:: VMax See `GetVMax <#GetVMax>`_ .. attribute:: VMin See `GetVMin <#GetVMin>`_ .. attribute:: VPosition See `GetVPosition <#GetVPosition>`_ .. attribute:: XMax See `GetXMax <#GetXMax>`_ .. attribute:: XMin See `GetXMin <#GetXMin>`_ .. attribute:: YMax See `GetYMax <#GetYMax>`_ .. attribute:: YMin See `GetYMin <#GetYMin>`_ .. attribute:: ZMax See `GetZMax <#GetZMax>`_ .. attribute:: ZMin See `GetZMin <#GetZMin>`_ .. attribute:: ZPosition See `GetZPosition <#GetZPosition>`_