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