equal
deleted
inserted
replaced
19 |
19 |
20 VerticalPanelView comment:' |
20 VerticalPanelView comment:' |
21 COPYRIGHT (c) 1989 by Claus Gittinger |
21 COPYRIGHT (c) 1989 by Claus Gittinger |
22 All Rights Reserved |
22 All Rights Reserved |
23 |
23 |
24 $Header: /cvs/stx/stx/libwidg/Attic/VPanelV.st,v 1.6 1994-11-17 14:38:46 claus Exp $ |
24 $Header: /cvs/stx/stx/libwidg/Attic/VPanelV.st,v 1.7 1994-11-21 16:45:46 claus Exp $ |
25 '! |
25 '! |
26 |
26 |
27 !VerticalPanelView class methodsFor:'documentation'! |
27 !VerticalPanelView class methodsFor:'documentation'! |
28 |
28 |
29 copyright |
29 copyright |
40 " |
40 " |
41 ! |
41 ! |
42 |
42 |
43 version |
43 version |
44 " |
44 " |
45 $Header: /cvs/stx/stx/libwidg/Attic/VPanelV.st,v 1.6 1994-11-17 14:38:46 claus Exp $ |
45 $Header: /cvs/stx/stx/libwidg/Attic/VPanelV.st,v 1.7 1994-11-21 16:45:46 claus Exp $ |
46 " |
46 " |
47 ! |
47 ! |
48 |
48 |
49 documentation |
49 documentation |
50 " |
50 " |
268 |
268 |
269 "compute net height needed" |
269 "compute net height needed" |
270 |
270 |
271 sumOfHeights := 0. |
271 sumOfHeights := 0. |
272 maxWidth := 0. |
272 maxWidth := 0. |
|
273 maxHeight := 0. |
273 |
274 |
274 subViews do:[:child | |
275 subViews do:[:child | |
275 |childsPreference| |
276 |childsPreference| |
276 |
277 |
277 childsPreference := child preferedExtent. |
278 childsPreference := child preferedExtent. |
285 ]. |
286 ]. |
286 borderWidth ~~ 0 ifTrue:[ |
287 borderWidth ~~ 0 ifTrue:[ |
287 sumOfHeights := sumOfHeights + (horizontalSpace * 2). |
288 sumOfHeights := sumOfHeights + (horizontalSpace * 2). |
288 maxWidth := maxWidth + (horizontalSpace * 2). |
289 maxWidth := maxWidth + (horizontalSpace * 2). |
289 ]. |
290 ]. |
290 sumOfHeights := sumOfHeights + ((subViews size - 1) * verticalSpace). |
291 vLayout == #fit ifTrue:[ |
291 |
292 sumOfHeights := maxHeight * subViews size. |
|
293 borderWidth ~~ 0 ifTrue:[ |
|
294 sumOfHeights := sumOfHeights + (verticalSpace * 2). |
|
295 ] |
|
296 ] ifFalse:[ |
|
297 sumOfHeights := sumOfHeights + ((subViews size - 1) * verticalSpace). |
|
298 ]. |
|
299 |
|
300 ((hLayout == #leftSpace) or:[hLayout == #rightSpace]) ifTrue:[ |
|
301 maxWidth := maxWidth + horizontalSpace |
|
302 ] ifFalse:[ |
|
303 ((hLayout == #fit) or:[hLayout == #center]) ifTrue:[ |
|
304 maxWidth := maxWidth + (horizontalSpace * 2) |
|
305 ] |
|
306 ]. |
292 ^ maxWidth @ sumOfHeights |
307 ^ maxWidth @ sumOfHeights |
293 ! ! |
308 ! ! |
294 |
309 |
295 !VerticalPanelView methodsFor:'layout'! |
310 !VerticalPanelView methodsFor:'layout'! |
296 |
311 |