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