wx.JoystickEvent

Inheritance diagram for wx.JoystickEvent:



Description

This event class contains information about mouse events, particularly events received by windows.

See also

wx.Joystick

Derived From

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.

Class API

Methods

__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


ButtonDown(but)

Returns True if the event was a down event from the specified button (or any button).

Parameters:

  • but (int)

Returns:

bool


ButtonIsDown(but)

Returns True if the specified button (or any button) was in a down state.

Parameters:

  • but (int)

Returns:

bool


ButtonUp(but)

Returns True if the event was an up event from the specified button (or any button).

Parameters:

  • but (int)

Returns:

bool


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


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


GetJoystick()

Returns the identifier of the joystick generating the event - one of wx.JOYSTICK1 and wx.JOYSTICK2.


Returns:

int


GetPosition()

Returns the x, y position of the joystick event.


Returns:

wx.Point


GetZPosition()

Returns the z position of the joystick event.


Returns:

int


IsButton()

Returns True if this was a button up or down event (not ‘is any button down?’).


Returns:

bool


IsMove()

Returns True if this was an x, y move event.


Returns:

bool


IsZMove()

Returns True if this was a z move event.


Returns:

bool


SetButtonChange(change)

Parameters:

  • change (int)

SetButtonState(state)

Parameters:

  • state (int)

SetJoystick(stick)

Parameters:

  • stick (int)

SetPosition(pos)

Parameters:


SetZPosition(zPos)

Parameters:

  • zPos (int)

Properties

ButtonChange
See GetButtonChange and SetButtonChange
ButtonState
See GetButtonState and SetButtonState
Joystick
See GetJoystick and SetJoystick
Position
See GetPosition and SetPosition
ZPosition
See GetZPosition and SetZPosition
m_buttonChange
See GetButtonChange and SetButtonChange
m_buttonState
See GetButtonState and SetButtonState
m_joyStick
See GetJoystick and SetJoystick
m_pos
See GetPosition and SetPosition
m_zPosition
See GetZPosition and SetZPosition