wxJoystickEvent Class Reference
[Events]

#include <wx/event.h>

Inheritance diagram for wxJoystickEvent:

wxEvent wxObject

List of all members.


Detailed Description

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

Events:

The following event handler macros redirect the events to member function handlers 'func' with prototypes like:

void handlerFuncName(wxJoystickEvent& event)
Event macros:
Library:  wxCore

Category:  Events

See also:
wxJoystick

Public Member Functions

 wxJoystickEvent (wxEventType eventType=wxEVT_NULL, int state=0, int joystick=wxJOYSTICK1, int change=0)
bool ButtonDown (int button=wxJOY_BUTTON_ANY) const
bool ButtonIsDown (int button=wxJOY_BUTTON_ANY) const
bool ButtonUp (int button=wxJOY_BUTTON_ANY) const
int GetButtonChange () const
int GetButtonState () const
int GetJoystick () const
wxPoint GetPosition () const
int GetZPosition () const
bool IsButton () const
bool IsMove () const
bool IsZMove () const

Constructor & Destructor Documentation

wxJoystickEvent::wxJoystickEvent ( wxEventType  eventType = wxEVT_NULL,
int  state = 0,
int  joystick = wxJOYSTICK1,
int  change = 0 
)

Constructor.


Member Function Documentation

bool wxJoystickEvent::ButtonDown ( int  button = wxJOY_BUTTON_ANY  )  const

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

Parameters:
button Can be wxJOY_BUTTONn where n is 1, 2, 3 or 4; or wxJOY_BUTTON_ANY to indicate any button down event.

bool wxJoystickEvent::ButtonIsDown ( int  button = wxJOY_BUTTON_ANY  )  const

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

Parameters:
button Can be wxJOY_BUTTONn where n is 1, 2, 3 or 4; or wxJOY_BUTTON_ANY to indicate any button down event.

bool wxJoystickEvent::ButtonUp ( int  button = wxJOY_BUTTON_ANY  )  const

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

Parameters:
button Can be wxJOY_BUTTONn where n is 1, 2, 3 or 4; or wxJOY_BUTTON_ANY to indicate any button down event.

int wxJoystickEvent::GetButtonChange (  )  const

Returns the identifier of the button changing state.

This is a wxJOY_BUTTONn identifier, where n is one of 1, 2, 3, 4.

int wxJoystickEvent::GetButtonState (  )  const

Returns the down state of the buttons.

This is a wxJOY_BUTTONn identifier, where n is one of 1, 2, 3, 4.

int wxJoystickEvent::GetJoystick (  )  const

Returns the identifier of the joystick generating the event - one of wxJOYSTICK1 and wxJOYSTICK2.

wxPoint wxJoystickEvent::GetPosition (  )  const

Returns the x, y position of the joystick event.

int wxJoystickEvent::GetZPosition (  )  const

Returns the z position of the joystick event.

bool wxJoystickEvent::IsButton (  )  const

Returns true if this was a button up or down event (not 'is any button down?').

bool wxJoystickEvent::IsMove (  )  const

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

bool wxJoystickEvent::IsZMove (  )  const

Returns true if this was a z move event.



wxWidgets logo

[ top ]