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