]>
Commit | Line | Data |
---|---|---|
1 | \section{\class{wxKeyEvent}}\label{wxkeyevent} | |
2 | ||
3 | This event class contains information about keypress (character) events. See \helpref{wxWindow::OnChar}{wxwindowonchar}. | |
4 | ||
5 | \wxheading{Derived from} | |
6 | ||
7 | \helpref{wxEvent}{wxevent} | |
8 | ||
9 | \wxheading{Event table macros} | |
10 | ||
11 | To process a key event, use these event handler macros to direct input to member | |
12 | functions that take a wxKeyEvent argument. | |
13 | ||
14 | \twocolwidtha{7cm} | |
15 | \begin{twocollist}\itemsep=0pt | |
16 | \twocolitem{{\bf EVT\_CHAR(func)}}{Process a wxEVT\_CHAR event.} | |
17 | \twocolitem{{\bf EVT\_CHAR\_HOOK(func)}}{Process a wxEVT\_CHAR\_HOOK event.} | |
18 | \end{twocollist}% | |
19 | ||
20 | \latexignore{\rtfignore{\wxheading{Members}}} | |
21 | ||
22 | \membersection{wxKeyEvent::m\_altDown} | |
23 | ||
24 | \member{bool}{m\_altDown} | |
25 | ||
26 | TRUE if the Alt key is pressed down. | |
27 | ||
28 | \membersection{wxKeyEvent::m\_controlDown} | |
29 | ||
30 | \member{bool}{m\_controlDown} | |
31 | ||
32 | TRUE if control is pressed down. | |
33 | ||
34 | \membersection{wxKeyEvent::m\_keyCode} | |
35 | ||
36 | \member{long}{m\_keyCode} | |
37 | ||
38 | Virtual keycode. An enumerated type, one of: | |
39 | ||
40 | \begin{verbatim} | |
41 | WXK_BACK = 8 | |
42 | WXK_TAB = 9 | |
43 | WXK_RETURN = 13 | |
44 | WXK_ESCAPE = 27 | |
45 | WXK_SPACE = 32 | |
46 | WXK_DELETE = 127 | |
47 | ||
48 | WXK_START = 300 | |
49 | WXK_LBUTTON | |
50 | WXK_RBUTTON | |
51 | WXK_CANCEL | |
52 | WXK_MBUTTON | |
53 | WXK_CLEAR | |
54 | WXK_SHIFT | |
55 | WXK_CONTROL | |
56 | WXK_MENU | |
57 | WXK_PAUSE | |
58 | WXK_CAPITAL | |
59 | WXK_PRIOR | |
60 | WXK_NEXT | |
61 | WXK_END | |
62 | WXK_HOME | |
63 | WXK_LEFT | |
64 | WXK_UP | |
65 | WXK_RIGHT | |
66 | WXK_DOWN | |
67 | WXK_SELECT | |
68 | WXK_PRINT | |
69 | WXK_EXECUTE | |
70 | WXK_SNAPSHOT | |
71 | WXK_INSERT | |
72 | WXK_HELP | |
73 | WXK_NUMPAD0 | |
74 | WXK_NUMPAD1 | |
75 | WXK_NUMPAD2 | |
76 | WXK_NUMPAD3 | |
77 | WXK_NUMPAD4 | |
78 | WXK_NUMPAD5 | |
79 | WXK_NUMPAD6 | |
80 | WXK_NUMPAD7 | |
81 | WXK_NUMPAD8 | |
82 | WXK_NUMPAD9 | |
83 | WXK_MULTIPLY | |
84 | WXK_ADD | |
85 | WXK_SEPARATOR | |
86 | WXK_SUBTRACT | |
87 | WXK_DECIMAL | |
88 | WXK_DIVIDE | |
89 | WXK_F1 | |
90 | WXK_F2 | |
91 | WXK_F3 | |
92 | WXK_F4 | |
93 | WXK_F5 | |
94 | WXK_F6 | |
95 | WXK_F7 | |
96 | WXK_F8 | |
97 | WXK_F9 | |
98 | WXK_F10 | |
99 | WXK_F11 | |
100 | WXK_F12 | |
101 | WXK_F13 | |
102 | WXK_F14 | |
103 | WXK_F15 | |
104 | WXK_F16 | |
105 | WXK_F17 | |
106 | WXK_F18 | |
107 | WXK_F19 | |
108 | WXK_F20 | |
109 | WXK_F21 | |
110 | WXK_F22 | |
111 | WXK_F23 | |
112 | WXK_F24 | |
113 | WXK_NUMLOCK | |
114 | WXK_SCROLL | |
115 | \end{verbatim} | |
116 | ||
117 | \membersection{wxKeyEvent::m\_metaDown} | |
118 | ||
119 | \member{bool}{m\_metaDown} | |
120 | ||
121 | TRUE if the Meta key is pressed down. | |
122 | ||
123 | \membersection{wxKeyEvent::m\_shiftDown} | |
124 | ||
125 | \member{bool}{m\_shiftDown} | |
126 | ||
127 | TRUE if shift is pressed down. | |
128 | ||
129 | \membersection{wxKeyEvent::m\_x} | |
130 | ||
131 | \member{int}{m\_x} | |
132 | ||
133 | X position of the event. | |
134 | ||
135 | \membersection{wxKeyEvent::m\_y} | |
136 | ||
137 | \member{int}{m\_y} | |
138 | ||
139 | Y position of the event. | |
140 | ||
141 | \membersection{wxKeyEvent::wxKeyEvent} | |
142 | ||
143 | \func{}{wxKeyEvent}{\param{WXTYPE}{ keyEventType}} | |
144 | ||
145 | Constructor. Currently, the only valid event types are wxEVT\_CHAR and wxEVT\_CHAR\_HOOK. | |
146 | ||
147 | \membersection{wxKeyEvent::AltDown} | |
148 | ||
149 | \func{bool}{AltDown}{\void} | |
150 | ||
151 | Returns TRUE if the Alt key was down at the time of the key event. | |
152 | ||
153 | \membersection{wxKeyEvent::ControlDown} | |
154 | ||
155 | \func{bool}{ControlDown}{\void} | |
156 | ||
157 | Returns TRUE if the control key was down at the time of the key event. | |
158 | ||
159 | \membersection{wxKeyEvent::GetX} | |
160 | ||
161 | \func{float}{GetX}{\void} | |
162 | ||
163 | Returns the X position of the event. | |
164 | ||
165 | \membersection{wxKeyEvent::GetY} | |
166 | ||
167 | \func{float}{GetY}{\void} | |
168 | ||
169 | Returns the Y position of the event. | |
170 | ||
171 | \membersection{wxKeyEvent::KeyCode} | |
172 | ||
173 | \func{long}{KeyCode}{\void} | |
174 | ||
175 | Returns the virtual key code. ASCII events return normal ASCII values, | |
176 | while non-ASCII events return values such as {\bf WXK\_LEFT} for the | |
177 | left cursor key. See {\tt wx\_defs.h} for a full list of the virtual key codes. | |
178 | ||
179 | \membersection{wxKeyEvent::MetaDown} | |
180 | ||
181 | \func{bool}{MetaDown}{\void} | |
182 | ||
183 | Returns TRUE if the Meta key was down at the time of the key event. | |
184 | ||
185 | \membersection{wxKeyEvent::Position} | |
186 | ||
187 | \func{void}{Position}{\param{float *}{x}, \param{float *}{y}} | |
188 | ||
189 | Obtains the position at which the key was pressed. | |
190 | ||
191 | \membersection{wxKeyEvent::ShiftDown} | |
192 | ||
193 | \func{bool}{ShiftDown}{\void} | |
194 | ||
195 | Returns TRUE if the shift key was down at the time of the key event. | |
196 | ||
197 |