]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/joyevent.tex
added null pointer check and assert
[wxWidgets.git] / docs / latex / wx / joyevent.tex
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 \helpref{wxObject}{wxobject}
10
11 \wxheading{Include files}
12
13 <wx/event.h>
14
15 \wxheading{Library}
16
17 \helpref{wxCore}{librarieslist}
18
19 \wxheading{Event table macros}
20
21 To process a mouse event, use these event handler macros to direct input to member
22 functions that take a wxJoystickEvent argument.
23
24 \twocolwidtha{7cm}
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.}
31 \end{twocollist}%
32
33 \wxheading{See also}
34
35 \helpref{wxJoystick}{wxjoystick}
36
37 \latexignore{\rtfignore{\wxheading{Members}}}
38
39 \membersection{wxJoystickEvent::wxJoystickEvent}\label{wxjoystickeventctor}
40
41 \func{}{wxJoystickEvent}{\param{WXTYPE}{ eventType = 0}, \param{int}{ state = 0},
42 \param{int}{ joystick = wxJOYSTICK1}, \param{int }{change = 0}}
43
44 Constructor.
45
46 \membersection{wxJoystickEvent::ButtonDown}\label{wxjoystickeventbuttondown}
47
48 \constfunc{bool}{ButtonDown}{\param{int}{ button = wxJOY\_BUTTON\_ANY}}
49
50 Returns true if the event was a down event from the specified button (or any button).
51
52 \wxheading{Parameters}
53
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.}
56
57 \membersection{wxJoystickEvent::ButtonIsDown}\label{wxjoystickeventbuttonisdown}
58
59 \constfunc{bool}{ButtonIsDown}{\param{int}{ button = wxJOY\_BUTTON\_ANY}}
60
61 Returns true if the specified button (or any button) was in a down state.
62
63 \wxheading{Parameters}
64
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.}
67
68 \membersection{wxJoystickEvent::ButtonUp}\label{wxjoystickeventbuttonup}
69
70 \constfunc{bool}{ButtonUp}{\param{int}{ button = wxJOY\_BUTTON\_ANY}}
71
72 Returns true if the event was an up event from the specified button (or any button).
73
74 \wxheading{Parameters}
75
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.}
78
79 \membersection{wxJoystickEvent::GetButtonChange}\label{wxjoystickeventgetbuttonchange}
80
81 \constfunc{int}{GetButtonChange}{\void}
82
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.
85
86 \membersection{wxJoystickEvent::GetButtonState}\label{wxjoystickeventgetbuttonstate}
87
88 \constfunc{int}{GetButtonState}{\void}
89
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.
92
93 \membersection{wxJoystickEvent::GetJoystick}\label{wxjoystickeventgetjoystick}
94
95 \constfunc{int}{GetJoystick}{\void}
96
97 Returns the identifier of the joystick generating the event - one of wxJOYSTICK1 and wxJOYSTICK2.
98
99 \membersection{wxJoystickEvent::GetPosition}\label{wxjoystickeventgetposition}
100
101 \constfunc{wxPoint}{GetPosition}{\void}
102
103 Returns the x, y position of the joystick event.
104
105 \membersection{wxJoystickEvent::GetZPosition}\label{wxjoystickeventgetzposition}
106
107 \constfunc{int}{GetZPosition}{\void}
108
109 Returns the z position of the joystick event.
110
111 \membersection{wxJoystickEvent::IsButton}\label{wxjoystickeventisbutton}
112
113 \constfunc{bool}{IsButton}{\void}
114
115 Returns true if this was a button up or down event ({\it not} 'is any button down?').
116
117 \membersection{wxJoystickEvent::IsMove}\label{wxjoystickeventismove}
118
119 \constfunc{bool}{IsMove}{\void}
120
121 Returns true if this was an x, y move event.
122
123 \membersection{wxJoystickEvent::IsZMove}\label{wxjoystickeventiszmove}
124
125 \constfunc{bool}{IsZMove}{\void}
126
127 Returns true if this was a z move event.
128