author | tz |
Mon, 29 Jun 1998 16:44:52 +0200 | |
changeset 987 | 54c15a2642f6 |
parent 962 | e6ccfc7fb22e |
child 994 | 1b606988c010 |
permissions | -rw-r--r-- |
245 | 1 |
" |
2 |
COPYRIGHT (c) 1996 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 |
||
13 |
||
14 |
||
15 |
Object subclass:#VisualComponent |
|
406 | 16 |
instanceVariableNames:'bounds' |
245 | 17 |
classVariableNames:'' |
18 |
poolDictionaries:'' |
|
19 |
category:'Graphics-Display Objects' |
|
20 |
! |
|
21 |
||
365 | 22 |
!VisualComponent class methodsFor:'documentation'! |
245 | 23 |
|
24 |
copyright |
|
25 |
" |
|
26 |
COPYRIGHT (c) 1996 by Claus Gittinger |
|
27 |
All Rights Reserved |
|
28 |
||
29 |
This software is furnished under a license and may be used |
|
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
||
37 |
||
38 |
! |
|
39 |
||
40 |
documentation |
|
41 |
" |
|
246 | 42 |
abstract superclass for all kinds of visual components. |
265 | 43 |
This class and its subclasses (currently) exist mostly for |
44 |
ST-80 compatibility - to provide a home for ported PD classes, |
|
45 |
which depend on the VisualComponent hierarchy. |
|
46 |
||
47 |
Notice: |
|
48 |
this class was implemented using protocol information |
|
365 | 49 |
from alpha testers, from reading PD programs and |
50 |
from the Hopkins/Horan book. |
|
265 | 51 |
- it may not be complete or compatible to the corresponding ST-80 class. |
52 |
If you encounter any incompatibilities, please forward a note |
|
53 |
describing the incompatibility verbal (i.e. no code) to the ST/X team. |
|
54 |
This is still being constructed - not yet finished. |
|
245 | 55 |
|
56 |
[author:] |
|
57 |
Claus Gittinger |
|
265 | 58 |
|
59 |
[see also:] |
|
60 |
GeometricWrapper |
|
245 | 61 |
" |
62 |
||
63 |
! ! |
|
64 |
||
365 | 65 |
!VisualComponent class methodsFor:'instance creation'! |
245 | 66 |
|
67 |
new |
|
68 |
^ self basicNew initialize |
|
69 |
! ! |
|
70 |
||
962
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
71 |
!VisualComponent class methodsFor:'queries'! |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
72 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
73 |
defaultFont |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
74 |
^ SimpleView defaultFont |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
75 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
76 |
"Created: / 18.6.1998 / 16:14:22 / cg" |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
77 |
! |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
78 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
79 |
defaultViewBackgroundColor |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
80 |
^ SimpleView defaultViewBackgroundColor |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
81 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
82 |
"Created: / 18.6.1998 / 16:15:17 / cg" |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
83 |
! ! |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
84 |
|
245 | 85 |
!VisualComponent methodsFor:'accessing'! |
86 |
||
962
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
87 |
backgroundColor |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
88 |
^ Color white |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
89 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
90 |
"Created: / 18.6.1998 / 16:01:00 / cg" |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
91 |
! |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
92 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
93 |
backgroundColor:aColor |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
94 |
"ignored here" |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
95 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
96 |
"Created: / 18.6.1998 / 16:15:28 / cg" |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
97 |
! |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
98 |
|
274 | 99 |
container:someContainer |
100 |
"ignored here" |
|
101 |
||
102 |
"Created: 9.5.1996 / 00:48:54 / cg" |
|
103 |
! |
|
104 |
||
962
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
105 |
defaultFont |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
106 |
^ SimpleView defaultFont |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
107 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
108 |
"Created: / 18.6.1998 / 16:13:56 / cg" |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
109 |
! |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
110 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
111 |
font:aFont |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
112 |
"ignored here" |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
113 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
114 |
"Created: / 18.6.1998 / 16:14:39 / cg" |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
115 |
! |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
116 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
117 |
foregroundColor |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
118 |
^ Color black |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
119 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
120 |
"Created: / 18.6.1998 / 16:01:07 / cg" |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
121 |
! |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
122 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
123 |
foregroundColor:aColor |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
124 |
"ignored here" |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
125 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
126 |
"Created: / 18.6.1998 / 16:14:53 / cg" |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
127 |
! |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
128 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
129 |
geometryLayout:aLayout |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
130 |
"ignored here" |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
131 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
132 |
"Created: / 18.6.1998 / 16:15:39 / cg" |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
133 |
! |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
134 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
135 |
hiddenOnRealize:aBoolean |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
136 |
"ignored here" |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
137 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
138 |
"Created: / 18.6.1998 / 16:13:19 / cg" |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
139 |
! |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
140 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
141 |
id |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
142 |
"ignored here" |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
143 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
144 |
^ nil |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
145 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
146 |
"Created: / 18.6.1998 / 16:13:34 / cg" |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
147 |
! |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
148 |
|
274 | 149 |
setParentViewIn:aView |
150 |
"ignored here - for now" |
|
151 |
||
152 |
"Created: 9.5.1996 / 00:19:39 / cg" |
|
962
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
153 |
! |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
154 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
155 |
superView |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
156 |
^ self container |
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
157 |
|
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
158 |
"Created: / 18.6.1998 / 16:16:07 / cg" |
274 | 159 |
! ! |
160 |
||
161 |
!VisualComponent methodsFor:'accessing - dimensions'! |
|
162 |
||
163 |
bottom |
|
164 |
"return my bottom y coordinate" |
|
165 |
||
166 |
^ self bounds bottom |
|
167 |
||
168 |
"Modified: 9.5.1996 / 00:13:12 / cg" |
|
169 |
"Created: 26.5.1996 / 12:56:12 / cg" |
|
170 |
! |
|
171 |
||
245 | 172 |
bounds |
246 | 173 |
"return my bounds" |
174 |
||
245 | 175 |
^ bounds |
176 |
||
177 |
"Created: 8.5.1996 / 23:35:19 / cg" |
|
246 | 178 |
"Modified: 9.5.1996 / 00:12:00 / cg" |
962
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
179 |
! |
245 | 180 |
|
246 | 181 |
bounds:aRectangle |
182 |
"set my bounds" |
|
183 |
||
184 |
bounds := aRectangle |
|
245 | 185 |
|
186 |
"Created: 8.5.1996 / 23:36:07 / cg" |
|
246 | 187 |
"Modified: 9.5.1996 / 00:13:12 / cg" |
962
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
188 |
! |
245 | 189 |
|
274 | 190 |
left |
191 |
"return my left x coordinate" |
|
250 | 192 |
|
274 | 193 |
^ self bounds left |
194 |
||
195 |
"Created: 8.5.1996 / 23:36:07 / cg" |
|
196 |
"Modified: 26.5.1996 / 12:56:22 / cg" |
|
250 | 197 |
! |
198 |
||
245 | 199 |
preferredBounds |
246 | 200 |
"return my preferredBounds" |
201 |
||
323 | 202 |
^ 0@0 extent:100@100 |
245 | 203 |
|
204 |
"Created: 8.5.1996 / 23:36:29 / cg" |
|
323 | 205 |
"Modified: 19.7.1996 / 20:06:28 / cg" |
206 |
! |
|
207 |
||
208 |
preferredExtent |
|
209 |
^ self preferredBounds extent |
|
210 |
||
246 | 211 |
"Modified: 9.5.1996 / 00:13:22 / cg" |
323 | 212 |
"Created: 19.7.1996 / 20:06:19 / cg" |
247 | 213 |
! |
214 |
||
274 | 215 |
right |
216 |
"return my right x coordinate" |
|
217 |
||
218 |
^ self bounds right |
|
247 | 219 |
|
274 | 220 |
"Modified: 9.5.1996 / 00:13:12 / cg" |
221 |
"Created: 26.5.1996 / 12:56:25 / cg" |
|
222 |
! |
|
223 |
||
224 |
top |
|
225 |
"return my top y coordinate" |
|
226 |
||
227 |
^ self bounds top |
|
228 |
||
229 |
"Modified: 9.5.1996 / 00:13:12 / cg" |
|
230 |
"Created: 26.5.1996 / 12:56:15 / cg" |
|
321 | 231 |
! |
232 |
||
233 |
viewRectangle |
|
234 |
^ self bounds |
|
235 |
||
236 |
"Created: 19.7.1996 / 17:24:58 / cg" |
|
245 | 237 |
! ! |
238 |
||
293
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
291
diff
changeset
|
239 |
!VisualComponent methodsFor:'accessing-mvc'! |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
291
diff
changeset
|
240 |
|
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
291
diff
changeset
|
241 |
model |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
291
diff
changeset
|
242 |
"return nil - generic components have no model" |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
291
diff
changeset
|
243 |
|
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
291
diff
changeset
|
244 |
^ nil |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
291
diff
changeset
|
245 |
|
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
291
diff
changeset
|
246 |
"Created: 5.6.1996 / 14:18:16 / cg" |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
291
diff
changeset
|
247 |
! ! |
d10ad10d23fa
prepare for view-component integration
Claus Gittinger <cg@exept.de>
parents:
291
diff
changeset
|
248 |
|
265 | 249 |
!VisualComponent methodsFor:'displaying'! |
250 |
||
406 | 251 |
displayOn:aGC |
252 |
"display the receiver on some graphicsContext. |
|
253 |
The sender is repsonsible for restoring the GC's state |
|
254 |
(i.e. it may be left in any undefined state)" |
|
255 |
||
256 |
self subclassResponsibility |
|
257 |
||
258 |
"Modified: 10.2.1997 / 13:53:03 / cg" |
|
259 |
! |
|
260 |
||
261 |
displayOn:aGC at:aPoint |
|
262 |
"display the receiver translated by some amount on some graphicsContext" |
|
263 |
||
265 | 264 |
|oldTranslation| |
265 |
||
266 |
oldTranslation := aGC translation. |
|
406 | 267 |
aGC translateBy:aPoint. |
265 | 268 |
self displayOn:aGC. |
269 |
aGC translation:oldTranslation |
|
270 |
||
406 | 271 |
"Created: 10.2.1997 / 13:47:18 / cg" |
272 |
"Modified: 10.2.1997 / 13:52:53 / cg" |
|
273 |
! |
|
274 |
||
275 |
displayOn:aGC x:x y:y |
|
276 |
"display the receiver translated by some amount on some graphicsContext" |
|
277 |
||
278 |
^ self displayOn:aGC at:(x @ y). |
|
279 |
||
280 |
"Modified: 10.2.1997 / 13:52:57 / cg" |
|
265 | 281 |
! ! |
282 |
||
245 | 283 |
!VisualComponent methodsFor:'event handling'! |
284 |
||
285 |
buttonPress:button x:x y:y |
|
246 | 286 |
"button was pressed over me - ignored here" |
245 | 287 |
|
246 | 288 |
"Modified: 9.5.1996 / 00:14:08 / cg" |
245 | 289 |
! |
290 |
||
291 |
buttonRelease:button x:x y:y |
|
246 | 292 |
"button was released over me - ignored here" |
245 | 293 |
|
294 |
"Created: 8.5.1996 / 23:38:30 / cg" |
|
246 | 295 |
"Modified: 9.5.1996 / 00:14:04 / cg" |
245 | 296 |
! |
297 |
||
321 | 298 |
containerChangedSize |
299 |
||
300 |
"Created: 19.7.1996 / 17:32:19 / cg" |
|
301 |
! |
|
302 |
||
303 |
containerMapped |
|
304 |
||
305 |
"Created: 19.7.1996 / 17:39:27 / cg" |
|
306 |
! |
|
307 |
||
308 |
containerUnmapped |
|
309 |
||
310 |
"Created: 19.7.1996 / 17:44:52 / cg" |
|
311 |
! |
|
312 |
||
313 |
destroy |
|
314 |
||
315 |
"Created: 19.7.1996 / 17:25:46 / cg" |
|
316 |
! |
|
317 |
||
245 | 318 |
keyPress:key x:x y:y |
246 | 319 |
"key was pressed over me - ignored here" |
245 | 320 |
|
321 |
"Created: 8.5.1996 / 23:46:03 / cg" |
|
246 | 322 |
"Modified: 9.5.1996 / 00:14:14 / cg" |
245 | 323 |
! |
324 |
||
325 |
keyRelease:key x:x y:y |
|
246 | 326 |
"key was released over me - ignored here" |
245 | 327 |
|
328 |
"Created: 8.5.1996 / 23:46:07 / cg" |
|
246 | 329 |
"Modified: 9.5.1996 / 00:14:19 / cg" |
245 | 330 |
! ! |
331 |
||
332 |
!VisualComponent methodsFor:'initialization'! |
|
333 |
||
334 |
initialize |
|
335 |
||
406 | 336 |
"Modified: 10.2.1997 / 19:28:11 / cg" |
245 | 337 |
! ! |
338 |
||
265 | 339 |
!VisualComponent methodsFor:'queries'! |
340 |
||
341 |
heightOn:aGC |
|
342 |
"return my height, if displayed on aGC; |
|
343 |
I assume that my height is independent of the device, and return |
|
344 |
the bounds height" |
|
345 |
||
346 |
^ self bounds height |
|
347 |
||
348 |
"Modified: 13.5.1996 / 10:15:13 / cg" |
|
349 |
! |
|
350 |
||
290
d26dc55ac7e4
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
274
diff
changeset
|
351 |
isBorderedWrapper |
d26dc55ac7e4
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
274
diff
changeset
|
352 |
^ false |
d26dc55ac7e4
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
274
diff
changeset
|
353 |
|
d26dc55ac7e4
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
274
diff
changeset
|
354 |
"Created: 5.6.1996 / 14:11:18 / cg" |
d26dc55ac7e4
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
274
diff
changeset
|
355 |
! |
d26dc55ac7e4
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
274
diff
changeset
|
356 |
|
321 | 357 |
isLayoutWrapper |
358 |
^ false |
|
359 |
||
360 |
"Created: 19.7.1996 / 17:50:59 / cg" |
|
361 |
! |
|
362 |
||
290
d26dc55ac7e4
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
274
diff
changeset
|
363 |
isWrapper |
d26dc55ac7e4
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
274
diff
changeset
|
364 |
^ false |
d26dc55ac7e4
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
274
diff
changeset
|
365 |
|
d26dc55ac7e4
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
274
diff
changeset
|
366 |
"Created: 5.6.1996 / 01:04:40 / cg" |
d26dc55ac7e4
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
274
diff
changeset
|
367 |
! |
d26dc55ac7e4
prepare for components & non-view as superView
Claus Gittinger <cg@exept.de>
parents:
274
diff
changeset
|
368 |
|
265 | 369 |
widthOn:aGC |
370 |
"return my width, if displayed on aGC; |
|
371 |
I assume that my width is independent of the device, and return |
|
372 |
the bounds width" |
|
373 |
||
374 |
^ self bounds width |
|
375 |
||
376 |
"Created: 13.5.1996 / 10:14:44 / cg" |
|
377 |
"Modified: 13.5.1996 / 10:15:17 / cg" |
|
378 |
! ! |
|
379 |
||
247 | 380 |
!VisualComponent methodsFor:'testing'! |
381 |
||
382 |
containsPoint:aPoint |
|
383 |
"return true, if the receiver contains aPoint" |
|
384 |
||
385 |
^ self bounds containsPoint:aPoint |
|
386 |
||
387 |
"Created: 9.5.1996 / 00:21:44 / cg" |
|
388 |
"Modified: 9.5.1996 / 00:22:00 / cg" |
|
389 |
! |
|
390 |
||
391 |
hasBorder |
|
392 |
"return true, if the receiver shows a border" |
|
393 |
||
394 |
^ false |
|
395 |
||
396 |
"Modified: 9.5.1996 / 00:21:29 / cg" |
|
397 |
! |
|
398 |
||
399 |
intersects:aRectangle |
|
400 |
"return true, if the receivers bounds intersects aRectangle" |
|
401 |
||
402 |
^ self bounds intersects:aRectangle |
|
403 |
||
404 |
"Created: 9.5.1996 / 00:21:18 / cg" |
|
405 |
"Modified: 9.5.1996 / 00:22:04 / cg" |
|
406 |
! ! |
|
407 |
||
365 | 408 |
!VisualComponent class methodsFor:'documentation'! |
245 | 409 |
|
410 |
version |
|
962
e6ccfc7fb22e
added more dummy methods to allow visualComponents to be
Claus Gittinger <cg@exept.de>
parents:
406
diff
changeset
|
411 |
^ '$Header: /cvs/stx/stx/libview2/Attic/VComponent.st,v 1.15 1998-06-18 14:56:22 cg Exp $' |
245 | 412 |
! ! |