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