0
|
1 |
"
|
6
|
2 |
COPYRIGHT (c) 1990 by Claus Gittinger
|
0
|
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 |
|
|
13 |
View subclass:#InputView
|
|
14 |
instanceVariableNames:'eventReceiver'
|
|
15 |
classVariableNames: ''
|
|
16 |
poolDictionaries: ''
|
|
17 |
category:'Views-Basic'
|
|
18 |
!
|
|
19 |
|
|
20 |
InputView comment:'
|
21
|
21 |
COPYRIGHT (c) 1990 by Claus Gittinger
|
|
22 |
All Rights Reserved
|
|
23 |
'!
|
0
|
24 |
|
21
|
25 |
!InputView class methodsFor:'documentation'!
|
|
26 |
|
|
27 |
copyright
|
|
28 |
"
|
|
29 |
COPYRIGHT (c) 1990 by Claus Gittinger
|
0
|
30 |
All Rights Reserved
|
|
31 |
|
21
|
32 |
This software is furnished under a license and may be used
|
|
33 |
only in accordance with the terms of that license and with the
|
|
34 |
inclusion of the above copyright notice. This software may not
|
|
35 |
be provided or otherwise made available to, or used by, any
|
|
36 |
other person. No title to or ownership of the software is
|
|
37 |
hereby transferred.
|
|
38 |
"
|
|
39 |
!
|
0
|
40 |
|
21
|
41 |
version
|
|
42 |
"
|
|
43 |
$Header: /cvs/stx/stx/libview2/InputView.st,v 1.4 1994-06-03 00:53:18 claus Exp $
|
|
44 |
"
|
|
45 |
!
|
0
|
46 |
|
21
|
47 |
documentation
|
|
48 |
"
|
|
49 |
a view for input only - forwarding all events to another object.
|
|
50 |
This kind of view can be used to be laid ontop of another view to catch all
|
|
51 |
input. (Interface builder)
|
|
52 |
NOTICE: the event forwarding is a leftover from times when not delegation mechanism
|
|
53 |
existed - it will vanish - use delegates for new code.
|
|
54 |
"
|
|
55 |
! !
|
0
|
56 |
|
|
57 |
!InputView methodsFor:'initialization'!
|
|
58 |
|
|
59 |
initialize
|
|
60 |
super initialize.
|
|
61 |
borderWidth := 0
|
|
62 |
! !
|
|
63 |
|
|
64 |
!InputView methodsFor:'accessing'!
|
|
65 |
|
|
66 |
inputOnly
|
|
67 |
^ true
|
|
68 |
!
|
|
69 |
|
|
70 |
eventReceiver:aView
|
|
71 |
eventReceiver := aView
|
|
72 |
! !
|
|
73 |
|
21
|
74 |
!InputView methodsFor:'redefined dummy'!
|
|
75 |
|
|
76 |
setViewBackground
|
|
77 |
"inputviews have no background"
|
|
78 |
|
|
79 |
^ self
|
|
80 |
! !
|
|
81 |
|
0
|
82 |
!InputView methodsFor:'event handling'!
|
|
83 |
|
|
84 |
exposeX:x y:y width:w height:h
|
|
85 |
"will never be received"
|
|
86 |
^ self
|
|
87 |
!
|
|
88 |
|
|
89 |
keyPress:key x:x y:y
|
21
|
90 |
"redefined to forward event"
|
|
91 |
|
0
|
92 |
eventReceiver notNil ifTrue:[
|
|
93 |
eventReceiver keyPress:key x:x y:y
|
|
94 |
]
|
|
95 |
!
|
|
96 |
|
|
97 |
keyRelease:key x:x y:y
|
21
|
98 |
"redefined to forward event"
|
|
99 |
|
0
|
100 |
eventReceiver notNil ifTrue:[
|
|
101 |
eventReceiver keyRelease:key x:x y:y
|
|
102 |
]
|
|
103 |
!
|
|
104 |
|
|
105 |
buttonShiftPress:button x:x y:y
|
21
|
106 |
"redefined to forward event"
|
|
107 |
|
0
|
108 |
eventReceiver notNil ifTrue:[
|
|
109 |
eventReceiver buttonShiftPress:button x:x y:y
|
|
110 |
]
|
|
111 |
!
|
|
112 |
|
|
113 |
buttonPress:button x:x y:y
|
21
|
114 |
"redefined to forward event"
|
|
115 |
|
0
|
116 |
eventReceiver notNil ifTrue:[
|
|
117 |
eventReceiver buttonPress:button x:x y:y
|
|
118 |
]
|
|
119 |
!
|
|
120 |
|
|
121 |
buttonRelease:button x:x y:y
|
21
|
122 |
"redefined to forward event"
|
|
123 |
|
0
|
124 |
eventReceiver notNil ifTrue:[
|
|
125 |
eventReceiver buttonRelease:button x:x y:y
|
|
126 |
]
|
|
127 |
!
|
|
128 |
|
|
129 |
buttonMotion:state x:x y:y
|
21
|
130 |
"redefined to forward event"
|
|
131 |
|
0
|
132 |
eventReceiver notNil ifTrue:[
|
|
133 |
eventReceiver buttonMotion:state x:x y:y
|
|
134 |
]
|
|
135 |
!
|
|
136 |
|
|
137 |
focusIn
|
21
|
138 |
"redefined to forward event"
|
|
139 |
|
0
|
140 |
eventReceiver notNil ifTrue:[
|
|
141 |
eventReceiver focusIn
|
|
142 |
]
|
|
143 |
!
|
|
144 |
|
|
145 |
focusOut
|
21
|
146 |
"redefined to forward event"
|
|
147 |
|
0
|
148 |
eventReceiver notNil ifTrue:[
|
|
149 |
eventReceiver focusOut
|
|
150 |
]
|
|
151 |
!
|
|
152 |
|
|
153 |
pointerEnter:state x:x y:y
|
21
|
154 |
"redefined to forward event"
|
|
155 |
|
0
|
156 |
eventReceiver notNil ifTrue:[
|
|
157 |
eventReceiver pointerEnter:state x:x y:y
|
|
158 |
]
|
|
159 |
!
|
|
160 |
|
|
161 |
pointerLeave:state
|
21
|
162 |
"redefined to forward event"
|
|
163 |
|
0
|
164 |
eventReceiver notNil ifTrue:[
|
|
165 |
eventReceiver pointerLeave:state
|
|
166 |
]
|
|
167 |
! !
|