author | Claus Gittinger <cg@exept.de> |
Fri, 02 Nov 2012 19:46:06 +0100 | |
changeset 5949 | 643c67d38bdd |
parent 5929 | 290477171e1f |
child 5962 | aa966cdf2127 |
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. |
|
5949 | 634 |
self abstractClassInstantiationError. |
3680 | 635 |
]. |
636 |
^ super new |
|
5929 | 637 |
|
638 |
"Modified (format): / 31-08-2012 / 19:44:41 / cg" |
|
3680 | 639 |
! ! |
640 |
||
244 | 641 |
!WindowEvent methodsFor:'accessing'! |
642 |
||
3465 | 643 |
consumed |
644 |
"return the value of the instance variable 'consumed' (automatically generated)" |
|
645 |
||
646 |
^ consumed |
|
647 |
! |
|
648 |
||
649 |
consumed:aBoolean |
|
650 |
"set the value of the instance variable 'consumed' (automatically generated)" |
|
651 |
||
652 |
consumed := aBoolean. |
|
653 |
! |
|
654 |
||
3089 | 655 |
delegatedFrom |
656 |
"return the value of the instance variable 'delegatedFrom' (automatically generated)" |
|
657 |
||
3376 | 658 |
^ delegatedFrom |
659 |
! |
|
3089 | 660 |
|
661 |
delegatedFrom:something |
|
662 |
"set the value of the instance variable 'delegatedFrom' (automatically generated)" |
|
663 |
||
3376 | 664 |
delegatedFrom := something. |
665 |
! |
|
3089 | 666 |
|
244 | 667 |
key |
1841 | 668 |
"return the key - nil is returned here. |
669 |
This is redefined in KeyboardEvent." |
|
244 | 670 |
|
671 |
^ nil |
|
1841 | 672 |
|
673 |
"Created: 1.8.1997 / 13:56:21 / cg" |
|
244 | 674 |
! |
675 |
||
676 |
rectangle |
|
677 |
"return the damage rectangle" |
|
678 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
679 |
^ 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
|
680 |
! |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
681 |
|
244 | 682 |
type |
683 |
"return the type of the event" |
|
684 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
685 |
^ selector |
244 | 686 |
! |
687 |
||
688 |
view |
|
689 |
"return the view, for which the event is for" |
|
690 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
691 |
^ receiver |
244 | 692 |
! |
693 |
||
694 |
view:aView |
|
695 |
"set the view, for which the event is for" |
|
696 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
697 |
receiver := aView |
3089 | 698 |
! |
699 |
||
700 |
x |
|
701 |
"the x coordinate - if any. |
|
702 |
nil returned for all but button- and keyEvents" |
|
703 |
||
704 |
^ nil |
|
705 |
! |
|
706 |
||
707 |
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
|
708 |
"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
|
709 |
only for button- and keyEvents" |
3089 | 710 |
! |
711 |
||
712 |
y |
|
713 |
"the y coordinate - if any. |
|
714 |
nil returned for all but button- and keyEvents" |
|
715 |
||
716 |
^ nil |
|
717 |
! |
|
718 |
||
719 |
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
|
720 |
"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
|
721 |
only for button- and keyEvents" |
244 | 722 |
! ! |
723 |
||
3011 | 724 |
!WindowEvent methodsFor:'dispatching'! |
725 |
||
726 |
dispatchTo:anObject |
|
727 |
"send this event to anObject" |
|
728 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
729 |
^ anObject perform:selector withArguments:args |
3011 | 730 |
! |
731 |
||
732 |
dispatchWithViewArgumentTo:anObject |
|
733 |
"send this event to anObject, and pass an additional view argument" |
|
734 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
735 |
args size = 0 ifTrue:[ |
3011 | 736 |
^ anObject |
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
737 |
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
|
738 |
with:receiver |
3011 | 739 |
]. |
740 |
||
741 |
^ anObject |
|
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
742 |
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
|
743 |
withArguments:(args copyWith:receiver) |
3011 | 744 |
! ! |
745 |
||
511
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
746 |
!WindowEvent methodsFor:'printing & storing'! |
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
747 |
|
5925
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
748 |
displayOn:aGCOrStream |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
749 |
"Compatibility |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
750 |
append a printed desription on some stream (Dolphin, Squeak) |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
751 |
OR: |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
752 |
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
|
753 |
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
|
754 |
(although the fallBack is to display its printString ...)" |
1905 | 755 |
|
5925
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
756 |
"/ 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
|
757 |
"/ 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
|
758 |
aGCOrStream isStream ifFalse:[ |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
759 |
^ super displayOn:aGCOrStream. |
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 |
|
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
762 |
aGCOrStream |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
763 |
nextPutAll:self class name; |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
764 |
nextPut:$(. |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
765 |
|
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
766 |
selector storeOn:aGCOrStream. |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
767 |
aGCOrStream |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
768 |
nextPutAll:' view: '; |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
769 |
nextPutAll:receiver class name; |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
770 |
nextPutAll:' args: '. |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
771 |
|
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
772 |
args displayOn:aGCOrStream. |
a3db9f9f6502
Implement #displayOn: instead of #displayString
Stefan Vogel <sv@exept.de>
parents:
5838
diff
changeset
|
773 |
aGCOrStream nextPut:$) |
511
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
774 |
|
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
775 |
"Created: 7.3.1996 / 14:55:50 / cg" |
1905 | 776 |
"Modified: 20.9.1997 / 11:42:11 / cg" |
511
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
777 |
! ! |
233dabfcc81c
added #displayString (for eventTracing)
Claus Gittinger <cg@exept.de>
parents:
356
diff
changeset
|
778 |
|
3879 | 779 |
!WindowEvent methodsFor:'private-accessing'! |
244 | 780 |
|
3680 | 781 |
for:aView type:aSymbol |
782 |
"set the instance variables of the event" |
|
783 |
||
784 |
receiver := aView. |
|
785 |
selector := aSymbol. |
|
4991 | 786 |
args := #(). |
787 |
timeStamp := Timestamp now. |
|
3680 | 788 |
! |
789 |
||
244 | 790 |
for:aView type:aSymbol arguments:argArray |
791 |
"set the instance variables of the event" |
|
792 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
793 |
receiver := aView. |
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
794 |
selector := aSymbol. |
4991 | 795 |
args := argArray. |
796 |
timeStamp := Timestamp now. |
|
244 | 797 |
! ! |
798 |
||
799 |
!WindowEvent methodsFor:'queries'! |
|
800 |
||
1588
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
801 |
hasAlt |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
802 |
"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
|
803 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
804 |
^ false |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
805 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
806 |
"Created: 12.4.1997 / 11:04:10 / cg" |
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 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
809 |
hasCtrl |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
810 |
"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
|
811 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
812 |
^ false |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
813 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
814 |
"Created: 12.4.1997 / 11:04:03 / cg" |
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 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
817 |
hasMeta |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
818 |
"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
|
819 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
820 |
^ false |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
821 |
|
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
822 |
"Created: 12.4.1997 / 11:04:16 / cg" |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
823 |
! |
8f9468059ef7
keep modifierKey information in keyboardEvents
Claus Gittinger <cg@exept.de>
parents:
1541
diff
changeset
|
824 |
|
1590 | 825 |
hasShift |
826 |
"return true, if this is a keyboard event, with SHIFT pressed" |
|
827 |
||
828 |
^ false |
|
829 |
||
830 |
"Created: 12.4.1997 / 11:30:59 / cg" |
|
831 |
! |
|
832 |
||
5249 | 833 |
targetView |
834 |
"return the view which will eventually handle the event; |
|
835 |
for most events, this is the same as the view, for which the event was |
|
836 |
originally generated. |
|
837 |
Except, if an explicit focus has been assigned (i.e. tabbed into a component), |
|
838 |
AND the event is a keyboard event. In this case, the targetView might be different. |
|
839 |
Notice: this method might return nil, for synthetic (app-related) or display screen related |
|
840 |
events" |
|
841 |
||
842 |
^ self view. |
|
843 |
! ! |
|
844 |
||
845 |
!WindowEvent methodsFor:'testing'! |
|
846 |
||
3680 | 847 |
isApplicationEvent |
848 |
"return true, if this event is application related (i.e. not for a particular view)" |
|
849 |
||
850 |
^ false |
|
851 |
! |
|
852 |
||
244 | 853 |
isButtonEvent |
854 |
"return true, if this event is a button event" |
|
855 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
856 |
^ false |
244 | 857 |
! |
858 |
||
1730 | 859 |
isButtonMotionEvent |
860 |
"return true, if this event is a buttonMotion event" |
|
861 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
862 |
^ false |
1730 | 863 |
|
864 |
"Created: 5.3.1997 / 12:25:43 / cg" |
|
865 |
! |
|
866 |
||
4628 | 867 |
isButtonMultiPressEvent |
868 |
"return true, if this event is a buttonMulti-Press event" |
|
869 |
||
870 |
^ false |
|
871 |
||
872 |
"Created: 5.3.1997 / 12:25:43 / cg" |
|
873 |
! |
|
874 |
||
1420 | 875 |
isButtonPressEvent |
876 |
"return true, if this event is a buttonPress event" |
|
877 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
878 |
^ false |
1420 | 879 |
|
880 |
"Created: 5.3.1997 / 12:25:43 / cg" |
|
881 |
! |
|
882 |
||
3011 | 883 |
isButtonReleaseEvent |
884 |
"return true, if this event is a buttonPress event" |
|
885 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
886 |
^ false |
3011 | 887 |
|
888 |
"Created: 5.3.1997 / 12:25:43 / cg" |
|
889 |
! |
|
890 |
||
2811 | 891 |
isConfigureEvent |
3680 | 892 |
"return true, if this is a window geometry change event" |
2811 | 893 |
|
3680 | 894 |
^ false. |
2811 | 895 |
! |
896 |
||
5751 | 897 |
isCreateWindowEvent |
898 |
"return true, if this event is a CreateWindow event" |
|
899 |
||
900 |
^selector == #createWindowX:y:width:height: |
|
901 |
||
902 |
"Created: / 01-06-2011 / 13:01:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
903 |
! |
|
904 |
||
244 | 905 |
isDamage |
906 |
"return true, if this is a damage event" |
|
907 |
||
3680 | 908 |
^ false. |
244 | 909 |
! |
910 |
||
2471 | 911 |
isDamageForView:aView |
3680 | 912 |
"return true, if this is a damage event for a View" |
2471 | 913 |
|
3680 | 914 |
^ false. |
2471 | 915 |
! |
916 |
||
5204
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
917 |
isDelegatedToFocusView |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
918 |
"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
|
919 |
|
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
920 |
^ false. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
921 |
! |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
922 |
|
1420 | 923 |
isFocusEvent |
924 |
"return true, if this event is a focusIn/focusOut event" |
|
925 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
926 |
^ false |
1420 | 927 |
|
928 |
"Created: 5.3.1997 / 12:12:37 / cg" |
|
929 |
! |
|
930 |
||
931 |
isFocusInEvent |
|
932 |
"return true, if this event is a focusIn event" |
|
933 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
934 |
^ false |
1420 | 935 |
|
936 |
"Created: 5.3.1997 / 12:18:10 / cg" |
|
937 |
! |
|
938 |
||
4980 | 939 |
isFocusOutEvent |
940 |
"return true, if this event is a focusOut event" |
|
941 |
||
942 |
^ false |
|
943 |
||
944 |
"Created: 5.3.1997 / 12:18:10 / cg" |
|
945 |
! |
|
946 |
||
2707 | 947 |
isInputEvent |
948 |
"return true, if this event is an input (pointer, key or button) event" |
|
949 |
||
950 |
^ false |
|
951 |
||
952 |
"Created: / 21.5.1999 / 19:49:42 / cg" |
|
953 |
"Modified: / 21.5.1999 / 19:50:11 / cg" |
|
954 |
! |
|
955 |
||
244 | 956 |
isKeyEvent |
957 |
"return true, if this event is a keyboard event" |
|
958 |
||
2028 | 959 |
^ false |
960 |
||
961 |
"Modified: / 28.1.1998 / 00:03:17 / cg" |
|
244 | 962 |
! |
963 |
||
964 |
isKeyPressEvent |
|
2028 | 965 |
"return true, if this event is a keyboard press event" |
966 |
||
967 |
^ false |
|
968 |
||
969 |
"Modified: / 28.1.1998 / 00:03:24 / cg" |
|
970 |
! |
|
244 | 971 |
|
2028 | 972 |
isKeyReleaseEvent |
973 |
"return true, if this event is a keyboard release event" |
|
974 |
||
975 |
^ false |
|
976 |
||
977 |
"Modified: / 28.1.1998 / 00:03:31 / cg" |
|
356 | 978 |
! |
979 |
||
3376 | 980 |
isKeyboardFocusEvent |
981 |
"return true, if this event is a keyboard focus event" |
|
982 |
||
983 |
^ false |
|
984 |
! |
|
985 |
||
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
986 |
isMapEvent |
4842 | 987 |
"return true, if this is a map event" |
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
988 |
|
3680 | 989 |
^ false |
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
990 |
|
4842 | 991 |
"Created: / 29-01-1998 / 21:52:54 / cg" |
992 |
"Modified: / 09-11-2007 / 13:10:25 / cg" |
|
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
993 |
! |
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
994 |
|
3297 | 995 |
isMessageSendEvent |
996 |
"return true, if this event is a general messageSend event" |
|
997 |
||
998 |
^ false |
|
999 |
! |
|
1000 |
||
3011 | 1001 |
isMouseWheelEvent |
3680 | 1002 |
^ false |
3011 | 1003 |
! |
1004 |
||
356 | 1005 |
isPointerEnterEvent |
1006 |
"return true, if this event is a pointer-enter event" |
|
1007 |
||
3680 | 1008 |
^ false |
356 | 1009 |
|
1010 |
"Created: 9.1.1996 / 15:51:24 / cg" |
|
1011 |
"Modified: 9.1.1996 / 15:51:40 / cg" |
|
1012 |
! |
|
1013 |
||
1014 |
isPointerEnterLeaveEvent |
|
1015 |
"return true, if this event is a pointer-enter/leave event" |
|
1016 |
||
3680 | 1017 |
^ false |
356 | 1018 |
|
1019 |
"Created: 9.1.1996 / 15:51:18 / cg" |
|
1020 |
! |
|
1021 |
||
1022 |
isPointerLeaveEvent |
|
1023 |
"return true, if this event is a pointer-leave event" |
|
1024 |
||
3680 | 1025 |
^ false |
356 | 1026 |
|
1027 |
"Created: 9.1.1996 / 15:51:36 / cg" |
|
1158 | 1028 |
! |
1029 |
||
5751 | 1030 |
isPropertyChangeEvent |
1031 |
"return true, if this event is a CreateWindow event" |
|
1032 |
||
1033 |
^selector == #propertyChange:state: |
|
1034 |
||
1035 |
"Created: / 01-06-2011 / 13:36:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1036 |
! |
|
1037 |
||
3773
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1038 |
isTerminateEvent |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1039 |
^ false |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1040 |
! |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1041 |
|
4842 | 1042 |
isTrayEvent |
1043 |
"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
|
1044 |
|
3680 | 1045 |
^ false |
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1046 |
|
4842 | 1047 |
"Created: / 09-11-2007 / 13:09:29 / cg" |
1048 |
! |
|
1049 |
||
1050 |
isUnmapEvent |
|
1051 |
"return true, if this is an unmap event" |
|
1052 |
||
1053 |
^ false |
|
1054 |
||
1055 |
"Modified: / 09-11-2007 / 13:10:07 / cg" |
|
2034
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1056 |
! |
9fd5b2a4d315
added isMapEvent / isUnmapEvent
Claus Gittinger <cg@exept.de>
parents:
2028
diff
changeset
|
1057 |
|
1158 | 1058 |
isUserEvent |
1059 |
"return true, if this event is a user event (i.e. mouse, keyboard or button)" |
|
1060 |
||
3680 | 1061 |
self isButtonEvent ifTrue:[^ true]. |
1062 |
self isKeyEvent ifTrue:[^ true]. |
|
3773
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1063 |
self isTerminateEvent ifTrue:[^ true]. |
1158 | 1064 |
|
3680 | 1065 |
self isPointerEnterEvent ifTrue:[^ true]. |
1066 |
"/ self isPointerLeaveEvent ifTrue:[^ true]. -- why disabled ? |
|
1420 | 1067 |
|
1158 | 1068 |
^ false |
1069 |
||
1420 | 1070 |
"Modified: 5.3.1997 / 11:27:40 / cg" |
244 | 1071 |
! ! |
1072 |
||
3680 | 1073 |
!WindowEvent::ApplicationEvent methodsFor:'blocked'! |
1074 |
||
1075 |
view |
|
1076 |
^ nil |
|
1077 |
! ! |
|
1078 |
||
5249 | 1079 |
!WindowEvent::ApplicationEvent methodsFor:'testing'! |
3680 | 1080 |
|
1081 |
isApplicationEvent |
|
1082 |
^ true |
|
1083 |
! ! |
|
1084 |
||
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1085 |
!WindowEvent::InputEvent class methodsFor:'class initialization'! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1086 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1087 |
initialize |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1088 |
F_SHIFT := 16r001. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1089 |
F_CTRL := 16r002. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1090 |
F_ALT := 16r004. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1091 |
F_META := 16r008. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1092 |
|
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1093 |
F_BUTTON1 := 16r100. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1094 |
F_BUTTON2 := 16r200. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1095 |
F_BUTTON3 := 16r400. |
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 |
" |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1098 |
self initialize |
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 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1101 |
"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
|
1102 |
! ! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1103 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1104 |
!WindowEvent::InputEvent methodsFor:'accessing'! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1105 |
|
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1106 |
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
|
1107 |
|f "{ Class: SmallInteger }"| |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1108 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1109 |
f := 0. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1110 |
shift ifTrue:[f := f bitOr:F_SHIFT]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1111 |
ctrl ifTrue:[f := f bitOr:F_CTRL]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1112 |
alt ifTrue:[f := f bitOr:F_ALT]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1113 |
meta ifTrue:[f := f bitOr:F_META]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1114 |
b1 ifTrue:[f := f bitOr:F_BUTTON1]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1115 |
b2 ifTrue:[f := f bitOr:F_BUTTON2]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1116 |
b3 ifTrue:[f := f bitOr:F_BUTTON3]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1117 |
modifierFlags := f. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1118 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1119 |
"Created: 13.8.1997 / 22:17:56 / cg" |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1120 |
! |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1121 |
|
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1122 |
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
|
1123 |
|f "{ Class: SmallInteger }"| |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1124 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1125 |
f := 0. |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1126 |
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
|
1127 |
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
|
1128 |
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
|
1129 |
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
|
1130 |
modifierFlags := f. |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1131 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1132 |
"Created: 13.8.1997 / 22:02:09 / cg" |
1862
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 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1135 |
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
|
1136 |
|f "{ Class: SmallInteger }"| |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1137 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1138 |
f := 0. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1139 |
shift ifTrue:[f := f bitOr:F_SHIFT]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1140 |
ctrl ifTrue:[f := f bitOr:F_CTRL]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1141 |
alt ifTrue:[f := f bitOr:F_ALT]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1142 |
meta ifTrue:[f := f bitOr:F_META]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1143 |
b1 ifTrue:[f := f bitOr:F_BUTTON1]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1144 |
b2 ifTrue:[f := f bitOr:F_BUTTON2]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1145 |
b3 ifTrue:[f := f bitOr:F_BUTTON3]. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1146 |
modifierFlags := f. |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1147 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1148 |
"Created: 13.8.1997 / 22:17:25 / cg" |
2761 | 1149 |
! |
1150 |
||
1151 |
modifierFlags |
|
1152 |
^ modifierFlags |
|
1153 |
! |
|
1154 |
||
1155 |
modifierFlags:flagBits |
|
1156 |
modifierFlags := flagBits |
|
1861
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 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1159 |
!WindowEvent::InputEvent methodsFor:'queries'! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1160 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1161 |
hasAlt |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1162 |
"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
|
1163 |
|
1885 | 1164 |
modifierFlags isNil ifTrue:[^ false]. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1165 |
^ (modifierFlags bitAnd:F_ALT) ~~ 0 |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1166 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1167 |
"Created: 13.8.1997 / 22:02:23 / cg" |
1885 | 1168 |
"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
|
1169 |
! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1170 |
|
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1171 |
hasButton1 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1172 |
"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
|
1173 |
|
1885 | 1174 |
modifierFlags isNil ifTrue:[^ false]. |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1175 |
^ (modifierFlags bitAnd:F_BUTTON1) ~~ 0 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1176 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1177 |
"Created: 13.8.1997 / 22:16:35 / cg" |
1885 | 1178 |
"Modified: 21.8.1997 / 19:41:40 / cg" |
1862
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 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1181 |
hasButton2 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1182 |
"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
|
1183 |
|
1885 | 1184 |
modifierFlags isNil ifTrue:[^ false]. |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1185 |
^ (modifierFlags bitAnd:F_BUTTON2) ~~ 0 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1186 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1187 |
"Created: 13.8.1997 / 22:16:43 / cg" |
1885 | 1188 |
"Modified: 21.8.1997 / 19:41:47 / cg" |
1862
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 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1191 |
hasButton3 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1192 |
"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
|
1193 |
|
1885 | 1194 |
modifierFlags isNil ifTrue:[^ false]. |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1195 |
^ (modifierFlags bitAnd:F_BUTTON3) ~~ 0 |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1196 |
|
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1197 |
"Created: 13.8.1997 / 22:16:49 / cg" |
1885 | 1198 |
"Modified: 21.8.1997 / 19:41:52 / cg" |
1862
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1199 |
! |
e56d9a7389bb
also remember buttonStates in keyEvents.
Claus Gittinger <cg@exept.de>
parents:
1861
diff
changeset
|
1200 |
|
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1201 |
hasCtrl |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1202 |
"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
|
1203 |
|
1885 | 1204 |
modifierFlags isNil ifTrue:[^ false]. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1205 |
^ (modifierFlags bitAnd:F_CTRL) ~~ 0 |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1206 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1207 |
"Created: 13.8.1997 / 22:02:29 / cg" |
1885 | 1208 |
"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
|
1209 |
! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1210 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1211 |
hasMeta |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1212 |
"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
|
1213 |
|
1885 | 1214 |
modifierFlags isNil ifTrue:[^ false]. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1215 |
^ (modifierFlags bitAnd:F_META) ~~ 0 |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1216 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1217 |
"Created: 13.8.1997 / 22:02:59 / cg" |
1885 | 1218 |
"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
|
1219 |
! |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1220 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1221 |
hasShift |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1222 |
"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
|
1223 |
|
1885 | 1224 |
modifierFlags isNil ifTrue:[^ false]. |
1861
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1225 |
^ (modifierFlags bitAnd:F_SHIFT) ~~ 0 |
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1226 |
|
1b1e49147380
remember shift,meta,alt & ctrl state in buttonEvents
Claus Gittinger <cg@exept.de>
parents:
1841
diff
changeset
|
1227 |
"Created: 13.8.1997 / 22:03:09 / cg" |
1885 | 1228 |
"Modified: 21.8.1997 / 19:41:34 / cg" |
2707 | 1229 |
! |
1230 |
||
5204
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1231 |
targetView |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1232 |
"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
|
1233 |
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
|
1234 |
originally generated. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1235 |
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
|
1236 |
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
|
1237 |
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
|
1238 |
events" |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1239 |
|
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1240 |
|evView group focusView| |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1241 |
|
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1242 |
evView := self view. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1243 |
self isDelegatedToFocusView ifTrue:[ |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1244 |
evView notNil ifTrue:[ |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1245 |
group := evView windowGroup. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1246 |
group notNil ifTrue:[ |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1247 |
focusView := group focusView. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1248 |
focusView notNil ifTrue:[^ focusView]. |
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 |
]. |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1252 |
^ evView |
3465 | 1253 |
! ! |
1254 |
||
5249 | 1255 |
!WindowEvent::InputEvent methodsFor:'testing'! |
1256 |
||
1257 |
isInputEvent |
|
1258 |
^ true |
|
1259 |
||
1260 |
"Created: / 21.5.1999 / 19:49:30 / cg" |
|
1261 |
! ! |
|
1262 |
||
3297 | 1263 |
!WindowEvent::ButtonEvent methodsFor:'accessing'! |
1264 |
||
1265 |
button |
|
1266 |
"return the button nr of the button-event" |
|
1267 |
||
1268 |
^ args at:1 |
|
1269 |
! |
|
1270 |
||
1271 |
state |
|
1272 |
"return the button state of the button-event |
|
1273 |
(mouse button bits at the time of the event)." |
|
1274 |
||
1275 |
^ args at:1 |
|
1276 |
||
1277 |
"Created: / 12.11.1998 / 16:21:18 / cg" |
|
1278 |
! |
|
1279 |
||
1280 |
x |
|
1281 |
"return the x coordinate of the button-event |
|
1282 |
(mouse position at the time of the event)." |
|
1283 |
||
1284 |
^ args at:2 |
|
1285 |
||
1286 |
"Created: 1.8.1997 / 13:58:15 / cg" |
|
1287 |
! |
|
1288 |
||
1289 |
x:anInteger |
|
1290 |
"change the x coordinate of the button-event" |
|
1291 |
||
1292 |
args at:2 put:anInteger |
|
1293 |
||
1294 |
"Created: 1.8.1997 / 13:58:15 / cg" |
|
1295 |
! |
|
1296 |
||
1297 |
y |
|
1298 |
"return the y coordinate of the button-event |
|
1299 |
(mouse position at the time of the event)." |
|
1300 |
||
1301 |
^ args at:3 |
|
1302 |
||
1303 |
"Created: 1.8.1997 / 13:58:07 / cg" |
|
1304 |
! |
|
1305 |
||
1306 |
y:anInteger |
|
1307 |
"change the y coordinate of the button-event" |
|
1308 |
||
1309 |
^ args at:3 put:anInteger |
|
1310 |
||
1311 |
"Created: 1.8.1997 / 13:58:15 / cg" |
|
1312 |
! ! |
|
1313 |
||
5249 | 1314 |
!WindowEvent::ButtonEvent methodsFor:'testing'! |
3297 | 1315 |
|
1316 |
isButtonEvent |
|
1317 |
"return true, if this event is a button event" |
|
1318 |
||
1319 |
^ true |
|
1320 |
||
1321 |
"Created: 4.4.1997 / 13:44:11 / cg" |
|
3680 | 1322 |
! ! |
1323 |
||
5249 | 1324 |
!WindowEvent::ButtonPressEvent methodsFor:'testing'! |
3680 | 1325 |
|
1326 |
isButtonPressEvent |
|
1327 |
"return true, if this event is a buttonPress event" |
|
1328 |
||
1329 |
^ true |
|
1330 |
! ! |
|
1331 |
||
5249 | 1332 |
!WindowEvent::ButtonMultiPressEvent methodsFor:'testing'! |
3680 | 1333 |
|
4628 | 1334 |
isButtonMultiPressEvent |
1335 |
^ true |
|
1336 |
! |
|
1337 |
||
3680 | 1338 |
isButtonPressEvent |
1339 |
"/ ATTENTION: temporary for bw. compatibility, since due to a bug, |
|
1340 |
"/ multi-presses returned false to this query |
|
1341 |
||
1342 |
"/'----------------' errorPrint. |
|
1343 |
"/'oops multipressEvent asked for isButtonPress' errorPrintCR. |
|
1344 |
"/thisContext fullPrintAll. |
|
1345 |
^ false |
|
1346 |
! ! |
|
1347 |
||
5249 | 1348 |
!WindowEvent::ButtonReleaseEvent methodsFor:'testing'! |
3680 | 1349 |
|
1350 |
isButtonReleaseEvent |
|
1351 |
"return true, if this event is a buttonRelease event" |
|
1352 |
||
1353 |
^ true |
|
1354 |
! ! |
|
1355 |
||
1356 |
!WindowEvent::ClientEvent methodsFor:'accessing'! |
|
1357 |
||
1358 |
eventData |
|
1359 |
"return the value of the instance variable 'eventData' (automatically generated)" |
|
1360 |
||
1361 |
^ eventData |
|
1362 |
||
1363 |
"Created: 4.4.1997 / 17:41:50 / cg" |
|
3297 | 1364 |
! |
1365 |
||
3680 | 1366 |
eventData:something |
1367 |
"set the value of the instance variable 'eventData' (automatically generated)" |
|
1368 |
||
1369 |
eventData := something. |
|
1370 |
||
1371 |
"Created: 4.4.1997 / 17:41:57 / cg" |
|
1372 |
! ! |
|
1373 |
||
5249 | 1374 |
!WindowEvent::ConfigureEvent methodsFor:'testing'! |
3680 | 1375 |
|
1376 |
isConfigureEvent |
|
1377 |
^ true |
|
1378 |
! ! |
|
1379 |
||
5249 | 1380 |
!WindowEvent::DamageEvent methodsFor:'testing'! |
3680 | 1381 |
|
1382 |
isDamage |
|
1383 |
"return true, if this is a damage event" |
|
1384 |
||
1385 |
^ true |
|
1386 |
! |
|
1387 |
||
1388 |
isDamageForView:aView |
|
1389 |
"return true, if this is a damage event for aView" |
|
1390 |
||
1391 |
^ (receiver == aView) |
|
1392 |
! ! |
|
1393 |
||
4988 | 1394 |
!WindowEvent::EnterLeaveEvent methodsFor:'accessing'! |
1395 |
||
1396 |
state |
|
1397 |
||
1398 |
^ args at:1 |
|
1399 |
! |
|
1400 |
||
1401 |
x |
|
1402 |
||
1403 |
^ args at:2 ifAbsent:nil |
|
1404 |
! |
|
1405 |
||
1406 |
y |
|
1407 |
||
1408 |
^ args at:3 ifAbsent:nil |
|
1409 |
! ! |
|
1410 |
||
5249 | 1411 |
!WindowEvent::EnterLeaveEvent methodsFor:'testing'! |
3680 | 1412 |
|
1413 |
isPointerEnterEvent |
|
1414 |
"return true, if this event is a pointer-enter event" |
|
1415 |
||
1416 |
^ (selector == #'pointerEnter:x:y:') |
|
1417 |
||
1418 |
"Created: 9.1.1996 / 15:51:24 / cg" |
|
1419 |
"Modified: 9.1.1996 / 15:51:40 / cg" |
|
1420 |
! |
|
1421 |
||
1422 |
isPointerEnterLeaveEvent |
|
1423 |
"return true, if this event is a pointer-enter/leave event" |
|
1424 |
||
1425 |
^ true |
|
1426 |
||
1427 |
"Created: 9.1.1996 / 15:51:18 / cg" |
|
1428 |
! |
|
1429 |
||
1430 |
isPointerLeaveEvent |
|
1431 |
"return true, if this event is a pointer-leave event" |
|
1432 |
||
1433 |
^ selector == #'pointerLeave:' |
|
1434 |
||
1435 |
"Created: 9.1.1996 / 15:51:36 / cg" |
|
1436 |
! ! |
|
1437 |
||
5249 | 1438 |
!WindowEvent::FocusEvent methodsFor:'testing'! |
3680 | 1439 |
|
1440 |
isFocusEvent |
|
1441 |
"return true, if this event is a focus event" |
|
1442 |
||
1443 |
^ true |
|
1444 |
||
1445 |
"Created: / 21.5.1999 / 19:44:47 / cg" |
|
1446 |
! |
|
1447 |
||
1448 |
isFocusInEvent |
|
1449 |
"return true, if this event is a focusIn event" |
|
1450 |
||
1451 |
^ (selector == #focusIn) |
|
1452 |
||
1453 |
"Created: / 21.5.1999 / 19:45:04 / cg" |
|
4980 | 1454 |
! |
1455 |
||
1456 |
isFocusOutEvent |
|
1457 |
"return true, if this event is a focusOut event" |
|
1458 |
||
1459 |
^ (selector == #focusOut) |
|
1460 |
||
1461 |
"Created: / 21.5.1999 / 19:45:04 / cg" |
|
3680 | 1462 |
! ! |
1463 |
||
5249 | 1464 |
!WindowEvent::ButtonMotionEvent methodsFor:'testing'! |
3680 | 1465 |
|
3297 | 1466 |
isButtonMotionEvent |
1467 |
"return true, if this event is a buttonMotion event" |
|
1468 |
||
3680 | 1469 |
^ true |
3297 | 1470 |
! ! |
1471 |
||
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1472 |
!WindowEvent::KeyboardEvent methodsFor:'accessing'! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1473 |
|
1841 | 1474 |
key |
1475 |
"return the key of the key-event." |
|
1476 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1477 |
^ args at:1 |
1841 | 1478 |
|
1479 |
"Created: 1.8.1997 / 13:55:19 / cg" |
|
1480 |
! |
|
1481 |
||
2852 | 1482 |
key:aCharacterOrSymbol |
1483 |
"change the key of the key-event." |
|
1484 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1485 |
args at:1 put:aCharacterOrSymbol |
2852 | 1486 |
|
1487 |
"Created: 1.8.1997 / 13:55:19 / cg" |
|
1488 |
! |
|
1489 |
||
1527
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 |
^ rawKey |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1492 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1493 |
"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
|
1494 |
! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1495 |
|
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 |
rawKey := aKey |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1498 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1499 |
"Created: 4.4.1997 / 13:47:10 / cg" |
1841 | 1500 |
! |
1501 |
||
1502 |
x |
|
1503 |
"return the x coordinate of the key-event |
|
1504 |
(mouse position at the time of the key-event)." |
|
1505 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1506 |
^ args at:2 |
1841 | 1507 |
|
1508 |
"Created: 1.8.1997 / 13:57:27 / cg" |
|
1509 |
! |
|
1510 |
||
5209 | 1511 |
x:anInteger |
3089 | 1512 |
"change the x coordinate of the key-event" |
1513 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1514 |
^ args at:2 put:anInteger |
3089 | 1515 |
! |
1516 |
||
1841 | 1517 |
y |
1518 |
"return the y coordinate of the key-event |
|
1519 |
(mouse position at the time of the key-event)." |
|
1520 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1521 |
^ args at:3 |
1841 | 1522 |
|
1523 |
"Created: 1.8.1997 / 13:55:19 / cg" |
|
1524 |
"Modified: 1.8.1997 / 13:57:42 / cg" |
|
3089 | 1525 |
! |
1526 |
||
1527 |
y:anInteger |
|
1528 |
"change the y coordinate of the key-event" |
|
1529 |
||
3295
84de6d18b9d1
code cleanup - now a subclass of MessageSend - thats what it is really
Claus Gittinger <cg@exept.de>
parents:
3294
diff
changeset
|
1530 |
^ args at:3 put:anInteger |
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1531 |
! ! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1532 |
|
5249 | 1533 |
!WindowEvent::KeyboardEvent methodsFor:'testing'! |
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1534 |
|
5204
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1535 |
isDelegatedToFocusView |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1536 |
"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
|
1537 |
|
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1538 |
^ true |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1539 |
! |
748c8f2954e9
fixed mouseWheelScroll bug due to changed targetView code
Claus Gittinger <cg@exept.de>
parents:
5201
diff
changeset
|
1540 |
|
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1541 |
isKeyEvent |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1542 |
"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
|
1543 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1544 |
^ true |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1545 |
|
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1546 |
"Created: 4.4.1997 / 13:39:59 / cg" |
3686 | 1547 |
! ! |
1548 |
||
5249 | 1549 |
!WindowEvent::KeyReleaseEvent methodsFor:'testing'! |
3686 | 1550 |
|
1551 |
isKeyReleaseEvent |
|
1552 |
"return true, if this event is a keyboard press event" |
|
1553 |
||
1554 |
^ true |
|
1555 |
! ! |
|
1556 |
||
5249 | 1557 |
!WindowEvent::KeyPressEvent methodsFor:'testing'! |
2028 | 1558 |
|
1559 |
isKeyPressEvent |
|
1560 |
"return true, if this event is a keyboard press event" |
|
1561 |
||
3686 | 1562 |
^ true |
1527
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1563 |
! ! |
661de0f76595
started to separate into distinct event classes;
Claus Gittinger <cg@exept.de>
parents:
1470
diff
changeset
|
1564 |
|
4988 | 1565 |
!WindowEvent::KeyboardFocusEvent methodsFor:'accessing'! |
1566 |
||
1567 |
hasFocus |
|
1568 |
||
1569 |
^ args at: 1 |
|
1570 |
! ! |
|
1571 |
||
5249 | 1572 |
!WindowEvent::KeyboardFocusEvent methodsFor:'testing'! |
3376 | 1573 |
|
1574 |
isKeyboardFocusEvent |
|
1575 |
"return true, if this event is a keyboard focus event" |
|
1576 |
||
1577 |
^ true |
|
1578 |
! ! |
|
1579 |
||
3680 | 1580 |
!WindowEvent::MessageSendEvent methodsFor:'blocked'! |
1581 |
||
1582 |
view |
|
1583 |
^ nil |
|
1584 |
! ! |
|
1585 |
||
5249 | 1586 |
!WindowEvent::MessageSendEvent methodsFor:'testing'! |
3089 | 1587 |
|
3465 | 1588 |
isMessageSendEvent |
1589 |
"return true, if this event is a general messageSend event" |
|
3089 | 1590 |
|
1591 |
^ true |
|
1592 |
||
1593 |
||
1594 |
||
1595 |
! ! |
|
1596 |
||
4988 | 1597 |
!WindowEvent::MouseWheelMotionEvent methodsFor:'accessing'! |
1598 |
||
1599 |
amount |
|
1600 |
"return the amount of the mouse wheel motion event " |
|
1601 |
||
1602 |
^ args at:4 |
|
1603 |
! |
|
1604 |
||
1605 |
deltaTime |
|
1606 |
"return the deltaTime of the mouse wheel motion event " |
|
1607 |
||
1608 |
^ args at:5 |
|
1609 |
! ! |
|
1610 |
||
5249 | 1611 |
!WindowEvent::MouseWheelMotionEvent methodsFor:'testing'! |
5205 | 1612 |
|
1613 |
isDelegatedToFocusView |
|
1614 |
"return true, if this event will be forwarded to a focusView." |
|
1615 |
||
1616 |
^ true. |
|
1617 |
! |
|
1618 |
||
1619 |
isMouseWheelEvent |
|
1620 |
^ true. |
|
1621 |
! ! |
|
1622 |
||
4233 | 1623 |
!WindowEvent::NativeWidgetCommandEvent methodsFor:'accessing'! |
1624 |
||
1625 |
command |
|
1626 |
^ selector |
|
1627 |
! |
|
1628 |
||
1629 |
command:something |
|
1630 |
selector := something. |
|
1631 |
! ! |
|
1632 |
||
5249 | 1633 |
!WindowEvent::NewDamageEvent methodsFor:'testing'! |
4044 | 1634 |
|
1635 |
isDamage |
|
1636 |
"return true, if this is a damage event" |
|
1637 |
||
1638 |
^ true |
|
1639 |
! |
|
1640 |
||
1641 |
isDamageForView:aView |
|
1642 |
"return true, if this is a damage event for aView" |
|
1643 |
||
1644 |
^ (receiver == aView) |
|
1645 |
! ! |
|
1646 |
||
5249 | 1647 |
!WindowEvent::TerminateEvent methodsFor:'testing'! |
3773
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1648 |
|
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1649 |
isTerminateEvent |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1650 |
^ true |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1651 |
! ! |
e2fd3df91e5c
new event class for TerminateEvents
Claus Gittinger <cg@exept.de>
parents:
3758
diff
changeset
|
1652 |
|
4817 | 1653 |
!WindowEvent::TrayActionEvent methodsFor:'accessing'! |
1654 |
||
1655 |
event |
|
1656 |
^ selector |
|
1657 |
||
1658 |
"Created: / 31-10-2007 / 01:23:05 / cg" |
|
1659 |
! |
|
1660 |
||
1661 |
event:something |
|
1662 |
selector := something. |
|
1663 |
||
1664 |
"Created: / 31-10-2007 / 01:23:07 / cg" |
|
1665 |
! ! |
|
1666 |
||
5249 | 1667 |
!WindowEvent::TrayActionEvent methodsFor:'testing'! |
4842 | 1668 |
|
1669 |
isTrayEvent |
|
1670 |
^ true |
|
1671 |
||
1672 |
"Created: / 09-11-2007 / 13:09:17 / cg" |
|
1673 |
! ! |
|
1674 |
||
5838
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1675 |
!WindowEvent::VisibilityChangeEvent class methodsFor:'instance creation'! |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1676 |
|
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1677 |
for:aView visibility:how |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1678 |
^ self new |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1679 |
|
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1680 |
"Created: / 23-01-2012 / 10:02:42 / cg" |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1681 |
! ! |
5629e7ee01bf
added: #visibilityOf:changedTo:
Claus Gittinger <cg@exept.de>
parents:
5752
diff
changeset
|
1682 |
|
5249 | 1683 |
!WindowEvent::WindowMapUnmapEvent methodsFor:'testing'! |
3680 | 1684 |
|
1685 |
isMapEvent |
|
4842 | 1686 |
"return true, if this is a map event" |
3680 | 1687 |
|
1688 |
^ selector == #mapped |
|
1689 |
||
4842 | 1690 |
"Created: / 29-01-1998 / 21:52:54 / cg" |
1691 |
"Modified: / 09-11-2007 / 13:11:02 / cg" |
|
3680 | 1692 |
! |
1693 |
||
1694 |
isUnmapEvent |
|
4842 | 1695 |
"return true, if this is an unmap event" |
3680 | 1696 |
|
1697 |
^ selector == #unmapped |
|
1698 |
||
4842 | 1699 |
"Modified: / 09-11-2007 / 13:11:04 / cg" |
3680 | 1700 |
! ! |
1701 |
||
251 | 1702 |
!WindowEvent class methodsFor:'documentation'! |
1703 |
||
5751 | 1704 |
version_CVS |
1705 |
||
5949 | 1706 |
^ '$Header: /cvs/stx/stx/libview/WindowEvent.st,v 1.109 2012-11-02 18:46:06 cg Exp $' |
5751 | 1707 |
! |
1708 |
||
1709 |
version_SVN |
|
5752 | 1710 |
^ '§ Id §' |
251 | 1711 |
! ! |
3758 | 1712 |
|
1713 |
WindowEvent::InputEvent initialize! |