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 |
|
6
|
22 |
COPYRIGHT (c) 1990 by Claus Gittinger
|
0
|
23 |
All Rights Reserved
|
|
24 |
|
|
25 |
a view for input only - forwarding all events to another object.
|
|
26 |
This kind of view can be used to be laid ontop of another view to catch all
|
|
27 |
input. (Interface builder)
|
|
28 |
|
6
|
29 |
$Header: /cvs/stx/stx/libview2/InputView.st,v 1.3 1993-10-13 02:43:45 claus Exp $
|
0
|
30 |
|
|
31 |
written spring 90 by claus
|
|
32 |
'!
|
|
33 |
|
|
34 |
!InputView methodsFor:'initialization'!
|
|
35 |
|
|
36 |
initialize
|
|
37 |
super initialize.
|
|
38 |
borderWidth := 0
|
|
39 |
! !
|
|
40 |
|
|
41 |
!InputView methodsFor:'accessing'!
|
|
42 |
|
|
43 |
inputOnly
|
|
44 |
^ true
|
|
45 |
!
|
|
46 |
|
|
47 |
eventReceiver:aView
|
|
48 |
eventReceiver := aView
|
|
49 |
! !
|
|
50 |
|
|
51 |
!InputView methodsFor:'event handling'!
|
|
52 |
|
|
53 |
exposeX:x y:y width:w height:h
|
|
54 |
"will never be received"
|
|
55 |
^ self
|
|
56 |
!
|
|
57 |
|
|
58 |
keyPress:key x:x y:y
|
|
59 |
eventReceiver notNil ifTrue:[
|
|
60 |
eventReceiver keyPress:key x:x y:y
|
|
61 |
]
|
|
62 |
!
|
|
63 |
|
|
64 |
keyRelease:key x:x y:y
|
|
65 |
eventReceiver notNil ifTrue:[
|
|
66 |
eventReceiver keyRelease:key x:x y:y
|
|
67 |
]
|
|
68 |
!
|
|
69 |
|
|
70 |
buttonShiftPress:button x:x y:y
|
|
71 |
eventReceiver notNil ifTrue:[
|
|
72 |
eventReceiver buttonShiftPress:button x:x y:y
|
|
73 |
]
|
|
74 |
!
|
|
75 |
|
|
76 |
buttonPress:button x:x y:y
|
|
77 |
eventReceiver notNil ifTrue:[
|
|
78 |
eventReceiver buttonPress:button x:x y:y
|
|
79 |
]
|
|
80 |
!
|
|
81 |
|
|
82 |
buttonRelease:button x:x y:y
|
|
83 |
eventReceiver notNil ifTrue:[
|
|
84 |
eventReceiver buttonRelease:button x:x y:y
|
|
85 |
]
|
|
86 |
!
|
|
87 |
|
|
88 |
buttonMotion:state x:x y:y
|
|
89 |
eventReceiver notNil ifTrue:[
|
|
90 |
eventReceiver buttonMotion:state x:x y:y
|
|
91 |
]
|
|
92 |
!
|
|
93 |
|
|
94 |
focusIn
|
|
95 |
eventReceiver notNil ifTrue:[
|
|
96 |
eventReceiver focusIn
|
|
97 |
]
|
|
98 |
!
|
|
99 |
|
|
100 |
focusOut
|
|
101 |
eventReceiver notNil ifTrue:[
|
|
102 |
eventReceiver focusOut
|
|
103 |
]
|
|
104 |
!
|
|
105 |
|
|
106 |
pointerEnter:state x:x y:y
|
|
107 |
eventReceiver notNil ifTrue:[
|
|
108 |
eventReceiver pointerEnter:state x:x y:y
|
|
109 |
]
|
|
110 |
!
|
|
111 |
|
|
112 |
pointerLeave:state
|
|
113 |
eventReceiver notNil ifTrue:[
|
|
114 |
eventReceiver pointerLeave:state
|
|
115 |
]
|
|
116 |
! !
|
|
117 |
|