author | Claus Gittinger <cg@exept.de> |
Wed, 06 Jun 2018 16:50:40 +0200 | |
changeset 8376 | 7f9164ebccfa |
parent 8308 | 27a9bedaaa70 |
child 8549 | 908351f143a1 |
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 |
" |
|
3294 | 12 |
"{ Package: 'stx:libview' }" |
13 |
||
7932 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
5275 | 16 |
Event subclass:#WindowEvent |
17 |
instanceVariableNames:'delegatedFrom consumed' |
|
356 | 18 |
classVariableNames:'' |
19 |
poolDictionaries:'' |
|
5275 | 20 |
category:'Interface-Support-UI' |
11 | 21 |
! |
22 |
||
3680 | 23 |
WindowEvent subclass:#ApplicationEvent |
24 |
instanceVariableNames:'' |
|
25 |
classVariableNames:'' |
|
26 |
poolDictionaries:'' |
|
27 |
privateIn:WindowEvent |
|
28 |
! |
|
29 |
||
3011 | 30 |
WindowEvent subclass:#InputEvent |
31 |
instanceVariableNames:'modifierFlags' |
|
32 |
classVariableNames:'F_CTRL F_ALT F_META F_SHIFT F_BUTTON1 F_BUTTON2 F_BUTTON3' |
|
33 |
poolDictionaries:'' |
|
34 |
privateIn:WindowEvent |
|
35 |
! |
|
36 |
||
3680 | 37 |
WindowEvent::InputEvent subclass:#ButtonEvent |
38 |
instanceVariableNames:'' |
|
39 |
classVariableNames:'' |
|
40 |
poolDictionaries:'' |
|
41 |
privateIn:WindowEvent |
|
42 |
! |
|
43 |
||
44 |
WindowEvent::ButtonEvent subclass:#ButtonPressEvent |
|
45 |
instanceVariableNames:'' |
|
46 |
classVariableNames:'' |
|
47 |
poolDictionaries:'' |
|
48 |
privateIn:WindowEvent |
|
49 |
! |
|
50 |
||
51 |
WindowEvent::ButtonPressEvent subclass:#ButtonMultiPressEvent |
|
52 |
instanceVariableNames:'' |
|
53 |
classVariableNames:'' |
|
54 |
poolDictionaries:'' |
|
55 |
privateIn:WindowEvent |
|
56 |
! |
|
57 |
||
58 |
WindowEvent::ButtonEvent subclass:#ButtonReleaseEvent |
|
59 |
instanceVariableNames:'' |
|
60 |
classVariableNames:'' |
|
61 |
poolDictionaries:'' |
|
62 |
privateIn:WindowEvent |
|
63 |
! |
|
64 |
||
3465 | 65 |
WindowEvent subclass:#ClientEvent |
66 |
instanceVariableNames:'eventData' |
|
67 |
classVariableNames:'' |
|
68 |
poolDictionaries:'' |
|
69 |
privateIn:WindowEvent |
|
70 |
! |
|
71 |
||
3680 | 72 |
WindowEvent subclass:#ConfigureEvent |
73 |
instanceVariableNames:'' |
|
74 |
classVariableNames:'' |
|
75 |
poolDictionaries:'' |
|
76 |
privateIn:WindowEvent |
|
77 |
! |
|
78 |
||
3465 | 79 |
WindowEvent subclass:#DamageEvent |
3297 | 80 |
instanceVariableNames:'' |
81 |
classVariableNames:'' |
|
82 |
poolDictionaries:'' |
|
83 |
privateIn:WindowEvent |
|
84 |
! |
|
85 |
||
3680 | 86 |
WindowEvent::InputEvent subclass:#DropEvent |
87 |
instanceVariableNames:'' |
|
88 |
classVariableNames:'' |
|
89 |
poolDictionaries:'' |
|
90 |
privateIn:WindowEvent |
|
91 |
! |
|
92 |
||
93 |
WindowEvent::InputEvent subclass:#EnterLeaveEvent |
|
94 |
instanceVariableNames:'' |
|
95 |
classVariableNames:'' |
|
96 |
poolDictionaries:'' |
|
97 |
privateIn:WindowEvent |
|
98 |
! |
|
99 |
||
3465 | 100 |
WindowEvent::InputEvent subclass:#FocusEvent |
101 |
instanceVariableNames:'' |
|
102 |
classVariableNames:'' |
|
103 |
poolDictionaries:'' |
|
104 |
privateIn:WindowEvent |
|
105 |
! |
|
106 |
||
5962 | 107 |
WindowEvent::InputEvent subclass:#KeyboardEvent |
108 |
instanceVariableNames:'rawKey' |
|
109 |
classVariableNames:'' |
|
110 |
poolDictionaries:'' |
|
111 |
privateIn:WindowEvent |
|
112 |
! |
|
113 |
||
3680 | 114 |
WindowEvent::ButtonEvent subclass:#ButtonMotionEvent |
3294 | 115 |
instanceVariableNames:'' |
116 |
classVariableNames:'' |
|
117 |
poolDictionaries:'' |
|
118 |
privateIn:WindowEvent |
|
119 |
! |
|
120 |
||
5962 | 121 |
WindowEvent::KeyboardEvent subclass:#KeyPressEvent |
122 |
instanceVariableNames:'' |
|
3294 | 123 |
classVariableNames:'' |
124 |
poolDictionaries:'' |
|
125 |
privateIn:WindowEvent |
|
126 |
! |
|
127 |
||
3680 | 128 |
WindowEvent::KeyboardEvent subclass:#KeyReleaseEvent |
129 |
instanceVariableNames:'' |
|
130 |
classVariableNames:'' |
|
131 |
poolDictionaries:'' |
|
132 |
privateIn:WindowEvent |
|
133 |
! |
|
134 |
||
5962 | 135 |
WindowEvent::KeyboardEvent subclass:#HotKeyEvent |
136 |
instanceVariableNames:'hotkeyIdentifier' |
|
3680 | 137 |
classVariableNames:'' |
138 |
poolDictionaries:'' |
|
139 |
privateIn:WindowEvent |
|
140 |
! |
|
141 |
||
3376 | 142 |
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
|
143 |
instanceVariableNames:'' |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
144 |
classVariableNames:'' |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
145 |
poolDictionaries:'' |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
146 |
privateIn:WindowEvent |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
147 |
! |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
148 |
|
3465 | 149 |
WindowEvent subclass:#MessageSendEvent |
3376 | 150 |
instanceVariableNames:'' |
151 |
classVariableNames:'' |
|
152 |
poolDictionaries:'' |
|
153 |
privateIn:WindowEvent |
|
154 |
! |
|
155 |
||
4988 | 156 |
WindowEvent::ButtonEvent subclass:#MouseWheelMotionEvent |
157 |
instanceVariableNames:'' |
|
158 |
classVariableNames:'' |
|
159 |
poolDictionaries:'' |
|
160 |
privateIn:WindowEvent |
|
161 |
! |
|
162 |
||
4144 | 163 |
WindowEvent::InputEvent subclass:#NativeWidgetCommandEvent |
4233 | 164 |
instanceVariableNames:'' |
4144 | 165 |
classVariableNames:'' |
166 |
poolDictionaries:'' |
|
167 |
privateIn:WindowEvent |
|
168 |
! |
|
169 |
||
4044 | 170 |
WindowEvent subclass:#NewDamageEvent |
171 |
instanceVariableNames:'' |
|
172 |
classVariableNames:'' |
|
173 |
poolDictionaries:'' |
|
174 |
privateIn:WindowEvent |
|
175 |
! |
|
176 |
||
3758 | 177 |
WindowEvent subclass:#SelectionEvent |
178 |
instanceVariableNames:'' |
|
179 |
classVariableNames:'' |
|
180 |
poolDictionaries:'' |
|
181 |
privateIn:WindowEvent |
|
182 |
! |
|
183 |
||
184 |
WindowEvent::SelectionEvent subclass:#SelectionClearEvent |
|
185 |
instanceVariableNames:'' |
|
186 |
classVariableNames:'' |
|
187 |
poolDictionaries:'' |
|
188 |
privateIn:WindowEvent |
|
189 |
! |
|
190 |
||
3773
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
191 |
WindowEvent subclass:#TerminateEvent |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
192 |
instanceVariableNames:'' |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
193 |
classVariableNames:'' |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
194 |
poolDictionaries:'' |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
195 |
privateIn:WindowEvent |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
196 |
! |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
197 |
|
4817 | 198 |
WindowEvent::InputEvent subclass:#TrayActionEvent |
199 |
instanceVariableNames:'' |
|
200 |
classVariableNames:'' |
|
201 |
poolDictionaries:'' |
|
202 |
privateIn:WindowEvent |
|
203 |
! |
|
204 |
||
5838
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
205 |
WindowEvent subclass:#VisibilityChangeEvent |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
206 |
instanceVariableNames:'visibility' |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
207 |
classVariableNames:'' |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
208 |
poolDictionaries:'' |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
209 |
privateIn:WindowEvent |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
210 |
! |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
211 |
|
3680 | 212 |
WindowEvent subclass:#WindowMapUnmapEvent |
213 |
instanceVariableNames:'' |
|
214 |
classVariableNames:'' |
|
215 |
poolDictionaries:'' |
|
216 |
privateIn:WindowEvent |
|
217 |
! |
|
218 |
||
46 | 219 |
!WindowEvent class methodsFor:'documentation'! |
220 |
||
221 |
copyright |
|
222 |
" |
|
223 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
72 | 224 |
All Rights Reserved |
46 | 225 |
|
226 |
This software is furnished under a license and may be used |
|
227 |
only in accordance with the terms of that license and with the |
|
228 |
inclusion of the above copyright notice. This software may not |
|
229 |
be provided or otherwise made available to, or used by, any |
|
230 |
other person. No title to or ownership of the software is |
|
231 |
hereby transferred. |
|
232 |
" |
|
233 |
! |
|
234 |
||
235 |
documentation |
|
236 |
" |
|
5752 | 237 |
Instances of WindowEvent are created for every event coming from the graphics device. |
144 | 238 |
Usually, they are enqueued by the event dispatcher process into |
239 |
a sensors input queue, and dequeued & processed by a windowGroup process |
|
240 |
in its event loop. |
|
241 |
||
242 |
WindowEvents hold the event type and additional information (such as key, |
|
243 |
x/y coordinates etc). Also, windowEvents know how to send themself to some |
|
244 |
destination. To provide a common (single) place where event dispatching is |
|
1421 | 245 |
implemented, this forwarding is done by a class method here (i.e. not by the |
144 | 246 |
window group itself). |
247 |
||
248 |
The algorithm for event dispatching is: |
|
249 |
||
5752 | 250 |
- if the destination view has a keyboard focus set, |
251 |
AND the event is a keyboard event, |
|
252 |
THEN recursively invoke the event dispatching method, |
|
253 |
sending the event to the focus view (or its delegate, as below) |
|
144 | 254 |
|
5752 | 255 |
- if the destination view has a delegate, |
256 |
AND its a keyboard, button or pointer event, |
|
257 |
AND the delegate is interested in that event |
|
258 |
(i.e. implements & responds to #handlesXXX with true) |
|
259 |
THEN send the event to the delegate, passing the original view |
|
260 |
as additional argument |
|
144 | 261 |
|
5752 | 262 |
- if the view has a nonNil controller, |
263 |
AND its a key, button or pointer event, |
|
264 |
THEN send the event to the controller |
|
144 | 265 |
|
5752 | 266 |
- otherwise send the event to the view |
144 | 267 |
|
268 |
||
269 |
If the view has a non-nil transformation, the event is sent as a |
|
270 |
#deviceXXX message, passing device coordinates. Typically, subclasses |
|
271 |
of view do not redefine this method and the inherited default method |
|
272 |
translates these device coordinates into logical coordinates and resends |
|
273 |
an XXX message. |
|
274 |
If the view has no transformation, the XXX message is directly sent here. |
|
275 |
||
276 |
For example, a 'buttonPress:button x:x y:y' event leads to sending of |
|
277 |
'aView deviceButtonPress:button x:x y:y' which resends |
|
278 |
'aView buttonPress:button x:(x-logical) y:(y-logical)' |
|
279 |
||
320
b7b8dc88fe9f
interest is written with one 'r' (shame on me)
Claus Gittinger <cg@exept.de>
parents:
251
diff
changeset
|
280 |
This allows views which are interested in deviceCoordinates to get them |
144 | 281 |
(by redefining #deviceXXX) and other views to transparently get & use |
282 |
logical coordinates. |
|
283 |
||
284 |
Therefore, for a delegated keyPress messages, the flow is: |
|
285 |
||
5752 | 286 |
sendEvent |
287 |
view has delegate |
|
288 |
------> ask delegate via 'handlesKeyPress:key inView:view' |
|
289 |
<------ returns true |
|
290 |
------> 'delegate keyPress:key x:x y:y view:view' |
|
291 |
-----> delegate does whatever it wants to do |
|
292 |
(typically sends the event to some other view) |
|
144 | 293 |
|
294 |
for an undelegated message: |
|
295 |
||
5752 | 296 |
sendEvent |
297 |
view has delegate |
|
298 |
------> ask delegate via 'handlesKeyPress:key inView:view' |
|
299 |
<------ returns false |
|
300 |
view has controller |
|
301 |
------> 'controller keyPress:key x:x y:y' |
|
302 |
view has no controller |
|
303 |
view has transformation |
|
304 |
----> 'view deviceKeyPress:key x:x y:y' |
|
305 |
inverse transform x/y |
|
306 |
----> 'self keyPress:key x:xLogical y:yLogical' |
|
307 |
view has no transformation |
|
308 |
----> 'view keyPress:key x:x y:y' |
|
598 | 309 |
|
612 | 310 |
[author:] |
5752 | 311 |
Claus Gittinger |
612 | 312 |
|
598 | 313 |
[see also:] |
5752 | 314 |
WindowGroup WindowSensor |
315 |
DeviceWorkstation View |
|
316 |
KeyboardMap KeyboardForwarder EventListener |
|
598 | 317 |
|
46 | 318 |
" |
319 |
! ! |
|
320 |
||
11 | 321 |
!WindowEvent class methodsFor:'instance creation'! |
322 |
||
4960 | 323 |
buttonMotion:buttonAndModifierState x:x y:y view:aView |
3680 | 324 |
^ (ButtonMotionEvent new) |
325 |
for:aView |
|
326 |
type:#buttonMotion:x:y: |
|
4960 | 327 |
arguments:(Array with:buttonAndModifierState with:x with:y) |
3680 | 328 |
! |
329 |
||
330 |
buttonMultiPress:button x:x y:y view:aView |
|
331 |
^ (ButtonMultiPressEvent new) |
|
332 |
for:aView |
|
333 |
type:#buttonMultiPress:x:y: |
|
334 |
arguments:(Array with:button with:x with:y) |
|
335 |
! |
|
336 |
||
337 |
buttonPress:button x:x y:y view:aView |
|
338 |
^ (ButtonPressEvent new) |
|
339 |
for:aView |
|
340 |
type:#buttonPress:x:y: |
|
341 |
arguments:(Array with:button with:x with:y) |
|
342 |
! |
|
343 |
||
344 |
buttonRelease:button x:x y:y view:aView |
|
345 |
^ (ButtonReleaseEvent new) |
|
346 |
for:aView |
|
347 |
type:#buttonRelease:x:y: |
|
348 |
arguments:(Array with:button with:x with:y) |
|
349 |
! |
|
350 |
||
351 |
clientMessageEvent:type format:format eventData:data view:aView |
|
5000
e0ec909988e9
hooks for client and copyData events
Claus Gittinger <cg@exept.de>
parents:
4991
diff
changeset
|
352 |
"this one is only used with X-Windows" |
e0ec909988e9
hooks for client and copyData events
Claus Gittinger <cg@exept.de>
parents:
4991
diff
changeset
|
353 |
|
3680 | 354 |
^ ClientEvent |
355 |
for:aView |
|
356 |
type:#clientMessage:format:eventData: |
|
357 |
arguments:(Array with:type with:format with:data) |
|
358 |
! |
|
359 |
||
360 |
configureX:x y:y width:w height:h view:aView |
|
361 |
^ ConfigureEvent |
|
362 |
for:aView |
|
363 |
type:#configureX:y:width:height: |
|
364 |
arguments:(Array with:x with:y with:w with:h) |
|
365 |
! |
|
366 |
||
5020
f8ba55bc9b95
changed #copyDataEvent:eventData:view:
Claus Gittinger <cg@exept.de>
parents:
5000
diff
changeset
|
367 |
copyDataEvent:parameter eventData:data view:aView |
5000
e0ec909988e9
hooks for client and copyData events
Claus Gittinger <cg@exept.de>
parents:
4991
diff
changeset
|
368 |
"this one is only used with Win32" |
e0ec909988e9
hooks for client and copyData events
Claus Gittinger <cg@exept.de>
parents:
4991
diff
changeset
|
369 |
|
e0ec909988e9
hooks for client and copyData events
Claus Gittinger <cg@exept.de>
parents:
4991
diff
changeset
|
370 |
^ ClientEvent |
e0ec909988e9
hooks for client and copyData events
Claus Gittinger <cg@exept.de>
parents:
4991
diff
changeset
|
371 |
for:aView |
e0ec909988e9
hooks for client and copyData events
Claus Gittinger <cg@exept.de>
parents:
4991
diff
changeset
|
372 |
type:#copyDataEvent:eventData: |
5020
f8ba55bc9b95
changed #copyDataEvent:eventData:view:
Claus Gittinger <cg@exept.de>
parents:
5000
diff
changeset
|
373 |
arguments:(Array with:parameter with:data) |
5000
e0ec909988e9
hooks for client and copyData events
Claus Gittinger <cg@exept.de>
parents:
4991
diff
changeset
|
374 |
! |
e0ec909988e9
hooks for client and copyData events
Claus Gittinger <cg@exept.de>
parents:
4991
diff
changeset
|
375 |
|
3680 | 376 |
coveredBy:coveringSiblingView view:coveredView |
377 |
^ (WindowEvent basicNew) |
|
378 |
for:coveredView |
|
379 |
type:#coveredBy: |
|
380 |
arguments:(Array with:coveringSiblingView) |
|
381 |
! |
|
382 |
||
5751 | 383 |
createWindow:view x:x y:y width:w height:h |
384 |
||
385 |
^ (self basicNew) |
|
386 |
for: view |
|
387 |
type:#createWindowX:y:width:height: |
|
388 |
arguments: (Array with: x with: y with: w with: h) |
|
389 |
||
390 |
"Created: / 30-05-2011 / 19:04:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
391 |
"Modified: / 01-06-2011 / 13:05:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
392 |
! |
|
393 |
||
244 | 394 |
damageFor:aView rectangle:aRectangle |
395 |
"create and return a new damage Event for aRectangle |
|
396 |
in aView" |
|
11 | 397 |
|
4044 | 398 |
^ DamageEvent for:aView type:#damage arguments:aRectangle |
3680 | 399 |
! |
400 |
||
401 |
destroyedView:aView |
|
402 |
^ (self basicNew) |
|
403 |
for:aView |
|
404 |
type:#destroyed |
|
405 |
! |
|
406 |
||
4459 | 407 |
dropFiles:files view:view position:dropPositionOrNil handle:dropHandleOrNil |
4648
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
408 |
^ self |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
409 |
dropMessage:(self dropType_files) |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
410 |
data:files |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
411 |
view:view |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
412 |
position:dropPositionOrNil |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
413 |
handle:dropHandleOrNil |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
414 |
|
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
415 |
"Modified: / 13-10-2006 / 10:11:47 / cg" |
4456 | 416 |
! |
417 |
||
4459 | 418 |
dropMessage:dropTypeSymbol data:dropValue view:aView position:positionOrNil handle:dropHandleOrNil |
3680 | 419 |
^ DropEvent |
420 |
for:aView |
|
4461 | 421 |
type:#dropMessage:data:position:handle: |
4458 | 422 |
arguments:(Array with:dropTypeSymbol with:dropValue with:positionOrNil with:dropHandleOrNil) |
3680 | 423 |
! |
424 |
||
425 |
focusInView:aView |
|
426 |
^ FocusEvent |
|
427 |
for:aView |
|
428 |
type:#focusIn |
|
429 |
! |
|
430 |
||
431 |
focusOutView:aView |
|
432 |
^ FocusEvent |
|
433 |
for:aView |
|
434 |
type:#focusOut |
|
435 |
! |
|
436 |
||
5962 | 437 |
hotkeyWithId:aHotkeyId rawKey:keyWithModifier view:aView |
438 |
||
439 |
|ev| |
|
440 |
||
441 |
ev := (HotKeyEvent new) |
|
442 |
for:aView |
|
443 |
type:#hotkeyWithId:rawKey: |
|
444 |
arguments:(Array with:keyWithModifier with:0 with:0). |
|
445 |
ev rawKey:keyWithModifier. |
|
446 |
ev hotkeyIdentifier:aHotkeyId. |
|
447 |
^ ev |
|
448 |
! |
|
449 |
||
3680 | 450 |
keyPress:key rawKey:untranslatedKey |
451 |
hasShift:shiftDown ctrl:ctrlDown alt:altDown meta:metaDown |
|
452 |
button1:leftButtonDown button2:middleButtonDown button3:rightButtonDown |
|
453 |
x:x y:y view:aView |
|
244 | 454 |
|
3680 | 455 |
|ev| |
456 |
||
457 |
ev := self keyPress:key x:x y:y view:aView. |
|
458 |
ev rawKey:untranslatedKey. |
|
459 |
ev hasShift:shiftDown ctrl:ctrlDown alt:altDown meta:metaDown |
|
460 |
button1:leftButtonDown button2:middleButtonDown button3:rightButtonDown. |
|
461 |
^ ev |
|
462 |
! |
|
463 |
||
464 |
keyPress:key x:x y:y view:aView |
|
465 |
^ (KeyPressEvent new) |
|
466 |
for:aView |
|
467 |
type:#keyPress:x:y: |
|
468 |
arguments:(Array with:key with:x with:y) |
|
469 |
! |
|
470 |
||
471 |
keyRelease:key rawKey:untranslatedKey |
|
472 |
hasShift:shiftDown ctrl:ctrlDown alt:altDown meta:metaDown |
|
473 |
button1:leftButtonDown button2:middleButtonDown button3:rightButtonDown |
|
474 |
x:x y:y view:aView |
|
475 |
||
476 |
|ev| |
|
477 |
||
478 |
ev := self keyRelease:key x:x y:y view:aView. |
|
479 |
ev rawKey:untranslatedKey. |
|
480 |
ev hasShift:shiftDown ctrl:ctrlDown alt:altDown meta:metaDown |
|
481 |
button1:leftButtonDown button2:middleButtonDown button3:rightButtonDown. |
|
482 |
^ ev |
|
483 |
! |
|
484 |
||
485 |
keyRelease:key x:x y:y view:aView |
|
486 |
^ (KeyReleaseEvent new) |
|
487 |
for:aView |
|
488 |
type:#keyRelease:x:y: |
|
489 |
arguments:(Array with:key with:x with:y) |
|
46 | 490 |
! |
491 |
||
3856
45fccc92d834
Use SynchronousWindoeSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3773
diff
changeset
|
492 |
keyboardFocus:arg view:aView |
45fccc92d834
Use SynchronousWindoeSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3773
diff
changeset
|
493 |
|
45fccc92d834
Use SynchronousWindoeSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3773
diff
changeset
|
494 |
^ KeyboardFocusEvent |
45fccc92d834
Use SynchronousWindoeSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3773
diff
changeset
|
495 |
for:aView type:#hasKeyboardFocus: arguments:(Array with:arg). |
45fccc92d834
Use SynchronousWindoeSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3773
diff
changeset
|
496 |
! |
45fccc92d834
Use SynchronousWindoeSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3773
diff
changeset
|
497 |
|
3680 | 498 |
mappedView:aView |
499 |
^ WindowMapUnmapEvent |
|
500 |
for:aView |
|
501 |
type:#mapped |
|
502 |
! |
|
503 |
||
504 |
messageSend:receiver selector:aSelector arguments:arguments |
|
505 |
^ MessageSendEvent |
|
506 |
for:receiver |
|
507 |
type:aSelector |
|
508 |
arguments:arguments |
|
509 |
! |
|
72 | 510 |
|
3680 | 511 |
mouseWheelMotion:state x:x y:y amount:amount deltaTime:deltaTime view:aView |
4988 | 512 |
^ MouseWheelMotionEvent |
3680 | 513 |
for:aView |
514 |
type:#mouseWheelMotion:x:y:amount:deltaTime: |
|
515 |
arguments:(Array with:state with:x with:y with:amount with:deltaTime). |
|
516 |
! |
|
517 |
||
4233 | 518 |
nativeWidgetCommand:command arguments:argVector view:aView |
4144 | 519 |
^ (NativeWidgetCommandEvent new) |
520 |
for:aView |
|
4233 | 521 |
type:command |
522 |
arguments:argVector |
|
4144 | 523 |
! |
524 |
||
4044 | 525 |
newDamageFor:aView |
526 |
"create and return a new damage Event for aView" |
|
527 |
||
528 |
^ NewDamageEvent for:aView type:#newDamage |
|
529 |
! |
|
530 |
||
3680 | 531 |
pasteFromClipBoard:something view:aView |
532 |
^ (self basicNew) |
|
533 |
for:aView |
|
534 |
type:#pasteFromClipBoard: |
|
535 |
arguments:(Array with:something). |
|
536 |
! |
|
537 |
||
538 |
pointerEnter:state x:x y:y view:aView |
|
539 |
^ EnterLeaveEvent |
|
540 |
for:aView |
|
541 |
type:#pointerEnter:x:y: |
|
542 |
arguments:(Array with:state with:x with:y). |
|
72 | 543 |
! |
544 |
||
3680 | 545 |
pointerLeave:state view:aView |
546 |
^ EnterLeaveEvent |
|
547 |
for:aView |
|
548 |
type:#pointerLeave: |
|
549 |
arguments:(Array with:state). |
|
550 |
! |
|
551 |
||
552 |
postViewCreateNotification:aView |
|
553 |
^ (self basicNew) |
|
554 |
for:aView |
|
555 |
type:#postCreateView |
|
556 |
! |
|
28 | 557 |
|
3680 | 558 |
preViewCreateNotification:aView |
559 |
^ (self basicNew) |
|
560 |
for:aView |
|
561 |
type:#preCreateView |
|
562 |
! |
|
563 |
||
5751 | 564 |
propertyChange:view property:propertyId state:aSymbol time:time |
565 |
^ (self basicNew) |
|
566 |
for: view |
|
567 |
type:#propertyChange:state: |
|
568 |
arguments: (Array with: propertyId with: aSymbol) |
|
569 |
||
570 |
"Created: / 01-06-2011 / 13:36:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
571 |
! |
|
572 |
||
3680 | 573 |
saveAndTerminateView:aView |
3773
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
574 |
^ (TerminateEvent basicNew) |
3680 | 575 |
for:aView |
576 |
type:#saveAndTerminate |
|
577 |
! |
|
578 |
||
579 |
terminateView:aView |
|
3773
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
580 |
^ (TerminateEvent basicNew) |
3680 | 581 |
for:aView |
582 |
type:#terminate |
|
583 |
! |
|
584 |
||
4817 | 585 |
trayAction:event arguments:argVector view:aView |
586 |
^ (TrayActionEvent new) |
|
587 |
for:aView |
|
588 |
type:event |
|
589 |
arguments:argVector |
|
590 |
||
591 |
"Created: / 31-10-2007 / 01:23:53 / cg" |
|
592 |
! |
|
593 |
||
3680 | 594 |
unmappedView:aView |
595 |
^ WindowMapUnmapEvent |
|
596 |
for:aView |
|
597 |
type:#unmapped |
|
5838
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
598 |
! |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
599 |
|
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
600 |
visibilityOf:aView changedTo:how |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
601 |
^ EnterLeaveEvent |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
602 |
for:aView |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
603 |
type:#visibilityChange: |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
604 |
arguments:(Array with:how). |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
605 |
|
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
606 |
"Created: / 23-01-2012 / 09:51:03 / cg" |
28 | 607 |
! ! |
608 |
||
4648
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
609 |
!WindowEvent class methodsFor:'constants'! |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
610 |
|
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
611 |
dropType_directory |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
612 |
^ #directory |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
613 |
|
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
614 |
"Created: / 13-10-2006 / 10:08:59 / cg" |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
615 |
! |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
616 |
|
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
617 |
dropType_file |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
618 |
^ #file |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
619 |
|
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
620 |
"Created: / 13-10-2006 / 10:08:52 / cg" |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
621 |
! |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
622 |
|
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
623 |
dropType_files |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
624 |
^ #files |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
625 |
|
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
626 |
"Created: / 13-10-2006 / 10:09:04 / cg" |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
627 |
! |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
628 |
|
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
629 |
dropType_text |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
630 |
^ #text |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
631 |
|
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
632 |
"Created: / 13-10-2006 / 10:09:36 / cg" |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
633 |
! ! |
87368f2f69fc
eliminated magic symbol constants
Claus Gittinger <cg@exept.de>
parents:
4628
diff
changeset
|
634 |
|
5929 | 635 |
!WindowEvent class methodsFor:'instance creation-basic'! |
3680 | 636 |
|
637 |
for:aView type:aSymbol |
|
638 |
"create and return a new windowEvent for sending |
|
639 |
aSymbol-message with no arguments to aView" |
|
640 |
||
3856
45fccc92d834
Use SynchronousWindoeSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3773
diff
changeset
|
641 |
^ self new for:aView type:aSymbol |
3680 | 642 |
! |
643 |
||
644 |
for:aView type:aSymbol arguments:argArray |
|
645 |
"create and return a new windowEvent for sending |
|
646 |
aSymbol-message with arguments to aView" |
|
647 |
||
3856
45fccc92d834
Use SynchronousWindoeSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3773
diff
changeset
|
648 |
^ self new for:aView type:aSymbol arguments:argArray |
3680 | 649 |
! |
650 |
||
651 |
new |
|
652 |
self == WindowEvent ifTrue:[ |
|
5929 | 653 |
'----------------' errorPrint. |
654 |
'WindowEvent is abstract - use/add explicit creation message' errorPrintCR. |
|
655 |
thisContext fullPrintAll. |
|
5949 | 656 |
self abstractClassInstantiationError. |
3680 | 657 |
]. |
658 |
^ super new |
|
5929 | 659 |
|
660 |
"Modified (format): / 31-08-2012 / 19:44:41 / cg" |
|
3680 | 661 |
! ! |
662 |
||
244 | 663 |
!WindowEvent methodsFor:'accessing'! |
664 |
||
3465 | 665 |
consumed |
666 |
"return the value of the instance variable 'consumed' (automatically generated)" |
|
667 |
||
668 |
^ consumed |
|
669 |
! |
|
670 |
||
671 |
consumed:aBoolean |
|
672 |
"set the value of the instance variable 'consumed' (automatically generated)" |
|
673 |
||
674 |
consumed := aBoolean. |
|
675 |
! |
|
676 |
||
3089 | 677 |
delegatedFrom |
678 |
"return the value of the instance variable 'delegatedFrom' (automatically generated)" |
|
679 |
||
3376 | 680 |
^ delegatedFrom |
681 |
! |
|
3089 | 682 |
|
683 |
delegatedFrom:something |
|
684 |
"set the value of the instance variable 'delegatedFrom' (automatically generated)" |
|
685 |
||
3376 | 686 |
delegatedFrom := something. |
687 |
! |
|
3089 | 688 |
|
244 | 689 |
key |
1841 | 690 |
"return the key - nil is returned here. |
691 |
This is redefined in KeyboardEvent." |
|
244 | 692 |
|
693 |
^ nil |
|
1841 | 694 |
|
695 |
"Created: 1.8.1997 / 13:56:21 / cg" |
|
244 | 696 |
! |
697 |
||
698 |
rectangle |
|
699 |
"return the damage rectangle" |
|
700 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
701 |
^ 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
|
702 |
! |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
703 |
|
244 | 704 |
type |
705 |
"return the type of the event" |
|
706 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
707 |
^ selector |
244 | 708 |
! |
709 |
||
710 |
view |
|
711 |
"return the view, for which the event is for" |
|
712 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
713 |
^ receiver |
244 | 714 |
! |
715 |
||
716 |
view:aView |
|
717 |
"set the view, for which the event is for" |
|
718 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
719 |
receiver := aView |
3089 | 720 |
! |
721 |
||
722 |
x |
|
723 |
"the x coordinate - if any. |
|
724 |
nil returned for all but button- and keyEvents" |
|
725 |
||
726 |
^ nil |
|
727 |
! |
|
728 |
||
729 |
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
|
730 |
"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
|
731 |
only for button- and keyEvents" |
3089 | 732 |
! |
733 |
||
734 |
y |
|
735 |
"the y coordinate - if any. |
|
736 |
nil returned for all but button- and keyEvents" |
|
737 |
||
738 |
^ nil |
|
739 |
! |
|
740 |
||
741 |
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
|
742 |
"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
|
743 |
only for button- and keyEvents" |
244 | 744 |
! ! |
745 |
||
3011 | 746 |
!WindowEvent methodsFor:'dispatching'! |
747 |
||
748 |
dispatchTo:anObject |
|
749 |
"send this event to anObject" |
|
750 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
751 |
^ anObject perform:selector withArguments:args |
3011 | 752 |
! |
753 |
||
754 |
dispatchWithViewArgumentTo:anObject |
|
755 |
"send this event to anObject, and pass an additional view argument" |
|
756 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
757 |
args size = 0 ifTrue:[ |
3011 | 758 |
^ anObject |
6312 | 759 |
perform:selector asMutator |
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
760 |
with:receiver |
3011 | 761 |
]. |
762 |
||
763 |
^ anObject |
|
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
764 |
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
|
765 |
withArguments:(args copyWith:receiver) |
3011 | 766 |
! ! |
767 |
||
511
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
768 |
!WindowEvent methodsFor:'printing & storing'! |
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
769 |
|
5925
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
770 |
displayOn:aGCOrStream |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
771 |
"Compatibility |
7932 | 772 |
append a printed desription on some stream (Dolphin, Squeak) |
5925
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
773 |
OR: |
7932 | 774 |
display the receiver in a graphicsContext at 0@0 (ST80). |
5925
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
775 |
This method allows for any object to be displayed in some view |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
776 |
(although the fallBack is to display its printString ...)" |
1905 | 777 |
|
5925
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
778 |
"/ what a kludge - Dolphin and Squeak mean: printOn: a stream; |
7932 | 779 |
"/ old ST80 means: draw-yourself on a GC. |
5925
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
780 |
aGCOrStream isStream ifFalse:[ |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
781 |
^ super displayOn:aGCOrStream. |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
782 |
]. |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
783 |
|
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
784 |
aGCOrStream |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
785 |
nextPutAll:self class name; |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
786 |
nextPut:$(. |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
787 |
|
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
788 |
selector storeOn:aGCOrStream. |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
789 |
aGCOrStream |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
790 |
nextPutAll:' view: '; |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
791 |
nextPutAll:receiver class name; |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
792 |
nextPutAll:' args: '. |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
793 |
|
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
794 |
args displayOn:aGCOrStream. |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
795 |
aGCOrStream nextPut:$) |
511
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
796 |
|
7932 | 797 |
"Created: / 07-03-1996 / 14:55:50 / cg" |
798 |
"Modified: / 20-09-1997 / 11:42:11 / cg" |
|
799 |
"Modified (comment): / 22-02-2017 / 16:53:02 / cg" |
|
511
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
800 |
! ! |
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
801 |
|
3879 | 802 |
!WindowEvent methodsFor:'private-accessing'! |
244 | 803 |
|
3680 | 804 |
for:aView type:aSymbol |
805 |
"set the instance variables of the event" |
|
806 |
||
807 |
receiver := aView. |
|
808 |
selector := aSymbol. |
|
4991 | 809 |
args := #(). |
810 |
timeStamp := Timestamp now. |
|
3680 | 811 |
! |
812 |
||
244 | 813 |
for:aView type:aSymbol arguments:argArray |
814 |
"set the instance variables of the event" |
|
815 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
816 |
receiver := aView. |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
817 |
selector := aSymbol. |
4991 | 818 |
args := argArray. |
819 |
timeStamp := Timestamp now. |
|
244 | 820 |
! ! |
821 |
||
822 |
!WindowEvent methodsFor:'queries'! |
|
823 |
||
1588
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
824 |
hasAlt |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
825 |
"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
|
826 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
827 |
^ false |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
828 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
829 |
"Created: 12.4.1997 / 11:04:10 / cg" |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
830 |
! |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
831 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
832 |
hasCtrl |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
833 |
"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
|
834 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
835 |
^ false |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
836 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
837 |
"Created: 12.4.1997 / 11:04:03 / cg" |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
838 |
! |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
839 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
840 |
hasMeta |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
841 |
"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
|
842 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
843 |
^ false |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
844 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
845 |
"Created: 12.4.1997 / 11:04:16 / cg" |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
846 |
! |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
847 |
|
1590 | 848 |
hasShift |
849 |
"return true, if this is a keyboard event, with SHIFT pressed" |
|
850 |
||
851 |
^ false |
|
852 |
||
853 |
"Created: 12.4.1997 / 11:30:59 / cg" |
|
854 |
! |
|
855 |
||
5249 | 856 |
targetView |
857 |
"return the view which will eventually handle the event; |
|
858 |
for most events, this is the same as the view, for which the event was |
|
859 |
originally generated. |
|
860 |
Except, if an explicit focus has been assigned (i.e. tabbed into a component), |
|
861 |
AND the event is a keyboard event. In this case, the targetView might be different. |
|
862 |
Notice: this method might return nil, for synthetic (app-related) or display screen related |
|
863 |
events" |
|
864 |
||
865 |
^ self view. |
|
866 |
! ! |
|
867 |
||
868 |
!WindowEvent methodsFor:'testing'! |
|
869 |
||
3680 | 870 |
isApplicationEvent |
871 |
"return true, if this event is application related (i.e. not for a particular view)" |
|
872 |
||
873 |
^ false |
|
874 |
! |
|
875 |
||
244 | 876 |
isButtonEvent |
877 |
"return true, if this event is a button event" |
|
878 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
879 |
^ false |
244 | 880 |
! |
881 |
||
1730 | 882 |
isButtonMotionEvent |
883 |
"return true, if this event is a buttonMotion event" |
|
884 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
885 |
^ false |
1730 | 886 |
|
887 |
"Created: 5.3.1997 / 12:25:43 / cg" |
|
888 |
! |
|
889 |
||
4628 | 890 |
isButtonMultiPressEvent |
891 |
"return true, if this event is a buttonMulti-Press event" |
|
892 |
||
893 |
^ false |
|
894 |
||
895 |
"Created: 5.3.1997 / 12:25:43 / cg" |
|
896 |
! |
|
897 |
||
1420 | 898 |
isButtonPressEvent |
899 |
"return true, if this event is a buttonPress event" |
|
900 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
901 |
^ false |
1420 | 902 |
|
903 |
"Created: 5.3.1997 / 12:25:43 / cg" |
|
904 |
! |
|
905 |
||
3011 | 906 |
isButtonReleaseEvent |
907 |
"return true, if this event is a buttonPress event" |
|
908 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
909 |
^ false |
3011 | 910 |
|
911 |
"Created: 5.3.1997 / 12:25:43 / cg" |
|
912 |
! |
|
913 |
||
2811 | 914 |
isConfigureEvent |
3680 | 915 |
"return true, if this is a window geometry change event" |
2811 | 916 |
|
3680 | 917 |
^ false. |
2811 | 918 |
! |
919 |
||
5751 | 920 |
isCreateWindowEvent |
921 |
"return true, if this event is a CreateWindow event" |
|
922 |
||
923 |
^selector == #createWindowX:y:width:height: |
|
924 |
||
925 |
"Created: / 01-06-2011 / 13:01:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
926 |
! |
|
927 |
||
244 | 928 |
isDamage |
929 |
"return true, if this is a damage event" |
|
930 |
||
3680 | 931 |
^ false. |
244 | 932 |
! |
933 |
||
2471 | 934 |
isDamageForView:aView |
3680 | 935 |
"return true, if this is a damage event for a View" |
2471 | 936 |
|
3680 | 937 |
^ false. |
2471 | 938 |
! |
939 |
||
5204
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
940 |
isDelegatedToFocusView |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
941 |
"return true, if this event will be forwarded to a focusView." |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
942 |
|
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
943 |
^ false. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
944 |
! |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
945 |
|
1420 | 946 |
isFocusEvent |
947 |
"return true, if this event is a focusIn/focusOut event" |
|
948 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
949 |
^ false |
1420 | 950 |
|
951 |
"Created: 5.3.1997 / 12:12:37 / cg" |
|
952 |
! |
|
953 |
||
954 |
isFocusInEvent |
|
955 |
"return true, if this event is a focusIn event" |
|
956 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
957 |
^ false |
1420 | 958 |
|
959 |
"Created: 5.3.1997 / 12:18:10 / cg" |
|
960 |
! |
|
961 |
||
4980 | 962 |
isFocusOutEvent |
963 |
"return true, if this event is a focusOut event" |
|
964 |
||
965 |
^ false |
|
966 |
||
967 |
"Created: 5.3.1997 / 12:18:10 / cg" |
|
968 |
! |
|
969 |
||
5962 | 970 |
isHotKeyEvent |
971 |
"return true, if this event is a hotkey event" |
|
972 |
||
973 |
^ false |
|
974 |
! |
|
975 |
||
2707 | 976 |
isInputEvent |
977 |
"return true, if this event is an input (pointer, key or button) event" |
|
978 |
||
979 |
^ false |
|
980 |
||
981 |
"Created: / 21.5.1999 / 19:49:42 / cg" |
|
982 |
"Modified: / 21.5.1999 / 19:50:11 / cg" |
|
983 |
! |
|
984 |
||
244 | 985 |
isKeyEvent |
986 |
"return true, if this event is a keyboard event" |
|
987 |
||
2028 | 988 |
^ false |
989 |
||
990 |
"Modified: / 28.1.1998 / 00:03:17 / cg" |
|
244 | 991 |
! |
992 |
||
993 |
isKeyPressEvent |
|
2028 | 994 |
"return true, if this event is a keyboard press event" |
995 |
||
996 |
^ false |
|
997 |
||
998 |
"Modified: / 28.1.1998 / 00:03:24 / cg" |
|
999 |
! |
|
244 | 1000 |
|
2028 | 1001 |
isKeyReleaseEvent |
1002 |
"return true, if this event is a keyboard release event" |
|
1003 |
||
1004 |
^ false |
|
1005 |
||
1006 |
"Modified: / 28.1.1998 / 00:03:31 / cg" |
|
356 | 1007 |
! |
1008 |
||
3376 | 1009 |
isKeyboardFocusEvent |
1010 |
"return true, if this event is a keyboard focus event" |
|
1011 |
||
1012 |
^ false |
|
1013 |
! |
|
1014 |
||
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1015 |
isMapEvent |
4842 | 1016 |
"return true, if this is a map event" |
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1017 |
|
3680 | 1018 |
^ false |
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1019 |
|
4842 | 1020 |
"Created: / 29-01-1998 / 21:52:54 / cg" |
1021 |
"Modified: / 09-11-2007 / 13:10:25 / cg" |
|
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1022 |
! |
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1023 |
|
3297 | 1024 |
isMessageSendEvent |
1025 |
"return true, if this event is a general messageSend event" |
|
1026 |
||
1027 |
^ false |
|
1028 |
! |
|
1029 |
||
3011 | 1030 |
isMouseWheelEvent |
3680 | 1031 |
^ false |
3011 | 1032 |
! |
1033 |
||
356 | 1034 |
isPointerEnterEvent |
1035 |
"return true, if this event is a pointer-enter event" |
|
1036 |
||
3680 | 1037 |
^ false |
356 | 1038 |
|
1039 |
"Created: 9.1.1996 / 15:51:24 / cg" |
|
1040 |
"Modified: 9.1.1996 / 15:51:40 / cg" |
|
1041 |
! |
|
1042 |
||
1043 |
isPointerEnterLeaveEvent |
|
1044 |
"return true, if this event is a pointer-enter/leave event" |
|
1045 |
||
3680 | 1046 |
^ false |
356 | 1047 |
|
1048 |
"Created: 9.1.1996 / 15:51:18 / cg" |
|
1049 |
! |
|
1050 |
||
1051 |
isPointerLeaveEvent |
|
1052 |
"return true, if this event is a pointer-leave event" |
|
1053 |
||
3680 | 1054 |
^ false |
356 | 1055 |
|
1056 |
"Created: 9.1.1996 / 15:51:36 / cg" |
|
1158 | 1057 |
! |
1058 |
||
5751 | 1059 |
isPropertyChangeEvent |
1060 |
"return true, if this event is a CreateWindow event" |
|
1061 |
||
1062 |
^selector == #propertyChange:state: |
|
1063 |
||
1064 |
"Created: / 01-06-2011 / 13:36:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1065 |
! |
|
1066 |
||
3773
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1067 |
isTerminateEvent |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1068 |
^ false |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1069 |
! |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1070 |
|
4842 | 1071 |
isTrayEvent |
1072 |
"return true, if this is an event from the tray (WIN32 only, for now)" |
|
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1073 |
|
3680 | 1074 |
^ false |
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1075 |
|
4842 | 1076 |
"Created: / 09-11-2007 / 13:09:29 / cg" |
1077 |
! |
|
1078 |
||
1079 |
isUnmapEvent |
|
1080 |
"return true, if this is an unmap event" |
|
1081 |
||
1082 |
^ false |
|
1083 |
||
1084 |
"Modified: / 09-11-2007 / 13:10:07 / cg" |
|
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1085 |
! |
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1086 |
|
1158 | 1087 |
isUserEvent |
1088 |
"return true, if this event is a user event (i.e. mouse, keyboard or button)" |
|
1089 |
||
1090 |
^ false |
|
1091 |
||
8308 | 1092 |
"Modified: / 05-03-1997 / 11:27:40 / cg" |
1093 |
"Modified: / 16-03-2018 / 11:07:59 / stefan" |
|
244 | 1094 |
! ! |
1095 |
||
3680 | 1096 |
!WindowEvent::ApplicationEvent methodsFor:'blocked'! |
1097 |
||
1098 |
view |
|
1099 |
^ nil |
|
1100 |
! ! |
|
1101 |
||
5249 | 1102 |
!WindowEvent::ApplicationEvent methodsFor:'testing'! |
3680 | 1103 |
|
1104 |
isApplicationEvent |
|
1105 |
^ true |
|
1106 |
! ! |
|
1107 |
||
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1108 |
!WindowEvent::InputEvent class methodsFor:'class initialization'! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1109 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1110 |
initialize |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1111 |
F_SHIFT := 16r001. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1112 |
F_CTRL := 16r002. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1113 |
F_ALT := 16r004. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1114 |
F_META := 16r008. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1115 |
|
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1116 |
F_BUTTON1 := 16r100. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1117 |
F_BUTTON2 := 16r200. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1118 |
F_BUTTON3 := 16r400. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1119 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1120 |
" |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1121 |
self initialize |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1122 |
" |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1123 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1124 |
"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
|
1125 |
! ! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1126 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1127 |
!WindowEvent::InputEvent methodsFor:'accessing'! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1128 |
|
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1129 |
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
|
1130 |
|f "{ Class: SmallInteger }"| |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1131 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1132 |
f := 0. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1133 |
shift ifTrue:[f := f bitOr:F_SHIFT]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1134 |
ctrl ifTrue:[f := f bitOr:F_CTRL]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1135 |
alt ifTrue:[f := f bitOr:F_ALT]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1136 |
meta ifTrue:[f := f bitOr:F_META]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1137 |
b1 ifTrue:[f := f bitOr:F_BUTTON1]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1138 |
b2 ifTrue:[f := f bitOr:F_BUTTON2]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1139 |
b3 ifTrue:[f := f bitOr:F_BUTTON3]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1140 |
modifierFlags := f. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1141 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1142 |
"Created: 13.8.1997 / 22:17:56 / cg" |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1143 |
! |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1144 |
|
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1145 |
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
|
1146 |
|f "{ Class: SmallInteger }"| |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1147 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1148 |
f := 0. |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1149 |
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
|
1150 |
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
|
1151 |
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
|
1152 |
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
|
1153 |
modifierFlags := f. |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1154 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1155 |
"Created: 13.8.1997 / 22:02:09 / cg" |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1156 |
! |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1157 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1158 |
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
|
1159 |
|f "{ Class: SmallInteger }"| |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1160 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1161 |
f := 0. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1162 |
shift ifTrue:[f := f bitOr:F_SHIFT]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1163 |
ctrl ifTrue:[f := f bitOr:F_CTRL]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1164 |
alt ifTrue:[f := f bitOr:F_ALT]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1165 |
meta ifTrue:[f := f bitOr:F_META]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1166 |
b1 ifTrue:[f := f bitOr:F_BUTTON1]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1167 |
b2 ifTrue:[f := f bitOr:F_BUTTON2]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1168 |
b3 ifTrue:[f := f bitOr:F_BUTTON3]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1169 |
modifierFlags := f. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1170 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1171 |
"Created: 13.8.1997 / 22:17:25 / cg" |
2761 | 1172 |
! |
1173 |
||
1174 |
modifierFlags |
|
1175 |
^ modifierFlags |
|
1176 |
! |
|
1177 |
||
1178 |
modifierFlags:flagBits |
|
1179 |
modifierFlags := flagBits |
|
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1180 |
! ! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1181 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1182 |
!WindowEvent::InputEvent methodsFor:'queries'! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1183 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1184 |
hasAlt |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1185 |
"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
|
1186 |
|
1885 | 1187 |
modifierFlags isNil ifTrue:[^ false]. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1188 |
^ (modifierFlags bitAnd:F_ALT) ~~ 0 |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1189 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1190 |
"Created: 13.8.1997 / 22:02:23 / cg" |
1885 | 1191 |
"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
|
1192 |
! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1193 |
|
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1194 |
hasButton1 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1195 |
"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
|
1196 |
|
1885 | 1197 |
modifierFlags isNil ifTrue:[^ false]. |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1198 |
^ (modifierFlags bitAnd:F_BUTTON1) ~~ 0 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1199 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1200 |
"Created: 13.8.1997 / 22:16:35 / cg" |
1885 | 1201 |
"Modified: 21.8.1997 / 19:41:40 / cg" |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1202 |
! |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1203 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1204 |
hasButton2 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1205 |
"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
|
1206 |
|
1885 | 1207 |
modifierFlags isNil ifTrue:[^ false]. |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1208 |
^ (modifierFlags bitAnd:F_BUTTON2) ~~ 0 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1209 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1210 |
"Created: 13.8.1997 / 22:16:43 / cg" |
1885 | 1211 |
"Modified: 21.8.1997 / 19:41:47 / cg" |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1212 |
! |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1213 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1214 |
hasButton3 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1215 |
"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
|
1216 |
|
1885 | 1217 |
modifierFlags isNil ifTrue:[^ false]. |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1218 |
^ (modifierFlags bitAnd:F_BUTTON3) ~~ 0 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1219 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1220 |
"Created: 13.8.1997 / 22:16:49 / cg" |
1885 | 1221 |
"Modified: 21.8.1997 / 19:41:52 / cg" |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1222 |
! |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1223 |
|
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1224 |
hasCtrl |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1225 |
"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
|
1226 |
|
1885 | 1227 |
modifierFlags isNil ifTrue:[^ false]. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1228 |
^ (modifierFlags bitAnd:F_CTRL) ~~ 0 |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1229 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1230 |
"Created: 13.8.1997 / 22:02:29 / cg" |
1885 | 1231 |
"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
|
1232 |
! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1233 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1234 |
hasMeta |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1235 |
"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
|
1236 |
|
1885 | 1237 |
modifierFlags isNil ifTrue:[^ false]. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1238 |
^ (modifierFlags bitAnd:F_META) ~~ 0 |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1239 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1240 |
"Created: 13.8.1997 / 22:02:59 / cg" |
1885 | 1241 |
"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
|
1242 |
! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1243 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1244 |
hasShift |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1245 |
"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
|
1246 |
|
1885 | 1247 |
modifierFlags isNil ifTrue:[^ false]. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1248 |
^ (modifierFlags bitAnd:F_SHIFT) ~~ 0 |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1249 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1250 |
"Created: 13.8.1997 / 22:03:09 / cg" |
1885 | 1251 |
"Modified: 21.8.1997 / 19:41:34 / cg" |
2707 | 1252 |
! |
1253 |
||
5204
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1254 |
targetView |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1255 |
"return the view which will eventually handle the event; |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1256 |
for most events, this is the same as the view, for which the event was |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1257 |
originally generated. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1258 |
Except, if an explicit focus has been assigned (i.e. tabbed into a component), |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1259 |
AND the event is a keyboard event. In this case, the targetView might be different. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1260 |
Notice: this method might return nil, for synthetic (app-related) or display screen related |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1261 |
events" |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1262 |
|
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1263 |
|evView group focusView| |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1264 |
|
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1265 |
evView := self view. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1266 |
self isDelegatedToFocusView ifTrue:[ |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1267 |
evView notNil ifTrue:[ |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1268 |
group := evView windowGroup. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1269 |
group notNil ifTrue:[ |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1270 |
focusView := group focusView. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1271 |
focusView notNil ifTrue:[^ focusView]. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1272 |
]. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1273 |
]. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1274 |
]. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1275 |
^ evView |
3465 | 1276 |
! ! |
1277 |
||
5249 | 1278 |
!WindowEvent::InputEvent methodsFor:'testing'! |
1279 |
||
1280 |
isInputEvent |
|
1281 |
^ true |
|
1282 |
||
1283 |
"Created: / 21.5.1999 / 19:49:30 / cg" |
|
1284 |
! ! |
|
1285 |
||
3297 | 1286 |
!WindowEvent::ButtonEvent methodsFor:'accessing'! |
1287 |
||
1288 |
button |
|
1289 |
"return the button nr of the button-event" |
|
1290 |
||
1291 |
^ args at:1 |
|
1292 |
! |
|
1293 |
||
1294 |
state |
|
1295 |
"return the button state of the button-event |
|
1296 |
(mouse button bits at the time of the event)." |
|
1297 |
||
1298 |
^ args at:1 |
|
1299 |
||
1300 |
"Created: / 12.11.1998 / 16:21:18 / cg" |
|
1301 |
! |
|
1302 |
||
1303 |
x |
|
1304 |
"return the x coordinate of the button-event |
|
1305 |
(mouse position at the time of the event)." |
|
1306 |
||
1307 |
^ args at:2 |
|
1308 |
||
1309 |
"Created: 1.8.1997 / 13:58:15 / cg" |
|
1310 |
! |
|
1311 |
||
1312 |
x:anInteger |
|
1313 |
"change the x coordinate of the button-event" |
|
1314 |
||
1315 |
args at:2 put:anInteger |
|
1316 |
||
1317 |
"Created: 1.8.1997 / 13:58:15 / cg" |
|
1318 |
! |
|
1319 |
||
1320 |
y |
|
1321 |
"return the y coordinate of the button-event |
|
1322 |
(mouse position at the time of the event)." |
|
1323 |
||
1324 |
^ args at:3 |
|
1325 |
||
1326 |
"Created: 1.8.1997 / 13:58:07 / cg" |
|
1327 |
! |
|
1328 |
||
1329 |
y:anInteger |
|
1330 |
"change the y coordinate of the button-event" |
|
1331 |
||
1332 |
^ args at:3 put:anInteger |
|
1333 |
||
1334 |
"Created: 1.8.1997 / 13:58:15 / cg" |
|
1335 |
! ! |
|
1336 |
||
5249 | 1337 |
!WindowEvent::ButtonEvent methodsFor:'testing'! |
3297 | 1338 |
|
1339 |
isButtonEvent |
|
1340 |
"return true, if this event is a button event" |
|
1341 |
||
1342 |
^ true |
|
1343 |
||
1344 |
"Created: 4.4.1997 / 13:44:11 / cg" |
|
8308 | 1345 |
! |
1346 |
||
1347 |
isUserEvent |
|
1348 |
"return true, if this event from a user" |
|
1349 |
||
1350 |
^ true |
|
1351 |
||
1352 |
"Created: / 16-03-2018 / 11:05:26 / stefan" |
|
3680 | 1353 |
! ! |
1354 |
||
5249 | 1355 |
!WindowEvent::ButtonPressEvent methodsFor:'testing'! |
3680 | 1356 |
|
1357 |
isButtonPressEvent |
|
1358 |
"return true, if this event is a buttonPress event" |
|
1359 |
||
1360 |
^ true |
|
1361 |
! ! |
|
1362 |
||
5249 | 1363 |
!WindowEvent::ButtonMultiPressEvent methodsFor:'testing'! |
3680 | 1364 |
|
4628 | 1365 |
isButtonMultiPressEvent |
1366 |
^ true |
|
1367 |
! |
|
1368 |
||
3680 | 1369 |
isButtonPressEvent |
1370 |
"/ ATTENTION: temporary for bw. compatibility, since due to a bug, |
|
1371 |
"/ multi-presses returned false to this query |
|
1372 |
||
1373 |
"/'----------------' errorPrint. |
|
1374 |
"/'oops multipressEvent asked for isButtonPress' errorPrintCR. |
|
1375 |
"/thisContext fullPrintAll. |
|
1376 |
^ false |
|
1377 |
! ! |
|
1378 |
||
5249 | 1379 |
!WindowEvent::ButtonReleaseEvent methodsFor:'testing'! |
3680 | 1380 |
|
1381 |
isButtonReleaseEvent |
|
1382 |
"return true, if this event is a buttonRelease event" |
|
1383 |
||
1384 |
^ true |
|
1385 |
! ! |
|
1386 |
||
1387 |
!WindowEvent::ClientEvent methodsFor:'accessing'! |
|
1388 |
||
1389 |
eventData |
|
1390 |
"return the value of the instance variable 'eventData' (automatically generated)" |
|
1391 |
||
1392 |
^ eventData |
|
1393 |
||
1394 |
"Created: 4.4.1997 / 17:41:50 / cg" |
|
3297 | 1395 |
! |
1396 |
||
3680 | 1397 |
eventData:something |
1398 |
"set the value of the instance variable 'eventData' (automatically generated)" |
|
1399 |
||
1400 |
eventData := something. |
|
1401 |
||
1402 |
"Created: 4.4.1997 / 17:41:57 / cg" |
|
1403 |
! ! |
|
1404 |
||
5249 | 1405 |
!WindowEvent::ConfigureEvent methodsFor:'testing'! |
3680 | 1406 |
|
1407 |
isConfigureEvent |
|
1408 |
^ true |
|
1409 |
! ! |
|
1410 |
||
5249 | 1411 |
!WindowEvent::DamageEvent methodsFor:'testing'! |
3680 | 1412 |
|
1413 |
isDamage |
|
1414 |
"return true, if this is a damage event" |
|
1415 |
||
1416 |
^ true |
|
1417 |
! |
|
1418 |
||
1419 |
isDamageForView:aView |
|
1420 |
"return true, if this is a damage event for aView" |
|
1421 |
||
1422 |
^ (receiver == aView) |
|
1423 |
! ! |
|
1424 |
||
4988 | 1425 |
!WindowEvent::EnterLeaveEvent methodsFor:'accessing'! |
1426 |
||
1427 |
state |
|
1428 |
||
1429 |
^ args at:1 |
|
1430 |
! |
|
1431 |
||
1432 |
x |
|
1433 |
||
1434 |
^ args at:2 ifAbsent:nil |
|
1435 |
! |
|
1436 |
||
1437 |
y |
|
1438 |
||
1439 |
^ args at:3 ifAbsent:nil |
|
1440 |
! ! |
|
1441 |
||
5249 | 1442 |
!WindowEvent::EnterLeaveEvent methodsFor:'testing'! |
3680 | 1443 |
|
1444 |
isPointerEnterEvent |
|
1445 |
"return true, if this event is a pointer-enter event" |
|
1446 |
||
1447 |
^ (selector == #'pointerEnter:x:y:') |
|
1448 |
||
1449 |
"Created: 9.1.1996 / 15:51:24 / cg" |
|
1450 |
"Modified: 9.1.1996 / 15:51:40 / cg" |
|
1451 |
! |
|
1452 |
||
1453 |
isPointerEnterLeaveEvent |
|
1454 |
"return true, if this event is a pointer-enter/leave event" |
|
1455 |
||
1456 |
^ true |
|
1457 |
||
1458 |
"Created: 9.1.1996 / 15:51:18 / cg" |
|
1459 |
! |
|
1460 |
||
1461 |
isPointerLeaveEvent |
|
1462 |
"return true, if this event is a pointer-leave event" |
|
1463 |
||
1464 |
^ selector == #'pointerLeave:' |
|
1465 |
||
1466 |
"Created: 9.1.1996 / 15:51:36 / cg" |
|
8308 | 1467 |
! |
1468 |
||
1469 |
isUserEvent |
|
1470 |
"return true, if this event from a user" |
|
1471 |
||
1472 |
^ self isPointerEnterEvent |
|
1473 |
"why not true for pointerLeave?" |
|
1474 |
||
1475 |
"Created: / 16-03-2018 / 11:07:04 / stefan" |
|
3680 | 1476 |
! ! |
1477 |
||
5249 | 1478 |
!WindowEvent::FocusEvent methodsFor:'testing'! |
3680 | 1479 |
|
1480 |
isFocusEvent |
|
1481 |
"return true, if this event is a focus event" |
|
1482 |
||
1483 |
^ true |
|
1484 |
||
1485 |
"Created: / 21.5.1999 / 19:44:47 / cg" |
|
1486 |
! |
|
1487 |
||
1488 |
isFocusInEvent |
|
1489 |
"return true, if this event is a focusIn event" |
|
1490 |
||
1491 |
^ (selector == #focusIn) |
|
1492 |
||
1493 |
"Created: / 21.5.1999 / 19:45:04 / cg" |
|
4980 | 1494 |
! |
1495 |
||
1496 |
isFocusOutEvent |
|
1497 |
"return true, if this event is a focusOut event" |
|
1498 |
||
1499 |
^ (selector == #focusOut) |
|
1500 |
||
1501 |
"Created: / 21.5.1999 / 19:45:04 / cg" |
|
3680 | 1502 |
! ! |
1503 |
||
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1504 |
!WindowEvent::KeyboardEvent methodsFor:'accessing'! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1505 |
|
1841 | 1506 |
key |
1507 |
"return the key of the key-event." |
|
1508 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1509 |
^ args at:1 |
1841 | 1510 |
|
1511 |
"Created: 1.8.1997 / 13:55:19 / cg" |
|
1512 |
! |
|
1513 |
||
2852 | 1514 |
key:aCharacterOrSymbol |
1515 |
"change the key of the key-event." |
|
1516 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1517 |
args at:1 put:aCharacterOrSymbol |
2852 | 1518 |
|
1519 |
"Created: 1.8.1997 / 13:55:19 / cg" |
|
1520 |
! |
|
1521 |
||
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1522 |
rawKey |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1523 |
^ rawKey |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1524 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1525 |
"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
|
1526 |
! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1527 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1528 |
rawKey:aKey |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1529 |
rawKey := aKey |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1530 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1531 |
"Created: 4.4.1997 / 13:47:10 / cg" |
1841 | 1532 |
! |
1533 |
||
1534 |
x |
|
1535 |
"return the x coordinate of the key-event |
|
1536 |
(mouse position at the time of the key-event)." |
|
1537 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1538 |
^ args at:2 |
1841 | 1539 |
|
1540 |
"Created: 1.8.1997 / 13:57:27 / cg" |
|
1541 |
! |
|
1542 |
||
5209 | 1543 |
x:anInteger |
3089 | 1544 |
"change the x coordinate of the key-event" |
1545 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1546 |
^ args at:2 put:anInteger |
3089 | 1547 |
! |
1548 |
||
1841 | 1549 |
y |
1550 |
"return the y coordinate of the key-event |
|
1551 |
(mouse position at the time of the key-event)." |
|
1552 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1553 |
^ args at:3 |
1841 | 1554 |
|
1555 |
"Created: 1.8.1997 / 13:55:19 / cg" |
|
1556 |
"Modified: 1.8.1997 / 13:57:42 / cg" |
|
3089 | 1557 |
! |
1558 |
||
1559 |
y:anInteger |
|
1560 |
"change the y coordinate of the key-event" |
|
1561 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1562 |
^ args at:3 put:anInteger |
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1563 |
! ! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1564 |
|
5249 | 1565 |
!WindowEvent::KeyboardEvent methodsFor:'testing'! |
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1566 |
|
5204
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1567 |
isDelegatedToFocusView |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1568 |
"return true, if this event will be forwarded to a focusView." |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1569 |
|
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1570 |
^ true |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1571 |
! |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1572 |
|
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1573 |
isKeyEvent |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1574 |
"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
|
1575 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1576 |
^ true |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1577 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1578 |
"Created: 4.4.1997 / 13:39:59 / cg" |
8308 | 1579 |
! |
1580 |
||
1581 |
isUserEvent |
|
1582 |
"return true, if this event from a user" |
|
1583 |
||
1584 |
^ true |
|
1585 |
||
1586 |
"Created: / 16-03-2018 / 11:05:50 / stefan" |
|
3686 | 1587 |
! ! |
1588 |
||
5962 | 1589 |
!WindowEvent::ButtonMotionEvent methodsFor:'testing'! |
1590 |
||
1591 |
isButtonMotionEvent |
|
1592 |
"return true, if this event is a buttonMotion event" |
|
1593 |
||
1594 |
^ true |
|
1595 |
! ! |
|
1596 |
||
1597 |
!WindowEvent::KeyPressEvent methodsFor:'testing'! |
|
1598 |
||
1599 |
isKeyPressEvent |
|
1600 |
"return true, if this event is a keyboard press event" |
|
1601 |
||
1602 |
^ true |
|
1603 |
! ! |
|
1604 |
||
5249 | 1605 |
!WindowEvent::KeyReleaseEvent methodsFor:'testing'! |
3686 | 1606 |
|
1607 |
isKeyReleaseEvent |
|
1608 |
"return true, if this event is a keyboard press event" |
|
1609 |
||
1610 |
^ true |
|
1611 |
! ! |
|
1612 |
||
5962 | 1613 |
!WindowEvent::HotKeyEvent methodsFor:'accessing'! |
1614 |
||
1615 |
hotkeyIdentifier |
|
1616 |
^ hotkeyIdentifier |
|
1617 |
! |
|
2028 | 1618 |
|
5962 | 1619 |
hotkeyIdentifier:something |
1620 |
hotkeyIdentifier := something. |
|
1621 |
! ! |
|
1622 |
||
1623 |
!WindowEvent::HotKeyEvent methodsFor:'testing'! |
|
1624 |
||
1625 |
isHotKeyEvent |
|
1626 |
"return true, if this event is a hotkey event" |
|
2028 | 1627 |
|
3686 | 1628 |
^ true |
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1629 |
! ! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1630 |
|
4988 | 1631 |
!WindowEvent::KeyboardFocusEvent methodsFor:'accessing'! |
1632 |
||
1633 |
hasFocus |
|
1634 |
||
1635 |
^ args at: 1 |
|
1636 |
! ! |
|
1637 |
||
5249 | 1638 |
!WindowEvent::KeyboardFocusEvent methodsFor:'testing'! |
3376 | 1639 |
|
1640 |
isKeyboardFocusEvent |
|
1641 |
"return true, if this event is a keyboard focus event" |
|
1642 |
||
1643 |
^ true |
|
1644 |
! ! |
|
1645 |
||
3680 | 1646 |
!WindowEvent::MessageSendEvent methodsFor:'blocked'! |
1647 |
||
1648 |
view |
|
1649 |
^ nil |
|
1650 |
! ! |
|
1651 |
||
5249 | 1652 |
!WindowEvent::MessageSendEvent methodsFor:'testing'! |
3089 | 1653 |
|
3465 | 1654 |
isMessageSendEvent |
1655 |
"return true, if this event is a general messageSend event" |
|
3089 | 1656 |
|
1657 |
^ true |
|
1658 |
||
1659 |
||
1660 |
||
1661 |
! ! |
|
1662 |
||
4988 | 1663 |
!WindowEvent::MouseWheelMotionEvent methodsFor:'accessing'! |
1664 |
||
1665 |
amount |
|
1666 |
"return the amount of the mouse wheel motion event " |
|
1667 |
||
1668 |
^ args at:4 |
|
1669 |
! |
|
1670 |
||
1671 |
deltaTime |
|
1672 |
"return the deltaTime of the mouse wheel motion event " |
|
1673 |
||
1674 |
^ args at:5 |
|
1675 |
! ! |
|
1676 |
||
5249 | 1677 |
!WindowEvent::MouseWheelMotionEvent methodsFor:'testing'! |
5205 | 1678 |
|
1679 |
isDelegatedToFocusView |
|
1680 |
"return true, if this event will be forwarded to a focusView." |
|
1681 |
||
1682 |
^ true. |
|
1683 |
! |
|
1684 |
||
1685 |
isMouseWheelEvent |
|
1686 |
^ true. |
|
1687 |
! ! |
|
1688 |
||
4233 | 1689 |
!WindowEvent::NativeWidgetCommandEvent methodsFor:'accessing'! |
1690 |
||
1691 |
command |
|
1692 |
^ selector |
|
1693 |
! |
|
1694 |
||
1695 |
command:something |
|
1696 |
selector := something. |
|
1697 |
! ! |
|
1698 |
||
5249 | 1699 |
!WindowEvent::NewDamageEvent methodsFor:'testing'! |
4044 | 1700 |
|
1701 |
isDamage |
|
1702 |
"return true, if this is a damage event" |
|
1703 |
||
1704 |
^ true |
|
1705 |
! |
|
1706 |
||
1707 |
isDamageForView:aView |
|
1708 |
"return true, if this is a damage event for aView" |
|
1709 |
||
1710 |
^ (receiver == aView) |
|
1711 |
! ! |
|
1712 |
||
5249 | 1713 |
!WindowEvent::TerminateEvent methodsFor:'testing'! |
3773
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1714 |
|
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1715 |
isTerminateEvent |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1716 |
^ true |
8308 | 1717 |
! |
1718 |
||
1719 |
isUserEvent |
|
1720 |
"return true, if this event from a user" |
|
1721 |
||
1722 |
^ true |
|
1723 |
||
1724 |
"Created: / 16-03-2018 / 11:06:05 / stefan" |
|
3773
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1725 |
! ! |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1726 |
|
4817 | 1727 |
!WindowEvent::TrayActionEvent methodsFor:'accessing'! |
1728 |
||
1729 |
event |
|
1730 |
^ selector |
|
1731 |
||
1732 |
"Created: / 31-10-2007 / 01:23:05 / cg" |
|
1733 |
! |
|
1734 |
||
1735 |
event:something |
|
1736 |
selector := something. |
|
1737 |
||
1738 |
"Created: / 31-10-2007 / 01:23:07 / cg" |
|
1739 |
! ! |
|
1740 |
||
5249 | 1741 |
!WindowEvent::TrayActionEvent methodsFor:'testing'! |
4842 | 1742 |
|
1743 |
isTrayEvent |
|
1744 |
^ true |
|
1745 |
||
1746 |
"Created: / 09-11-2007 / 13:09:17 / cg" |
|
1747 |
! ! |
|
1748 |
||
5838
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1749 |
!WindowEvent::VisibilityChangeEvent class methodsFor:'instance creation'! |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1750 |
|
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1751 |
for:aView visibility:how |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1752 |
^ self new |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1753 |
|
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1754 |
"Created: / 23-01-2012 / 10:02:42 / cg" |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1755 |
! ! |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1756 |
|
5249 | 1757 |
!WindowEvent::WindowMapUnmapEvent methodsFor:'testing'! |
3680 | 1758 |
|
1759 |
isMapEvent |
|
4842 | 1760 |
"return true, if this is a map event" |
3680 | 1761 |
|
1762 |
^ selector == #mapped |
|
1763 |
||
4842 | 1764 |
"Created: / 29-01-1998 / 21:52:54 / cg" |
1765 |
"Modified: / 09-11-2007 / 13:11:02 / cg" |
|
3680 | 1766 |
! |
1767 |
||
1768 |
isUnmapEvent |
|
4842 | 1769 |
"return true, if this is an unmap event" |
3680 | 1770 |
|
1771 |
^ selector == #unmapped |
|
1772 |
||
4842 | 1773 |
"Modified: / 09-11-2007 / 13:11:04 / cg" |
3680 | 1774 |
! ! |
1775 |
||
251 | 1776 |
!WindowEvent class methodsFor:'documentation'! |
1777 |
||
5751 | 1778 |
version_CVS |
1779 |
||
7932 | 1780 |
^ '$Header$' |
5751 | 1781 |
! |
1782 |
||
1783 |
version_SVN |
|
6312 | 1784 |
^ '$ Id $' |
251 | 1785 |
! ! |
3758 | 1786 |
|
6312 | 1787 |
|
3758 | 1788 |
WindowEvent::InputEvent initialize! |