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