equal
deleted
inserted
replaced
21 |
21 |
22 VerticalPanelView comment:' |
22 VerticalPanelView comment:' |
23 COPYRIGHT (c) 1989 by Claus Gittinger |
23 COPYRIGHT (c) 1989 by Claus Gittinger |
24 All Rights Reserved |
24 All Rights Reserved |
25 |
25 |
26 $Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.10 1995-05-12 18:25:18 claus Exp $ |
26 $Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.11 1995-06-06 04:15:38 claus Exp $ |
27 '! |
27 '! |
28 |
28 |
29 !VerticalPanelView class methodsFor:'documentation'! |
29 !VerticalPanelView class methodsFor:'documentation'! |
30 |
30 |
31 copyright |
31 copyright |
42 " |
42 " |
43 ! |
43 ! |
44 |
44 |
45 version |
45 version |
46 " |
46 " |
47 $Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.10 1995-05-12 18:25:18 claus Exp $ |
47 $Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.11 1995-06-06 04:15:38 claus Exp $ |
48 " |
48 " |
49 ! |
49 ! |
50 |
50 |
51 documentation |
51 documentation |
52 " |
52 " |
476 |
476 |
477 panel add:((CheckBox on:true asValue) label:'this is toggle number 1'; resize). |
477 panel add:((CheckBox on:true asValue) label:'this is toggle number 1'; resize). |
478 panel add:((CheckBox on:false asValue) label:'nr 2 '; resize). |
478 panel add:((CheckBox on:false asValue) label:'nr 2 '; resize). |
479 panel add:((CheckBox on:true asValue) label:'number 3 '; resize). |
479 panel add:((CheckBox on:true asValue) label:'number 3 '; resize). |
480 |
480 |
481 panel extent:(panel preferedExtent). |
481 panel extent:(panel preferredExtent). |
482 panel open |
482 panel open |
483 " |
483 " |
484 ! ! |
484 ! ! |
485 |
485 |
486 !VerticalPanelView methodsFor:'layout'! |
486 !VerticalPanelView methodsFor:'layout'! |
731 ! |
731 ! |
732 |
732 |
733 layout:aSymbol |
733 layout:aSymbol |
734 "leftover for historic reasons - do not use any more" |
734 "leftover for historic reasons - do not use any more" |
735 |
735 |
736 self verticalLayout:aSymbol |
736 self obsoleteMethodWarning:'use #verticalLayout:'. |
|
737 ^ self verticalLayout:aSymbol |
737 ! |
738 ! |
738 |
739 |
739 layout |
740 layout |
740 "leftover for historic reasons - do not use any more" |
741 "leftover for historic reasons - do not use any more" |
741 |
742 |
742 self verticalLayout |
743 self obsoleteMethodWarning:'use #verticalLayout'. |
|
744 ^ self verticalLayout |
743 ! ! |
745 ! ! |
744 |
746 |
745 !VerticalPanelView methodsFor:'queries'! |
747 !VerticalPanelView methodsFor:'queries'! |
746 |
748 |
747 preferedExtent |
749 preferredExtent |
748 "return a good extent, one that makes subviews fit" |
750 "return a good extent, one that makes subviews fit" |
749 |
751 |
750 |sumOfHeights maxWidth maxHeight| |
752 |sumOfHeights maxWidth maxHeight| |
751 |
753 |
752 subViews isNil ifTrue:[^ horizontalSpace @ verticalSpace]. |
754 subViews isNil ifTrue:[^ horizontalSpace @ verticalSpace]. |
758 maxHeight := 0. |
760 maxHeight := 0. |
759 |
761 |
760 subViews do:[:child | |
762 subViews do:[:child | |
761 |childsPreference| |
763 |childsPreference| |
762 |
764 |
763 childsPreference := child preferedExtent. |
765 childsPreference := child preferredExtent. |
764 sumOfHeights := sumOfHeights + childsPreference y. |
766 sumOfHeights := sumOfHeights + childsPreference y. |
765 maxHeight := maxHeight max:childsPreference y. |
767 maxHeight := maxHeight max:childsPreference y. |
766 maxWidth := maxWidth max:childsPreference x. |
768 maxWidth := maxWidth max:childsPreference x. |
767 |
769 |
768 "/ sumOfHeights := sumOfHeights + child heightIncludingBorder. |
770 "/ sumOfHeights := sumOfHeights + child heightIncludingBorder. |