wxWidgets/docs/latex/wx/joyevent.tex

124 lines
3.8 KiB
TeX
Raw Normal View History

\section{\class{wxJoystickEvent}}\label{wxjoystickevent}
This event class contains information about mouse events, particularly
events received by windows.
\wxheading{Derived from}
\helpref{wxEvent}{wxevent}
\wxheading{Include files}
<wx/event.h>
\wxheading{Event table macros}
To process a mouse event, use these event handler macros to direct input to member
functions that take a wxJoystickEvent argument.
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
\twocolitem{{\bf EVT\_JOY\_BUTTON\_DOWN(func)}}{Process a wxEVT\_JOY\_BUTTON\_DOWN event.}
\twocolitem{{\bf EVT\_JOY\_BUTTON\_UP(func)}}{Process a wxEVT\_JOY\_BUTTON\_UP event.}
\twocolitem{{\bf EVT\_JOY\_MOVE(func)}}{Process a wxEVT\_JOY\_MOVE event.}
\twocolitem{{\bf EVT\_JOY\_ZMOVE(func)}}{Process a wxEVT\_JOY\_ZMOVE event.}
\twocolitem{{\bf EVT\_JOYSTICK\_EVENTS(func)}}{Processes all joystick events.}
\end{twocollist}%
\wxheading{See also}
\helpref{wxJoystick}{wxjoystick}
\latexignore{\rtfignore{\wxheading{Members}}}
\membersection{wxJoystickEvent::wxJoystickEvent}\label{wxjoystickeventctor}
\func{}{wxJoystickEvent}{\param{WXTYPE}{ eventType = 0}, \param{int}{ state = 0},
\param{int}{ joystick = wxJOYSTICK1}, \param{int }{change = 0}}
Constructor.
\membersection{wxJoystickEvent::ButtonDown}\label{wxjoystickeventbuttondown}
\constfunc{bool}{ButtonDown}{\param{int}{ button = wxJOY\_BUTTON\_ANY}}
Returns true if the event was a down event from the specified button (or any button).
\wxheading{Parameters}
\docparam{button}{Can be wxJOY\_BUTTONn where n is 1, 2, 3 or 4; or wxJOY\_BUTTON\_ANY to
indicate any button down event.}
\membersection{wxJoystickEvent::ButtonIsDown}\label{wxjoystickeventbuttonisdown}
\constfunc{bool}{ButtonIsDown}{\param{int}{ button = wxJOY\_BUTTON\_ANY}}
Returns true if the specified button (or any button) was in a down state.
\wxheading{Parameters}
\docparam{button}{Can be wxJOY\_BUTTONn where n is 1, 2, 3 or 4; or wxJOY\_BUTTON\_ANY to
indicate any button down event.}
\membersection{wxJoystickEvent::ButtonUp}\label{wxjoystickeventbuttonup}
\constfunc{bool}{ButtonUp}{\param{int}{ button = wxJOY\_BUTTON\_ANY}}
Returns true if the event was an up event from the specified button (or any button).
\wxheading{Parameters}
\docparam{button}{Can be wxJOY\_BUTTONn where n is 1, 2, 3 or 4; or wxJOY\_BUTTON\_ANY to
indicate any button down event.}
\membersection{wxJoystickEvent::GetButtonChange}\label{wxjoystickeventgetbuttonchange}
\constfunc{int}{GetButtonChange}{\void}
Returns the identifier of the button changing state. This is a wxJOY\_BUTTONn identifier, where
n is one of 1, 2, 3, 4.
\membersection{wxJoystickEvent::GetButtonState}\label{wxjoystickeventgetbuttonstate}
\constfunc{int}{GetButtonState}{\void}
Returns the down state of the buttons. This is a bitlist of wxJOY\_BUTTONn identifiers, where
n is one of 1, 2, 3, 4.
\membersection{wxJoystickEvent::GetJoystick}\label{wxjoystickeventgetjoystick}
\constfunc{int}{GetJoystick}{\void}
Returns the identifier of the joystick generating the event - one of wxJOYSTICK1 and wxJOYSTICK2.
\membersection{wxJoystickEvent::GetPosition}\label{wxjoystickeventgetposition}
\constfunc{wxPoint}{GetPosition}{\void}
Returns the x, y position of the joystick event.
\membersection{wxJoystickEvent::GetZPosition}\label{wxjoystickeventgetzposition}
\constfunc{int}{GetZPosition}{\void}
Returns the z position of the joystick event.
\membersection{wxJoystickEvent::IsButton}\label{wxjoystickeventisbutton}
\constfunc{bool}{IsButton}{\void}
Returns true if this was a button up or down event ({\it not} 'is any button down?').
\membersection{wxJoystickEvent::IsMove}\label{wxjoystickeventismove}
\constfunc{bool}{IsMove}{\void}
Returns true if this was an x, y move event.
\membersection{wxJoystickEvent::IsZMove}\label{wxjoystickeventiszmove}
\constfunc{bool}{IsZMove}{\void}
Returns true if this was a z move event.