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