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