| 1 | \section{\class{wxJoystickEvent}}\label{wxjoystickevent} |
| 2 | |
| 3 | This event class contains information about mouse events, particularly |
| 4 | events received by windows. |
| 5 | |
| 6 | \wxheading{Derived from} |
| 7 | |
| 8 | \helpref{wxEvent}{wxevent} |
| 9 | |
| 10 | \wxheading{Include files} |
| 11 | |
| 12 | <wx/event.h> |
| 13 | |
| 14 | \wxheading{Event table macros} |
| 15 | |
| 16 | To process a mouse event, use these event handler macros to direct input to member |
| 17 | functions that take a wxJoystickEvent argument. |
| 18 | |
| 19 | \twocolwidtha{7cm} |
| 20 | \begin{twocollist}\itemsep=0pt |
| 21 | \twocolitem{{\bf EVT\_JOY\_BUTTON\_DOWN(func)}}{Process a wxEVT\_JOY\_BUTTON\_DOWN event.} |
| 22 | \twocolitem{{\bf EVT\_JOY\_BUTTON\_UP(func)}}{Process a wxEVT\_JOY\_BUTTON\_UP event.} |
| 23 | \twocolitem{{\bf EVT\_JOY\_MOVE(func)}}{Process a wxEVT\_JOY\_MOVE event.} |
| 24 | \twocolitem{{\bf EVT\_JOY\_ZMOVE(func)}}{Process a wxEVT\_JOY\_ZMOVE event.} |
| 25 | \end{twocollist}% |
| 26 | |
| 27 | \wxheading{See also} |
| 28 | |
| 29 | \helpref{wxJoystick}{wxjoystick} |
| 30 | |
| 31 | \latexignore{\rtfignore{\wxheading{Members}}} |
| 32 | |
| 33 | \membersection{wxJoystickEvent::wxJoystickEvent} |
| 34 | |
| 35 | \func{}{wxJoystickEvent}{\param{WXTYPE}{ eventType = 0}, \param{int}{ state = 0}, |
| 36 | \param{int}{ joystick = wxJOYSTICK1}, \param{int }{change = 0}} |
| 37 | |
| 38 | Constructor. |
| 39 | |
| 40 | \membersection{wxJoystickEvent::ButtonDown}\label{wxjoystickeventbuttondown} |
| 41 | |
| 42 | \constfunc{bool}{ButtonDown}{\param{int}{ button = wxJOY\_BUTTON\_ANY}} |
| 43 | |
| 44 | Returns TRUE if the event was a down event from the specified button (or any button). |
| 45 | |
| 46 | \wxheading{Parameters} |
| 47 | |
| 48 | \docparam{button}{Can be wxJOY\_BUTTONn where n is 1, 2, 3 or 4; or wxJOY\_BUTTON\_ANY to |
| 49 | indicate any button down event.} |
| 50 | |
| 51 | \membersection{wxJoystickEvent::ButtonIsDown}\label{wxjoystickeventbuttonisdown} |
| 52 | |
| 53 | \constfunc{bool}{ButtonIsDown}{\param{int}{ button = wxJOY\_BUTTON\_ANY}} |
| 54 | |
| 55 | Returns TRUE if the specified button (or any button) was in a down state. |
| 56 | |
| 57 | \wxheading{Parameters} |
| 58 | |
| 59 | \docparam{button}{Can be wxJOY\_BUTTONn where n is 1, 2, 3 or 4; or wxJOY\_BUTTON\_ANY to |
| 60 | indicate any button down event.} |
| 61 | |
| 62 | \membersection{wxJoystickEvent::ButtonUp}\label{wxjoystickeventbuttonup} |
| 63 | |
| 64 | \constfunc{bool}{ButtonUp}{\param{int}{ button = wxJOY\_BUTTON\_ANY}} |
| 65 | |
| 66 | Returns TRUE if the event was an up event from the specified button (or any button). |
| 67 | |
| 68 | \wxheading{Parameters} |
| 69 | |
| 70 | \docparam{button}{Can be wxJOY\_BUTTONn where n is 1, 2, 3 or 4; or wxJOY\_BUTTON\_ANY to |
| 71 | indicate any button down event.} |
| 72 | |
| 73 | \membersection{wxJoystickEvent::GetButtonChange}\label{wxjoystickeventgetbuttonchange} |
| 74 | |
| 75 | \constfunc{int}{GetButtonChange}{\void} |
| 76 | |
| 77 | Returns the identifier of the button changing state. This is a wxJOY\_BUTTONn identifier, where |
| 78 | n is one of 1, 2, 3, 4. |
| 79 | |
| 80 | \membersection{wxJoystickEvent::GetButtonState}\label{wxjoystickeventgetbuttonstate} |
| 81 | |
| 82 | \constfunc{int}{GetButtonState}{\void} |
| 83 | |
| 84 | Returns the down state of the buttons. This is a bitlist of wxJOY\_BUTTONn identifiers, where |
| 85 | n is one of 1, 2, 3, 4. |
| 86 | |
| 87 | \membersection{wxJoystickEvent::GetJoystick}\label{wxjoystickeventgetjoystick} |
| 88 | |
| 89 | \constfunc{int}{GetJoystick}{\void} |
| 90 | |
| 91 | Returns the identifier of the joystick generating the event - one of wxJOYSTICK1 and wxJOYSTICK2. |
| 92 | |
| 93 | \membersection{wxJoystickEvent::GetPosition}\label{wxjoystickeventgetposition} |
| 94 | |
| 95 | \constfunc{wxPoint}{GetPosition}{\void} |
| 96 | |
| 97 | Returns the x, y position of the joystick event. |
| 98 | |
| 99 | \membersection{wxJoystickEvent::GetZPosition}\label{wxjoystickeventgetzposition} |
| 100 | |
| 101 | \constfunc{int}{GetZPosition}{\void} |
| 102 | |
| 103 | Returns the z position of the joystick event. |
| 104 | |
| 105 | \membersection{wxJoystickEvent::IsButton}\label{wxjoystickeventisbutton} |
| 106 | |
| 107 | \constfunc{bool}{IsButton}{\void} |
| 108 | |
| 109 | Returns TRUE if this was a button up or down event ({\it not} 'is any button down?'). |
| 110 | |
| 111 | \membersection{wxJoystickEvent::IsMove}\label{wxjoystickeventismove} |
| 112 | |
| 113 | \constfunc{bool}{IsMove}{\void} |
| 114 | |
| 115 | Returns TRUE if this was an x, y move event. |
| 116 | |
| 117 | \membersection{wxJoystickEvent::IsZMove}\label{wxjoystickeventiszmove} |
| 118 | |
| 119 | \constfunc{bool}{IsZMove}{\void} |
| 120 | |
| 121 | Returns TRUE if this was a z move event. |
| 122 | |