author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 19 Jul 2017 09:42:32 +0200 | |
branch | jv |
changeset 17619 | edb119820fcb |
parent 17518 | b7688f8c4d7a |
child 17712 | 7ac1ffddb6cf |
permissions | -rw-r--r-- |
52 | 1 |
" |
2 |
COPYRIGHT (c) 1991 by Claus Gittinger |
|
14149 | 3 |
All Rights Reserved |
52 | 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 |
" |
|
2805 | 12 |
"{ Package: 'stx:libtool' }" |
13 |
||
16250 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
6520 | 16 |
ApplicationModel subclass:#EventMonitor |
16250 | 17 |
instanceVariableNames:'outputSelector' |
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'Monitors-ST/X' |
|
19 | 21 |
! |
22 |
||
6520 | 23 |
View subclass:#EventMonitorView |
16250 | 24 |
instanceVariableNames:'outputStream labelHolder showButtonMotion showFocusEvents |
25 |
showTimestamp' |
|
26 |
classVariableNames:'' |
|
27 |
poolDictionaries:'' |
|
28 |
privateIn:EventMonitor |
|
6520 | 29 |
! |
30 |
||
1021 | 31 |
!EventMonitor class methodsFor:'documentation'! |
52 | 32 |
|
33 |
copyright |
|
34 |
" |
|
35 |
COPYRIGHT (c) 1991 by Claus Gittinger |
|
14149 | 36 |
All Rights Reserved |
19 | 37 |
|
52 | 38 |
This software is furnished under a license and may be used |
39 |
only in accordance with the terms of that license and with the |
|
40 |
inclusion of the above copyright notice. This software may not |
|
41 |
be provided or otherwise made available to, or used by, any |
|
42 |
other person. No title to or ownership of the software is |
|
43 |
hereby transferred. |
|
44 |
" |
|
45 |
! |
|
46 |
||
47 |
documentation |
|
48 |
" |
|
49 |
like xev - show events. |
|
6520 | 50 |
|
52 | 51 |
You can use this to check your keyboard mappings, for example. |
14148
5e6a841c980f
access font via message send to gc
Stefan Vogel <sv@exept.de>
parents:
8583
diff
changeset
|
52 |
start with: |
14149 | 53 |
EventMonitor open |
6520 | 54 |
and watch the output on the xterm/console. |
52 | 55 |
" |
56 |
! ! |
|
19 | 57 |
|
1021 | 58 |
!EventMonitor class methodsFor:'defaults'! |
19 | 59 |
|
60 |
defaultExtent |
|
61 |
^ 200 @ 200 |
|
62 |
! |
|
63 |
||
64 |
defaultLabel |
|
65 |
^ 'Event Monitor' |
|
66 |
! ! |
|
67 |
||
6520 | 68 |
!EventMonitor class methodsFor:'interface specs'! |
69 |
||
70 |
windowSpec |
|
71 |
"This resource specification was automatically generated |
|
72 |
by the UIPainter of ST/X." |
|
73 |
||
74 |
"Do not manually edit this!! If it is corrupted, |
|
75 |
the UIPainter may not be able to read the specification." |
|
76 |
||
77 |
" |
|
78 |
UIPainter new openOnClass:EventMonitor andSelector:#windowSpec |
|
79 |
EventMonitor new openInterface:#windowSpec |
|
80 |
EventMonitor open |
|
81 |
" |
|
82 |
||
83 |
<resource: #canvas> |
|
84 |
||
14148
5e6a841c980f
access font via message send to gc
Stefan Vogel <sv@exept.de>
parents:
8583
diff
changeset
|
85 |
^ |
6520 | 86 |
#(FullSpec |
14149 | 87 |
name: windowSpec |
88 |
window: |
|
6520 | 89 |
(WindowSpec |
14149 | 90 |
label: 'EventMonitor' |
91 |
name: 'EventMonitor' |
|
92 |
min: (Point 100 100) |
|
93 |
bounds: (Rectangle 0 0 300 300) |
|
94 |
menu: mainMenu |
|
95 |
) |
|
96 |
component: |
|
6520 | 97 |
(SpecCollection |
14149 | 98 |
collection: ( |
99 |
(NonScrollableArbitraryComponentSpec |
|
100 |
name: 'eventMonitorView' |
|
101 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
102 |
component: EventMonitorView |
|
103 |
) |
|
104 |
) |
|
14148
5e6a841c980f
access font via message send to gc
Stefan Vogel <sv@exept.de>
parents:
8583
diff
changeset
|
105 |
|
14149 | 106 |
) |
6520 | 107 |
) |
108 |
! ! |
|
109 |
||
110 |
!EventMonitor class methodsFor:'menu specs'! |
|
111 |
||
112 |
mainMenu |
|
113 |
"This resource specification was automatically generated |
|
114 |
by the MenuEditor of ST/X." |
|
115 |
||
116 |
"Do not manually edit this!! If it is corrupted, |
|
117 |
the MenuEditor may not be able to read the specification." |
|
118 |
||
119 |
" |
|
120 |
MenuEditor new openOnClass:EventMonitor andSelector:#mainMenu |
|
121 |
(Menu new fromLiteralArrayEncoding:(EventMonitor mainMenu)) startUp |
|
122 |
" |
|
123 |
||
124 |
<resource: #menu> |
|
125 |
||
14148
5e6a841c980f
access font via message send to gc
Stefan Vogel <sv@exept.de>
parents:
8583
diff
changeset
|
126 |
^ |
6520 | 127 |
#(Menu |
14149 | 128 |
( |
129 |
(MenuItem |
|
130 |
label: 'File' |
|
131 |
translateLabel: true |
|
132 |
submenu: |
|
133 |
(Menu |
|
134 |
( |
|
135 |
(MenuItem |
|
136 |
label: 'Open Modal Box' |
|
137 |
itemValue: openModalBox |
|
138 |
translateLabel: true |
|
139 |
) |
|
140 |
(MenuItem |
|
141 |
label: 'Exit' |
|
142 |
itemValue: closeRequest |
|
143 |
translateLabel: true |
|
144 |
) |
|
145 |
) |
|
146 |
nil |
|
147 |
nil |
|
148 |
) |
|
149 |
) |
|
150 |
(MenuItem |
|
151 |
label: 'Filter' |
|
152 |
translateLabel: true |
|
153 |
submenu: |
|
154 |
(Menu |
|
155 |
( |
|
156 |
(MenuItem |
|
157 |
label: 'Show ButtonMotion Events' |
|
158 |
itemValue: showButtonMotion: |
|
159 |
translateLabel: true |
|
160 |
indication: showButtonMotion |
|
161 |
) |
|
162 |
(MenuItem |
|
163 |
label: 'Show Focus Events' |
|
164 |
itemValue: showFocusEvents: |
|
165 |
translateLabel: true |
|
166 |
indication: showFocusEvents |
|
167 |
) |
|
168 |
) |
|
169 |
nil |
|
170 |
nil |
|
171 |
) |
|
172 |
) |
|
173 |
(MenuItem |
|
174 |
label: 'Output' |
|
175 |
translateLabel: true |
|
176 |
submenu: |
|
177 |
(Menu |
|
178 |
( |
|
179 |
(MenuItem |
|
180 |
label: 'Stdout' |
|
181 |
translateLabel: true |
|
182 |
choice: outputSelector |
|
183 |
choiceValue: stdout |
|
184 |
) |
|
185 |
(MenuItem |
|
186 |
label: 'Transcript' |
|
187 |
translateLabel: true |
|
188 |
choice: outputSelector |
|
189 |
choiceValue: transcript |
|
190 |
) |
|
191 |
(MenuItem |
|
192 |
label: '-' |
|
193 |
) |
|
194 |
(MenuItem |
|
195 |
label: 'Show Timestamp' |
|
196 |
itemValue: showTimestamp: |
|
197 |
translateLabel: true |
|
198 |
indication: showTimestamp |
|
199 |
) |
|
200 |
) |
|
201 |
nil |
|
202 |
nil |
|
203 |
) |
|
204 |
) |
|
205 |
(MenuItem |
|
206 |
label: 'Help' |
|
207 |
translateLabel: true |
|
208 |
startGroup: right |
|
209 |
submenu: |
|
210 |
(Menu |
|
211 |
( |
|
212 |
(MenuItem |
|
213 |
label: 'Documentation' |
|
214 |
itemValue: openDocumentation |
|
215 |
translateLabel: true |
|
216 |
) |
|
217 |
(MenuItem |
|
218 |
label: '-' |
|
219 |
) |
|
220 |
(MenuItem |
|
221 |
label: 'About this Application' |
|
222 |
itemValue: openAboutThisApplication |
|
223 |
translateLabel: true |
|
224 |
) |
|
225 |
) |
|
226 |
nil |
|
227 |
nil |
|
228 |
) |
|
229 |
) |
|
230 |
) |
|
231 |
nil |
|
232 |
nil |
|
6520 | 233 |
) |
234 |
! ! |
|
235 |
||
236 |
!EventMonitor methodsFor:'aspects'! |
|
237 |
||
6582 | 238 |
eventMonitorView |
239 |
^ (self builder componentAt:#eventMonitorView) |
|
240 |
! |
|
241 |
||
6520 | 242 |
outputSelector |
243 |
outputSelector isNil ifTrue:[ |
|
14149 | 244 |
outputSelector := #transcript asValue. |
245 |
outputSelector onChangeEvaluate:[ self outputSelectorChanged ]. |
|
6520 | 246 |
]. |
247 |
^ outputSelector |
|
248 |
! |
|
249 |
||
250 |
outputSelectorChanged |
|
251 |
|stream| |
|
252 |
||
253 |
stream := self outputSelector value == #transcript ifTrue:[Transcript] ifFalse:[Stdout]. |
|
6582 | 254 |
self eventMonitorView outputStream:stream. |
255 |
! |
|
256 |
||
6759
72791b0658d6
start initially with Transcript as output
Claus Gittinger <cg@exept.de>
parents:
6582
diff
changeset
|
257 |
postBuildWith:aBuilder |
72791b0658d6
start initially with Transcript as output
Claus Gittinger <cg@exept.de>
parents:
6582
diff
changeset
|
258 |
super postBuildWith:aBuilder. |
72791b0658d6
start initially with Transcript as output
Claus Gittinger <cg@exept.de>
parents:
6582
diff
changeset
|
259 |
self outputSelectorChanged. |
72791b0658d6
start initially with Transcript as output
Claus Gittinger <cg@exept.de>
parents:
6582
diff
changeset
|
260 |
! |
72791b0658d6
start initially with Transcript as output
Claus Gittinger <cg@exept.de>
parents:
6582
diff
changeset
|
261 |
|
6582 | 262 |
showButtonMotion |
263 |
^ self eventMonitorView showButtonMotion |
|
264 |
! |
|
265 |
||
266 |
showButtonMotion:aBoolean |
|
267 |
^ self eventMonitorView showButtonMotion:aBoolean |
|
7353 | 268 |
! |
269 |
||
270 |
showFocusEvents |
|
271 |
^ self eventMonitorView showFocusEvents |
|
272 |
||
273 |
"Created: / 04-10-2006 / 13:05:16 / cg" |
|
274 |
! |
|
275 |
||
276 |
showFocusEvents:aBoolean |
|
277 |
^ self eventMonitorView showFocusEvents:aBoolean |
|
278 |
||
279 |
"Created: / 04-10-2006 / 13:05:19 / cg" |
|
7354 | 280 |
! |
281 |
||
282 |
showTimestamp |
|
283 |
^ self eventMonitorView showTimestamp |
|
284 |
||
285 |
"Created: / 04-10-2006 / 13:14:49 / cg" |
|
286 |
! |
|
287 |
||
288 |
showTimestamp:aBoolean |
|
289 |
^ self eventMonitorView showTimestamp:aBoolean |
|
290 |
||
291 |
"Created: / 04-10-2006 / 13:14:53 / cg" |
|
6520 | 292 |
! ! |
293 |
||
294 |
!EventMonitor methodsFor:'menu actions'! |
|
295 |
||
296 |
openAboutThisApplication |
|
297 |
"This method was generated by the Browser. |
|
298 |
It will be invoked when the menu-item 'help-about' is selected." |
|
299 |
||
300 |
"/ could open a customized aboutBox here ... |
|
301 |
super openAboutThisApplication |
|
302 |
! |
|
303 |
||
304 |
openDocumentation |
|
305 |
HTMLDocumentView openFullOnDocumentationFile:'tools/misc/TOP.html#EVENTMONITOR'. |
|
8583
1ba96eea53a8
Menu for ModalBox (in order to genrate coveredBy: events, which are not received)
Stefan Vogel <sv@exept.de>
parents:
8089
diff
changeset
|
306 |
! |
1ba96eea53a8
Menu for ModalBox (in order to genrate coveredBy: events, which are not received)
Stefan Vogel <sv@exept.de>
parents:
8089
diff
changeset
|
307 |
|
1ba96eea53a8
Menu for ModalBox (in order to genrate coveredBy: events, which are not received)
Stefan Vogel <sv@exept.de>
parents:
8089
diff
changeset
|
308 |
openModalBox |
1ba96eea53a8
Menu for ModalBox (in order to genrate coveredBy: events, which are not received)
Stefan Vogel <sv@exept.de>
parents:
8089
diff
changeset
|
309 |
Dialog information:'Modal Box' |
6520 | 310 |
! ! |
311 |
||
312 |
!EventMonitor::EventMonitorView class methodsFor:'defaults'! |
|
313 |
||
314 |
defaultExtent |
|
315 |
^ 200 @ 200 |
|
316 |
! |
|
317 |
||
318 |
defaultLabel |
|
319 |
^ 'Event Monitor' |
|
320 |
! ! |
|
321 |
||
322 |
!EventMonitor::EventMonitorView class methodsFor:'documentation'! |
|
323 |
||
324 |
documentation |
|
325 |
" |
|
326 |
like xev - show events. |
|
327 |
You can use this to check your keyboard mappings, for example. |
|
14148
5e6a841c980f
access font via message send to gc
Stefan Vogel <sv@exept.de>
parents:
8583
diff
changeset
|
328 |
start with: |
14149 | 329 |
EventMonitorView open |
6520 | 330 |
and watch the output on xterm. |
331 |
" |
|
332 |
! ! |
|
333 |
||
334 |
!EventMonitor::EventMonitorView class methodsFor:'startup'! |
|
1822 | 335 |
|
336 |
isVisualStartable |
|
337 |
^ true |
|
338 |
||
339 |
"Created: / 10.8.1998 / 16:03:13 / cg" |
|
340 |
! ! |
|
341 |
||
6520 | 342 |
!EventMonitor::EventMonitorView methodsFor:'accessing'! |
343 |
||
7353 | 344 |
outputStream:aStream |
345 |
outputStream := aStream. |
|
6520 | 346 |
|
347 |
labelHolder value:nil. |
|
348 |
outputStream == Stdout ifTrue:[ |
|
14149 | 349 |
labelHolder value: 'See event trace\on the standard output' withCRs. |
6520 | 350 |
]. |
351 |
outputStream == Transcript ifTrue:[ |
|
14149 | 352 |
labelHolder value: 'See event trace\on the Transcript' withCRs. |
6520 | 353 |
]. |
6582 | 354 |
self invalidate. |
7353 | 355 |
|
356 |
"Modified: / 04-10-2006 / 13:04:16 / cg" |
|
6582 | 357 |
! |
358 |
||
359 |
showButtonMotion |
|
7353 | 360 |
^ showButtonMotion ? false |
361 |
||
362 |
"Modified: / 04-10-2006 / 13:03:31 / cg" |
|
363 |
! |
|
364 |
||
365 |
showButtonMotion:aBoolean |
|
366 |
showButtonMotion := aBoolean. |
|
367 |
||
368 |
"Modified: / 04-10-2006 / 13:04:08 / cg" |
|
6582 | 369 |
! |
370 |
||
7353 | 371 |
showFocusEvents |
372 |
^ showFocusEvents ? true |
|
373 |
||
374 |
"Created: / 04-10-2006 / 13:03:48 / cg" |
|
375 |
! |
|
376 |
||
377 |
showFocusEvents:aBoolean |
|
378 |
showFocusEvents := aBoolean. |
|
379 |
||
380 |
"Created: / 04-10-2006 / 13:04:04 / cg" |
|
7354 | 381 |
! |
382 |
||
383 |
showTimestamp |
|
384 |
^ showTimestamp ? false |
|
385 |
||
386 |
"Created: / 04-10-2006 / 13:06:57 / cg" |
|
387 |
! |
|
388 |
||
389 |
showTimestamp:aBoolean |
|
390 |
showTimestamp := aBoolean. |
|
391 |
||
392 |
"Created: / 04-10-2006 / 13:07:02 / cg" |
|
6520 | 393 |
! ! |
394 |
||
395 |
!EventMonitor::EventMonitorView methodsFor:'drawing'! |
|
396 |
||
397 |
redraw |
|
14148
5e6a841c980f
access font via message send to gc
Stefan Vogel <sv@exept.de>
parents:
8583
diff
changeset
|
398 |
|y p lines font| |
6520 | 399 |
|
400 |
self clear. |
|
401 |
lines := labelHolder value asCollectionOfLines. |
|
14148
5e6a841c980f
access font via message send to gc
Stefan Vogel <sv@exept.de>
parents:
8583
diff
changeset
|
402 |
font := gc font. |
6520 | 403 |
|
404 |
y := (self height - ((font heightOf:'A') * lines size)) // 2. |
|
405 |
lines do:[:eachLine | |
|
14149 | 406 |
p := (self center x - ((font widthOf:eachLine) // 2)) @ y. |
407 |
self displayString:eachLine value x:(p x) y:(p y). |
|
408 |
y := y + (font heightOf:eachLine). |
|
6520 | 409 |
] |
7354 | 410 |
! |
411 |
||
412 |
showEventTime |
|
413 |
self showTimestamp ifTrue:[ |
|
14149 | 414 |
Transcript show:(Timestamp now); show:' '. |
7354 | 415 |
] |
416 |
||
417 |
"Created: / 04-10-2006 / 13:08:27 / cg" |
|
6520 | 418 |
! ! |
419 |
||
420 |
!EventMonitor::EventMonitorView methodsFor:'events'! |
|
19 | 421 |
|
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
422 |
buttonMotion:state x:x y:y |
6582 | 423 |
self showButtonMotion ifFalse:[^ self]. |
424 |
||
7354 | 425 |
self showEventTime. |
6520 | 426 |
outputStream nextPutAll:'buttonMotion x:'. |
427 |
x printOn:outputStream. |
|
428 |
outputStream nextPutAll:' y:'. |
|
429 |
y printOn:outputStream. |
|
430 |
outputStream nextPutAll:' state:'. |
|
431 |
state printOn:outputStream. |
|
432 |
outputStream cr. |
|
1117 | 433 |
|
7354 | 434 |
"Modified: / 04-10-2006 / 13:07:53 / cg" |
19 | 435 |
! |
436 |
||
2159 | 437 |
buttonMultiPress:button x:x y:y |
7354 | 438 |
self showEventTime. |
439 |
||
6520 | 440 |
outputStream nextPutAll:'buttonMultiPress x:'. |
441 |
x printOn:outputStream. |
|
442 |
outputStream nextPutAll:' y:'. |
|
443 |
y printOn:outputStream. |
|
444 |
outputStream nextPutAll:' button:'. |
|
445 |
button printOn:outputStream. |
|
446 |
outputStream cr. |
|
2159 | 447 |
|
7354 | 448 |
"Created: / 19-05-1999 / 09:40:40 / cg" |
449 |
"Modified: / 04-10-2006 / 13:08:36 / cg" |
|
2159 | 450 |
! |
451 |
||
19 | 452 |
buttonPress:button x:x y:y |
7354 | 453 |
self showEventTime. |
454 |
||
6520 | 455 |
outputStream nextPutAll:'buttonPress x:'. |
456 |
x printOn:outputStream. |
|
457 |
outputStream nextPutAll:' y:'. |
|
458 |
y printOn:outputStream. |
|
459 |
outputStream nextPutAll:' button:'. |
|
460 |
button printOn:outputStream. |
|
461 |
outputStream cr. |
|
462 |
outputStream flush. |
|
1117 | 463 |
|
7354 | 464 |
"Modified: / 04-10-2006 / 13:08:43 / cg" |
19 | 465 |
! |
466 |
||
467 |
buttonRelease:button x:x y:y |
|
7354 | 468 |
self showEventTime. |
469 |
||
6520 | 470 |
outputStream nextPutAll:'buttonRelease x:'. |
471 |
x printOn:outputStream. |
|
472 |
outputStream nextPutAll:' y:'. |
|
473 |
y printOn:outputStream. |
|
474 |
outputStream nextPutAll:' button:'. |
|
475 |
button printOn:outputStream. |
|
476 |
outputStream cr. |
|
1117 | 477 |
|
7354 | 478 |
"Modified: / 04-10-2006 / 13:08:46 / cg" |
19 | 479 |
! |
480 |
||
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
481 |
configureX:x y:y width:newWidth height:newHeight |
7354 | 482 |
self showEventTime. |
483 |
||
6520 | 484 |
outputStream nextPutAll:'configure x:'. |
485 |
x printOn:outputStream. |
|
486 |
outputStream nextPutAll:' y:'. |
|
487 |
y printOn:outputStream. |
|
488 |
outputStream nextPutAll:' width:'. |
|
489 |
newWidth printOn:outputStream. |
|
490 |
outputStream nextPutAll:' height:'. |
|
491 |
newHeight printOn:outputStream. |
|
492 |
outputStream nextPutAll:' button:'. |
|
493 |
outputStream cr. |
|
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
494 |
|
6520 | 495 |
super configureX:x y:y width:newWidth height:newHeight. |
496 |
||
497 |
self invalidate. |
|
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
498 |
|
7354 | 499 |
"Modified: / 04-10-2006 / 13:08:49 / cg" |
1117 | 500 |
! |
501 |
||
8583
1ba96eea53a8
Menu for ModalBox (in order to genrate coveredBy: events, which are not received)
Stefan Vogel <sv@exept.de>
parents:
8089
diff
changeset
|
502 |
coveredBy:coveringView |
1ba96eea53a8
Menu for ModalBox (in order to genrate coveredBy: events, which are not received)
Stefan Vogel <sv@exept.de>
parents:
8089
diff
changeset
|
503 |
|
1ba96eea53a8
Menu for ModalBox (in order to genrate coveredBy: events, which are not received)
Stefan Vogel <sv@exept.de>
parents:
8089
diff
changeset
|
504 |
self showEventTime. |
1ba96eea53a8
Menu for ModalBox (in order to genrate coveredBy: events, which are not received)
Stefan Vogel <sv@exept.de>
parents:
8089
diff
changeset
|
505 |
|
1ba96eea53a8
Menu for ModalBox (in order to genrate coveredBy: events, which are not received)
Stefan Vogel <sv@exept.de>
parents:
8089
diff
changeset
|
506 |
outputStream nextPutAll:'coveredBy: '. |
1ba96eea53a8
Menu for ModalBox (in order to genrate coveredBy: events, which are not received)
Stefan Vogel <sv@exept.de>
parents:
8089
diff
changeset
|
507 |
coveringView printOn:outputStream. |
1ba96eea53a8
Menu for ModalBox (in order to genrate coveredBy: events, which are not received)
Stefan Vogel <sv@exept.de>
parents:
8089
diff
changeset
|
508 |
outputStream cr. |
1ba96eea53a8
Menu for ModalBox (in order to genrate coveredBy: events, which are not received)
Stefan Vogel <sv@exept.de>
parents:
8089
diff
changeset
|
509 |
! |
1ba96eea53a8
Menu for ModalBox (in order to genrate coveredBy: events, which are not received)
Stefan Vogel <sv@exept.de>
parents:
8089
diff
changeset
|
510 |
|
7320 | 511 |
dispatchEvent:event withFocusOn:focusViewOrNil delegate:doDelegate |
512 |
event isButtonMotionEvent ifTrue:[ |
|
14149 | 513 |
self showButtonMotion ifFalse:[^ self]. |
7320 | 514 |
]. |
515 |
||
516 |
"/ Timestamp now printOn:outputStream. |
|
517 |
"/ outputStream nextPutAll:' '. |
|
518 |
||
519 |
super dispatchEvent:event withFocusOn:focusViewOrNil delegate:doDelegate. |
|
520 |
||
521 |
"Created: / 20-09-2006 / 10:29:38 / cg" |
|
522 |
! |
|
523 |
||
1117 | 524 |
dropMessage:dropType data:dropData |
7354 | 525 |
self showEventTime. |
526 |
||
6520 | 527 |
outputStream nextPutAll:'drop '. |
528 |
dropType printOn:outputStream. |
|
529 |
outputStream nextPutAll:' data:'. |
|
530 |
dropData printOn:outputStream. |
|
531 |
outputStream cr. |
|
1117 | 532 |
|
7354 | 533 |
"Modified: / 04-10-2006 / 13:09:13 / cg" |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
534 |
! |
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
535 |
|
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
536 |
focusIn |
7353 | 537 |
self showFocusEvents ifFalse:[^ self]. |
538 |
||
7354 | 539 |
self showEventTime. |
540 |
||
6520 | 541 |
outputStream nextPutLine:'focusIn '. |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
542 |
|
7353 | 543 |
"Created: / 07-03-1996 / 15:06:18 / cg" |
7354 | 544 |
"Modified: / 04-10-2006 / 13:09:17 / cg" |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
545 |
! |
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
546 |
|
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
547 |
focusOut |
7353 | 548 |
self showFocusEvents ifFalse:[^ self]. |
549 |
||
7354 | 550 |
self showEventTime. |
551 |
||
6520 | 552 |
outputStream nextPutLine:'focusOut '. |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
553 |
|
7353 | 554 |
"Created: / 07-03-1996 / 15:06:21 / cg" |
7354 | 555 |
"Modified: / 04-10-2006 / 13:09:20 / cg" |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
556 |
! |
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
557 |
|
2159 | 558 |
hasKeyboardFocus:aBoolen |
7353 | 559 |
self showFocusEvents ifFalse:[^ self]. |
560 |
||
7354 | 561 |
self showEventTime. |
562 |
||
6520 | 563 |
outputStream nextPutAll:'hasKeyboardFocus:'. |
564 |
aBoolen printOn:outputStream. |
|
565 |
outputStream cr. |
|
2159 | 566 |
|
7354 | 567 |
"Modified: / 04-10-2006 / 13:09:23 / cg" |
2159 | 568 |
! |
569 |
||
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
570 |
mapped |
7354 | 571 |
self showEventTime. |
572 |
||
6520 | 573 |
outputStream nextPutLine:'mapped '. |
574 |
||
1977 | 575 |
super mapped. |
1117 | 576 |
|
7354 | 577 |
"Modified: / 04-10-2006 / 13:09:31 / cg" |
45 | 578 |
! |
579 |
||
52 | 580 |
pointerEnter:state x:x y:y |
7354 | 581 |
self showEventTime. |
582 |
||
6520 | 583 |
outputStream nextPutAll:'pointerEnter x:'. |
584 |
x printOn:outputStream. |
|
585 |
outputStream nextPutAll:' y:'. |
|
586 |
y printOn:outputStream. |
|
587 |
outputStream nextPutAll:' state:'. |
|
588 |
state printOn:outputStream. |
|
589 |
outputStream cr. |
|
1117 | 590 |
|
7354 | 591 |
"Modified: / 04-10-2006 / 13:09:34 / cg" |
52 | 592 |
! |
593 |
||
14148
5e6a841c980f
access font via message send to gc
Stefan Vogel <sv@exept.de>
parents:
8583
diff
changeset
|
594 |
pointerLeave:state |
7354 | 595 |
self showEventTime. |
596 |
||
6520 | 597 |
outputStream nextPutAll:'pointerLeave state:'. |
598 |
state storeString printOn:outputStream. |
|
599 |
outputStream cr. |
|
1117 | 600 |
|
7354 | 601 |
"Modified: / 04-10-2006 / 13:09:36 / cg" |
52 | 602 |
! |
603 |
||
6582 | 604 |
sizeChanged:how |
8089 | 605 |
outputStream nextPutAll:'sizeChanged how:'. |
606 |
how printOn:outputStream. |
|
607 |
outputStream cr. |
|
608 |
||
6582 | 609 |
super sizeChanged:how. |
610 |
self invalidate |
|
7354 | 611 |
|
612 |
"Modified: / 04-10-2006 / 13:17:46 / cg" |
|
6582 | 613 |
! |
614 |
||
45 | 615 |
unmapped |
7354 | 616 |
self showEventTime. |
617 |
||
6520 | 618 |
outputStream nextPutLine:'unmapped '. |
619 |
||
1977 | 620 |
super unmapped. |
1117 | 621 |
|
7354 | 622 |
"Modified: / 04-10-2006 / 13:09:41 / cg" |
45 | 623 |
! |
624 |
||
625 |
visibilityChange:how |
|
7354 | 626 |
self showEventTime. |
627 |
||
6520 | 628 |
outputStream nextPutAll:'visibilityChange:'. |
629 |
how storeString printOn:outputStream. |
|
630 |
outputStream cr. |
|
631 |
||
1977 | 632 |
super visibilityChange:how |
1117 | 633 |
|
7354 | 634 |
"Modified: / 04-10-2006 / 13:09:43 / cg" |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
635 |
! ! |
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
636 |
|
6520 | 637 |
!EventMonitor::EventMonitorView methodsFor:'initialization'! |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
638 |
|
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
639 |
initialize |
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
640 |
super initialize. |
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
641 |
|
6520 | 642 |
labelHolder := '' asValue. |
643 |
self outputStream:Stdout. |
|
19 | 644 |
! ! |
645 |
||
6520 | 646 |
!EventMonitor::EventMonitorView methodsFor:'realization'! |
19 | 647 |
|
648 |
initEvents |
|
649 |
self enableMotionEvents. |
|
45 | 650 |
self enableKeyReleaseEvents. |
52 | 651 |
self enableEnterLeaveEvents. |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
652 |
self enableFocusEvents. |
8583
1ba96eea53a8
Menu for ModalBox (in order to genrate coveredBy: events, which are not received)
Stefan Vogel <sv@exept.de>
parents:
8089
diff
changeset
|
653 |
self enableEvent:#visibilityChange. |
1ba96eea53a8
Menu for ModalBox (in order to genrate coveredBy: events, which are not received)
Stefan Vogel <sv@exept.de>
parents:
8089
diff
changeset
|
654 |
"/ self enableEvent:#structureNotify. |
1ba96eea53a8
Menu for ModalBox (in order to genrate coveredBy: events, which are not received)
Stefan Vogel <sv@exept.de>
parents:
8089
diff
changeset
|
655 |
"/ self enableEvent:#substructureNotify. |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
656 |
|
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
657 |
"Modified: 7.3.1996 / 15:06:42 / cg" |
19 | 658 |
! ! |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
659 |
|
1021 | 660 |
!EventMonitor class methodsFor:'documentation'! |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
661 |
|
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
662 |
version |
16250 | 663 |
^ '$Header$' |
17518
b7688f8c4d7a
Keyboard mapping: code updated to catch up with `KeyboardMap`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16256
diff
changeset
|
664 |
! |
b7688f8c4d7a
Keyboard mapping: code updated to catch up with `KeyboardMap`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16256
diff
changeset
|
665 |
|
b7688f8c4d7a
Keyboard mapping: code updated to catch up with `KeyboardMap`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16256
diff
changeset
|
666 |
version_HG |
b7688f8c4d7a
Keyboard mapping: code updated to catch up with `KeyboardMap`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16256
diff
changeset
|
667 |
|
b7688f8c4d7a
Keyboard mapping: code updated to catch up with `KeyboardMap`
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
16256
diff
changeset
|
668 |
^ '$Changeset: <not expanded> $' |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
669 |
! ! |
14149 | 670 |