File: wx123.htm

package info (click to toggle)
wxwin2-doc 2.01-1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 6,540 kB
  • ctags: 5,968
  • sloc: cpp: 15,157; makefile: 434; sh: 6
file content (180 lines) | stat: -rw-r--r-- 5,851 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<HTML>
<head><title>wxJoystickEvent</title></head>

<BODY BGCOLOR=#FFFFFF>
<A NAME="wxjoystickevent"></A><CENTER>
<A HREF="wx.htm"><img align=center src="contents.gif" BORDER=0 ALT="Contents"></A> <A HREF="wx22.htm#classref"><img align=center src="up.gif" BORDER=0 ALT="Up"></A> <A HREF="wx122.htm#wxjoystick"><img align=center src="back.gif" BORDER=0 ALT="Previous"></A> <A HREF="wx124.htm#wxkeyevent"><img align=center src="forward.gif" BORDER=0 ALT="Next"></A> </CENTER><HR>

<H2>wxJoystickEvent</H2>
<P>
This event class contains information about mouse events, particularly
events received by windows.<P>
<B><FONT COLOR="#FF0000">Derived from</FONT></B><P>
<A HREF="wx84.htm#wxevent">wxEvent</A><P>
<B><FONT COLOR="#FF0000">Include files</FONT></B><P>
&lt;wx/event.h&gt;<P>
<B><FONT COLOR="#FF0000">Event table macros</FONT></B><P>
To process a mouse event, use these event handler macros to direct input to member
functions that take a wxJoystickEvent argument.<P>


<TABLE>


<TR><TD VALIGN=TOP>
<B>EVT_JOY_BUTTON_DOWN(func)</B>
</TD>

<TD VALIGN=TOP>
Process a wxEVT_JOY_BUTTON_DOWN event.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>EVT_JOY_BUTTON_UP(func)</B>
</TD>

<TD VALIGN=TOP>
Process a wxEVT_JOY_BUTTON_UP event.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>EVT_JOY_MOVE(func)</B>
</TD>

<TD VALIGN=TOP>
Process a wxEVT_JOY_MOVE event.
</TD></TR>


<TR><TD VALIGN=TOP>
<B>EVT_JOY_ZMOVE(func)</B>
</TD>

<TD VALIGN=TOP>
Process a wxEVT_JOY_ZMOVE event.
</TD></TR>


</TABLE>
<B><FONT COLOR="#FF0000">See also</FONT></B><P>
<A HREF="wx122.htm#wxjoystick">wxJoystick</A><P>
<B><FONT COLOR="#FF0000">Members</FONT></B><P>
<A HREF="#topic494">wxJoystickEvent::wxJoystickEvent</A><BR>
<A HREF="#wxjoystickeventbuttondown">wxJoystickEvent::ButtonDown</A><BR>
<A HREF="#wxjoystickeventbuttonisdown">wxJoystickEvent::ButtonIsDown</A><BR>
<A HREF="#wxjoystickeventbuttonup">wxJoystickEvent::ButtonUp</A><BR>
<A HREF="#wxjoystickeventgetbuttonchange">wxJoystickEvent::GetButtonChange</A><BR>
<A HREF="#wxjoystickeventgetbuttonstate">wxJoystickEvent::GetButtonState</A><BR>
<A HREF="#wxjoystickeventgetjoystick">wxJoystickEvent::GetJoystick</A><BR>
<A HREF="#wxjoystickeventgetposition">wxJoystickEvent::GetPosition</A><BR>
<A HREF="#wxjoystickeventgetzposition">wxJoystickEvent::GetZPosition</A><BR>
<A HREF="#wxjoystickeventisbutton">wxJoystickEvent::IsButton</A><BR>
<A HREF="#wxjoystickeventismove">wxJoystickEvent::IsMove</A><BR>
<A HREF="#wxjoystickeventiszmove">wxJoystickEvent::IsZMove</A><BR>
<P>

<HR>
<A NAME="topic494"></A>
<H3>wxJoystickEvent::wxJoystickEvent</H3>
<P>
<B></B> <B>wxJoystickEvent</B>(<B>WXTYPE</B><I> eventType = 0</I>, <B>int</B><I> state = 0</I>,
 <B>int</B><I> joystick = wxJOYSTICK1</I>, <B>int </B><I>change = 0</I>)<P>
