author | Claus Gittinger <cg@exept.de> |
Mon, 20 Feb 2006 10:51:03 +0100 | |
changeset 6582 | e375666dc974 |
parent 6520 | 1fc302c1b979 |
child 6759 | 72791b0658d6 |
permissions | -rw-r--r-- |
52 | 1 |
" |
2 |
COPYRIGHT (c) 1991 by Claus Gittinger |
|
3 |
All Rights Reserved |
|
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 |
" |
|
12 |
||
2805 | 13 |
"{ Package: 'stx:libtool' }" |
14 |
||
6520 | 15 |
ApplicationModel subclass:#EventMonitor |
16 |
instanceVariableNames:'outputSelector' |
|
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
17 |
classVariableNames:'' |
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
18 |
poolDictionaries:'' |
1053 | 19 |
category:'Monitors-ST/X' |
19 | 20 |
! |
21 |
||
6520 | 22 |
View subclass:#EventMonitorView |
6582 | 23 |
instanceVariableNames:'outputStream labelHolder showButtonMotion' |
6520 | 24 |
classVariableNames:'' |
25 |
poolDictionaries:'' |
|
26 |
privateIn:EventMonitor |
|
27 |
! |
|
28 |
||
1021 | 29 |
!EventMonitor class methodsFor:'documentation'! |
52 | 30 |
|
31 |
copyright |
|
32 |
" |
|
33 |
COPYRIGHT (c) 1991 by Claus Gittinger |
|
34 |
All Rights Reserved |
|
19 | 35 |
|
52 | 36 |
This software is furnished under a license and may be used |
37 |
only in accordance with the terms of that license and with the |
|
38 |
inclusion of the above copyright notice. This software may not |
|
39 |
be provided or otherwise made available to, or used by, any |
|
40 |
other person. No title to or ownership of the software is |
|
41 |
hereby transferred. |
|
42 |
" |
|
43 |
! |
|
44 |
||
45 |
documentation |
|
46 |
" |
|
47 |
like xev - show events. |
|
6520 | 48 |
|
52 | 49 |
You can use this to check your keyboard mappings, for example. |
50 |
start with: |
|
6520 | 51 |
EventMonitor open |
52 |
and watch the output on the xterm/console. |
|
52 | 53 |
" |
54 |
! ! |
|
19 | 55 |
|
1021 | 56 |
!EventMonitor class methodsFor:'defaults'! |
19 | 57 |
|
58 |
defaultExtent |
|
59 |
^ 200 @ 200 |
|
60 |
! |
|
61 |
||
62 |
defaultLabel |
|
63 |
^ 'Event Monitor' |
|
64 |
! ! |
|
65 |
||
6520 | 66 |
!EventMonitor class methodsFor:'interface specs'! |
67 |
||
68 |
windowSpec |
|
69 |
"This resource specification was automatically generated |
|
70 |
by the UIPainter of ST/X." |
|
71 |
||
72 |
"Do not manually edit this!! If it is corrupted, |
|
73 |
the UIPainter may not be able to read the specification." |
|
74 |
||
75 |
" |
|
76 |
UIPainter new openOnClass:EventMonitor andSelector:#windowSpec |
|
77 |
EventMonitor new openInterface:#windowSpec |
|
78 |
EventMonitor open |
|
79 |
" |
|
80 |
||
81 |
<resource: #canvas> |
|
82 |
||
83 |
^ |
|
84 |
#(FullSpec |
|
85 |
name: windowSpec |
|
86 |
window: |
|
87 |
(WindowSpec |
|
88 |
label: 'EventMonitor' |
|
89 |
name: 'EventMonitor' |
|
90 |
min: (Point 10 10) |
|
91 |
max: (Point 1024 768) |
|
92 |
bounds: (Rectangle 0 0 300 300) |
|
93 |
menu: mainMenu |
|
94 |
) |
|
95 |
component: |
|
96 |
(SpecCollection |
|
97 |
collection: ( |
|
98 |
(NonScrollableArbitraryComponentSpec |
|
99 |
name: 'eventMonitorView' |
|
100 |
layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
101 |
component: EventMonitorView |
|
102 |
) |
|
103 |
) |
|
104 |
||
105 |
) |
|
106 |
) |
|
107 |
! ! |
|
108 |
||
109 |
!EventMonitor class methodsFor:'menu specs'! |
|
110 |
||
111 |
mainMenu |
|
112 |
"This resource specification was automatically generated |
|
113 |
by the MenuEditor of ST/X." |
|
114 |
||
115 |
"Do not manually edit this!! If it is corrupted, |
|
116 |
the MenuEditor may not be able to read the specification." |
|
117 |
||
118 |
" |
|
119 |
MenuEditor new openOnClass:EventMonitor andSelector:#mainMenu |
|
120 |
(Menu new fromLiteralArrayEncoding:(EventMonitor mainMenu)) startUp |
|
121 |
" |
|
122 |
||
123 |
<resource: #menu> |
|
124 |
||
125 |
^ |
|
126 |
#(Menu |
|
127 |
( |
|
128 |
(MenuItem |
|
129 |
label: 'File' |
|
130 |
translateLabel: true |
|
131 |
submenu: |
|
132 |
(Menu |
|
133 |
( |
|
134 |
(MenuItem |
|
135 |
label: 'Exit' |
|
136 |
itemValue: closeRequest |
|
137 |
translateLabel: true |
|
138 |
) |
|
139 |
) |
|
140 |
nil |
|
141 |
nil |
|
142 |
) |
|
143 |
) |
|
144 |
(MenuItem |
|
6582 | 145 |
label: 'Filter' |
146 |
translateLabel: true |
|
147 |
submenu: |
|
148 |
(Menu |
|
149 |
( |
|
150 |
(MenuItem |
|
151 |
label: 'Show ButtonMotion' |
|
152 |
itemValue: showButtonMotion: |
|
153 |
translateLabel: true |
|
154 |
indication: showButtonMotion |
|
155 |
) |
|
156 |
) |
|
157 |
nil |
|
158 |
nil |
|
159 |
) |
|
160 |
) |
|
161 |
(MenuItem |
|
6520 | 162 |
label: 'Output' |
163 |
translateLabel: true |
|
164 |
submenu: |
|
165 |
(Menu |
|
166 |
( |
|
167 |
(MenuItem |
|
168 |
label: 'Stdout' |
|
169 |
translateLabel: true |
|
170 |
choice: outputSelector |
|
171 |
choiceValue: stdout |
|
172 |
) |
|
173 |
(MenuItem |
|
174 |
label: 'Transcript' |
|
175 |
translateLabel: true |
|
176 |
choice: outputSelector |
|
177 |
choiceValue: transcript |
|
178 |
) |
|
179 |
) |
|
180 |
nil |
|
181 |
nil |
|
182 |
) |
|
183 |
) |
|
184 |
(MenuItem |
|
185 |
label: 'Help' |
|
186 |
translateLabel: true |
|
187 |
startGroup: right |
|
188 |
submenu: |
|
189 |
(Menu |
|
190 |
( |
|
191 |
(MenuItem |
|
192 |
label: 'Documentation' |
|
193 |
itemValue: openDocumentation |
|
194 |
translateLabel: true |
|
195 |
) |
|
196 |
(MenuItem |
|
197 |
label: '-' |
|
198 |
) |
|
199 |
(MenuItem |
|
200 |
label: 'About this Application' |
|
201 |
itemValue: openAboutThisApplication |
|
202 |
translateLabel: true |
|
203 |
) |
|
204 |
) |
|
205 |
nil |
|
206 |
nil |
|
207 |
) |
|
208 |
) |
|
209 |
) |
|
210 |
nil |
|
211 |
nil |
|
212 |
) |
|
213 |
! ! |
|
214 |
||
215 |
!EventMonitor methodsFor:'aspects'! |
|
216 |
||
6582 | 217 |
eventMonitorView |
218 |
^ (self builder componentAt:#eventMonitorView) |
|
219 |
! |
|
220 |
||
6520 | 221 |
outputSelector |
222 |
outputSelector isNil ifTrue:[ |
|
223 |
outputSelector := #stdout asValue. |
|
224 |
outputSelector onChangeEvaluate:[ self outputSelectorChanged ]. |
|
225 |
]. |
|
226 |
^ outputSelector |
|
227 |
! |
|
228 |
||
229 |
outputSelectorChanged |
|
230 |
|stream| |
|
231 |
||
232 |
stream := self outputSelector value == #transcript ifTrue:[Transcript] ifFalse:[Stdout]. |
|
6582 | 233 |
self eventMonitorView outputStream:stream. |
234 |
! |
|
235 |
||
236 |
showButtonMotion |
|
237 |
^ self eventMonitorView showButtonMotion |
|
238 |
! |
|
239 |
||
240 |
showButtonMotion:aBoolean |
|
241 |
^ self eventMonitorView showButtonMotion:aBoolean |
|
6520 | 242 |
! ! |
243 |
||
244 |
!EventMonitor methodsFor:'menu actions'! |
|
245 |
||
246 |
openAboutThisApplication |
|
247 |
"This method was generated by the Browser. |
|
248 |
It will be invoked when the menu-item 'help-about' is selected." |
|
249 |
||
250 |
"/ could open a customized aboutBox here ... |
|
251 |
super openAboutThisApplication |
|
252 |
! |
|
253 |
||
254 |
openDocumentation |
|
255 |
HTMLDocumentView openFullOnDocumentationFile:'tools/misc/TOP.html#EVENTMONITOR'. |
|
256 |
! ! |
|
257 |
||
258 |
!EventMonitor::EventMonitorView class methodsFor:'defaults'! |
|
259 |
||
260 |
defaultExtent |
|
261 |
^ 200 @ 200 |
|
262 |
! |
|
263 |
||
264 |
defaultLabel |
|
265 |
^ 'Event Monitor' |
|
266 |
! ! |
|
267 |
||
268 |
!EventMonitor::EventMonitorView class methodsFor:'documentation'! |
|
269 |
||
270 |
documentation |
|
271 |
" |
|
272 |
like xev - show events. |
|
273 |
You can use this to check your keyboard mappings, for example. |
|
274 |
start with: |
|
275 |
EventMonitorView open |
|
276 |
and watch the output on xterm. |
|
277 |
" |
|
278 |
! ! |
|
279 |
||
280 |
!EventMonitor::EventMonitorView class methodsFor:'startup'! |
|
1822 | 281 |
|
282 |
isVisualStartable |
|
283 |
^ true |
|
284 |
||
285 |
"Created: / 10.8.1998 / 16:03:13 / cg" |
|
286 |
! ! |
|
287 |
||
6520 | 288 |
!EventMonitor::EventMonitorView methodsFor:'accessing'! |
289 |
||
290 |
outputStream:something |
|
291 |
outputStream := something. |
|
292 |
||
293 |
labelHolder value:nil. |
|
294 |
outputStream == Stdout ifTrue:[ |
|
295 |
labelHolder value: 'See event trace\on the standard output' withCRs. |
|
296 |
]. |
|
297 |
outputStream == Transcript ifTrue:[ |
|
298 |
labelHolder value: 'See event trace\on the Transcript' withCRs. |
|
299 |
]. |
|
6582 | 300 |
self invalidate. |
301 |
! |
|
302 |
||
303 |
showButtonMotion |
|
304 |
^ showButtonMotion ? true |
|
305 |
! |
|
306 |
||
307 |
showButtonMotion:something |
|
308 |
showButtonMotion := something. |
|
6520 | 309 |
! ! |
310 |
||
311 |
!EventMonitor::EventMonitorView methodsFor:'drawing'! |
|
312 |
||
313 |
redraw |
|
314 |
|y p lines| |
|
315 |
||
316 |
self clear. |
|
317 |
lines := labelHolder value asCollectionOfLines. |
|
318 |
||
319 |
y := (self height - ((font heightOf:'A') * lines size)) // 2. |
|
320 |
lines do:[:eachLine | |
|
321 |
p := (self center x - ((font widthOf:eachLine) // 2)) @ y. |
|
322 |
self displayString:eachLine value x:(p x) y:(p y). |
|
323 |
y := y + (font heightOf:eachLine). |
|
324 |
] |
|
325 |
! ! |
|
326 |
||
327 |
!EventMonitor::EventMonitorView methodsFor:'events'! |
|
19 | 328 |
|
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
329 |
buttonMotion:state x:x y:y |
6582 | 330 |
self showButtonMotion ifFalse:[^ self]. |
331 |
||
6520 | 332 |
outputStream nextPutAll:'buttonMotion x:'. |
333 |
x printOn:outputStream. |
|
334 |
outputStream nextPutAll:' y:'. |
|
335 |
y printOn:outputStream. |
|
336 |
outputStream nextPutAll:' state:'. |
|
337 |
state printOn:outputStream. |
|
338 |
outputStream cr. |
|
1117 | 339 |
|
340 |
"Modified: 5.4.1997 / 01:23:39 / cg" |
|
19 | 341 |
! |
342 |
||
2159 | 343 |
buttonMultiPress:button x:x y:y |
6520 | 344 |
outputStream nextPutAll:'buttonMultiPress x:'. |
345 |
x printOn:outputStream. |
|
346 |
outputStream nextPutAll:' y:'. |
|
347 |
y printOn:outputStream. |
|
348 |
outputStream nextPutAll:' button:'. |
|
349 |
button printOn:outputStream. |
|
350 |
outputStream cr. |
|
2159 | 351 |
|
352 |
"Modified: / 5.4.1997 / 01:23:42 / cg" |
|
353 |
"Created: / 19.5.1999 / 09:40:40 / cg" |
|
354 |
! |
|
355 |
||
19 | 356 |
buttonPress:button x:x y:y |
6520 | 357 |
outputStream nextPutAll:'buttonPress x:'. |
358 |
x printOn:outputStream. |
|
359 |
outputStream nextPutAll:' y:'. |
|
360 |
y printOn:outputStream. |
|
361 |
outputStream nextPutAll:' button:'. |
|
362 |
button printOn:outputStream. |
|
363 |
outputStream cr. |
|
364 |
outputStream flush. |
|
1117 | 365 |
|
366 |
"Modified: 5.4.1997 / 01:23:42 / cg" |
|
19 | 367 |
! |
368 |
||
369 |
buttonRelease:button x:x y:y |
|
6520 | 370 |
outputStream nextPutAll:'buttonRelease x:'. |
371 |
x printOn:outputStream. |
|
372 |
outputStream nextPutAll:' y:'. |
|
373 |
y printOn:outputStream. |
|
374 |
outputStream nextPutAll:' button:'. |
|
375 |
button printOn:outputStream. |
|
376 |
outputStream cr. |
|
1117 | 377 |
|
378 |
"Modified: 5.4.1997 / 01:23:43 / cg" |
|
19 | 379 |
! |
380 |
||
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
381 |
configureX:x y:y width:newWidth height:newHeight |
6520 | 382 |
outputStream nextPutAll:'configure x:'. |
383 |
x printOn:outputStream. |
|
384 |
outputStream nextPutAll:' y:'. |
|
385 |
y printOn:outputStream. |
|
386 |
outputStream nextPutAll:' width:'. |
|
387 |
newWidth printOn:outputStream. |
|
388 |
outputStream nextPutAll:' height:'. |
|
389 |
newHeight printOn:outputStream. |
|
390 |
outputStream nextPutAll:' button:'. |
|
391 |
outputStream cr. |
|
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
392 |
|
6520 | 393 |
super configureX:x y:y width:newWidth height:newHeight. |
394 |
||
395 |
self invalidate. |
|
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
396 |
|
1117 | 397 |
"Modified: 5.4.1997 / 01:23:45 / cg" |
398 |
! |
|
399 |
||
400 |
dropMessage:dropType data:dropData |
|
6520 | 401 |
outputStream nextPutAll:'drop '. |
402 |
dropType printOn:outputStream. |
|
403 |
outputStream nextPutAll:' data:'. |
|
404 |
dropData printOn:outputStream. |
|
405 |
outputStream cr. |
|
1117 | 406 |
|
407 |
"Modified: 5.4.1997 / 01:23:28 / cg" |
|
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
408 |
! |
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
409 |
|
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
410 |
focusIn |
6520 | 411 |
outputStream nextPutLine:'focusIn '. |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
412 |
|
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
413 |
"Created: 7.3.1996 / 15:06:18 / cg" |
1117 | 414 |
"Modified: 5.4.1997 / 01:23:48 / cg" |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
415 |
! |
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
416 |
|
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
417 |
focusOut |
6520 | 418 |
outputStream nextPutLine:'focusOut '. |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
419 |
|
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
420 |
"Created: 7.3.1996 / 15:06:21 / cg" |
1117 | 421 |
"Modified: 5.4.1997 / 01:23:49 / cg" |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
422 |
! |
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
423 |
|
2159 | 424 |
hasKeyboardFocus:aBoolen |
6520 | 425 |
outputStream nextPutAll:'hasKeyboardFocus:'. |
426 |
aBoolen printOn:outputStream. |
|
427 |
outputStream cr. |
|
2159 | 428 |
|
429 |
"Modified: / 19.5.1999 / 09:42:59 / cg" |
|
430 |
! |
|
431 |
||
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
432 |
keyPress:key x:x y:y |
6344 | 433 |
|s rawKey untranslatedKey| |
640
7608b07af7bb
show untranslated key as well
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
434 |
|
2805 | 435 |
s := 'KeyPress x:' , x printString , ' y:' , y printString. |
6520 | 436 |
s printOn:outputStream. |
6344 | 437 |
|
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
438 |
(key isMemberOf:Character) ifTrue:[ |
6582 | 439 |
s := ' character key:' , key storeString |
2805 | 440 |
, ' (' , key asciiValue printString , ')'. |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
441 |
] ifFalse:[ |
2805 | 442 |
s := ' symbolic key:' , key storeString. |
640
7608b07af7bb
show untranslated key as well
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
443 |
untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key. |
7608b07af7bb
show untranslated key as well
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
444 |
untranslatedKey ~~ key ifTrue:[ |
6582 | 445 |
s := s , ' untranslated key:' , untranslatedKey storeString |
2805 | 446 |
]. |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
447 |
]. |
6344 | 448 |
rawKey := (WindowGroup lastEventQuerySignal query) rawKey. |
6582 | 449 |
s := s , ' rawKey:' , rawKey storeString. |
6344 | 450 |
|
6520 | 451 |
s printOn:outputStream. |
452 |
outputStream cr. |
|
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
453 |
! |
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
454 |
|
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
455 |
keyRelease:key x:x y:y |
640
7608b07af7bb
show untranslated key as well
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
456 |
|untranslatedKey| |
7608b07af7bb
show untranslated key as well
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
457 |
|
6520 | 458 |
'KeyRelease x:' printOn:outputStream. |
459 |
x printOn:outputStream. |
|
460 |
' y:' printOn:outputStream. |
|
461 |
y printOn:outputStream. |
|
462 |
||
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
463 |
(key isMemberOf:Character) ifTrue:[ |
6187 | 464 |
key codePoint <= 16rFF ifTrue:[ |
6520 | 465 |
' character key:' printOn:outputStream. |
6582 | 466 |
key storeString printOn:outputStream. |
6187 | 467 |
] ifFalse:[ |
6520 | 468 |
' unicode character utf8:' printOn:outputStream. |
469 |
key asString utf8Encoded asByteArray hexPrintOn:outputStream. |
|
6187 | 470 |
]. |
6520 | 471 |
' (' printOn:outputStream. key asciiValue printOn:outputStream. ')' printOn:outputStream |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
472 |
] ifFalse:[ |
6582 | 473 |
' symbolic key:' print. key storeString printOn:outputStream. |
640
7608b07af7bb
show untranslated key as well
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
474 |
untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key. |
7608b07af7bb
show untranslated key as well
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
475 |
untranslatedKey ~~ key ifTrue:[ |
6582 | 476 |
' untranslated key:' printOn:outputStream. untranslatedKey storeString printOn:outputStream |
640
7608b07af7bb
show untranslated key as well
Claus Gittinger <cg@exept.de>
parents:
433
diff
changeset
|
477 |
] |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
478 |
]. |
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
479 |
|
6520 | 480 |
outputStream cr |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
481 |
! |
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
482 |
|
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
483 |
mapped |
6520 | 484 |
outputStream nextPutLine:'mapped '. |
485 |
||
1977 | 486 |
super mapped. |
1117 | 487 |
|
1977 | 488 |
"Modified: / 6.1.1999 / 11:04:32 / cg" |
45 | 489 |
! |
490 |
||
52 | 491 |
pointerEnter:state x:x y:y |
6520 | 492 |
outputStream nextPutAll:'pointerEnter x:'. |
493 |
x printOn:outputStream. |
|
494 |
outputStream nextPutAll:' y:'. |
|
495 |
y printOn:outputStream. |
|
496 |
outputStream nextPutAll:' state:'. |
|
497 |
state printOn:outputStream. |
|
498 |
outputStream cr. |
|
1117 | 499 |
|
500 |
"Modified: 5.4.1997 / 01:24:02 / cg" |
|
52 | 501 |
! |
502 |
||
503 |
pointerLeave:state |
|
6520 | 504 |
outputStream nextPutAll:'pointerLeave state:'. |
505 |
state storeString printOn:outputStream. |
|
506 |
outputStream cr. |
|
1117 | 507 |
|
508 |
"Modified: 5.4.1997 / 01:24:05 / cg" |
|
52 | 509 |
! |
510 |
||
6582 | 511 |
sizeChanged:how |
512 |
super sizeChanged:how. |
|
513 |
self invalidate |
|
514 |
! |
|
515 |
||
45 | 516 |
unmapped |
6520 | 517 |
outputStream nextPutLine:'unmapped '. |
518 |
||
1977 | 519 |
super unmapped. |
1117 | 520 |
|
1977 | 521 |
"Modified: / 6.1.1999 / 11:04:22 / cg" |
45 | 522 |
! |
523 |
||
524 |
visibilityChange:how |
|
6520 | 525 |
outputStream nextPutAll:'visibilityChange:'. |
526 |
how storeString printOn:outputStream. |
|
527 |
outputStream cr. |
|
528 |
||
1977 | 529 |
super visibilityChange:how |
1117 | 530 |
|
1977 | 531 |
"Modified: / 6.1.1999 / 11:04:12 / cg" |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
532 |
! ! |
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
533 |
|
6520 | 534 |
!EventMonitor::EventMonitorView methodsFor:'initialization'! |
433
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 |
initialize |
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
537 |
super initialize. |
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
538 |
|
6520 | 539 |
labelHolder := '' asValue. |
540 |
self outputStream:Stdout. |
|
19 | 541 |
! ! |
542 |
||
6520 | 543 |
!EventMonitor::EventMonitorView methodsFor:'realization'! |
19 | 544 |
|
545 |
initEvents |
|
546 |
self enableMotionEvents. |
|
45 | 547 |
self enableKeyReleaseEvents. |
52 | 548 |
self enableEnterLeaveEvents. |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
549 |
self enableFocusEvents. |
45 | 550 |
self enableEvent:#visibilityChange |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
551 |
|
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
552 |
"Modified: 7.3.1996 / 15:06:42 / cg" |
19 | 553 |
! ! |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
554 |
|
1021 | 555 |
!EventMonitor class methodsFor:'documentation'! |
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 |
version |
6582 | 558 |
^ '$Header: /cvs/stx/stx/libtool/EventMonitor.st,v 1.24 2006-02-20 09:51:03 cg Exp $' |
433
703d84558f6f
also show config & focus events
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
559 |
! ! |