1 \section{\class{wxJoystickEvent
}}\label{wxjoystickevent
}
3 This event class contains information about mouse events, particularly
4 events received by windows.
6 \wxheading{Derived from
}
8 \helpref{wxEvent
}{wxevent
}\\
9 \helpref{wxObject
}{wxobject
}
11 \wxheading{Include files
}
17 \helpref{wxCore
}{librarieslist
}
19 \wxheading{Event table macros
}
21 To process a mouse event, use these event handler macros to direct input to member
22 functions that take a wxJoystickEvent argument.
25 \begin{twocollist
}\itemsep=
0pt
26 \twocolitem{{\bf EVT
\_JOY\_BUTTON\_DOWN(func)
}}{Process a wxEVT
\_JOY\_BUTTON\_DOWN event.
}
27 \twocolitem{{\bf EVT
\_JOY\_BUTTON\_UP(func)
}}{Process a wxEVT
\_JOY\_BUTTON\_UP event.
}
28 \twocolitem{{\bf EVT
\_JOY\_MOVE(func)
}}{Process a wxEVT
\_JOY\_MOVE event.
}
29 \twocolitem{{\bf EVT
\_JOY\_ZMOVE(func)
}}{Process a wxEVT
\_JOY\_ZMOVE event.
}
30 \twocolitem{{\bf EVT
\_JOYSTICK\_EVENTS(func)
}}{Processes all joystick events.
}
35 \helpref{wxJoystick
}{wxjoystick
}
37 \latexignore{\rtfignore{\wxheading{Members
}}}
39 \membersection{wxJoystickEvent::wxJoystickEvent
}\label{wxjoystickeventctor
}
41 \func{}{wxJoystickEvent
}{\param{WXTYPE
}{ eventType =
0},
\param{int
}{ state =
0},
42 \param{int
}{ joystick = wxJOYSTICK1
},
\param{int
}{change =
0}}
46 \membersection{wxJoystickEvent::ButtonDown
}\label{wxjoystickeventbuttondown
}
48 \constfunc{bool
}{ButtonDown
}{\param{int
}{ button = wxJOY
\_BUTTON\_ANY}}
50 Returns true if the event was a down event from the specified button (or any button).
52 \wxheading{Parameters
}
54 \docparam{button
}{Can be wxJOY
\_BUTTONn where n is
1,
2,
3 or
4; or wxJOY
\_BUTTON\_ANY to
55 indicate any button down event.
}
57 \membersection{wxJoystickEvent::ButtonIsDown
}\label{wxjoystickeventbuttonisdown
}
59 \constfunc{bool
}{ButtonIsDown
}{\param{int
}{ button = wxJOY
\_BUTTON\_ANY}}
61 Returns true if the specified button (or any button) was in a down state.
63 \wxheading{Parameters
}
65 \docparam{button
}{Can be wxJOY
\_BUTTONn where n is
1,
2,
3 or
4; or wxJOY
\_BUTTON\_ANY to
66 indicate any button down event.
}
68 \membersection{wxJoystickEvent::ButtonUp
}\label{wxjoystickeventbuttonup
}
70 \constfunc{bool
}{ButtonUp
}{\param{int
}{ button = wxJOY
\_BUTTON\_ANY}}
72 Returns true if the event was an up event from the specified button (or any button).
74 \wxheading{Parameters
}
76 \docparam{button
}{Can be wxJOY
\_BUTTONn where n is
1,
2,
3 or
4; or wxJOY
\_BUTTON\_ANY to
77 indicate any button down event.
}
79 \membersection{wxJoystickEvent::GetButtonChange
}\label{wxjoystickeventgetbuttonchange
}
81 \constfunc{int
}{GetButtonChange
}{\void}
83 Returns the identifier of the button changing state. This is a wxJOY
\_BUTTONn identifier, where
84 n is one of
1,
2,
3,
4.
86 \membersection{wxJoystickEvent::GetButtonState
}\label{wxjoystickeventgetbuttonstate
}
88 \constfunc{int
}{GetButtonState
}{\void}
90 Returns the down state of the buttons. This is a bitlist of wxJOY
\_BUTTONn identifiers, where
91 n is one of
1,
2,
3,
4.
93 \membersection{wxJoystickEvent::GetJoystick
}\label{wxjoystickeventgetjoystick
}
95 \constfunc{int
}{GetJoystick
}{\void}
97 Returns the identifier of the joystick generating the event - one of wxJOYSTICK1 and wxJOYSTICK2.
99 \membersection{wxJoystickEvent::GetPosition
}\label{wxjoystickeventgetposition
}
101 \constfunc{wxPoint
}{GetPosition
}{\void}
103 Returns the x, y position of the joystick event.
105 \membersection{wxJoystickEvent::GetZPosition
}\label{wxjoystickeventgetzposition
}
107 \constfunc{int
}{GetZPosition
}{\void}
109 Returns the z position of the joystick event.
111 \membersection{wxJoystickEvent::IsButton
}\label{wxjoystickeventisbutton
}
113 \constfunc{bool
}{IsButton
}{\void}
115 Returns true if this was a button up or down event (
{\it not
} 'is any button down?').
117 \membersection{wxJoystickEvent::IsMove
}\label{wxjoystickeventismove
}
119 \constfunc{bool
}{IsMove
}{\void}
121 Returns true if this was an x, y move event.
123 \membersection{wxJoystickEvent::IsZMove
}\label{wxjoystickeventiszmove
}
125 \constfunc{bool
}{IsZMove
}{\void}
127 Returns true if this was a z move event.