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
}
10 \wxheading{Include files
}
16 \helpref{wxCore
}{librarieslist
}
18 \wxheading{Event table macros
}
20 To process a mouse event, use these event handler macros to direct input to member
21 functions that take a wxJoystickEvent argument.
24 \begin{twocollist
}\itemsep=
0pt
25 \twocolitem{{\bf EVT
\_JOY\_BUTTON\_DOWN(func)
}}{Process a wxEVT
\_JOY\_BUTTON\_DOWN event.
}
26 \twocolitem{{\bf EVT
\_JOY\_BUTTON\_UP(func)
}}{Process a wxEVT
\_JOY\_BUTTON\_UP event.
}
27 \twocolitem{{\bf EVT
\_JOY\_MOVE(func)
}}{Process a wxEVT
\_JOY\_MOVE event.
}
28 \twocolitem{{\bf EVT
\_JOY\_ZMOVE(func)
}}{Process a wxEVT
\_JOY\_ZMOVE event.
}
29 \twocolitem{{\bf EVT
\_JOYSTICK\_EVENTS(func)
}}{Processes all joystick events.
}
34 \helpref{wxJoystick
}{wxjoystick
}
36 \latexignore{\rtfignore{\wxheading{Members
}}}
38 \membersection{wxJoystickEvent::wxJoystickEvent
}\label{wxjoystickeventctor
}
40 \func{}{wxJoystickEvent
}{\param{WXTYPE
}{ eventType =
0},
\param{int
}{ state =
0},
41 \param{int
}{ joystick = wxJOYSTICK1
},
\param{int
}{change =
0}}
45 \membersection{wxJoystickEvent::ButtonDown
}\label{wxjoystickeventbuttondown
}
47 \constfunc{bool
}{ButtonDown
}{\param{int
}{ button = wxJOY
\_BUTTON\_ANY}}
49 Returns true if the event was a down event from the specified button (or any button).
51 \wxheading{Parameters
}
53 \docparam{button
}{Can be wxJOY
\_BUTTONn where n is
1,
2,
3 or
4; or wxJOY
\_BUTTON\_ANY to
54 indicate any button down event.
}
56 \membersection{wxJoystickEvent::ButtonIsDown
}\label{wxjoystickeventbuttonisdown
}
58 \constfunc{bool
}{ButtonIsDown
}{\param{int
}{ button = wxJOY
\_BUTTON\_ANY}}
60 Returns true if the specified button (or any button) was in a down state.
62 \wxheading{Parameters
}
64 \docparam{button
}{Can be wxJOY
\_BUTTONn where n is
1,
2,
3 or
4; or wxJOY
\_BUTTON\_ANY to
65 indicate any button down event.
}
67 \membersection{wxJoystickEvent::ButtonUp
}\label{wxjoystickeventbuttonup
}
69 \constfunc{bool
}{ButtonUp
}{\param{int
}{ button = wxJOY
\_BUTTON\_ANY}}
71 Returns true if the event was an up event from the specified button (or any button).
73 \wxheading{Parameters
}
75 \docparam{button
}{Can be wxJOY
\_BUTTONn where n is
1,
2,
3 or
4; or wxJOY
\_BUTTON\_ANY to
76 indicate any button down event.
}
78 \membersection{wxJoystickEvent::GetButtonChange
}\label{wxjoystickeventgetbuttonchange
}
80 \constfunc{int
}{GetButtonChange
}{\void}
82 Returns the identifier of the button changing state. This is a wxJOY
\_BUTTONn identifier, where
83 n is one of
1,
2,
3,
4.
85 \membersection{wxJoystickEvent::GetButtonState
}\label{wxjoystickeventgetbuttonstate
}
87 \constfunc{int
}{GetButtonState
}{\void}
89 Returns the down state of the buttons. This is a bitlist of wxJOY
\_BUTTONn identifiers, where
90 n is one of
1,
2,
3,
4.
92 \membersection{wxJoystickEvent::GetJoystick
}\label{wxjoystickeventgetjoystick
}
94 \constfunc{int
}{GetJoystick
}{\void}
96 Returns the identifier of the joystick generating the event - one of wxJOYSTICK1 and wxJOYSTICK2.
98 \membersection{wxJoystickEvent::GetPosition
}\label{wxjoystickeventgetposition
}
100 \constfunc{wxPoint
}{GetPosition
}{\void}
102 Returns the x, y position of the joystick event.
104 \membersection{wxJoystickEvent::GetZPosition
}\label{wxjoystickeventgetzposition
}
106 \constfunc{int
}{GetZPosition
}{\void}
108 Returns the z position of the joystick event.
110 \membersection{wxJoystickEvent::IsButton
}\label{wxjoystickeventisbutton
}
112 \constfunc{bool
}{IsButton
}{\void}
114 Returns true if this was a button up or down event (
{\it not
} 'is any button down?').
116 \membersection{wxJoystickEvent::IsMove
}\label{wxjoystickeventismove
}
118 \constfunc{bool
}{IsMove
}{\void}
120 Returns true if this was an x, y move event.
122 \membersection{wxJoystickEvent::IsZMove
}\label{wxjoystickeventiszmove
}
124 \constfunc{bool
}{IsZMove
}{\void}
126 Returns true if this was a z move event.