**************** wx.JoystickEvent **************** Inheritance diagram for `wx.JoystickEvent`: | .. inheritance-diagram:: wx.JoystickEvent | Description =========== This event class contains information about mouse events, particularly events received by windows. .. seealso:: `wx.Joystick <../Widgets/wx.Joystick.html>`_ Derived From ^^^^^^^^^^^^^ * `wx.Event `_ Event Handling ^^^^^^^^^^^^^^ ================================================== ================================================== Event Name Description ================================================== ================================================== wx.EVT_JOY_BUTTON_DOWN(func) Process a ``wx.wxEVT_JOY_BUTTON_DOWN`` event. wx.EVT_JOY_BUTTON_UP(func) Process a ``wx.wxEVT_JOY_BUTTON_UP`` event. wx.EVT_JOY_MOVE(func) Process a ``wx.wxEVT_JOY_MOVE`` event. wx.EVT_JOY_ZMOVE(func) Process a ``wx.wxEVT_JOY_ZMOVE`` event. wx.EVT_JOYSTICK_EVENTS(func) Processes all joystick events. ================================================== ================================================== Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `ButtonDown <#ButtonDown>`_ * `ButtonIsDown <#ButtonIsDown>`_ * `ButtonUp <#ButtonUp>`_ * `GetButtonChange <#GetButtonChange>`_ * `GetButtonState <#GetButtonState>`_ * `GetJoystick <#GetJoystick>`_ * `GetPosition <#GetPosition>`_ * `GetZPosition <#GetZPosition>`_ * `IsButton <#IsButton>`_ * `IsMove <#IsMove>`_ * `IsZMove <#IsZMove>`_ * `SetButtonChange <#SetButtonChange>`_ * `SetButtonState <#SetButtonState>`_ * `SetJoystick <#SetJoystick>`_ * `SetPosition <#SetPosition>`_ * `SetZPosition <#SetZPosition>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `ButtonChange <#ButtonChange>`_ * `ButtonState <#ButtonState>`_ * `Joystick <#Joystick>`_ * `Position <#Position>`_ * `ZPosition <#ZPosition>`_ * `m_buttonChange <#m_buttonChange>`_ * `m_buttonState <#m_buttonState>`_ * `m_joyStick <#m_joyStick>`_ * `m_pos <#m_pos>`_ * `m_zPosition <#m_zPosition>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__(type=wx.wxEVT_NULL, state=0, joystick=wx.JOYSTICK1, change=0) Constructor. **Parameters:** * `type` (eventtype) * `state` (int) * `joystick` (int) * `change` (int) | **Returns:** `wx.JoystickEvent `_ -------- .. method:: ButtonDown(but) Returns ``True`` if the event was a down event from the specified button (or any button). **Parameters:** * `but` (int) | **Returns:** `bool` -------- .. method:: ButtonIsDown(but) Returns ``True`` if the specified button (or any button) was in a down state. **Parameters:** * `but` (int) | **Returns:** `bool` -------- .. method:: ButtonUp(but) Returns ``True`` if the event was an up event from the specified button (or any button). **Parameters:** * `but` (int) | **Returns:** `bool` -------- .. method:: GetButtonChange() Returns the identifier of the button changing state. This is a ``wx.JOY_BUTTONn`` identifier, where n is one of 1, 2, 3, 4. | **Returns:** `int` -------- .. method:: GetButtonState() Returns the down state of the buttons. This is a bitlist of ``wx.JOY_BUTTONn`` identifiers, where n is one of 1, 2, 3, 4. | **Returns:** `int` -------- .. method:: GetJoystick() Returns the identifier of the joystick generating the event - one of ``wx.JOYSTICK1`` and ``wx.JOYSTICK2``. | **Returns:** `int` -------- .. method:: GetPosition() Returns the `x`, `y` position of the joystick event. | **Returns:** `wx.Point <../Widgets/wx.Point.html>`_ -------- .. method:: GetZPosition() Returns the `z` position of the joystick event. | **Returns:** `int` -------- .. method:: IsButton() Returns ``True`` if this was a button up or down event (**not** 'is any button down?'). | **Returns:** `bool` -------- .. method:: IsMove() Returns ``True`` if this was an `x`, `y` move event. | **Returns:** `bool` -------- .. method:: IsZMove() Returns ``True`` if this was a `z` move event. | **Returns:** `bool` -------- .. method:: SetButtonChange(change) | **Parameters:** * `change` (int) -------- .. method:: SetButtonState(state) | **Parameters:** * `state` (int) -------- .. method:: SetJoystick(stick) | **Parameters:** * `stick` (int) -------- .. method:: SetPosition(pos) | **Parameters:** * `pos` (`wx.Point <../Widgets/wx.Point.html>`_) -------- .. method:: SetZPosition(zPos) | **Parameters:** * `zPos` (int) -------- Properties ^^^^^^^^^^ .. attribute:: ButtonChange See `GetButtonChange <#GetButtonChange>`_ and `SetButtonChange <#SetButtonChange>`_ .. attribute:: ButtonState See `GetButtonState <#GetButtonState>`_ and `SetButtonState <#SetButtonState>`_ .. attribute:: Joystick See `GetJoystick <#GetJoystick>`_ and `SetJoystick <#SetJoystick>`_ .. attribute:: Position See `GetPosition <#GetPosition>`_ and `SetPosition <#SetPosition>`_ .. attribute:: ZPosition See `GetZPosition <#GetZPosition>`_ and `SetZPosition <#SetZPosition>`_ .. attribute:: m_buttonChange See `GetButtonChange <#GetButtonChange>`_ and `SetButtonChange <#SetButtonChange>`_ .. attribute:: m_buttonState See `GetButtonState <#GetButtonState>`_ and `SetButtonState <#SetButtonState>`_ .. attribute:: m_joyStick See `GetJoystick <#GetJoystick>`_ and `SetJoystick <#SetJoystick>`_ .. attribute:: m_pos See `GetPosition <#GetPosition>`_ and `SetPosition <#SetPosition>`_ .. attribute:: m_zPosition See `GetZPosition <#GetZPosition>`_ and `SetZPosition <#SetZPosition>`_