author | Claus Gittinger <cg@exept.de> |
Tue, 23 Apr 2019 16:30:55 +0200 | |
changeset 8674 | e29a561c0fbe |
parent 8626 | f2894e8528de |
child 8716 | f6a82eb8941e |
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 |
248 |
a sensors input queue, and dequeued & processed by a windowGroup process |
|
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 |
|
712 |
delegatedFrom:something |
|
713 |
"set the value of the instance variable 'delegatedFrom' (automatically generated)" |
|
714 |
||
3376 | 715 |
delegatedFrom := something. |
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 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
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 |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
814 |
nextPutAll:self class name; |
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" |
|
511
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
829 |
! ! |
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
830 |
|
3879 | 831 |
!WindowEvent methodsFor:'private-accessing'! |
244 | 832 |
|
3680 | 833 |
for:aView type:aSymbol |
834 |
"set the instance variables of the event" |
|
835 |
||
836 |
receiver := aView. |
|
837 |
selector := aSymbol. |
|
4991 | 838 |
args := #(). |
839 |
timeStamp := Timestamp now. |
|
3680 | 840 |
! |
841 |
||
244 | 842 |
for:aView type:aSymbol arguments:argArray |
843 |
"set the instance variables of the event" |
|
844 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
845 |
receiver := aView. |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
846 |
selector := aSymbol. |
4991 | 847 |
args := argArray. |
848 |
timeStamp := Timestamp now. |
|
244 | 849 |
! ! |
850 |
||
851 |
!WindowEvent methodsFor:'queries'! |
|
852 |
||
1588
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
853 |
hasAlt |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
854 |
"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
|
855 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
856 |
^ false |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
857 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
858 |
"Created: 12.4.1997 / 11:04:10 / cg" |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
859 |
! |
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 |
hasCtrl |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
862 |
"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
|
863 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
864 |
^ false |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
865 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
866 |
"Created: 12.4.1997 / 11:04:03 / cg" |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
867 |
! |
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 |
hasMeta |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
870 |
"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
|
871 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
872 |
^ false |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
873 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
874 |
"Created: 12.4.1997 / 11:04:16 / cg" |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
875 |
! |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
876 |
|
1590 | 877 |
hasShift |
878 |
"return true, if this is a keyboard event, with SHIFT pressed" |
|
879 |
||
880 |
^ false |
|
881 |
||
882 |
"Created: 12.4.1997 / 11:30:59 / cg" |
|
883 |
! |
|
884 |
||
5249 | 885 |
targetView |
886 |
"return the view which will eventually handle the event; |
|
887 |
for most events, this is the same as the view, for which the event was |
|
888 |
originally generated. |
|
889 |
Except, if an explicit focus has been assigned (i.e. tabbed into a component), |
|
890 |
AND the event is a keyboard event. In this case, the targetView might be different. |
|
891 |
Notice: this method might return nil, for synthetic (app-related) or display screen related |
|
892 |
events" |
|
893 |
||
894 |
^ self view. |
|
895 |
! ! |
|
896 |
||
897 |
!WindowEvent methodsFor:'testing'! |
|
898 |
||
3680 | 899 |
isApplicationEvent |
900 |
"return true, if this event is application related (i.e. not for a particular view)" |
|
901 |
||
902 |
^ false |
|
903 |
! |
|
904 |
||
244 | 905 |
isButtonEvent |
906 |
"return true, if this event is a button event" |
|
907 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
908 |
^ false |
244 | 909 |
! |
910 |
||
1730 | 911 |
isButtonMotionEvent |
912 |
"return true, if this event is a buttonMotion event" |
|
913 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
914 |
^ false |
1730 | 915 |
|
916 |
"Created: 5.3.1997 / 12:25:43 / cg" |
|
917 |
! |
|
918 |
||
4628 | 919 |
isButtonMultiPressEvent |
920 |
"return true, if this event is a buttonMulti-Press event" |
|
921 |
||
922 |
^ false |
|
923 |
||
924 |
"Created: 5.3.1997 / 12:25:43 / cg" |
|
925 |
! |
|
926 |
||
1420 | 927 |
isButtonPressEvent |
928 |
"return true, if this event is a buttonPress event" |
|
929 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
930 |
^ false |
1420 | 931 |
|
932 |
"Created: 5.3.1997 / 12:25:43 / cg" |
|
933 |
! |
|
934 |
||
3011 | 935 |
isButtonReleaseEvent |
936 |
"return true, if this event is a buttonPress event" |
|
937 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
938 |
^ false |
3011 | 939 |
|
940 |
"Created: 5.3.1997 / 12:25:43 / cg" |
|
941 |
! |
|
942 |
||
2811 | 943 |
isConfigureEvent |
3680 | 944 |
"return true, if this is a window geometry change event" |
2811 | 945 |
|
3680 | 946 |
^ false. |
2811 | 947 |
! |
948 |
||
5751 | 949 |
isCreateWindowEvent |
950 |
"return true, if this event is a CreateWindow event" |
|
951 |
||
952 |
^selector == #createWindowX:y:width:height: |
|
953 |
||
954 |
"Created: / 01-06-2011 / 13:01:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
955 |
! |
|
956 |
||
244 | 957 |
isDamage |
958 |
"return true, if this is a damage event" |
|
959 |
||
3680 | 960 |
^ false. |
244 | 961 |
! |
962 |
||
2471 | 963 |
isDamageForView:aView |
3680 | 964 |
"return true, if this is a damage event for a View" |
2471 | 965 |
|
3680 | 966 |
^ false. |
2471 | 967 |
! |
968 |
||
5204
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
969 |
isDelegatedToFocusView |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
970 |
"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
|
971 |
|
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
972 |
^ false. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
973 |
! |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
974 |
|
1420 | 975 |
isFocusEvent |
976 |
"return true, if this event is a focusIn/focusOut event" |
|
977 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
978 |
^ false |
1420 | 979 |
|
980 |
"Created: 5.3.1997 / 12:12:37 / cg" |
|
981 |
! |
|
982 |
||
983 |
isFocusInEvent |
|
984 |
"return true, if this event is a focusIn event" |
|
985 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
986 |
^ false |
1420 | 987 |
|
988 |
"Created: 5.3.1997 / 12:18:10 / cg" |
|
989 |
! |
|
990 |
||
4980 | 991 |
isFocusOutEvent |
992 |
"return true, if this event is a focusOut event" |
|
993 |
||
994 |
^ false |
|
995 |
||
996 |
"Created: 5.3.1997 / 12:18:10 / cg" |
|
997 |
! |
|
998 |
||
5962 | 999 |
isHotKeyEvent |
1000 |
"return true, if this event is a hotkey event" |
|
1001 |
||
1002 |
^ false |
|
1003 |
! |
|
1004 |
||
2707 | 1005 |
isInputEvent |
1006 |
"return true, if this event is an input (pointer, key or button) event" |
|
1007 |
||
1008 |
^ false |
|
1009 |
||
1010 |
"Created: / 21.5.1999 / 19:49:42 / cg" |
|
1011 |
"Modified: / 21.5.1999 / 19:50:11 / cg" |
|
1012 |
! |
|
1013 |
||
244 | 1014 |
isKeyEvent |
1015 |
"return true, if this event is a keyboard event" |
|
1016 |
||
2028 | 1017 |
^ false |
1018 |
||
1019 |
"Modified: / 28.1.1998 / 00:03:17 / cg" |
|
244 | 1020 |
! |
1021 |
||
1022 |
isKeyPressEvent |
|
2028 | 1023 |
"return true, if this event is a keyboard press event" |
1024 |
||
1025 |
^ false |
|
1026 |
||
1027 |
"Modified: / 28.1.1998 / 00:03:24 / cg" |
|
1028 |
! |
|
244 | 1029 |
|
2028 | 1030 |
isKeyReleaseEvent |
1031 |
"return true, if this event is a keyboard release event" |
|
1032 |
||
1033 |
^ false |
|
1034 |
||
1035 |
"Modified: / 28.1.1998 / 00:03:31 / cg" |
|
356 | 1036 |
! |
1037 |
||
3376 | 1038 |
isKeyboardFocusEvent |
1039 |
"return true, if this event is a keyboard focus event" |
|
1040 |
||
1041 |
^ false |
|
1042 |
! |
|
1043 |
||
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1044 |
isMapEvent |
4842 | 1045 |
"return true, if this is a map event" |
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1046 |
|
3680 | 1047 |
^ false |
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1048 |
|
4842 | 1049 |
"Created: / 29-01-1998 / 21:52:54 / cg" |
1050 |
"Modified: / 09-11-2007 / 13:10:25 / cg" |
|
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1051 |
! |
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1052 |
|
3297 | 1053 |
isMessageSendEvent |
1054 |
"return true, if this event is a general messageSend event" |
|
1055 |
||
1056 |
^ false |
|
1057 |
! |
|
1058 |
||
3011 | 1059 |
isMouseWheelEvent |
3680 | 1060 |
^ false |
3011 | 1061 |
! |
1062 |
||
356 | 1063 |
isPointerEnterEvent |
1064 |
"return true, if this event is a pointer-enter event" |
|
1065 |
||
3680 | 1066 |
^ false |
356 | 1067 |
|
1068 |
"Created: 9.1.1996 / 15:51:24 / cg" |
|
1069 |
"Modified: 9.1.1996 / 15:51:40 / cg" |
|
1070 |
! |
|
1071 |
||
1072 |
isPointerEnterLeaveEvent |
|
1073 |
"return true, if this event is a pointer-enter/leave event" |
|
1074 |
||
3680 | 1075 |
^ false |
356 | 1076 |
|
1077 |
"Created: 9.1.1996 / 15:51:18 / cg" |
|
1078 |
! |
|
1079 |
||
1080 |
isPointerLeaveEvent |
|
1081 |
"return true, if this event is a pointer-leave event" |
|
1082 |
||
3680 | 1083 |
^ false |
356 | 1084 |
|
1085 |
"Created: 9.1.1996 / 15:51:36 / cg" |
|
1158 | 1086 |
! |
1087 |
||
5751 | 1088 |
isPropertyChangeEvent |
1089 |
"return true, if this event is a CreateWindow event" |
|
1090 |
||
1091 |
^selector == #propertyChange:state: |
|
1092 |
||
1093 |
"Created: / 01-06-2011 / 13:36:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1094 |
! |
|
1095 |
||
3773
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1096 |
isTerminateEvent |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1097 |
^ false |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1098 |
! |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1099 |
|
4842 | 1100 |
isTrayEvent |
1101 |
"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
|
1102 |
|
3680 | 1103 |
^ false |
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1104 |
|
4842 | 1105 |
"Created: / 09-11-2007 / 13:09:29 / cg" |
1106 |
! |
|
1107 |
||
1108 |
isUnmapEvent |
|
1109 |
"return true, if this is an unmap event" |
|
1110 |
||
1111 |
^ false |
|
1112 |
||
1113 |
"Modified: / 09-11-2007 / 13:10:07 / cg" |
|
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1114 |
! |
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1115 |
|
1158 | 1116 |
isUserEvent |
1117 |
"return true, if this event is a user event (i.e. mouse, keyboard or button)" |
|
1118 |
||
1119 |
^ false |
|
1120 |
||
8308 | 1121 |
"Modified: / 05-03-1997 / 11:27:40 / cg" |
1122 |
"Modified: / 16-03-2018 / 11:07:59 / stefan" |
|
244 | 1123 |
! ! |
1124 |
||
3680 | 1125 |
!WindowEvent::ApplicationEvent methodsFor:'blocked'! |
1126 |
||
1127 |
view |
|
1128 |
^ nil |
|
1129 |
! ! |
|
1130 |
||
5249 | 1131 |
!WindowEvent::ApplicationEvent methodsFor:'testing'! |
3680 | 1132 |
|
1133 |
isApplicationEvent |
|
1134 |
^ true |
|
1135 |
! ! |
|
1136 |
||
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1137 |
!WindowEvent::InputEvent class methodsFor:'class initialization'! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1138 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1139 |
initialize |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1140 |
F_SHIFT := 16r001. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1141 |
F_CTRL := 16r002. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1142 |
F_ALT := 16r004. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1143 |
F_META := 16r008. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1144 |
|
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1145 |
F_BUTTON1 := 16r100. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1146 |
F_BUTTON2 := 16r200. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1147 |
F_BUTTON3 := 16r400. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1148 |
|
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 |
self initialize |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1151 |
" |
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 |
"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
|
1154 |
! ! |
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 |
!WindowEvent::InputEvent methodsFor:'accessing'! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1157 |
|
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1158 |
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
|
1159 |
|f "{ Class: SmallInteger }"| |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1160 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1161 |
f := 0. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1162 |
shift ifTrue:[f := f bitOr:F_SHIFT]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1163 |
ctrl ifTrue:[f := f bitOr:F_CTRL]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1164 |
alt ifTrue:[f := f bitOr:F_ALT]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1165 |
meta ifTrue:[f := f bitOr:F_META]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1166 |
b1 ifTrue:[f := f bitOr:F_BUTTON1]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1167 |
b2 ifTrue:[f := f bitOr:F_BUTTON2]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1168 |
b3 ifTrue:[f := f bitOr:F_BUTTON3]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1169 |
modifierFlags := f. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1170 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1171 |
"Created: 13.8.1997 / 22:17:56 / cg" |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1172 |
! |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1173 |
|
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1174 |
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
|
1175 |
|f "{ Class: SmallInteger }"| |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1176 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1177 |
f := 0. |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1178 |
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
|
1179 |
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
|
1180 |
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
|
1181 |
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
|
1182 |
modifierFlags := f. |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1183 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1184 |
"Created: 13.8.1997 / 22:02:09 / cg" |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1185 |
! |
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 |
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
|
1188 |
|f "{ Class: SmallInteger }"| |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1189 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1190 |
f := 0. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1191 |
shift ifTrue:[f := f bitOr:F_SHIFT]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1192 |
ctrl ifTrue:[f := f bitOr:F_CTRL]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1193 |
alt ifTrue:[f := f bitOr:F_ALT]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1194 |
meta ifTrue:[f := f bitOr:F_META]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1195 |
b1 ifTrue:[f := f bitOr:F_BUTTON1]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1196 |
b2 ifTrue:[f := f bitOr:F_BUTTON2]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1197 |
b3 ifTrue:[f := f bitOr:F_BUTTON3]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1198 |
modifierFlags := f. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1199 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1200 |
"Created: 13.8.1997 / 22:17:25 / cg" |
2761 | 1201 |
! |
1202 |
||
1203 |
modifierFlags |
|
1204 |
^ modifierFlags |
|
1205 |
! |
|
1206 |
||
1207 |
modifierFlags:flagBits |
|
1208 |
modifierFlags := flagBits |
|
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1209 |
! ! |
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 |
!WindowEvent::InputEvent methodsFor:'queries'! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1212 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1213 |
hasAlt |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1214 |
"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
|
1215 |
|
1885 | 1216 |
modifierFlags isNil ifTrue:[^ false]. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1217 |
^ (modifierFlags bitAnd:F_ALT) ~~ 0 |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1218 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1219 |
"Created: 13.8.1997 / 22:02:23 / cg" |
1885 | 1220 |
"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
|
1221 |
! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1222 |
|
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1223 |
hasButton1 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1224 |
"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
|
1225 |
|
1885 | 1226 |
modifierFlags isNil ifTrue:[^ false]. |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1227 |
^ (modifierFlags bitAnd:F_BUTTON1) ~~ 0 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1228 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1229 |
"Created: 13.8.1997 / 22:16:35 / cg" |
1885 | 1230 |
"Modified: 21.8.1997 / 19:41:40 / cg" |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1231 |
! |
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 |
hasButton2 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1234 |
"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
|
1235 |
|
1885 | 1236 |
modifierFlags isNil ifTrue:[^ false]. |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1237 |
^ (modifierFlags bitAnd:F_BUTTON2) ~~ 0 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1238 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1239 |
"Created: 13.8.1997 / 22:16:43 / cg" |
1885 | 1240 |
"Modified: 21.8.1997 / 19:41:47 / cg" |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1241 |
! |
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 |
hasButton3 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1244 |
"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
|
1245 |
|
1885 | 1246 |
modifierFlags isNil ifTrue:[^ false]. |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1247 |
^ (modifierFlags bitAnd:F_BUTTON3) ~~ 0 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1248 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1249 |
"Created: 13.8.1997 / 22:16:49 / cg" |
1885 | 1250 |
"Modified: 21.8.1997 / 19:41:52 / cg" |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1251 |
! |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1252 |
|
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1253 |
hasCtrl |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1254 |
"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
|
1255 |
|
1885 | 1256 |
modifierFlags isNil ifTrue:[^ false]. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1257 |
^ (modifierFlags bitAnd:F_CTRL) ~~ 0 |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1258 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1259 |
"Created: 13.8.1997 / 22:02:29 / cg" |
1885 | 1260 |
"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
|
1261 |
! |
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 |
hasMeta |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1264 |
"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
|
1265 |
|
1885 | 1266 |
modifierFlags isNil ifTrue:[^ false]. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1267 |
^ (modifierFlags bitAnd:F_META) ~~ 0 |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1268 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1269 |
"Created: 13.8.1997 / 22:02:59 / cg" |
1885 | 1270 |
"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
|
1271 |
! |
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 |
hasShift |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1274 |
"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
|
1275 |
|
1885 | 1276 |
modifierFlags isNil ifTrue:[^ false]. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1277 |
^ (modifierFlags bitAnd:F_SHIFT) ~~ 0 |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1278 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1279 |
"Created: 13.8.1997 / 22:03:09 / cg" |
1885 | 1280 |
"Modified: 21.8.1997 / 19:41:34 / cg" |
2707 | 1281 |
! |
1282 |
||
5204
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1283 |
targetView |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1284 |
"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
|
1285 |
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
|
1286 |
originally generated. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1287 |
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
|
1288 |
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
|
1289 |
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
|
1290 |
events" |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1291 |
|
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1292 |
|evView group focusView| |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1293 |
|
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1294 |
evView := self view. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1295 |
self isDelegatedToFocusView ifTrue:[ |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1296 |
evView notNil ifTrue:[ |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1297 |
group := evView windowGroup. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1298 |
group notNil ifTrue:[ |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1299 |
focusView := group focusView. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1300 |
focusView notNil ifTrue:[^ focusView]. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1301 |
]. |
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 |
^ evView |
3465 | 1305 |
! ! |
1306 |
||
5249 | 1307 |
!WindowEvent::InputEvent methodsFor:'testing'! |
1308 |
||
1309 |
isInputEvent |
|
1310 |
^ true |
|
1311 |
||
1312 |
"Created: / 21.5.1999 / 19:49:30 / cg" |
|
1313 |
! ! |
|
1314 |
||
3297 | 1315 |
!WindowEvent::ButtonEvent methodsFor:'accessing'! |
1316 |
||
1317 |
button |
|
1318 |
"return the button nr of the button-event" |
|
1319 |
||
1320 |
^ args at:1 |
|
1321 |
! |
|
1322 |
||
1323 |
state |
|
1324 |
"return the button state of the button-event |
|
1325 |
(mouse button bits at the time of the event)." |
|
1326 |
||
1327 |
^ args at:1 |
|
1328 |
||
1329 |
"Created: / 12.11.1998 / 16:21:18 / cg" |
|
1330 |
! |
|
1331 |
||
1332 |
x |
|
1333 |
"return the x coordinate of the button-event |
|
1334 |
(mouse position at the time of the event)." |
|
1335 |
||
1336 |
^ args at:2 |
|
1337 |
||
1338 |
"Created: 1.8.1997 / 13:58:15 / cg" |
|
1339 |
! |
|
1340 |
||
1341 |
x:anInteger |
|
1342 |
"change the x coordinate of the button-event" |
|
1343 |
||
1344 |
args at:2 put:anInteger |
|
1345 |
||
1346 |
"Created: 1.8.1997 / 13:58:15 / cg" |
|
1347 |
! |
|
1348 |
||
1349 |
y |
|
1350 |
"return the y coordinate of the button-event |
|
1351 |
(mouse position at the time of the event)." |
|
1352 |
||
1353 |
^ args at:3 |
|
1354 |
||
1355 |
"Created: 1.8.1997 / 13:58:07 / cg" |
|
1356 |
! |
|
1357 |
||
1358 |
y:anInteger |
|
1359 |
"change the y coordinate of the button-event" |
|
1360 |
||
1361 |
^ args at:3 put:anInteger |
|
1362 |
||
1363 |
"Created: 1.8.1997 / 13:58:15 / cg" |
|
1364 |
! ! |
|
1365 |
||
5249 | 1366 |
!WindowEvent::ButtonEvent methodsFor:'testing'! |
3297 | 1367 |
|
1368 |
isButtonEvent |
|
1369 |
"return true, if this event is a button event" |
|
1370 |
||
1371 |
^ true |
|
1372 |
||
1373 |
"Created: 4.4.1997 / 13:44:11 / cg" |
|
8308 | 1374 |
! |
1375 |
||
1376 |
isUserEvent |
|
1377 |
"return true, if this event from a user" |
|
1378 |
||
1379 |
^ true |
|
1380 |
||
1381 |
"Created: / 16-03-2018 / 11:05:26 / stefan" |
|
3680 | 1382 |
! ! |
1383 |
||
5249 | 1384 |
!WindowEvent::ButtonPressEvent methodsFor:'testing'! |
3680 | 1385 |
|
1386 |
isButtonPressEvent |
|
1387 |
"return true, if this event is a buttonPress event" |
|
1388 |
||
1389 |
^ true |
|
1390 |
! ! |
|
1391 |
||
5249 | 1392 |
!WindowEvent::ButtonMultiPressEvent methodsFor:'testing'! |
3680 | 1393 |
|
4628 | 1394 |
isButtonMultiPressEvent |
1395 |
^ true |
|
1396 |
! |
|
1397 |
||
3680 | 1398 |
isButtonPressEvent |
1399 |
"/ ATTENTION: temporary for bw. compatibility, since due to a bug, |
|
1400 |
"/ multi-presses returned false to this query |
|
1401 |
||
1402 |
"/'----------------' errorPrint. |
|
1403 |
"/'oops multipressEvent asked for isButtonPress' errorPrintCR. |
|
1404 |
"/thisContext fullPrintAll. |
|
1405 |
^ false |
|
1406 |
! ! |
|
1407 |
||
5249 | 1408 |
!WindowEvent::ButtonReleaseEvent methodsFor:'testing'! |
3680 | 1409 |
|
1410 |
isButtonReleaseEvent |
|
1411 |
"return true, if this event is a buttonRelease event" |
|
1412 |
||
1413 |
^ true |
|
1414 |
! ! |
|
1415 |
||
1416 |
!WindowEvent::ClientEvent methodsFor:'accessing'! |
|
1417 |
||
1418 |
eventData |
|
1419 |
"return the value of the instance variable 'eventData' (automatically generated)" |
|
1420 |
||
1421 |
^ eventData |
|
1422 |
||
1423 |
"Created: 4.4.1997 / 17:41:50 / cg" |
|
3297 | 1424 |
! |
1425 |
||
3680 | 1426 |
eventData:something |
1427 |
"set the value of the instance variable 'eventData' (automatically generated)" |
|
1428 |
||
1429 |
eventData := something. |
|
1430 |
||
1431 |
"Created: 4.4.1997 / 17:41:57 / cg" |
|
1432 |
! ! |
|
1433 |
||
5249 | 1434 |
!WindowEvent::ConfigureEvent methodsFor:'testing'! |
3680 | 1435 |
|
1436 |
isConfigureEvent |
|
1437 |
^ true |
|
1438 |
! ! |
|
1439 |
||
5249 | 1440 |
!WindowEvent::DamageEvent methodsFor:'testing'! |
3680 | 1441 |
|
1442 |
isDamage |
|
1443 |
"return true, if this is a damage event" |
|
1444 |
||
1445 |
^ true |
|
1446 |
! |
|
1447 |
||
1448 |
isDamageForView:aView |
|
1449 |
"return true, if this is a damage event for aView" |
|
1450 |
||
1451 |
^ (receiver == aView) |
|
1452 |
! ! |
|
1453 |
||
4988 | 1454 |
!WindowEvent::EnterLeaveEvent methodsFor:'accessing'! |
1455 |
||
1456 |
state |
|
1457 |
||
1458 |
^ args at:1 |
|
1459 |
! |
|
1460 |
||
1461 |
x |
|
1462 |
||
1463 |
^ args at:2 ifAbsent:nil |
|
1464 |
! |
|
1465 |
||
1466 |
y |
|
1467 |
||
1468 |
^ args at:3 ifAbsent:nil |
|
1469 |
! ! |
|
1470 |
||
5249 | 1471 |
!WindowEvent::EnterLeaveEvent methodsFor:'testing'! |
3680 | 1472 |
|
1473 |
isPointerEnterEvent |
|
1474 |
"return true, if this event is a pointer-enter event" |
|
1475 |
||
1476 |
^ (selector == #'pointerEnter:x:y:') |
|
1477 |
||
1478 |
"Created: 9.1.1996 / 15:51:24 / cg" |
|
1479 |
"Modified: 9.1.1996 / 15:51:40 / cg" |
|
1480 |
! |
|
1481 |
||
1482 |
isPointerEnterLeaveEvent |
|
1483 |
"return true, if this event is a pointer-enter/leave event" |
|
1484 |
||
1485 |
^ true |
|
1486 |
||
1487 |
"Created: 9.1.1996 / 15:51:18 / cg" |
|
1488 |
! |
|
1489 |
||
1490 |
isPointerLeaveEvent |
|
1491 |
"return true, if this event is a pointer-leave event" |
|
1492 |
||
1493 |
^ selector == #'pointerLeave:' |
|
1494 |
||
1495 |
"Created: 9.1.1996 / 15:51:36 / cg" |
|
8308 | 1496 |
! |
1497 |
||
1498 |
isUserEvent |
|
1499 |
"return true, if this event from a user" |
|
1500 |
||
1501 |
^ self isPointerEnterEvent |
|
1502 |
"why not true for pointerLeave?" |
|
1503 |
||
1504 |
"Created: / 16-03-2018 / 11:07:04 / stefan" |
|
3680 | 1505 |
! ! |
1506 |
||
5249 | 1507 |
!WindowEvent::FocusEvent methodsFor:'testing'! |
3680 | 1508 |
|
1509 |
isFocusEvent |
|
1510 |
"return true, if this event is a focus event" |
|
1511 |
||
1512 |
^ true |
|
1513 |
||
1514 |
"Created: / 21.5.1999 / 19:44:47 / cg" |
|
1515 |
! |
|
1516 |
||
1517 |
isFocusInEvent |
|
1518 |
"return true, if this event is a focusIn event" |
|
1519 |
||
1520 |
^ (selector == #focusIn) |
|
1521 |
||
1522 |
"Created: / 21.5.1999 / 19:45:04 / cg" |
|
4980 | 1523 |
! |
1524 |
||
1525 |
isFocusOutEvent |
|
1526 |
"return true, if this event is a focusOut event" |
|
1527 |
||
1528 |
^ (selector == #focusOut) |
|
1529 |
||
1530 |
"Created: / 21.5.1999 / 19:45:04 / cg" |
|
3680 | 1531 |
! ! |
1532 |
||
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1533 |
!WindowEvent::KeyboardEvent methodsFor:'accessing'! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1534 |
|
1841 | 1535 |
key |
1536 |
"return the key of the key-event." |
|
1537 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1538 |
^ args at:1 |
1841 | 1539 |
|
1540 |
"Created: 1.8.1997 / 13:55:19 / cg" |
|
1541 |
! |
|
1542 |
||
2852 | 1543 |
key:aCharacterOrSymbol |
1544 |
"change the key of the key-event." |
|
1545 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1546 |
args at:1 put:aCharacterOrSymbol |
2852 | 1547 |
|
1548 |
"Created: 1.8.1997 / 13:55:19 / cg" |
|
1549 |
! |
|
1550 |
||
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1551 |
rawKey |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1552 |
^ rawKey |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1553 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1554 |
"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
|
1555 |
! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1556 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1557 |
rawKey:aKey |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1558 |
rawKey := aKey |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1559 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1560 |
"Created: 4.4.1997 / 13:47:10 / cg" |
1841 | 1561 |
! |
1562 |
||
1563 |
x |
|
1564 |
"return the x coordinate of the key-event |
|
1565 |
(mouse position at the time of the key-event)." |
|
1566 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1567 |
^ args at:2 |
1841 | 1568 |
|
1569 |
"Created: 1.8.1997 / 13:57:27 / cg" |
|
1570 |
! |
|
1571 |
||
5209 | 1572 |
x:anInteger |
3089 | 1573 |
"change the x coordinate of the key-event" |
1574 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1575 |
^ args at:2 put:anInteger |
3089 | 1576 |
! |
1577 |
||
1841 | 1578 |
y |
1579 |
"return the y coordinate of the key-event |
|
1580 |
(mouse position at the time of the key-event)." |
|
1581 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1582 |
^ args at:3 |
1841 | 1583 |
|
1584 |
"Created: 1.8.1997 / 13:55:19 / cg" |
|
1585 |
"Modified: 1.8.1997 / 13:57:42 / cg" |
|
3089 | 1586 |
! |
1587 |
||
1588 |
y:anInteger |
|
1589 |
"change the y coordinate of the key-event" |
|
1590 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1591 |
^ args at:3 put:anInteger |
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1592 |
! ! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1593 |
|
5249 | 1594 |
!WindowEvent::KeyboardEvent methodsFor:'testing'! |
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1595 |
|
5204
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1596 |
isDelegatedToFocusView |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1597 |
"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
|
1598 |
|
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1599 |
^ true |
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 |
|
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1602 |
isKeyEvent |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1603 |
"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
|
1604 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1605 |
^ true |
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 |
"Created: 4.4.1997 / 13:39:59 / cg" |
8308 | 1608 |
! |
1609 |
||
1610 |
isUserEvent |
|
1611 |
"return true, if this event from a user" |
|
1612 |
||
1613 |
^ true |
|
1614 |
||
1615 |
"Created: / 16-03-2018 / 11:05:50 / stefan" |
|
3686 | 1616 |
! ! |
1617 |
||
5962 | 1618 |
!WindowEvent::ButtonMotionEvent methodsFor:'testing'! |
1619 |
||
1620 |
isButtonMotionEvent |
|
1621 |
"return true, if this event is a buttonMotion event" |
|
1622 |
||
1623 |
^ true |
|
1624 |
! ! |
|
1625 |
||
1626 |
!WindowEvent::KeyPressEvent methodsFor:'testing'! |
|
1627 |
||
1628 |
isKeyPressEvent |
|
1629 |
"return true, if this event is a keyboard press event" |
|
1630 |
||
1631 |
^ true |
|
1632 |
! ! |
|
1633 |
||
5249 | 1634 |
!WindowEvent::KeyReleaseEvent methodsFor:'testing'! |
3686 | 1635 |
|
1636 |
isKeyReleaseEvent |
|
1637 |
"return true, if this event is a keyboard press event" |
|
1638 |
||
1639 |
^ true |
|
1640 |
! ! |
|
1641 |
||
5962 | 1642 |
!WindowEvent::HotKeyEvent methodsFor:'accessing'! |
1643 |
||
1644 |
hotkeyIdentifier |
|
1645 |
^ hotkeyIdentifier |
|
1646 |
! |
|
2028 | 1647 |
|
5962 | 1648 |
hotkeyIdentifier:something |
1649 |
hotkeyIdentifier := something. |
|
1650 |
! ! |
|
1651 |
||
1652 |
!WindowEvent::HotKeyEvent methodsFor:'testing'! |
|
1653 |
||
1654 |
isHotKeyEvent |
|
1655 |
"return true, if this event is a hotkey event" |
|
2028 | 1656 |
|
3686 | 1657 |
^ true |
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1658 |
! ! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1659 |
|
4988 | 1660 |
!WindowEvent::KeyboardFocusEvent methodsFor:'accessing'! |
1661 |
||
1662 |
hasFocus |
|
1663 |
||
1664 |
^ args at: 1 |
|
1665 |
! ! |
|
1666 |
||
5249 | 1667 |
!WindowEvent::KeyboardFocusEvent methodsFor:'testing'! |
3376 | 1668 |
|
1669 |
isKeyboardFocusEvent |
|
1670 |
"return true, if this event is a keyboard focus event" |
|
1671 |
||
1672 |
^ true |
|
1673 |
! ! |
|
1674 |
||
3680 | 1675 |
!WindowEvent::MessageSendEvent methodsFor:'blocked'! |
1676 |
||
1677 |
view |
|
1678 |
^ nil |
|
1679 |
! ! |
|
1680 |
||
5249 | 1681 |
!WindowEvent::MessageSendEvent methodsFor:'testing'! |
3089 | 1682 |
|
3465 | 1683 |
isMessageSendEvent |
1684 |
"return true, if this event is a general messageSend event" |
|
3089 | 1685 |
|
1686 |
^ true |
|
1687 |
||
1688 |
||
1689 |
||
1690 |
! ! |
|
1691 |
||
4988 | 1692 |
!WindowEvent::MouseWheelMotionEvent methodsFor:'accessing'! |
1693 |
||
1694 |
amount |
|
1695 |
"return the amount of the mouse wheel motion event " |
|
1696 |
||
1697 |
^ args at:4 |
|
1698 |
! |
|
1699 |
||
1700 |
deltaTime |
|
1701 |
"return the deltaTime of the mouse wheel motion event " |
|
1702 |
||
1703 |
^ args at:5 |
|
1704 |
! ! |
|
1705 |
||
5249 | 1706 |
!WindowEvent::MouseWheelMotionEvent methodsFor:'testing'! |
5205 | 1707 |
|
1708 |
isDelegatedToFocusView |
|
1709 |
"return true, if this event will be forwarded to a focusView." |
|
1710 |
||
1711 |
^ true. |
|
1712 |
! |
|
1713 |
||
1714 |
isMouseWheelEvent |
|
1715 |
^ true. |
|
1716 |
! ! |
|
1717 |
||
4233 | 1718 |
!WindowEvent::NativeWidgetCommandEvent methodsFor:'accessing'! |
1719 |
||
1720 |
command |
|
1721 |
^ selector |
|
1722 |
! |
|
1723 |
||
1724 |
command:something |
|
1725 |
selector := something. |
|
1726 |
! ! |
|
1727 |
||
5249 | 1728 |
!WindowEvent::NewDamageEvent methodsFor:'testing'! |
4044 | 1729 |
|
1730 |
isDamage |
|
1731 |
"return true, if this is a damage event" |
|
1732 |
||
1733 |
^ true |
|
1734 |
! |
|
1735 |
||
1736 |
isDamageForView:aView |
|
1737 |
"return true, if this is a damage event for aView" |
|
1738 |
||
1739 |
^ (receiver == aView) |
|
1740 |
! ! |
|
1741 |
||
5249 | 1742 |
!WindowEvent::TerminateEvent methodsFor:'testing'! |
3773
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1743 |
|
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1744 |
isTerminateEvent |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1745 |
^ true |
8308 | 1746 |
! |
1747 |
||
1748 |
isUserEvent |
|
1749 |
"return true, if this event from a user" |
|
1750 |
||
1751 |
^ true |
|
1752 |
||
1753 |
"Created: / 16-03-2018 / 11:06:05 / stefan" |
|
3773
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1754 |
! ! |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1755 |
|
4817 | 1756 |
!WindowEvent::TrayActionEvent methodsFor:'accessing'! |
1757 |
||
1758 |
event |
|
1759 |
^ selector |
|
1760 |
||
1761 |
"Created: / 31-10-2007 / 01:23:05 / cg" |
|
1762 |
! |
|
1763 |
||
1764 |
event:something |
|
1765 |
selector := something. |
|
1766 |
||
1767 |
"Created: / 31-10-2007 / 01:23:07 / cg" |
|
1768 |
! ! |
|
1769 |
||
5249 | 1770 |
!WindowEvent::TrayActionEvent methodsFor:'testing'! |
4842 | 1771 |
|
1772 |
isTrayEvent |
|
1773 |
^ true |
|
1774 |
||
1775 |
"Created: / 09-11-2007 / 13:09:17 / cg" |
|
1776 |
! ! |
|
1777 |
||
5838
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1778 |
!WindowEvent::VisibilityChangeEvent class methodsFor:'instance creation'! |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1779 |
|
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1780 |
for:aView visibility:how |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1781 |
^ self new |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1782 |
|
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1783 |
"Created: / 23-01-2012 / 10:02:42 / cg" |
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 |
|
8550 | 1786 |
!WindowEvent::WidgetSelectionEvent class methodsFor:'documentation'! |
8549 | 1787 |
|
1788 |
copyright |
|
1789 |
" |
|
1790 |
COPYRIGHT (c) 2008 by eXept Software AG |
|
1791 |
All Rights Reserved |
|
1792 |
||
1793 |
This software is furnished under a license and may be used |
|
1794 |
only in accordance with the terms of that license and with the |
|
1795 |
inclusion of the above copyright notice. This software may not |
|
1796 |
be provided or otherwise made available to, or used by, any |
|
1797 |
other person. No title to or ownership of the software is |
|
1798 |
hereby transferred. |
|
1799 |
||
1800 |
" |
|
1801 |
! ! |
|
1802 |
||
8550 | 1803 |
!WindowEvent::WidgetSelectionEvent methodsFor:'accessing'! |
8549 | 1804 |
|
1805 |
widget:aWidget |
|
1806 |
selector := #'widgetSelected:'. |
|
1807 |
args := Array with:aWidget class name. |
|
1808 |
receiver := aWidget. |
|
1809 |
timeStamp := Timestamp now. |
|
1810 |
! |
|
1811 |
||
1812 |
widgetClassName |
|
1813 |
||
1814 |
^ args at: 1 |
|
1815 |
! ! |
|
1816 |
||
5249 | 1817 |
!WindowEvent::WindowMapUnmapEvent methodsFor:'testing'! |
3680 | 1818 |
|
1819 |
isMapEvent |
|
4842 | 1820 |
"return true, if this is a map event" |
3680 | 1821 |
|
1822 |
^ selector == #mapped |
|
1823 |
||
4842 | 1824 |
"Created: / 29-01-1998 / 21:52:54 / cg" |
1825 |
"Modified: / 09-11-2007 / 13:11:02 / cg" |
|
3680 | 1826 |
! |
1827 |
||
1828 |
isUnmapEvent |
|
4842 | 1829 |
"return true, if this is an unmap event" |
3680 | 1830 |
|
1831 |
^ selector == #unmapped |
|
1832 |
||
4842 | 1833 |
"Modified: / 09-11-2007 / 13:11:04 / cg" |
3680 | 1834 |
! ! |
1835 |
||
251 | 1836 |
!WindowEvent class methodsFor:'documentation'! |
1837 |
||
5751 | 1838 |
version_CVS |
8550 | 1839 |
^ '$Header$' |
5751 | 1840 |
! |
1841 |
||
1842 |
version_SVN |
|
6312 | 1843 |
^ '$ Id $' |
251 | 1844 |
! ! |
3758 | 1845 |
|
6312 | 1846 |
|
3758 | 1847 |
WindowEvent::InputEvent initialize! |