60
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1995 by Claus Gittinger
|
77
|
3 |
All Rights Reserved
|
60
|
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 |
|
|
13 |
|
|
14 |
|
|
15 |
'From Smalltalk/X, Version:2.10.5 on 25-mar-1995 at 11:44:17 am'!
|
|
16 |
|
|
17 |
Object subclass:#EventListener
|
77
|
18 |
instanceVariableNames:''
|
60
|
19 |
classVariableNames:''
|
|
20 |
poolDictionaries:''
|
77
|
21 |
category:'Interface-Support'
|
60
|
22 |
!
|
|
23 |
|
|
24 |
!EventListener class methodsFor:'documentation'!
|
|
25 |
|
|
26 |
version
|
|
27 |
"
|
77
|
28 |
$Header: /cvs/stx/stx/libview2/EventListener.st,v 1.2 1995-05-19 16:40:24 claus Exp $
|
60
|
29 |
"
|
|
30 |
!
|
|
31 |
|
|
32 |
documentation
|
|
33 |
"
|
77
|
34 |
abstract class for event listeners. See example use in ActiveHelp.
|
60
|
35 |
"
|
|
36 |
!
|
|
37 |
|
|
38 |
copyright
|
|
39 |
"
|
|
40 |
COPYRIGHT (c) 1995 by Claus Gittinger
|
77
|
41 |
All Rights Reserved
|
60
|
42 |
|
|
43 |
This software is furnished under a license and may be used
|
|
44 |
only in accordance with the terms of that license and with the
|
|
45 |
inclusion of the above copyright notice. This software may not
|
|
46 |
be provided or otherwise made available to, or used by, any
|
|
47 |
other person. No title to or ownership of the software is
|
|
48 |
hereby transferred.
|
|
49 |
"
|
|
50 |
|
|
51 |
|
|
52 |
! !
|
|
53 |
|
|
54 |
!EventListener methodsFor:'events'!
|
|
55 |
|
|
56 |
buttonRelease:button x:x y:y view:aView
|
|
57 |
^ false
|
|
58 |
|
|
59 |
!
|
|
60 |
|
|
61 |
keyPress:key x:x y:y view:aView
|
|
62 |
^ false
|
|
63 |
|
|
64 |
!
|
|
65 |
|
|
66 |
buttonMultiPress:button x:x y:y view:aView
|
|
67 |
^ false
|
|
68 |
|
|
69 |
!
|
|
70 |
|
|
71 |
buttonPress:button x:x y:y view:aView
|
|
72 |
^ false
|
|
73 |
|
|
74 |
!
|
|
75 |
|
|
76 |
buttonMotion:state x:x y:y view:aView
|
|
77 |
^ false
|
|
78 |
!
|
|
79 |
|
|
80 |
pointerLeave:state view:view
|
|
81 |
^ false
|
|
82 |
|
|
83 |
!
|
|
84 |
|
|
85 |
pointerEnter:state x:x y:y view:view
|
|
86 |
^ false
|
|
87 |
|
|
88 |
!
|
|
89 |
|
|
90 |
buttonShiftPress:button x:x y:y view:aView
|
|
91 |
^ false
|
|
92 |
|
|
93 |
!
|
|
94 |
|
|
95 |
keyRelease:key x:x y:y view:aView
|
|
96 |
^ false
|
|
97 |
|
|
98 |
! !
|
|
99 |
|
|
100 |
!EventListener methodsFor:'listen'!
|
|
101 |
|
|
102 |
listen
|
|
103 |
"install myself as listener"
|
|
104 |
|
|
105 |
WindowSensor eventListener:self
|
|
106 |
|
|
107 |
"
|
|
108 |
|listener|
|
|
109 |
|
|
110 |
listener := EventListener new.
|
|
111 |
listener listen.
|
|
112 |
(Delay forSeconds:20) wait.
|
|
113 |
listener unlisten
|
|
114 |
"
|
|
115 |
!
|
|
116 |
|
|
117 |
unlisten
|
|
118 |
"uninstall myself as listener"
|
|
119 |
|
|
120 |
WindowSensor eventListener:nil
|
|
121 |
! !
|