equal
deleted
inserted
replaced
132 ! ! |
132 ! ! |
133 |
133 |
134 !VisualPart methodsFor:'accessing-dimensions'! |
134 !VisualPart methodsFor:'accessing-dimensions'! |
135 |
135 |
136 bounds:newBounds |
136 bounds:newBounds |
137 frame notNil ifTrue:[ |
137 self assert:(newBounds left isInteger). |
138 container invalidate:frame. |
138 self assert:(newBounds width isInteger). |
139 ]. |
139 self assert:(newBounds top isInteger). |
|
140 self assert:(newBounds height isInteger). |
|
141 |
140 frame := newBounds. |
142 frame := newBounds. |
141 container invalidate:frame. |
143 |
142 ! ! |
144 ! ! |
143 |
145 |
144 !VisualPart methodsFor:'view protocol mimicri'! |
146 !VisualPart methodsFor:'view protocol mimicri'! |
145 |
147 |
146 bottomInset |
148 bottomInset |
147 ^ 0 |
149 ^ 0 |
|
150 ! |
|
151 |
|
152 computeBoundingBox |
|
153 layout notNil ifTrue:[ |
|
154 container notNil ifTrue:[ |
|
155 self bounds:(layout |
|
156 rectangleRelativeTo:(0@0 extent:container extent "container bounds") |
|
157 preferred:self preferredBounds). |
|
158 ] |
|
159 ] ifFalse:[ |
|
160 self error. |
|
161 ]. |
|
162 |
|
163 ^ frame |
148 ! |
164 ! |
149 |
165 |
150 computeCorner |
166 computeCorner |
151 ^ self corner |
167 ^ self corner |
152 ! |
168 ! |
193 destroy |
209 destroy |
194 |c| |
210 |c| |
195 |
211 |
196 (c := container) notNil ifTrue:[ |
212 (c := container) notNil ifTrue:[ |
197 container := nil. |
213 container := nil. |
198 c invalidate:self bounds. |
214 frame notNil ifTrue:[ c invalidate:frame ]. |
199 c removeComponent:self. |
215 c removeComponent:self. |
200 ]. |
216 ]. |
201 ! |
217 ! |
202 |
218 |
203 device |
219 device |
211 geometryLayout |
227 geometryLayout |
212 ^ layout |
228 ^ layout |
213 ! |
229 ! |
214 |
230 |
215 geometryLayout:newLayoutOrNil |
231 geometryLayout:newLayoutOrNil |
|
232 container notNil ifTrue:[ |
|
233 frame notNil ifTrue:[ |
|
234 container invalidate:(frame insetBy:-2). |
|
235 ] |
|
236 ]. |
|
237 |
216 frame := nil. |
238 frame := nil. |
217 layout := newLayoutOrNil. |
239 layout := newLayoutOrNil. |
|
240 |
|
241 container notNil ifTrue:[ |
|
242 self computeBoundingBox. |
|
243 frame notNil ifTrue:[ |
|
244 container invalidate:(frame insetBy:-2). |
|
245 ] |
|
246 ]. |
218 ! |
247 ! |
219 |
248 |
220 invalidate |
249 invalidate |
221 container notNil ifTrue:[ |
250 container notNil ifTrue:[ |
222 container invalidate:self bounds |
251 container invalidate:self bounds |
347 ! ! |
376 ! ! |
348 |
377 |
349 !VisualPart class methodsFor:'documentation'! |
378 !VisualPart class methodsFor:'documentation'! |
350 |
379 |
351 version |
380 version |
352 ^ '$Header: /cvs/stx/stx/libview2/VisualPart.st,v 1.17 2009-05-10 12:32:26 cg Exp $' |
381 ^ '$Header: /cvs/stx/stx/libview2/VisualPart.st,v 1.18 2009-05-10 14:08:28 cg Exp $' |
353 ! ! |
382 ! ! |