Constructor.<P>

<HR>
<A NAME="wxjoystickeventbuttondown"></A>
<H3>wxJoystickEvent::ButtonDown</H3>
<P>
<B>bool</B> <B>ButtonDown</B>(<B>int</B><I> button = wxJOY_BUTTON_ANY</I>) <B>const</B><P>
Returns TRUE if the event was a down event from the specified button (or any button).<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>button</I><UL><UL>
Can be wxJOY_BUTTONn where n is 1, 2, 3 or 4; or wxJOY_BUTTON_ANY to
indicate any button down event.</UL></UL>
<P>

<HR>
<A NAME="wxjoystickeventbuttonisdown"></A>
<H3>wxJoystickEvent::ButtonIsDown</H3>
<P>
<B>bool</B> <B>ButtonIsDown</B>(<B>int</B><I> button = wxJOY_BUTTON_ANY</I>) <B>const</B><P>
Returns TRUE if the specified button (or any button) was in a down state.<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>button</I><UL><UL>
Can be wxJOY_BUTTONn where n is 1, 2, 3 or 4; or wxJOY_BUTTON_ANY to
indicate any button down event.</UL></UL>
<P>

<HR>
<A NAME="wxjoystickeventbuttonup"></A>
<H3>wxJoystickEvent::ButtonUp</H3>
<P>
<B>bool</B> <B>ButtonUp</B>(<B>int</B><I> button = wxJOY_BUTTON_ANY</I>) <B>const</B><P>
Returns TRUE if the event was an up event from the specified button (or any button).<P>
<B><FONT COLOR="#FF0000">Parameters</FONT></B><P>
<I>button</I><UL><UL>
Can be wxJOY_BUTTONn where n is 1, 2, 3 or 4; or wxJOY_BUTTON_ANY to
indicate any button down event.</UL></UL>
<P>

<HR>
<A NAME="wxjoystickeventgetbuttonchange"></A>
<H3>wxJoystickEvent::GetButtonChange</H3>
<P>
<B>int</B> <B>GetButtonChange</B>() <B>const</B><P>
Returns the identifier of the button changing state. This is a wxJOY_BUTTONn identifier, where
n is one of 1, 2, 3, 4.<P>

<HR>
<A NAME="wxjoystickeventgetbuttonstate"></A>
<H3>wxJoystickEvent::GetButtonState</H3>
<P>
<B>int</B> <B>GetButtonState</B>() <B>const</B><P>
Returns the down state of the buttons. This is a bitlist of wxJOY_BUTTONn identifiers, where
n is one of 1, 2, 3, 4.<P>

<HR>
<A NAME="wxjoystickeventgetjoystick"></A>
<H3>wxJoystickEvent::GetJoystick</H3>
<P>
<B>int</B> <B>GetJoystick</B>() <B>const</B><P>
Returns the identifier of the joystick generating the event - one of wxJOYSTICK1 and wxJOYSTICK2.<P>

<HR>
<A NAME="wxjoystickeventgetposition"></A>
<H3>wxJoystickEvent::GetPosition</H3>
<P>
<B>wxPoint</B> <B>GetPosition</B>() <B>const</B><P>
Returns the x, y position of the joystick event.<P>

<HR>
<A NAME="wxjoystickeventgetzposition"></A>
<H3>wxJoystickEvent::GetZPosition</H3>
<P>
<B>int</B> <B>GetZPosition</B>() <B>const</B><P>
Returns the z position of the joystick event.<P>

<HR>
<A NAME="wxjoystickeventisbutton"></A>
<H3>wxJoystickEvent::IsButton</H3>
<P>
<B>bool</B> <B>IsButton</B>() <B>const</B><P>
Returns TRUE if this was a button up or down event (<I>not</I> 'is any button down?').<P>

<HR>
<A NAME="wxjoystickeventismove"></A>
<H3>wxJoystickEvent::IsMove</H3>
<P>
<B>bool</B> <B>IsMove</B>() <B>const</B><P>
Returns TRUE if this was an x, y move event.<P>

<HR>
<A NAME="wxjoystickeventiszmove"></A>
<H3>wxJoystickEvent::IsZMove</H3>
<P>
<B>bool</B> <B>IsZMove</B>() <B>const</B><P>
Returns TRUE if this was a z move event.<P>

</BODY></HTML>