author | Claus Gittinger <cg@exept.de> |
Thu, 31 Oct 2002 21:20:59 +0100 | |
changeset 3758 | c484f793f9b1 |
parent 3686 | 33158a6957a2 |
child 3773 | e2fd3df91e5c |
permissions | -rw-r--r-- |
26 | 1 |
" |
2 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
72 | 3 |
All Rights Reserved |
26 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
11 | 12 |
|
3294 | 13 |
"{ Package: 'stx:libview' }" |
14 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
15 |
MessageSend subclass:#WindowEvent |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
16 |
instanceVariableNames:'delegatedFrom consumed' |
356 | 17 |
classVariableNames:'' |
18 |
poolDictionaries:'' |
|
19 |
category:'Interface-Support' |
|
11 | 20 |
! |
21 |
||
3680 | 22 |
WindowEvent subclass:#ApplicationEvent |
23 |
instanceVariableNames:'' |
|
24 |
classVariableNames:'' |
|
25 |
poolDictionaries:'' |
|
26 |
privateIn:WindowEvent |
|
27 |
! |
|
28 |
||
3011 | 29 |
WindowEvent subclass:#InputEvent |
30 |
instanceVariableNames:'modifierFlags' |
|
31 |
classVariableNames:'F_CTRL F_ALT F_META F_SHIFT F_BUTTON1 F_BUTTON2 F_BUTTON3' |
|
32 |
poolDictionaries:'' |
|
33 |
privateIn:WindowEvent |
|
34 |
! |
|
35 |
||
3680 | 36 |
WindowEvent::InputEvent subclass:#ButtonEvent |
37 |
instanceVariableNames:'' |
|
38 |
classVariableNames:'' |
|
39 |
poolDictionaries:'' |
|
40 |
privateIn:WindowEvent |
|
41 |
! |
|
42 |
||
43 |
WindowEvent::ButtonEvent subclass:#ButtonPressEvent |
|
44 |
instanceVariableNames:'' |
|
45 |
classVariableNames:'' |
|
46 |
poolDictionaries:'' |
|
47 |
privateIn:WindowEvent |
|
48 |
! |
|
49 |
||
50 |
WindowEvent::ButtonPressEvent subclass:#ButtonMultiPressEvent |
|
51 |
instanceVariableNames:'' |
|
52 |
classVariableNames:'' |
|
53 |
poolDictionaries:'' |
|
54 |
privateIn:WindowEvent |
|
55 |
! |
|
56 |
||
57 |
WindowEvent::ButtonEvent subclass:#ButtonReleaseEvent |
|
58 |
instanceVariableNames:'' |
|
59 |
classVariableNames:'' |
|
60 |
poolDictionaries:'' |
|
61 |
privateIn:WindowEvent |
|
62 |
! |
|
63 |
||
3465 | 64 |
WindowEvent subclass:#ClientEvent |
65 |
instanceVariableNames:'eventData' |
|
66 |
classVariableNames:'' |
|
67 |
poolDictionaries:'' |
|
68 |
privateIn:WindowEvent |
|
69 |
! |
|
70 |
||
3680 | 71 |
WindowEvent subclass:#ConfigureEvent |
72 |
instanceVariableNames:'' |
|
73 |
classVariableNames:'' |
|
74 |
poolDictionaries:'' |
|
75 |
privateIn:WindowEvent |
|
76 |
! |
|
77 |
||
3465 | 78 |
WindowEvent subclass:#DamageEvent |
3297 | 79 |
instanceVariableNames:'' |
80 |
classVariableNames:'' |
|
81 |
poolDictionaries:'' |
|
82 |
privateIn:WindowEvent |
|
83 |
! |
|
84 |
||
3680 | 85 |
WindowEvent::InputEvent subclass:#DropEvent |
86 |
instanceVariableNames:'' |
|
87 |
classVariableNames:'' |
|
88 |
poolDictionaries:'' |
|
89 |
privateIn:WindowEvent |
|
90 |
! |
|
91 |
||
92 |
WindowEvent::InputEvent subclass:#EnterLeaveEvent |
|
93 |
instanceVariableNames:'' |
|
94 |
classVariableNames:'' |
|
95 |
poolDictionaries:'' |
|
96 |
privateIn:WindowEvent |
|
97 |
! |
|
98 |
||
3465 | 99 |
WindowEvent::InputEvent subclass:#FocusEvent |
100 |
instanceVariableNames:'' |
|
101 |
classVariableNames:'' |
|
102 |
poolDictionaries:'' |
|
103 |
privateIn:WindowEvent |
|
104 |
! |
|
105 |
||
3680 | 106 |
WindowEvent::ButtonEvent subclass:#ButtonMotionEvent |
3294 | 107 |
instanceVariableNames:'' |
108 |
classVariableNames:'' |
|
109 |
poolDictionaries:'' |
|
110 |
privateIn:WindowEvent |
|
111 |
! |
|
112 |
||
113 |
WindowEvent::InputEvent subclass:#KeyboardEvent |
|
114 |
instanceVariableNames:'rawKey' |
|
115 |
classVariableNames:'' |
|
116 |
poolDictionaries:'' |
|
117 |
privateIn:WindowEvent |
|
118 |
! |
|
119 |
||
3680 | 120 |
WindowEvent::KeyboardEvent subclass:#KeyReleaseEvent |
121 |
instanceVariableNames:'' |
|
122 |
classVariableNames:'' |
|
123 |
poolDictionaries:'' |
|
124 |
privateIn:WindowEvent |
|
125 |
! |
|
126 |
||
127 |
WindowEvent::KeyboardEvent subclass:#KeyPressEvent |
|
128 |
instanceVariableNames:'' |
|
129 |
classVariableNames:'' |
|
130 |
poolDictionaries:'' |
|
131 |
privateIn:WindowEvent |
|
132 |
! |
|
133 |
||
3376 | 134 |
WindowEvent::InputEvent subclass:#KeyboardFocusEvent |
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
135 |
instanceVariableNames:'' |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
136 |
classVariableNames:'' |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
137 |
poolDictionaries:'' |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
138 |
privateIn:WindowEvent |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
139 |
! |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
140 |
|
3465 | 141 |
WindowEvent subclass:#MessageSendEvent |
3376 | 142 |
instanceVariableNames:'' |
143 |
classVariableNames:'' |
|
144 |
poolDictionaries:'' |
|
145 |
privateIn:WindowEvent |
|
146 |
! |
|
147 |
||
3758 | 148 |
WindowEvent subclass:#SelectionEvent |
149 |
instanceVariableNames:'' |
|
150 |
classVariableNames:'' |
|
151 |
poolDictionaries:'' |
|
152 |
privateIn:WindowEvent |
|
153 |
! |
|
154 |
||
155 |
WindowEvent::SelectionEvent subclass:#SelectionClearEvent |
|
156 |
instanceVariableNames:'' |
|
157 |
classVariableNames:'' |
|
158 |
poolDictionaries:'' |
|
159 |
privateIn:WindowEvent |
|
160 |
! |
|
161 |
||
3680 | 162 |
WindowEvent subclass:#WindowMapUnmapEvent |
163 |
instanceVariableNames:'' |
|
164 |
classVariableNames:'' |
|
165 |
poolDictionaries:'' |
|
166 |
privateIn:WindowEvent |
|
167 |
! |
|
168 |
||
46 | 169 |
!WindowEvent class methodsFor:'documentation'! |
170 |
||
171 |
copyright |
|
172 |
" |
|
173 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
72 | 174 |
All Rights Reserved |
46 | 175 |
|
176 |
This software is furnished under a license and may be used |
|
177 |
only in accordance with the terms of that license and with the |
|
178 |
inclusion of the above copyright notice. This software may not |
|
179 |
be provided or otherwise made available to, or used by, any |
|
180 |
other person. No title to or ownership of the software is |
|
181 |
hereby transferred. |
|
182 |
" |
|
183 |
! |
|
184 |
||
185 |
documentation |
|
186 |
" |
|
187 |
Instances of WindowEvent are created for every event coming from |
|
144 | 188 |
the graphics device. |
189 |
Usually, they are enqueued by the event dispatcher process into |
|
190 |
a sensors input queue, and dequeued & processed by a windowGroup process |
|
191 |
in its event loop. |
|
192 |
||
193 |
WindowEvents hold the event type and additional information (such as key, |
|
194 |
x/y coordinates etc). Also, windowEvents know how to send themself to some |
|
195 |
destination. To provide a common (single) place where event dispatching is |
|
1421 | 196 |
implemented, this forwarding is done by a class method here (i.e. not by the |
144 | 197 |
window group itself). |
198 |
||
199 |
The algorithm for event dispatching is: |
|
200 |
||
1982
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
201 |
- if the destination view has a keyboard focus set, |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
202 |
AND the event is a keyboard event, |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
203 |
THEN recursively invoke the event dispatching method, |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
204 |
sending the event to the focus view (or its delegate, as below) |
144 | 205 |
|
1982
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
206 |
- if the destination view has a delegate, |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
207 |
AND its a keyboard, button or pointer event, |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
208 |
AND the delegate is interested in that event |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
209 |
(i.e. implements & responds to #handlesXXX with true) |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
210 |
THEN send the event to the delegate, passing the original view |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
211 |
as additional argument |
144 | 212 |
|
1982
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
213 |
- if the view has a nonNil controller, |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
214 |
AND its a key, button or pointer event, |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
215 |
THEN send the event to the controller |
144 | 216 |
|
1982
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
217 |
- otherwise send the event to the view |
144 | 218 |
|
219 |
||
220 |
If the view has a non-nil transformation, the event is sent as a |
|
221 |
#deviceXXX message, passing device coordinates. Typically, subclasses |
|
222 |
of view do not redefine this method and the inherited default method |
|
223 |
translates these device coordinates into logical coordinates and resends |
|
224 |
an XXX message. |
|
225 |
If the view has no transformation, the XXX message is directly sent here. |
|
226 |
||
227 |
For example, a 'buttonPress:button x:x y:y' event leads to sending of |
|
228 |
'aView deviceButtonPress:button x:x y:y' which resends |
|
229 |
'aView buttonPress:button x:(x-logical) y:(y-logical)' |
|
230 |
||
320
b7b8dc88fe9f
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
251
diff
changeset
|
231 |
This allows views which are interested in deviceCoordinates to get them |
144 | 232 |
(by redefining #deviceXXX) and other views to transparently get & use |
233 |
logical coordinates. |
|
234 |
||
235 |
Therefore, for a delegated keyPress messages, the flow is: |
|
236 |
||
1982
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
237 |
sendEvent |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
238 |
view has delegate |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
239 |
------> ask delegate via 'handlesKeyPress:key inView:view' |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
240 |
<------ returns true |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
241 |
------> 'delegate keyPress:key x:x y:y view:view' |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
242 |
-----> delegate does whatever it wants to do |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
243 |
(typically sends the event to some other view) |
144 | 244 |
|
245 |
for an undelegated message: |
|
246 |
||
1982
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
247 |
sendEvent |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
248 |
view has delegate |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
249 |
------> ask delegate via 'handlesKeyPress:key inView:view' |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
250 |
<------ returns false |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
251 |
view has controller |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
252 |
------> 'controller keyPress:key x:x y:y' |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
253 |
view has no controller |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
254 |
view has transformation |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
255 |
----> 'view deviceKeyPress:key x:x y:y' |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
256 |
inverse transform x/y |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
257 |
----> 'self keyPress:key x:xLogical y:yLogical' |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
258 |
view has no transformation |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
259 |
----> 'view keyPress:key x:x y:y' |
598 | 260 |
|
612 | 261 |
[author:] |
1982
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
262 |
Claus Gittinger |
612 | 263 |
|
598 | 264 |
[see also:] |
1982
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
265 |
WindowGroup WindowSensor |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
266 |
DeviceWorkstation View |
55d0357449c2
oops - pointerLeave events did not return true for the #isPointerXXX query
Claus Gittinger <cg@exept.de>
parents:
1947
diff
changeset
|
267 |
KeyboardMap KeyboardForwarder EventListener |
598 | 268 |
|
46 | 269 |
" |
270 |
! ! |
|
271 |
||
11 | 272 |
!WindowEvent class methodsFor:'instance creation'! |
273 |
||
3680 | 274 |
buttonMotion:buttonState x:x y:y view:aView |
275 |
^ (ButtonMotionEvent new) |
|
276 |
for:aView |
|
277 |
type:#buttonMotion:x:y: |
|
278 |
arguments:(Array with:buttonState with:x with:y) |
|
279 |
! |
|
280 |
||
281 |
buttonMultiPress:button x:x y:y view:aView |
|
282 |
^ (ButtonMultiPressEvent new) |
|
283 |
for:aView |
|
284 |
type:#buttonMultiPress:x:y: |
|
285 |
arguments:(Array with:button with:x with:y) |
|
286 |
! |
|
287 |
||
288 |
buttonPress:button x:x y:y view:aView |
|
289 |
^ (ButtonPressEvent new) |
|
290 |
for:aView |
|
291 |
type:#buttonPress:x:y: |
|
292 |
arguments:(Array with:button with:x with:y) |
|
293 |
! |
|
294 |
||
295 |
buttonRelease:button x:x y:y view:aView |
|
296 |
^ (ButtonReleaseEvent new) |
|
297 |
for:aView |
|
298 |
type:#buttonRelease:x:y: |
|
299 |
arguments:(Array with:button with:x with:y) |
|
300 |
! |
|
301 |
||
302 |
clientMessageEvent:type format:format eventData:data view:aView |
|
303 |
^ ClientEvent |
|
304 |
for:aView |
|
305 |
type:#clientMessage:format:eventData: |
|
306 |
arguments:(Array with:type with:format with:data) |
|
307 |
! |
|
308 |
||
309 |
configureX:x y:y width:w height:h view:aView |
|
310 |
^ ConfigureEvent |
|
311 |
for:aView |
|
312 |
type:#configureX:y:width:height: |
|
313 |
arguments:(Array with:x with:y with:w with:h) |
|
314 |
! |
|
315 |
||
316 |
coveredBy:coveringSiblingView view:coveredView |
|
317 |
^ (WindowEvent basicNew) |
|
318 |
for:coveredView |
|
319 |
type:#coveredBy: |
|
320 |
arguments:(Array with:coveringSiblingView) |
|
321 |
! |
|
322 |
||
244 | 323 |
damageFor:aView rectangle:aRectangle |
324 |
"create and return a new damage Event for aRectangle |
|
325 |
in aView" |
|
11 | 326 |
|
3680 | 327 |
^ (DamageEvent new) for:aView type:#damage arguments:aRectangle |
328 |
! |
|
329 |
||
330 |
destroyedView:aView |
|
331 |
^ (self basicNew) |
|
332 |
for:aView |
|
333 |
type:#destroyed |
|
334 |
! |
|
335 |
||
336 |
dropMessage:dropType data:dropValue view:aView |
|
337 |
^ DropEvent |
|
338 |
for:aView |
|
339 |
type:#dropMessage:data: |
|
340 |
arguments:(Array with:dropType with:dropValue) |
|
341 |
! |
|
342 |
||
343 |
focusInView:aView |
|
344 |
^ FocusEvent |
|
345 |
for:aView |
|
346 |
type:#focusIn |
|
347 |
! |
|
348 |
||
349 |
focusOutView:aView |
|
350 |
^ FocusEvent |
|
351 |
for:aView |
|
352 |
type:#focusOut |
|
353 |
! |
|
354 |
||
355 |
keyPress:key rawKey:untranslatedKey |
|
356 |
hasShift:shiftDown ctrl:ctrlDown alt:altDown meta:metaDown |
|
357 |
button1:leftButtonDown button2:middleButtonDown button3:rightButtonDown |
|
358 |
x:x y:y view:aView |
|
244 | 359 |
|
3680 | 360 |
|ev| |
361 |
||
362 |
ev := self keyPress:key x:x y:y view:aView. |
|
363 |
ev rawKey:untranslatedKey. |
|
364 |
ev hasShift:shiftDown ctrl:ctrlDown alt:altDown meta:metaDown |
|
365 |
button1:leftButtonDown button2:middleButtonDown button3:rightButtonDown. |
|
366 |
^ ev |
|
367 |
! |
|
368 |
||
369 |
keyPress:key x:x y:y view:aView |
|
370 |
^ (KeyPressEvent new) |
|
371 |
for:aView |
|
372 |
type:#keyPress:x:y: |
|
373 |
arguments:(Array with:key with:x with:y) |
|
374 |
! |
|
375 |
||
376 |
keyRelease:key rawKey:untranslatedKey |
|
377 |
hasShift:shiftDown ctrl:ctrlDown alt:altDown meta:metaDown |
|
378 |
button1:leftButtonDown button2:middleButtonDown button3:rightButtonDown |
|
379 |
x:x y:y view:aView |
|
380 |
||
381 |
|ev| |
|
382 |
||
383 |
ev := self keyRelease:key x:x y:y view:aView. |
|
384 |
ev rawKey:untranslatedKey. |
|
385 |
ev hasShift:shiftDown ctrl:ctrlDown alt:altDown meta:metaDown |
|
386 |
button1:leftButtonDown button2:middleButtonDown button3:rightButtonDown. |
|
387 |
^ ev |
|
388 |
! |
|
389 |
||
390 |
keyRelease:key x:x y:y view:aView |
|
391 |
^ (KeyReleaseEvent new) |
|
392 |
for:aView |
|
393 |
type:#keyRelease:x:y: |
|
394 |
arguments:(Array with:key with:x with:y) |
|
46 | 395 |
! |
396 |
||
3680 | 397 |
mappedView:aView |
398 |
^ WindowMapUnmapEvent |
|
399 |
for:aView |
|
400 |
type:#mapped |
|
401 |
! |
|
402 |
||
403 |
messageSend:receiver selector:aSelector arguments:arguments |
|
404 |
^ MessageSendEvent |
|
405 |
for:receiver |
|
406 |
type:aSelector |
|
407 |
arguments:arguments |
|
408 |
! |
|
72 | 409 |
|
3680 | 410 |
mouseWheelMotion:state x:x y:y amount:amount deltaTime:deltaTime view:aView |
411 |
^ InputEvent |
|
412 |
for:aView |
|
413 |
type:#mouseWheelMotion:x:y:amount:deltaTime: |
|
414 |
arguments:(Array with:state with:x with:y with:amount with:deltaTime). |
|
415 |
! |
|
416 |
||
417 |
pasteFromClipBoard:something view:aView |
|
418 |
^ (self basicNew) |
|
419 |
for:aView |
|
420 |
type:#pasteFromClipBoard: |
|
421 |
arguments:(Array with:something). |
|
422 |
! |
|
423 |
||
424 |
pointerEnter:state x:x y:y view:aView |
|
425 |
^ EnterLeaveEvent |
|
426 |
for:aView |
|
427 |
type:#pointerEnter:x:y: |
|
428 |
arguments:(Array with:state with:x with:y). |
|
72 | 429 |
! |
430 |
||
3680 | 431 |
pointerLeave:state view:aView |
432 |
^ EnterLeaveEvent |
|
433 |
for:aView |
|
434 |
type:#pointerLeave: |
|
435 |
arguments:(Array with:state). |
|
436 |
! |
|
437 |
||
438 |
postViewCreateNotification:aView |
|
439 |
^ (self basicNew) |
|
440 |
for:aView |
|
441 |
type:#postCreateView |
|
442 |
! |
|
28 | 443 |
|
3680 | 444 |
preViewCreateNotification:aView |
445 |
^ (self basicNew) |
|
446 |
for:aView |
|
447 |
type:#preCreateView |
|
448 |
! |
|
449 |
||
450 |
saveAndTerminateView:aView |
|
451 |
^ (self basicNew) |
|
452 |
for:aView |
|
453 |
type:#saveAndTerminate |
|
454 |
! |
|
455 |
||
456 |
terminateView:aView |
|
457 |
^ (self basicNew) |
|
458 |
for:aView |
|
459 |
type:#terminate |
|
460 |
! |
|
461 |
||
462 |
unmappedView:aView |
|
463 |
^ WindowMapUnmapEvent |
|
464 |
for:aView |
|
465 |
type:#unmapped |
|
28 | 466 |
! ! |
467 |
||
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
468 |
!WindowEvent class methodsFor:'event class access'! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
469 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
470 |
buttonEvent |
2136 | 471 |
"return the class used to represent buttonEvents" |
472 |
||
3680 | 473 |
self obsoleteMethodWarning:'use explicit event creation message'. |
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
474 |
^ ButtonEvent |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
475 |
|
2136 | 476 |
"Created: / 4.4.1997 / 13:45:04 / cg" |
477 |
"Modified: / 6.6.1998 / 21:00:29 / cg" |
|
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
478 |
! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
479 |
|
1531 | 480 |
clientEvent |
2136 | 481 |
"return the class used to represent clientEvents" |
482 |
||
3680 | 483 |
self obsoleteMethodWarning:'use explicit event creation message'. |
1531 | 484 |
^ ClientEvent |
485 |
||
2136 | 486 |
"Created: / 4.4.1997 / 13:58:25 / cg" |
487 |
"Modified: / 6.6.1998 / 21:00:36 / cg" |
|
1531 | 488 |
! |
489 |
||
2707 | 490 |
focusEvent |
491 |
"return the class used to represent focusEvents" |
|
492 |
||
3680 | 493 |
self obsoleteMethodWarning:'use explicit event creation message'. |
2707 | 494 |
^ FocusEvent |
495 |
||
496 |
"Modified: / 6.6.1998 / 21:00:50 / cg" |
|
497 |
"Created: / 21.5.1999 / 19:45:25 / cg" |
|
498 |
! |
|
499 |
||
1863 | 500 |
inputEvent |
2136 | 501 |
"return the class used to represent inputEvents" |
502 |
||
3680 | 503 |
self obsoleteMethodWarning:'use explicit event creation message'. |
1863 | 504 |
^ InputEvent |
505 |
||
2136 | 506 |
"Created: / 13.8.1997 / 23:03:02 / cg" |
507 |
"Modified: / 6.6.1998 / 21:00:43 / cg" |
|
1863 | 508 |
! |
509 |
||
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
510 |
keyboardEvent |
2136 | 511 |
"return the class used to represent keyboardEvents" |
512 |
||
3680 | 513 |
self obsoleteMethodWarning:'use explicit event creation message'. |
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
514 |
^ KeyboardEvent |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
515 |
|
2136 | 516 |
"Created: / 4.4.1997 / 13:41:44 / cg" |
517 |
"Modified: / 6.6.1998 / 21:00:50 / cg" |
|
3294 | 518 |
! |
519 |
||
3297 | 520 |
messageSendEvent |
521 |
"return the class used to represent arbitrary messageSend-Events" |
|
522 |
||
3680 | 523 |
self obsoleteMethodWarning:'use explicit event creation message'. |
3297 | 524 |
^ MessageSendEvent |
525 |
! |
|
526 |
||
3294 | 527 |
userEvent |
528 |
"return the class used to represent userEvents" |
|
529 |
||
3680 | 530 |
self obsoleteMethodWarning:'use explicit event creation message'. |
3294 | 531 |
^ UserEvent |
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
532 |
! ! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
533 |
|
3680 | 534 |
!WindowEvent class methodsFor:'instance creation basic'! |
535 |
||
536 |
for:aView type:aSymbol |
|
537 |
"create and return a new windowEvent for sending |
|
538 |
aSymbol-message with no arguments to aView" |
|
539 |
||
540 |
^ (self new) for:aView type:aSymbol |
|
541 |
! |
|
542 |
||
543 |
for:aView type:aSymbol arguments:argArray |
|
544 |
"create and return a new windowEvent for sending |
|
545 |
aSymbol-message with arguments to aView" |
|
546 |
||
547 |
^ (self new) for:aView type:aSymbol arguments:argArray |
|
548 |
! |
|
549 |
||
550 |
new |
|
551 |
self == WindowEvent ifTrue:[ |
|
552 |
'----------------' errorPrint. |
|
553 |
'WindowEvent is abstract - use/add explicit creation message' errorPrintCR. |
|
554 |
thisContext fullPrintAll. |
|
555 |
]. |
|
556 |
^ super new |
|
557 |
! ! |
|
558 |
||
244 | 559 |
!WindowEvent methodsFor:'accessing'! |
560 |
||
561 |
arguments:anArray |
|
562 |
"set the arguments" |
|
563 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
564 |
args := anArray |
244 | 565 |
! |
566 |
||
3465 | 567 |
consumed |
568 |
"return the value of the instance variable 'consumed' (automatically generated)" |
|
569 |
||
570 |
^ consumed |
|
571 |
! |
|
572 |
||
573 |
consumed:aBoolean |
|
574 |
"set the value of the instance variable 'consumed' (automatically generated)" |
|
575 |
||
576 |
consumed := aBoolean. |
|
577 |
! |
|
578 |
||
3089 | 579 |
delegatedFrom |
580 |
"return the value of the instance variable 'delegatedFrom' (automatically generated)" |
|
581 |
||
3376 | 582 |
^ delegatedFrom |
583 |
! |
|
3089 | 584 |
|
585 |
delegatedFrom:something |
|
586 |
"set the value of the instance variable 'delegatedFrom' (automatically generated)" |
|
587 |
||
3376 | 588 |
delegatedFrom := something. |
589 |
! |
|
3089 | 590 |
|
244 | 591 |
key |
1841 | 592 |
"return the key - nil is returned here. |
593 |
This is redefined in KeyboardEvent." |
|
244 | 594 |
|
595 |
^ nil |
|
1841 | 596 |
|
597 |
"Created: 1.8.1997 / 13:56:21 / cg" |
|
244 | 598 |
! |
599 |
||
600 |
rectangle |
|
601 |
"return the damage rectangle" |
|
602 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
603 |
^ args "consider this a kludge" |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
604 |
! |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
605 |
|
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
606 |
target |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
607 |
"return the target, for which the event is for" |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
608 |
|
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
609 |
^ receiver |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
610 |
! |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
611 |
|
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
612 |
target:anObject |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
613 |
"set the target, for which the event is for" |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
614 |
|
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
615 |
receiver := anObject |
244 | 616 |
! |
617 |
||
618 |
type |
|
619 |
"return the type of the event" |
|
620 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
621 |
^ selector |
244 | 622 |
! |
623 |
||
624 |
view |
|
625 |
"return the view, for which the event is for" |
|
626 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
627 |
^ receiver |
244 | 628 |
! |
629 |
||
630 |
view:aView |
|
631 |
"set the view, for which the event is for" |
|
632 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
633 |
receiver := aView |
3089 | 634 |
! |
635 |
||
636 |
x |
|
637 |
"the x coordinate - if any. |
|
638 |
nil returned for all but button- and keyEvents" |
|
639 |
||
640 |
^ nil |
|
641 |
! |
|
642 |
||
643 |
x:ignoredInteger |
|
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
644 |
"set the x coordinate - ignored here. |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
645 |
only for button- and keyEvents" |
3089 | 646 |
! |
647 |
||
648 |
y |
|
649 |
"the y coordinate - if any. |
|
650 |
nil returned for all but button- and keyEvents" |
|
651 |
||
652 |
^ nil |
|
653 |
! |
|
654 |
||
655 |
y:ignoredInteger |
|
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
656 |
"set the y coordinate - ignored here. |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
657 |
only for button- and keyEvents" |
244 | 658 |
! ! |
659 |
||
3011 | 660 |
!WindowEvent methodsFor:'dispatching'! |
661 |
||
662 |
dispatchTo:anObject |
|
663 |
"send this event to anObject" |
|
664 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
665 |
^ anObject perform:selector withArguments:args |
3011 | 666 |
! |
667 |
||
668 |
dispatchWithViewArgumentTo:anObject |
|
669 |
"send this event to anObject, and pass an additional view argument" |
|
670 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
671 |
args size = 0 ifTrue:[ |
3011 | 672 |
^ anObject |
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
673 |
perform:(selector , ':') asSymbol |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
674 |
with:receiver |
3011 | 675 |
]. |
676 |
||
677 |
^ anObject |
|
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
678 |
perform:(selector , 'view:') asSymbol |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
679 |
withArguments:(args copyWith:receiver) |
3011 | 680 |
! ! |
681 |
||
511
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
682 |
!WindowEvent methodsFor:'printing & storing'! |
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
683 |
|
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
684 |
displayString |
1905 | 685 |
"return a string for display in inspectors etc." |
686 |
||
511
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
687 |
^ self className |
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
688 |
, '(' , selector storeString |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
689 |
, ' view: ' , receiver className |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
690 |
, ' args: ' , args displayString |
511
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
691 |
, ')' |
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
692 |
|
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
693 |
"Created: 7.3.1996 / 14:55:50 / cg" |
1905 | 694 |
"Modified: 20.9.1997 / 11:42:11 / cg" |
511
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
695 |
! ! |
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
696 |
|
244 | 697 |
!WindowEvent methodsFor:'private accessing'! |
698 |
||
3680 | 699 |
for:aView type:aSymbol |
700 |
"set the instance variables of the event" |
|
701 |
||
702 |
receiver := aView. |
|
703 |
selector := aSymbol. |
|
704 |
args := #() |
|
705 |
! |
|
706 |
||
244 | 707 |
for:aView type:aSymbol arguments:argArray |
708 |
"set the instance variables of the event" |
|
709 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
710 |
receiver := aView. |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
711 |
selector := aSymbol. |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
712 |
args := argArray |
244 | 713 |
! ! |
714 |
||
715 |
!WindowEvent methodsFor:'queries'! |
|
716 |
||
1588
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
717 |
hasAlt |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
718 |
"return true, if this is a keyboard event, with ALT pressed" |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
719 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
720 |
^ false |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
721 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
722 |
"Created: 12.4.1997 / 11:04:10 / cg" |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
723 |
! |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
724 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
725 |
hasCtrl |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
726 |
"return true, if this is a keyboard event, with CTRL pressed" |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
727 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
728 |
^ false |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
729 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
730 |
"Created: 12.4.1997 / 11:04:03 / cg" |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
731 |
! |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
732 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
733 |
hasMeta |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
734 |
"return true, if this is a keyboard event, with META pressed" |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
735 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
736 |
^ false |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
737 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
738 |
"Created: 12.4.1997 / 11:04:16 / cg" |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
739 |
! |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
740 |
|
1590 | 741 |
hasShift |
742 |
"return true, if this is a keyboard event, with SHIFT pressed" |
|
743 |
||
744 |
^ false |
|
745 |
||
746 |
"Created: 12.4.1997 / 11:30:59 / cg" |
|
747 |
! |
|
748 |
||
3680 | 749 |
isApplicationEvent |
750 |
"return true, if this event is application related (i.e. not for a particular view)" |
|
751 |
||
752 |
^ false |
|
753 |
! |
|
754 |
||
244 | 755 |
isButtonEvent |
756 |
"return true, if this event is a button event" |
|
757 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
758 |
^ false |
244 | 759 |
! |
760 |
||
1730 | 761 |
isButtonMotionEvent |
762 |
"return true, if this event is a buttonMotion event" |
|
763 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
764 |
^ false |
1730 | 765 |
|
766 |
"Created: 5.3.1997 / 12:25:43 / cg" |
|
767 |
! |
|
768 |
||
1420 | 769 |
isButtonPressEvent |
770 |
"return true, if this event is a buttonPress event" |
|
771 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
772 |
^ false |
1420 | 773 |
|
774 |
"Created: 5.3.1997 / 12:25:43 / cg" |
|
775 |
! |
|
776 |
||
3011 | 777 |
isButtonReleaseEvent |
778 |
"return true, if this event is a buttonPress event" |
|
779 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
780 |
^ false |
3011 | 781 |
|
782 |
"Created: 5.3.1997 / 12:25:43 / cg" |
|
783 |
! |
|
784 |
||
2811 | 785 |
isConfigureEvent |
3680 | 786 |
"return true, if this is a window geometry change event" |
2811 | 787 |
|
3680 | 788 |
^ false. |
2811 | 789 |
! |
790 |
||
244 | 791 |
isDamage |
792 |
"return true, if this is a damage event" |
|
793 |
||
3680 | 794 |
^ false. |
244 | 795 |
! |
796 |
||
2471 | 797 |
isDamageForView:aView |
3680 | 798 |
"return true, if this is a damage event for a View" |
2471 | 799 |
|
3680 | 800 |
^ false. |
2471 | 801 |
! |
802 |
||
1420 | 803 |
isFocusEvent |
804 |
"return true, if this event is a focusIn/focusOut event" |
|
805 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
806 |
^ false |
1420 | 807 |
|
808 |
"Created: 5.3.1997 / 12:12:37 / cg" |
|
809 |
! |
|
810 |
||
811 |
isFocusInEvent |
|
812 |
"return true, if this event is a focusIn event" |
|
813 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
814 |
^ false |
1420 | 815 |
|
816 |
"Created: 5.3.1997 / 12:18:10 / cg" |
|
817 |
! |
|
818 |
||
2707 | 819 |
isInputEvent |
820 |
"return true, if this event is an input (pointer, key or button) event" |
|
821 |
||
822 |
^ false |
|
823 |
||
824 |
"Created: / 21.5.1999 / 19:49:42 / cg" |
|
825 |
"Modified: / 21.5.1999 / 19:50:11 / cg" |
|
826 |
! |
|
827 |
||
244 | 828 |
isKeyEvent |
829 |
"return true, if this event is a keyboard event" |
|
830 |
||
2028 | 831 |
^ false |
832 |
||
833 |
"Modified: / 28.1.1998 / 00:03:17 / cg" |
|
244 | 834 |
! |
835 |
||
836 |
isKeyPressEvent |
|
2028 | 837 |
"return true, if this event is a keyboard press event" |
838 |
||
839 |
^ false |
|
840 |
||
841 |
"Modified: / 28.1.1998 / 00:03:24 / cg" |
|
842 |
! |
|
244 | 843 |
|
2028 | 844 |
isKeyReleaseEvent |
845 |
"return true, if this event is a keyboard release event" |
|
846 |
||
847 |
^ false |
|
848 |
||
849 |
"Modified: / 28.1.1998 / 00:03:31 / cg" |
|
356 | 850 |
! |
851 |
||
3376 | 852 |
isKeyboardFocusEvent |
853 |
"return true, if this event is a keyboard focus event" |
|
854 |
||
855 |
^ false |
|
856 |
! |
|
857 |
||
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
858 |
isMapEvent |
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
859 |
"return true, if this is a map event event" |
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
860 |
|
3680 | 861 |
^ false |
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
862 |
|
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
863 |
"Created: / 29.1.1998 / 21:52:54 / cg" |
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
864 |
! |
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
865 |
|
3297 | 866 |
isMessageSendEvent |
867 |
"return true, if this event is a general messageSend event" |
|
868 |
||
869 |
^ false |
|
870 |
! |
|
871 |
||
3011 | 872 |
isMouseWheelEvent |
3680 | 873 |
^ false |
3011 | 874 |
! |
875 |
||
356 | 876 |
isPointerEnterEvent |
877 |
"return true, if this event is a pointer-enter event" |
|
878 |
||
3680 | 879 |
^ false |
356 | 880 |
|
881 |
"Created: 9.1.1996 / 15:51:24 / cg" |
|
882 |
"Modified: 9.1.1996 / 15:51:40 / cg" |
|
883 |
! |
|
884 |
||
885 |
isPointerEnterLeaveEvent |
|
886 |
"return true, if this event is a pointer-enter/leave event" |
|
887 |
||
3680 | 888 |
^ false |
356 | 889 |
|
890 |
"Created: 9.1.1996 / 15:51:18 / cg" |
|
891 |
! |
|
892 |
||
893 |
isPointerLeaveEvent |
|
894 |
"return true, if this event is a pointer-leave event" |
|
895 |
||
3680 | 896 |
^ false |
356 | 897 |
|
898 |
"Created: 9.1.1996 / 15:51:36 / cg" |
|
1158 | 899 |
! |
900 |
||
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
901 |
isUnmapEvent |
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
902 |
"return true, if this is an unmap event event" |
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
903 |
|
3680 | 904 |
^ false |
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
905 |
|
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
906 |
"Modified: / 29.1.1998 / 21:53:02 / cg" |
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
907 |
! |
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
908 |
|
1158 | 909 |
isUserEvent |
910 |
"return true, if this event is a user event (i.e. mouse, keyboard or button)" |
|
911 |
||
3680 | 912 |
self isButtonEvent ifTrue:[^ true]. |
913 |
self isKeyEvent ifTrue:[^ true]. |
|
1158 | 914 |
|
3680 | 915 |
self isPointerEnterEvent ifTrue:[^ true]. |
916 |
"/ self isPointerLeaveEvent ifTrue:[^ true]. -- why disabled ? |
|
1420 | 917 |
|
1158 | 918 |
^ false |
919 |
||
1420 | 920 |
"Modified: 5.3.1997 / 11:27:40 / cg" |
3654 | 921 |
! |
922 |
||
923 |
targetView |
|
924 |
"return the view which will eventually handle the event; |
|
925 |
for most events, this is the same as the view, for which the event was |
|
926 |
originally generated. |
|
927 |
Except, if an explicit focus has been assigned (i.e. tabbed into a component), |
|
928 |
AND the event is a keyboard event. In this case, the targetView might be different. |
|
929 |
Notice: this method might return nil, for synthetic (app-related) or display screen related |
|
930 |
events" |
|
931 |
||
932 |
|evView group focusView| |
|
933 |
||
934 |
(evView := self view) notNil ifTrue:[ |
|
935 |
group := evView windowGroup. |
|
936 |
group notNil ifTrue:[ |
|
937 |
focusView := group focusView. |
|
938 |
focusView notNil ifTrue:[^ focusView]. |
|
939 |
]. |
|
940 |
]. |
|
941 |
^ evView |
|
244 | 942 |
! ! |
943 |
||
3680 | 944 |
!WindowEvent::ApplicationEvent methodsFor:'blocked'! |
945 |
||
946 |
view |
|
947 |
^ nil |
|
948 |
! ! |
|
949 |
||
950 |
!WindowEvent::ApplicationEvent methodsFor:'queries'! |
|
951 |
||
952 |
isApplicationEvent |
|
953 |
^ true |
|
954 |
! ! |
|
955 |
||
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
956 |
!WindowEvent::InputEvent class methodsFor:'class initialization'! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
957 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
958 |
initialize |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
959 |
F_SHIFT := 16r001. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
960 |
F_CTRL := 16r002. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
961 |
F_ALT := 16r004. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
962 |
F_META := 16r008. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
963 |
|
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
964 |
F_BUTTON1 := 16r100. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
965 |
F_BUTTON2 := 16r200. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
966 |
F_BUTTON3 := 16r400. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
967 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
968 |
" |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
969 |
self initialize |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
970 |
" |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
971 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
972 |
"Modified: 13.8.1997 / 22:16:17 / cg" |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
973 |
! ! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
974 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
975 |
!WindowEvent::InputEvent methodsFor:'accessing'! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
976 |
|
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
977 |
hasShift:shift ctrl:ctrl alt:alt meta:meta button1:b1 button2:b2 button3:b3 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
978 |
|f "{ Class: SmallInteger }"| |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
979 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
980 |
f := 0. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
981 |
shift ifTrue:[f := f bitOr:F_SHIFT]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
982 |
ctrl ifTrue:[f := f bitOr:F_CTRL]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
983 |
alt ifTrue:[f := f bitOr:F_ALT]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
984 |
meta ifTrue:[f := f bitOr:F_META]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
985 |
b1 ifTrue:[f := f bitOr:F_BUTTON1]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
986 |
b2 ifTrue:[f := f bitOr:F_BUTTON2]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
987 |
b3 ifTrue:[f := f bitOr:F_BUTTON3]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
988 |
modifierFlags := f. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
989 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
990 |
"Created: 13.8.1997 / 22:17:56 / cg" |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
991 |
! |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
992 |
|
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
993 |
hasShift:shift hasCtrl:ctrl hasAlt:alt hasMeta:meta |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
994 |
|f "{ Class: SmallInteger }"| |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
995 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
996 |
f := 0. |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
997 |
shift ifTrue:[f := f bitOr:F_SHIFT]. |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
998 |
ctrl ifTrue:[f := f bitOr:F_CTRL]. |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
999 |
alt ifTrue:[f := f bitOr:F_ALT]. |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1000 |
meta ifTrue:[f := f bitOr:F_META]. |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1001 |
modifierFlags := f. |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1002 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1003 |
"Created: 13.8.1997 / 22:02:09 / cg" |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1004 |
! |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1005 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1006 |
hasShift:shift hasCtrl:ctrl hasAlt:alt hasMeta:meta hasButton1:b1 hasButton2:b2 hasButton3:b3 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1007 |
|f "{ Class: SmallInteger }"| |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1008 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1009 |
f := 0. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1010 |
shift ifTrue:[f := f bitOr:F_SHIFT]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1011 |
ctrl ifTrue:[f := f bitOr:F_CTRL]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1012 |
alt ifTrue:[f := f bitOr:F_ALT]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1013 |
meta ifTrue:[f := f bitOr:F_META]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1014 |
b1 ifTrue:[f := f bitOr:F_BUTTON1]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1015 |
b2 ifTrue:[f := f bitOr:F_BUTTON2]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1016 |
b3 ifTrue:[f := f bitOr:F_BUTTON3]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1017 |
modifierFlags := f. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1018 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1019 |
"Created: 13.8.1997 / 22:17:25 / cg" |
2761 | 1020 |
! |
1021 |
||
1022 |
modifierFlags |
|
1023 |
^ modifierFlags |
|
1024 |
! |
|
1025 |
||
1026 |
modifierFlags:flagBits |
|
1027 |
modifierFlags := flagBits |
|
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1028 |
! ! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1029 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1030 |
!WindowEvent::InputEvent methodsFor:'queries'! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1031 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1032 |
hasAlt |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1033 |
"return true, if this is an event, with ALT pressed" |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1034 |
|
1885 | 1035 |
modifierFlags isNil ifTrue:[^ false]. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1036 |
^ (modifierFlags bitAnd:F_ALT) ~~ 0 |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1037 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1038 |
"Created: 13.8.1997 / 22:02:23 / cg" |
1885 | 1039 |
"Modified: 21.8.1997 / 19:41:11 / cg" |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1040 |
! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1041 |
|
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1042 |
hasButton1 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1043 |
"return true, if this is an event, with the left mouse button pressed" |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1044 |
|
1885 | 1045 |
modifierFlags isNil ifTrue:[^ false]. |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1046 |
^ (modifierFlags bitAnd:F_BUTTON1) ~~ 0 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1047 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1048 |
"Created: 13.8.1997 / 22:16:35 / cg" |
1885 | 1049 |
"Modified: 21.8.1997 / 19:41:40 / cg" |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1050 |
! |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1051 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1052 |
hasButton2 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1053 |
"return true, if this is an event, with the middle mouse button pressed" |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1054 |
|
1885 | 1055 |
modifierFlags isNil ifTrue:[^ false]. |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1056 |
^ (modifierFlags bitAnd:F_BUTTON2) ~~ 0 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1057 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1058 |
"Created: 13.8.1997 / 22:16:43 / cg" |
1885 | 1059 |
"Modified: 21.8.1997 / 19:41:47 / cg" |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1060 |
! |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1061 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1062 |
hasButton3 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1063 |
"return true, if this is an event, with the right mouse button pressed" |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1064 |
|
1885 | 1065 |
modifierFlags isNil ifTrue:[^ false]. |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1066 |
^ (modifierFlags bitAnd:F_BUTTON3) ~~ 0 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1067 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1068 |
"Created: 13.8.1997 / 22:16:49 / cg" |
1885 | 1069 |
"Modified: 21.8.1997 / 19:41:52 / cg" |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1070 |
! |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1071 |
|
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1072 |
hasCtrl |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1073 |
"return true, if this is an event, with CTRL pressed" |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1074 |
|
1885 | 1075 |
modifierFlags isNil ifTrue:[^ false]. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1076 |
^ (modifierFlags bitAnd:F_CTRL) ~~ 0 |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1077 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1078 |
"Created: 13.8.1997 / 22:02:29 / cg" |
1885 | 1079 |
"Modified: 21.8.1997 / 19:41:21 / cg" |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1080 |
! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1081 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1082 |
hasMeta |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1083 |
"return true, if this is an event, with META pressed" |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1084 |
|
1885 | 1085 |
modifierFlags isNil ifTrue:[^ false]. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1086 |
^ (modifierFlags bitAnd:F_META) ~~ 0 |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1087 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1088 |
"Created: 13.8.1997 / 22:02:59 / cg" |
1885 | 1089 |
"Modified: 21.8.1997 / 19:41:27 / cg" |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1090 |
! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1091 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1092 |
hasShift |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1093 |
"return true, if this is an event, with SHIFT pressed" |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1094 |
|
1885 | 1095 |
modifierFlags isNil ifTrue:[^ false]. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1096 |
^ (modifierFlags bitAnd:F_SHIFT) ~~ 0 |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1097 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1098 |
"Created: 13.8.1997 / 22:03:09 / cg" |
1885 | 1099 |
"Modified: 21.8.1997 / 19:41:34 / cg" |
2707 | 1100 |
! |
1101 |
||
1102 |
isInputEvent |
|
1103 |
^ true |
|
1104 |
||
1105 |
"Created: / 21.5.1999 / 19:49:30 / cg" |
|
3465 | 1106 |
! |
1107 |
||
3680 | 1108 |
isMouseWheelEvent |
1109 |
^ selector == #mouseWheelMotion:x:y:amount:deltaTime: |
|
3465 | 1110 |
! ! |
1111 |
||
3297 | 1112 |
!WindowEvent::ButtonEvent methodsFor:'accessing'! |
1113 |
||
1114 |
button |
|
1115 |
"return the button nr of the button-event" |
|
1116 |
||
1117 |
^ args at:1 |
|
1118 |
! |
|
1119 |
||
1120 |
state |
|
1121 |
"return the button state of the button-event |
|
1122 |
(mouse button bits at the time of the event)." |
|
1123 |
||
1124 |
^ args at:1 |
|
1125 |
||
1126 |
"Created: / 12.11.1998 / 16:21:18 / cg" |
|
1127 |
! |
|
1128 |
||
1129 |
x |
|
1130 |
"return the x coordinate of the button-event |
|
1131 |
(mouse position at the time of the event)." |
|
1132 |
||
1133 |
^ args at:2 |
|
1134 |
||
1135 |
"Created: 1.8.1997 / 13:58:15 / cg" |
|
1136 |
! |
|
1137 |
||
1138 |
x:anInteger |
|
1139 |
"change the x coordinate of the button-event" |
|
1140 |
||
1141 |
args at:2 put:anInteger |
|
1142 |
||
1143 |
"Created: 1.8.1997 / 13:58:15 / cg" |
|
1144 |
! |
|
1145 |
||
1146 |
y |
|
1147 |
"return the y coordinate of the button-event |
|
1148 |
(mouse position at the time of the event)." |
|
1149 |
||
1150 |
^ args at:3 |
|
1151 |
||
1152 |
"Created: 1.8.1997 / 13:58:07 / cg" |
|
1153 |
! |
|
1154 |
||
1155 |
y:anInteger |
|
1156 |
"change the y coordinate of the button-event" |
|
1157 |
||
1158 |
^ args at:3 put:anInteger |
|
1159 |
||
1160 |
"Created: 1.8.1997 / 13:58:15 / cg" |
|
1161 |
! ! |
|
1162 |
||
1163 |
!WindowEvent::ButtonEvent methodsFor:'queries'! |
|
1164 |
||
1165 |
isButtonEvent |
|
1166 |
"return true, if this event is a button event" |
|
1167 |
||
1168 |
^ true |
|
1169 |
||
1170 |
"Created: 4.4.1997 / 13:44:11 / cg" |
|
3680 | 1171 |
! ! |
1172 |
||
1173 |
!WindowEvent::ButtonPressEvent methodsFor:'queries'! |
|
1174 |
||
1175 |
isButtonPressEvent |
|
1176 |
"return true, if this event is a buttonPress event" |
|
1177 |
||
1178 |
^ true |
|
1179 |
! ! |
|
1180 |
||
1181 |
!WindowEvent::ButtonMultiPressEvent methodsFor:'queries'! |
|
1182 |
||
1183 |
isButtonPressEvent |
|
1184 |
"/ ATTENTION: temporary for bw. compatibility, since due to a bug, |
|
1185 |
"/ multi-presses returned false to this query |
|
1186 |
||
1187 |
"/'----------------' errorPrint. |
|
1188 |
"/'oops multipressEvent asked for isButtonPress' errorPrintCR. |
|
1189 |
"/thisContext fullPrintAll. |
|
1190 |
^ false |
|
1191 |
! ! |
|
1192 |
||
1193 |
!WindowEvent::ButtonReleaseEvent methodsFor:'queries'! |
|
1194 |
||
1195 |
isButtonReleaseEvent |
|
1196 |
"return true, if this event is a buttonRelease event" |
|
1197 |
||
1198 |
^ true |
|
1199 |
! ! |
|
1200 |
||
1201 |
!WindowEvent::ClientEvent methodsFor:'accessing'! |
|
1202 |
||
1203 |
eventData |
|
1204 |
"return the value of the instance variable 'eventData' (automatically generated)" |
|
1205 |
||
1206 |
^ eventData |
|
1207 |
||
1208 |
"Created: 4.4.1997 / 17:41:50 / cg" |
|
3297 | 1209 |
! |
1210 |
||
3680 | 1211 |
eventData:something |
1212 |
"set the value of the instance variable 'eventData' (automatically generated)" |
|
1213 |
||
1214 |
eventData := something. |
|
1215 |
||
1216 |
"Created: 4.4.1997 / 17:41:57 / cg" |
|
1217 |
! ! |
|
1218 |
||
1219 |
!WindowEvent::ConfigureEvent methodsFor:'queries'! |
|
1220 |
||
1221 |
isConfigureEvent |
|
1222 |
^ true |
|
1223 |
! ! |
|
1224 |
||
1225 |
!WindowEvent::DamageEvent methodsFor:'queries'! |
|
1226 |
||
1227 |
isDamage |
|
1228 |
"return true, if this is a damage event" |
|
1229 |
||
1230 |
^ true |
|
1231 |
! |
|
1232 |
||
1233 |
isDamageForView:aView |
|
1234 |
"return true, if this is a damage event for aView" |
|
1235 |
||
1236 |
^ (receiver == aView) |
|
1237 |
! ! |
|
1238 |
||
1239 |
!WindowEvent::EnterLeaveEvent methodsFor:'queries'! |
|
1240 |
||
1241 |
isPointerEnterEvent |
|
1242 |
"return true, if this event is a pointer-enter event" |
|
1243 |
||
1244 |
^ (selector == #'pointerEnter:x:y:') |
|
1245 |
||
1246 |
"Created: 9.1.1996 / 15:51:24 / cg" |
|
1247 |
"Modified: 9.1.1996 / 15:51:40 / cg" |
|
1248 |
! |
|
1249 |
||
1250 |
isPointerEnterLeaveEvent |
|
1251 |
"return true, if this event is a pointer-enter/leave event" |
|
1252 |
||
1253 |
^ true |
|
1254 |
||
1255 |
"Created: 9.1.1996 / 15:51:18 / cg" |
|
1256 |
! |
|
1257 |
||
1258 |
isPointerLeaveEvent |
|
1259 |
"return true, if this event is a pointer-leave event" |
|
1260 |
||
1261 |
^ selector == #'pointerLeave:' |
|
1262 |
||
1263 |
"Created: 9.1.1996 / 15:51:36 / cg" |
|
1264 |
! ! |
|
1265 |
||
1266 |
!WindowEvent::FocusEvent methodsFor:'queries'! |
|
1267 |
||
1268 |
isFocusEvent |
|
1269 |
"return true, if this event is a focus event" |
|
1270 |
||
1271 |
^ true |
|
1272 |
||
1273 |
"Created: / 21.5.1999 / 19:44:47 / cg" |
|
1274 |
! |
|
1275 |
||
1276 |
isFocusInEvent |
|
1277 |
"return true, if this event is a focusIn event" |
|
1278 |
||
1279 |
^ (selector == #focusIn) |
|
1280 |
||
1281 |
"Created: / 21.5.1999 / 19:45:04 / cg" |
|
1282 |
! ! |
|
1283 |
||
1284 |
!WindowEvent::ButtonMotionEvent methodsFor:'queries'! |
|
1285 |
||
3297 | 1286 |
isButtonMotionEvent |
1287 |
"return true, if this event is a buttonMotion event" |
|
1288 |
||
3680 | 1289 |
^ true |
3297 | 1290 |
! ! |
1291 |
||
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1292 |
!WindowEvent::KeyboardEvent methodsFor:'accessing'! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1293 |
|
1841 | 1294 |
key |
1295 |
"return the key of the key-event." |
|
1296 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1297 |
^ args at:1 |
1841 | 1298 |
|
1299 |
"Created: 1.8.1997 / 13:55:19 / cg" |
|
1300 |
! |
|
1301 |
||
2852 | 1302 |
key:aCharacterOrSymbol |
1303 |
"change the key of the key-event." |
|
1304 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1305 |
args at:1 put:aCharacterOrSymbol |
2852 | 1306 |
|
1307 |
"Created: 1.8.1997 / 13:55:19 / cg" |
|
1308 |
! |
|
1309 |
||
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1310 |
rawKey |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1311 |
^ rawKey |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1312 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1313 |
"Created: 4.4.1997 / 13:47:15 / cg" |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1314 |
! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1315 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1316 |
rawKey:aKey |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1317 |
rawKey := aKey |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1318 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1319 |
"Created: 4.4.1997 / 13:47:10 / cg" |
1841 | 1320 |
! |
1321 |
||
1322 |
x |
|
1323 |
"return the x coordinate of the key-event |
|
1324 |
(mouse position at the time of the key-event)." |
|
1325 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1326 |
^ args at:2 |
1841 | 1327 |
|
1328 |
"Created: 1.8.1997 / 13:57:27 / cg" |
|
1329 |
! |
|
1330 |
||
3089 | 1331 |
xy:anInteger |
1332 |
"change the x coordinate of the key-event" |
|
1333 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1334 |
^ args at:2 put:anInteger |
3089 | 1335 |
! |
1336 |
||
1841 | 1337 |
y |
1338 |
"return the y coordinate of the key-event |
|
1339 |
(mouse position at the time of the key-event)." |
|
1340 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1341 |
^ args at:3 |
1841 | 1342 |
|
1343 |
"Created: 1.8.1997 / 13:55:19 / cg" |
|
1344 |
"Modified: 1.8.1997 / 13:57:42 / cg" |
|
3089 | 1345 |
! |
1346 |
||
1347 |
y:anInteger |
|
1348 |
"change the y coordinate of the key-event" |
|
1349 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1350 |
^ args at:3 put:anInteger |
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1351 |
! ! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1352 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1353 |
!WindowEvent::KeyboardEvent methodsFor:'queries'! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1354 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1355 |
isKeyEvent |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1356 |
"return true, if this event is a keyboard event" |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1357 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1358 |
^ true |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1359 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1360 |
"Created: 4.4.1997 / 13:39:59 / cg" |
3686 | 1361 |
! ! |
1362 |
||
1363 |
!WindowEvent::KeyReleaseEvent methodsFor:'queries'! |
|
1364 |
||
1365 |
isKeyReleaseEvent |
|
1366 |
"return true, if this event is a keyboard press event" |
|
1367 |
||
1368 |
^ true |
|
1369 |
! ! |
|
1370 |
||
1371 |
!WindowEvent::KeyPressEvent methodsFor:'queries'! |
|
2028 | 1372 |
|
1373 |
isKeyPressEvent |
|
1374 |
"return true, if this event is a keyboard press event" |
|
1375 |
||
3686 | 1376 |
^ true |
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1377 |
! ! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1378 |
|
3376 | 1379 |
!WindowEvent::KeyboardFocusEvent methodsFor:'queries'! |
1380 |
||
1381 |
isKeyboardFocusEvent |
|
1382 |
"return true, if this event is a keyboard focus event" |
|
1383 |
||
1384 |
^ true |
|
1385 |
! ! |
|
1386 |
||
3680 | 1387 |
!WindowEvent::MessageSendEvent methodsFor:'blocked'! |
1388 |
||
1389 |
view |
|
1390 |
^ nil |
|
1391 |
! ! |
|
1392 |
||
3465 | 1393 |
!WindowEvent::MessageSendEvent methodsFor:'queries'! |
3089 | 1394 |
|
3465 | 1395 |
isMessageSendEvent |
1396 |
"return true, if this event is a general messageSend event" |
|
3089 | 1397 |
|
1398 |
^ true |
|
1399 |
||
1400 |
||
1401 |
||
1402 |
! ! |
|
1403 |
||
3680 | 1404 |
!WindowEvent::WindowMapUnmapEvent methodsFor:'queries'! |
1405 |
||
1406 |
isMapEvent |
|
1407 |
"return true, if this is a map event event" |
|
1408 |
||
1409 |
^ selector == #mapped |
|
1410 |
||
1411 |
"Created: / 29.1.1998 / 21:52:54 / cg" |
|
1412 |
! |
|
1413 |
||
1414 |
isUnmapEvent |
|
1415 |
"return true, if this is an unmap event event" |
|
1416 |
||
1417 |
^ selector == #unmapped |
|
1418 |
||
1419 |
"Modified: / 29.1.1998 / 21:53:02 / cg" |
|
1420 |
! ! |
|
1421 |
||
251 | 1422 |
!WindowEvent class methodsFor:'documentation'! |
1423 |
||
1424 |
version |
|
3758 | 1425 |
^ '$Header: /cvs/stx/stx/libview/WindowEvent.st,v 1.74 2002-10-31 20:20:51 cg Exp $' |
251 | 1426 |
! ! |
3758 | 1427 |
|
1428 |
WindowEvent::InputEvent initialize! |