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