author | Claus Gittinger <cg@exept.de> |
Wed, 08 Nov 2000 10:17:08 +0100 | |
changeset 2305 | f2850e54b0ab |
parent 2033 | fc16e79f649b |
child 2370 | d118a160afbe |
permissions | -rw-r--r-- |
0 | 1 |
" |
5 | 2 |
COPYRIGHT (c) 1989 by Claus Gittinger |
59 | 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 |
||
2305
f2850e54b0ab
only access originChanged, extentChanged and cornerChanged
Claus Gittinger <cg@exept.de>
parents:
2033
diff
changeset
|
13 |
"{ Package: 'stx:libwidg' }" |
f2850e54b0ab
only access originChanged, extentChanged and cornerChanged
Claus Gittinger <cg@exept.de>
parents:
2033
diff
changeset
|
14 |
|
0 | 15 |
PanelView subclass:#VerticalPanelView |
321
00c17944cb00
preferredExtent computation used hSpace instead of vSpace
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
16 |
instanceVariableNames:'' |
00c17944cb00
preferredExtent computation used hSpace instead of vSpace
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
17 |
classVariableNames:'' |
00c17944cb00
preferredExtent computation used hSpace instead of vSpace
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
18 |
poolDictionaries:'' |
00c17944cb00
preferredExtent computation used hSpace instead of vSpace
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
19 |
category:'Views-Layout' |
0 | 20 |
! |
21 |
||
980
6079922a5519
eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
22 |
!VerticalPanelView class methodsFor:'documentation'! |
38 | 23 |
|
24 |
copyright |
|
25 |
" |
|
26 |
COPYRIGHT (c) 1989 by Claus Gittinger |
|
59 | 27 |
All Rights Reserved |
38 | 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 |
documentation |
|
39 |
" |
|
40 |
a View which arranges its child-views in a vertical column. |
|
63 | 41 |
All real work is done in PanelView - except the layout computation is |
38 | 42 |
redefined here. |
43 |
||
127 | 44 |
The layout is controlled by the instance variables: |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
45 |
horizontalLayout and verticalLayout |
127 | 46 |
in addition to |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
47 |
horizontalSpace and verticalSpace. |
77 | 48 |
|
63 | 49 |
The vertical layout can be any of: |
50 |
||
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
51 |
#top arrange elements at the top |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
52 |
#topSpace arrange elements at the top, start with spacing |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
53 |
#bottom arrange elements at the bottom |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
54 |
#bottomSpace arrange elements at the bottom, start with spacing |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
55 |
#center arrange elements in the center; ignore verticalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
56 |
#spread spread elements evenly; ignore verticalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
57 |
#spreadSpace spread elements evenly with spacing at ends; ignore verticalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
58 |
#fit like #spread, but resize elements for tight packing; ignore verticalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
59 |
#fitSpace like #fit, with spacing; ignore verticalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
60 |
#topFit like #top, but resize the last element to fit |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
61 |
#topSpaceFit like #topSpace, but resize the last element to fit |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
62 |
#bottomFit like #bottom, but resize the first element to fit |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
63 |
#bottomSpaceFit like #bottomSpace, but resize the first element to fit |
63 | 64 |
|
65 |
the horizontal layout can be: |
|
66 |
||
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
67 |
#left place element at the left |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
68 |
#leftSpace place element at the left, offset by horizontalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
69 |
#center place elements horizontally centered; ignore horizontalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
70 |
#right place it at the right |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
71 |
#rightSpace place it at the right, offset by horizontalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
72 |
#fit resize elements horizontally to fit this panel; ignore horizontalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
73 |
#fitSpace like #fit, but add spacing; ignore horizontalSpace |
127 | 74 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
75 |
#leftMax like #left, but resize elements to max of them |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
76 |
#leftSpaceMax like #leftSpace, but resize elements |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
77 |
#centerMax like #center, but resize elements |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
78 |
#rightMax like #right, but resize elements to max of them |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
79 |
#rightSpaceMax like #rightSpace, but resize elements |
63 | 80 |
|
77 | 81 |
The defaults is #center for both directions. |
127 | 82 |
|
63 | 83 |
The layout is changed by the messages #verticalLayout: and #horizontalLayout:. |
84 |
For backward compatibility (to times, where only vLayout existed), the simple |
|
85 |
#layout: does the same as #verticalLayout:. Do not use this old method. |
|
77 | 86 |
|
127 | 87 |
The panel assumes, that the elements do not resize themselfes, after it |
88 |
became visible. This is not true for all widgets (buttons or labels may |
|
89 |
like to change). If you have changing elements, tell this to the panel |
|
90 |
with 'aPanel elementsChangeSize:true'. In that case, the panel will react |
|
91 |
to size changes, and reorganize things. |
|
92 |
||
77 | 93 |
If none of these layout/space combinations is exactly what you need in |
94 |
your application, create a subclass, and redefine the setChildPositions method. |
|
127 | 95 |
|
96 |
CAVEAT: this class started with #top and no horizontal alignments; |
|
97 |
as time went by, more layouts were added and the setup should be changed |
|
98 |
to use different selectors for space, max-resize and alignment |
|
99 |
(i.e. having more and more layout symbols makes things a bit confusing ...) |
|
585 | 100 |
|
101 |
[see also:] |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
102 |
HorizontalPanelView |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
103 |
VariableVerticalPanel VariableHorizontalPanel |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
104 |
Label |
585 | 105 |
|
106 |
[author:] |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
107 |
Claus Gittinger |
63 | 108 |
" |
109 |
! |
|
110 |
||
111 |
examples |
|
112 |
" |
|
77 | 113 |
These examples demonstrate the effect of different layout |
114 |
settings. |
|
115 |
You should try more examples, combining spacing and different |
|
116 |
verticalLayout:/horizontalLayout: combinations. |
|
117 |
||
118 |
||
38 | 119 |
example: default layout (centered) |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
120 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
121 |
|v p b1 b2 b3| |
127 | 122 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
123 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
124 |
v label:'center (default)'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
125 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
126 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
127 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
128 |
b2 := Button label:'b2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
129 |
b3 := Button label:'butt3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
130 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
131 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
132 |
[exEnd] |
127 | 133 |
|
134 |
||
135 |
example: horizontal centerMax |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
136 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
137 |
|v p b1 b2 b3| |
127 | 138 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
139 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
140 |
v label:'hL=centerMax'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
141 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
142 |
p horizontalLayout:#centerMax. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
143 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
144 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
145 |
b2 := Button label:'b2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
146 |
b3 := Button label:'butt3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
147 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
148 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
149 |
[exEnd] |
127 | 150 |
|
151 |
||
152 |
example: horizontal leftMax |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
153 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
154 |
|v p b1 b2 b3| |
127 | 155 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
156 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
157 |
v label:'hL=leftMax'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
158 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
159 |
p horizontalLayout:#leftMax. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
160 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
161 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
162 |
b2 := Button label:'b2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
163 |
b3 := Button label:'butt3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
164 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
165 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
166 |
[exEnd] |
38 | 167 |
|
127 | 168 |
example: horizontal leftSpaceMax |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
169 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
170 |
|v p b1 b2 b3| |
127 | 171 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
172 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
173 |
v label:'hL=leftMax'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
174 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
175 |
p horizontalLayout:#leftSpaceMax. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
176 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
177 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
178 |
b2 := Button label:'b2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
179 |
b3 := Button label:'butt3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
180 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
181 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
182 |
[exEnd] |
127 | 183 |
|
184 |
example: horizontal rightMax |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
185 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
186 |
|v p b1 b2 b3| |
127 | 187 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
188 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
189 |
v label:'hL=rightMax'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
190 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
191 |
p horizontalLayout:#rightMax. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
192 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
193 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
194 |
b2 := Button label:'b2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
195 |
b3 := Button label:'butt3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
196 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
197 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
198 |
[exEnd] |
127 | 199 |
|
200 |
example: horizontal rightSpaceMax |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
201 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
202 |
|v p b1 b2 b3| |
127 | 203 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
204 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
205 |
v label:'hL=rightMaxSpace'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
206 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
207 |
p horizontalLayout:#rightSpaceMax. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
208 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
209 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
210 |
b2 := Button label:'b2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
211 |
b3 := Button label:'butt3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
212 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
213 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
214 |
[exEnd] |
0 | 215 |
|
63 | 216 |
example: top-layout |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
217 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
218 |
|v p b1 b2 b3| |
127 | 219 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
220 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
221 |
v label:'vL=top; hL=center (default)'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
222 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
223 |
p verticalLayout:#top. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
224 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
225 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
226 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
227 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
228 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
229 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
230 |
[exEnd] |
38 | 231 |
|
127 | 232 |
example: topSpace-layout |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
233 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
234 |
|v p b1 b2 b3| |
127 | 235 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
236 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
237 |
v label:'vL=topSpace; hL=center (default)'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
238 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
239 |
p verticalLayout:#topSpace. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
240 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
241 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
242 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
243 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
244 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
245 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
246 |
[exEnd] |
38 | 247 |
|
77 | 248 |
example: top-layout; horizontal fit |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
249 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
250 |
|v p b1 b2 b3| |
77 | 251 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
252 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
253 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
254 |
v label:'vL=top; hL=fit'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
255 |
p verticalLayout:#top. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
256 |
p horizontalLayout:#fit. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
257 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
258 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
259 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
260 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
261 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
262 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
263 |
[exEnd] |
77 | 264 |
|
265 |
example: top-layout; horizontal fit with space |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
266 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
267 |
|v p b1 b2 b3| |
77 | 268 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
269 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
270 |
v label:'vL=top; hL=fitSpace'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
271 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
272 |
p verticalLayout:#top. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
273 |
p horizontalLayout:#fitSpace. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
274 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
275 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
276 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
277 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
278 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
279 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
280 |
[exEnd] |
77 | 281 |
|
127 | 282 |
example: topSpace-layout; horizontal fit with space |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
283 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
284 |
|v p b1 b2 b3| |
77 | 285 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
286 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
287 |
v label:'vL=topSpace; hL=fitSpace'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
288 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
289 |
p verticalLayout:#topSpace. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
290 |
p horizontalLayout:#fitSpace. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
291 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
292 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
293 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
294 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
295 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
296 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
297 |
[exEnd] |
77 | 298 |
|
63 | 299 |
example: bottom-layout |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
300 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
301 |
|v p b1 b2 b3| |
0 | 302 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
303 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
304 |
v label:'vL=bottom; hL=center (default)'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
305 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
306 |
p verticalLayout:#bottom. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
307 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
308 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
309 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
310 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
311 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
312 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
313 |
[exEnd] |
38 | 314 |
|
77 | 315 |
example: bottomSpace-layout |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
316 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
317 |
|v p b1 b2 b3| |
77 | 318 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
319 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
320 |
v label:'vL=bottomSpace; hL=center (default)'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
321 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
322 |
p verticalLayout:#bottomSpace. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
323 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
324 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
325 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
326 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
327 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
328 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
329 |
[exEnd] |
77 | 330 |
|
133 | 331 |
example: topFit-layout |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
332 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
333 |
|v p b1 b2 b3| |
133 | 334 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
335 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
336 |
v label:'vL=topFit; hL=center (default)'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
337 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
338 |
p verticalLayout:#topFit. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
339 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
340 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
341 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
342 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
343 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
344 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
345 |
[exEnd] |
133 | 346 |
|
347 |
example: topSpaceFit-layout; combined with horizontal #fitSpace |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
348 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
349 |
|v p b1 b2 b3| |
133 | 350 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
351 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
352 |
v label:'vL=topFit; hL=center (default)'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
353 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
354 |
p verticalLayout:#topSpaceFit. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
355 |
p horizontalLayout:#fitSpace. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
356 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
357 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
358 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
359 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
360 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
361 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
362 |
[exEnd] |
133 | 363 |
|
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
364 |
example: bottomFit-layout (arrange at bottom; resize first to fit) |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
365 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
366 |
|v p b1 b2 b3| |
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
367 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
368 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
369 |
v label:'vL=bottomFit; hL=center (default)'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
370 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
371 |
p verticalLayout:#bottomFit. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
372 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
373 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
374 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
375 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
376 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
377 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
378 |
[exEnd] |
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
379 |
|
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
380 |
example: bottomSpaceFit-layout (arrange at bottom; resize first to fit; with spacing |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
381 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
382 |
|v p b1 b2 b3| |
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
383 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
384 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
385 |
v label:'vL=bottomSpaceFit; hL=center (default)'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
386 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
387 |
p verticalLayout:#bottomSpaceFit. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
388 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
389 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
390 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
391 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
392 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
393 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
394 |
[exEnd] |
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
395 |
|
38 | 396 |
example: spread-layout |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
397 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
398 |
|v p b1 b2 b3| |
38 | 399 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
400 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
401 |
v label:'vL=spread; hL=center (default)'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
402 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
403 |
p verticalLayout:#spread. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
404 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
405 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
406 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
407 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
408 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
409 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
410 |
[exEnd] |
77 | 411 |
|
412 |
example: spreadSpace-layout |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
413 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
414 |
|v p b1 b2 b3| |
77 | 415 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
416 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
417 |
v label:'vL=spreadSpace; hL=center (default)'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
418 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
419 |
p verticalLayout:#spreadSpace. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
420 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
421 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
422 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
423 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
424 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
425 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
426 |
[exEnd] |
77 | 427 |
|
428 |
example: fit-layout |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
429 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
430 |
|v p b1 b2 b3| |
77 | 431 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
432 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
433 |
v label:'vL=fit; hL=center (default)'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
434 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
435 |
p verticalLayout:#fit. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
436 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
437 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
438 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
439 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
440 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
441 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
442 |
[exEnd] |
77 | 443 |
|
444 |
example: fitSpace-layout |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
445 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
446 |
|v p b1 b2 b3| |
77 | 447 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
448 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
449 |
v label:'vL=fitSpace; hL=center (default)'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
450 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
451 |
p verticalLayout:#fitSpace. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
452 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
453 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
454 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
455 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
456 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
457 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
458 |
[exEnd] |
77 | 459 |
|
460 |
example: fully fitSpace |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
461 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
462 |
|v p b1 b2 b3| |
77 | 463 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
464 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
465 |
v label:'vL=fitSpace; hL=fitSpace'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
466 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
467 |
p verticalLayout:#fitSpace. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
468 |
p horizontalLayout:#fitSpace. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
469 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
470 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
471 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
472 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
473 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
474 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
475 |
[exEnd] |
77 | 476 |
|
131 | 477 |
example: combine fully fitSpace with scaling button labels |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
478 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
479 |
|v p b1 b2 b3| |
131 | 480 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
481 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
482 |
v label:'vL=fitSpace; hL=fitSpace'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
483 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
484 |
p verticalLayout:#fitSpace. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
485 |
p horizontalLayout:#fitSpace. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
486 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
487 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
488 |
b1 adjust:#fit. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
489 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
490 |
b2 adjust:#fit. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
491 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
492 |
b3 adjust:#fit. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
493 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
494 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
495 |
[exEnd] |
131 | 496 |
|
63 | 497 |
example: from top, each at left: |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
498 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
499 |
|v p b1 b2 b3| |
63 | 500 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
501 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
502 |
v label:'vL=top; hL=left'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
503 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
504 |
p verticalLayout:#top. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
505 |
p horizontalLayout:#left. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
506 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
507 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
508 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
509 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
510 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
511 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
512 |
[exEnd] |
77 | 513 |
|
127 | 514 |
example: center, right: |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
515 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
516 |
|v p b1 b2 b3| |
63 | 517 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
518 |
v := StandardSystemView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
519 |
v label:'vL=center; hL=right'. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
520 |
p := VerticalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
521 |
p verticalLayout:#center. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
522 |
p horizontalLayout:#right. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
523 |
p origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
524 |
b1 := Button label:'button1' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
525 |
b2 := Button label:'butt2' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
526 |
b3 := Button label:'button3' in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
527 |
v extent:100 @ 300. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
528 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
529 |
[exEnd] |
77 | 530 |
|
531 |
example: a panel in a panel |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
532 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
533 |
|v hp p b1 b2 b3| |
77 | 534 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
535 |
v := StandardSystemView new. |
63 | 536 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
537 |
hp := HorizontalPanelView in:v. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
538 |
hp verticalLayout:#fit. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
539 |
hp horizontalLayout:#fitSpace. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
540 |
hp origin:(0.0 @ 0.0) corner:(1.0 @ 1.0). |
63 | 541 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
542 |
1 to:3 do:[:i | |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
543 |
p := VerticalPanelView in:hp. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
544 |
p borderWidth:0. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
545 |
p verticalLayout:#fitSpace. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
546 |
p horizontalLayout:#fit. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
547 |
b1 := Button label:('button1-' , i printString) in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
548 |
b2 := Button label:('butt2-' , i printString) in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
549 |
b3 := Button label:('button3-' , i printString) in:p. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
550 |
]. |
63 | 551 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
552 |
v extent:300 @ 100. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
553 |
v open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
554 |
[exEnd] |
0 | 555 |
|
125 | 556 |
example: checkToggles in a panel |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
557 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
558 |
|panel| |
63 | 559 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
560 |
panel := VerticalPanelView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
561 |
panel horizontalLayout:#left. |
63 | 562 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
563 |
panel add:((CheckBox on:true asValue) label:'this is toggle number 1'; resize). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
564 |
panel add:((CheckBox on:false asValue) label:'nr 2 '; resize). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
565 |
panel add:((CheckBox on:true asValue) label:'number 3 '; resize). |
0 | 566 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
567 |
panel extent:(panel preferredExtent). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
568 |
panel open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
569 |
[exEnd] |
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
570 |
example: the topFit & bottomFit layouts are great to combine |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
571 |
labels or enterFields with a selectionInList or textView: |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
572 |
[exBegin] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
573 |
|panel| |
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
574 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
575 |
panel := VerticalPanelView new. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
576 |
panel horizontalLayout:#fit. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
577 |
panel verticalLayout:#topFit. |
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
578 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
579 |
panel add:(Label new label:'this is label number 1'; font:(Font family:'courier' size:16)). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
580 |
panel add:(EditField new). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
581 |
panel add:(Label new label:'this is label number 1'). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
582 |
panel add:(ScrollableView for:SelectionInListView). |
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
583 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
584 |
panel extent:(panel preferredExtent). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
585 |
panel open |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
586 |
[exEnd] |
125 | 587 |
" |
202 | 588 |
! ! |
589 |
||
590 |
!VerticalPanelView methodsFor:'accessing'! |
|
591 |
||
592 |
horizontalLayout |
|
593 |
"return the horizontal layout as symbol. |
|
594 |
the returned value is one of |
|
595 |
#left place element at the left |
|
596 |
#leftSpace place element at the left, offset by horizontalSpace |
|
597 |
#center place elements horizontally centered; ignore horizontalSpace |
|
598 |
#right place it at the right |
|
599 |
#rightSpace place it at the right, offset by horizontalSpace |
|
600 |
#fit resize elements horizontally to fit this panel; ignore horizontalSpace |
|
601 |
#fitSpace like #fit, but add spacing; ignore horizontalSpace |
|
602 |
||
603 |
#leftMax like #left, but resize elements to max of them |
|
604 |
#leftSpaceMax like #leftSpace, but resize elements |
|
605 |
#centerMax like #center, but resize elements |
|
606 |
#rightMax like #right, but resize elements to max of them |
|
607 |
#rightSpaceMax like #rightSpace, but resize elements |
|
608 |
the default is #centered |
|
609 |
" |
|
610 |
||
611 |
^ hLayout |
|
612 |
! |
|
613 |
||
614 |
horizontalLayout:aSymbol |
|
615 |
"change the horizontal layout as symbol. |
|
616 |
The argument, aSymbol must be one of: |
|
617 |
#left place element at the left |
|
618 |
#leftSpace place element at the left, offset by horizontalSpace |
|
619 |
#center place elements horizontally centered; ignore horizontalSpace |
|
620 |
#right place it at the right |
|
621 |
#rightSpace place it at the right, offset by horizontalSpace |
|
622 |
#fit resize elements horizontally to fit this panel; ignore horizontalSpace |
|
623 |
#fitSpace like #fit, but add spacing; ignore horizontalSpace |
|
624 |
||
625 |
#leftMax like #left, but resize elements to max of them |
|
626 |
#leftSpaceMax like #leftSpace, but resize elements |
|
627 |
#centerMax like #center, but resize elements |
|
628 |
#rightMax like #right, but resize elements to max of them |
|
629 |
#rightSpaceMax like #rightSpace, but resize elements |
|
630 |
the default (if never changed) is #centered |
|
631 |
" |
|
632 |
||
633 |
(hLayout ~~ aSymbol) ifTrue:[ |
|
634 |
hLayout := aSymbol. |
|
635 |
self layoutChanged |
|
636 |
] |
|
637 |
! |
|
638 |
||
639 |
layout:something |
|
640 |
"OBSOLETE compatibility interface. Will vanish. |
|
641 |
leftover for historic reasons - do not use any more. |
|
642 |
In the meantime, try to figure out what is meant ... a kludge" |
|
643 |
||
644 |
something isLayout ifTrue:[^ super layout:something]. |
|
645 |
||
646 |
self obsoleteMethodWarning:'use #verticalLayout:'. |
|
647 |
^ self verticalLayout:something |
|
648 |
||
649 |
"Modified: 31.8.1995 / 23:08:54 / claus" |
|
650 |
! |
|
651 |
||
652 |
verticalLayout |
|
653 |
"return the vertical layout as a symbol. |
|
654 |
the returned value is one of |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
655 |
#top arrange elements at the top |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
656 |
#topSpace arrange elements at the top, start with spacing |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
657 |
#bottom arrange elements at the bottom |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
658 |
#bottomSpace arrange elements at the bottom, start with spacing |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
659 |
#center arrange elements in the center; ignore verticalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
660 |
#spread spread elements evenly; ignore verticalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
661 |
#spreadSpace spread elements evenly with spacing at ends; ignore verticalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
662 |
#fit like #spread, but resize elements for tight packing; ignore verticalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
663 |
#fitSpace like #fit, with spacing; ignore verticalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
664 |
#topFit like #top, but resize the last element to fit |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
665 |
#topSpaceFit like #topSpace, but resize the last element to fit |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
666 |
#bottomFit like #bottom, but resize the first element to fit |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
667 |
#bottomSpaceFit like #bottomSpace, but extend the first element to fit |
202 | 668 |
the default is #centered |
669 |
" |
|
670 |
||
671 |
^ vLayout |
|
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
672 |
|
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
673 |
"Modified: 17.8.1997 / 15:20:13 / cg" |
202 | 674 |
! |
675 |
||
676 |
verticalLayout:aSymbol |
|
677 |
"change the vertical layout as a symbol. |
|
678 |
The argument, aSymbol must be one of: |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
679 |
#top arrange elements at the top |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
680 |
#topSpace arrange elements at the top, start with spacing |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
681 |
#bottom arrange elements at the bottom |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
682 |
#bottomSpace arrange elements at the bottom, start with spacing |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
683 |
#center arrange elements in the center; ignore verticalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
684 |
#spread spread elements evenly; ignore verticalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
685 |
#spreadSpace spread elements evenly with spacing at ends; ignore verticalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
686 |
#fit like #spread, but resize elements for tight packing; ignore verticalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
687 |
#fitSpace like #fit, with spacing; ignore verticalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
688 |
#topFit like #top, but resize the last element to fit |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
689 |
#topSpaceFit like #topSpace, but resize the last element to fit |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
690 |
#bottomFit like #bottom, but resize the first element to fit |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
691 |
#bottomSpaceFit like #bottomSpace, but extend the first element to fit |
202 | 692 |
the default (if never changed) is #centered |
693 |
" |
|
694 |
||
695 |
(vLayout ~~ aSymbol) ifTrue:[ |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
696 |
vLayout := aSymbol. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
697 |
self layoutChanged |
202 | 698 |
] |
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
699 |
|
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
700 |
"Modified: 17.8.1997 / 15:19:58 / cg" |
0 | 701 |
! ! |
702 |
||
703 |
!VerticalPanelView methodsFor:'layout'! |
|
704 |
||
705 |
setChildPositions |
|
706 |
"(re)compute position of every child" |
|
707 |
||
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
708 |
|ypos space sumOfHeights numChilds l hEach hInside hL vL |
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
709 |
maxWidth maxHeight resizeToMaxV resizeToMaxH m2 subViews ext restHeight| |
0 | 710 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
711 |
subViews := self subViewsToConsider. |
1042 | 712 |
subViews size == 0 ifTrue:[^ self]. |
713 |
||
2305
f2850e54b0ab
only access originChanged, extentChanged and cornerChanged
Claus Gittinger <cg@exept.de>
parents:
2033
diff
changeset
|
714 |
self extentChangedFlag ifTrue:[ |
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
715 |
ext := self computeExtent. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
716 |
width := ext x. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
717 |
height := ext y. |
1042 | 718 |
]. |
0 | 719 |
|
720 |
space := verticalSpace. |
|
63 | 721 |
numChilds := subViews size. |
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
722 |
|
380
6eb402d01ae0
looks better if panels level is ~~ 0 AND subview has 0 level
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
723 |
m2 := margin * 2. |
6eb402d01ae0
looks better if panels level is ~~ 0 AND subview has 0 level
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
724 |
hInside := height - m2 + (borderWidth*2) - subViews last borderWidth. |
0 | 725 |
|
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
726 |
hL := hLayout. |
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
727 |
vL := vLayout. |
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
728 |
|
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
729 |
resizeToMaxV := false. |
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
730 |
(vL endsWith:'Max') ifTrue:[ |
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
731 |
resizeToMaxV := true. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
732 |
hEach := maxHeight := subViews inject:0 into:[:maxSoFar :child | maxSoFar max:child heightIncludingBorder]. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
733 |
vL := (vL copyWithoutLast:3) asSymbol. |
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
734 |
]. |
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
735 |
|
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
736 |
numChilds == 1 ifTrue:[ |
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
737 |
(vL == #topFit or:[vL == #bottomFit]) ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
738 |
vL := #fit |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
739 |
]. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
740 |
(vL == #topSpaceFit or:[vL == #bottomSpaceFit]) ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
741 |
vL := #fitSpace |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
742 |
]. |
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
743 |
]. |
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
744 |
|
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
745 |
vL == #fitSpace ifTrue:[ |
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
746 |
" |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
747 |
adjust childs extents and set origins. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
748 |
Be careful to avoid accumulation of rounding errors |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
749 |
" |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
750 |
hEach := (hInside - (numChilds + 1 * space)) / numChilds. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
751 |
ypos := space + margin - borderWidth. |
63 | 752 |
] ifFalse:[ |
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
753 |
vL == #fit ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
754 |
" |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
755 |
adjust childs extents and set origins. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
756 |
Be careful to avoid accumulation of rounding errors |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
757 |
" |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
758 |
hEach := (hInside - (numChilds - 1 * space)) / numChilds. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
759 |
ypos := margin - borderWidth. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
760 |
] ifFalse:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
761 |
l := vL. |
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
762 |
|
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
763 |
" |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
764 |
compute net height needed |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
765 |
" |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
766 |
resizeToMaxV ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
767 |
sumOfHeights := subViews inject:0 into:[:sumSoFar :child | sumSoFar + maxHeight + (child borderWidth*2)]. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
768 |
] ifFalse:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
769 |
sumOfHeights := subViews inject:0 into:[:sumSoFar :child | sumSoFar + child heightIncludingBorder]. |
2031
6f28b9951713
oops - bug in setChildPositions leading to recursion
Claus Gittinger <cg@exept.de>
parents:
1431
diff
changeset
|
770 |
|
6f28b9951713
oops - bug in setChildPositions leading to recursion
Claus Gittinger <cg@exept.de>
parents:
1431
diff
changeset
|
771 |
"/ adjust - do not include height of last(first) element if doing a fit |
6f28b9951713
oops - bug in setChildPositions leading to recursion
Claus Gittinger <cg@exept.de>
parents:
1431
diff
changeset
|
772 |
(vL == #topFit or:[vL == #topSpaceFit]) ifTrue:[ |
6f28b9951713
oops - bug in setChildPositions leading to recursion
Claus Gittinger <cg@exept.de>
parents:
1431
diff
changeset
|
773 |
sumOfHeights := sumOfHeights - subViews last heightIncludingBorder. |
6f28b9951713
oops - bug in setChildPositions leading to recursion
Claus Gittinger <cg@exept.de>
parents:
1431
diff
changeset
|
774 |
] ifFalse:[ |
6f28b9951713
oops - bug in setChildPositions leading to recursion
Claus Gittinger <cg@exept.de>
parents:
1431
diff
changeset
|
775 |
(vL == #bottomFit or:[vL == #bottomSpaceFit]) ifTrue:[ |
6f28b9951713
oops - bug in setChildPositions leading to recursion
Claus Gittinger <cg@exept.de>
parents:
1431
diff
changeset
|
776 |
sumOfHeights := sumOfHeights - subViews first heightIncludingBorder. |
6f28b9951713
oops - bug in setChildPositions leading to recursion
Claus Gittinger <cg@exept.de>
parents:
1431
diff
changeset
|
777 |
] |
6f28b9951713
oops - bug in setChildPositions leading to recursion
Claus Gittinger <cg@exept.de>
parents:
1431
diff
changeset
|
778 |
]. |
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
779 |
]. |
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
780 |
|
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
781 |
restHeight := height - sumOfHeights. |
77 | 782 |
|
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
783 |
((l == #center) and:[numChilds == 1]) ifTrue:[l := #spread]. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
784 |
(l == #spread and:[numChilds == 1]) ifTrue:[l := #spreadSpace]. |
59 | 785 |
|
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
786 |
" |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
787 |
compute position of topmost subview and space between them; |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
788 |
if they do hardly fit, leave no space between them |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
789 |
" |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
790 |
((sumOfHeights >= (height - m2)) |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
791 |
and:[l ~~ #fixTopSpace and:[l ~~ #fixTop]]) ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
792 |
" |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
793 |
if we have not enough space for all the elements, |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
794 |
fill them tight, and show what can be shown (at least) |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
795 |
" |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
796 |
ypos := margin. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
797 |
space := 0 |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
798 |
] ifFalse:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
799 |
l == #fixTopSpace ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
800 |
l := #topSpace |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
801 |
] ifFalse:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
802 |
l == #fixTop ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
803 |
l := #top |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
804 |
] |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
805 |
]. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
806 |
((l == #bottom) or:[l == #bottomSpace |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
807 |
or:[l == #bottomFit or:[l == #bottomSpaceFit]]]) ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
808 |
ypos := restHeight - (space * (numChilds - 1)). |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
809 |
"/ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
810 |
"/ borderWidth == 0 ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
811 |
"/ ypos := ypos + space |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
812 |
"/ ]. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
813 |
"/ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
814 |
(l == #bottomSpace |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
815 |
or:[l == #bottomSpaceFit]) ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
816 |
ypos >= space ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
817 |
ypos := ypos - space |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
818 |
] |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
819 |
]. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
820 |
ypos := ypos - margin. |
77 | 821 |
|
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
822 |
ypos < 0 ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
823 |
space := space min:(restHeight // (numChilds + 1)). |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
824 |
ypos := restHeight - (space * numChilds). |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
825 |
] |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
826 |
] ifFalse: [ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
827 |
(l == #spread) ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
828 |
space := (restHeight - m2) // (numChilds - 1). |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
829 |
ypos := margin. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
830 |
(space == 0) ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
831 |
ypos := restHeight // 2 |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
832 |
] |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
833 |
] ifFalse: [ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
834 |
(l == #spreadSpace) ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
835 |
space := (restHeight - m2) // (numChilds + 1). |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
836 |
ypos := space + margin. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
837 |
(space == 0) ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
838 |
ypos := restHeight // 2 |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
839 |
] |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
840 |
] ifFalse: [ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
841 |
((l == #top) or:[l == #topSpace |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
842 |
or:[l == #topFit or:[l == #topSpaceFit]]]) ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
843 |
space := space min:(restHeight - m2) // (numChilds + 1). |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
844 |
(vL == #fixTop or:[vL == #fixTopSpace]) ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
845 |
space := space max:verticalSpace. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
846 |
] ifFalse:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
847 |
space := space max:0. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
848 |
]. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
849 |
(l == #topSpace or:[l == #topSpaceFit]) ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
850 |
ypos := space + margin. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
851 |
] ifFalse:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
852 |
"/ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
853 |
"/ if the very first view has a 0-level AND |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
854 |
"/ my level is non-zero, begin with margin |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
855 |
"/ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
856 |
true "(margin ~~ 0 and:[subViews first level == 0])" ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
857 |
ypos := margin |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
858 |
] ifFalse:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
859 |
ypos := 0 |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
860 |
] |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
861 |
] |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
862 |
] ifFalse:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
863 |
"center" |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
864 |
ypos := (restHeight - ((numChilds - 1) * space)) // 2. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
865 |
ypos < 0 ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
866 |
space := restHeight // (numChilds + 1). |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
867 |
ypos := (restHeight - ((numChilds - 1) * space)) // 2. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
868 |
] |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
869 |
] |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
870 |
] |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
871 |
] |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
872 |
] |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
873 |
]. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
874 |
]. |
63 | 875 |
]. |
876 |
||
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
877 |
resizeToMaxH := false. |
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
878 |
(hL endsWith:'Max') ifTrue:[ |
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
879 |
resizeToMaxH := true. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
880 |
maxWidth := subViews inject:0 into:[:maxSoFar :child | maxSoFar max:child widthIncludingBorder]. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
881 |
hL := (hL copyWithoutLast:3) asSymbol. |
127 | 882 |
]. |
883 |
||
63 | 884 |
" |
885 |
now set positions |
|
886 |
" |
|
133 | 887 |
subViews keysAndValuesDo:[:index :child | |
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
888 |
|xpos advance bwChild wChild newWChild x2| |
125 | 889 |
|
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
890 |
wChild := child widthIncludingBorder. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
891 |
bwChild := child borderWidth. |
63 | 892 |
|
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
893 |
resizeToMaxH ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
894 |
child width:(wChild := maxWidth - (bwChild * 2)). |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
895 |
]. |
127 | 896 |
|
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
897 |
hL == #left ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
898 |
xpos := 0 - borderWidth + margin. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
899 |
] ifFalse:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
900 |
hL == #leftSpace ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
901 |
xpos := horizontalSpace + margin |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
902 |
] ifFalse:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
903 |
hL == #right ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
904 |
xpos := width - wChild - margin |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
905 |
] ifFalse:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
906 |
hL == #rightSpace ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
907 |
xpos := width - horizontalSpace - wChild - margin. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
908 |
] ifFalse:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
909 |
hL == #fitSpace ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
910 |
xpos := horizontalSpace + margin. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
911 |
newWChild := width - m2 - (horizontalSpace + bwChild * 2) |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
912 |
] ifFalse:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
913 |
hL == #fit ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
914 |
newWChild := width "- (bwChild * 2)". |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
915 |
borderWidth == 0 ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
916 |
newWChild := newWChild - (bwChild * 2) |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
917 |
]. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
918 |
true "child level == 0" ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
919 |
xpos := margin - borderWidth. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
920 |
newWChild := newWChild - m2 |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
921 |
] ifFalse:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
922 |
xpos := 0 - borderWidth. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
923 |
]. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
924 |
] ifFalse:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
925 |
"centered" |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
926 |
xpos := margin + ((width - m2 - wChild) // 2). |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
927 |
] |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
928 |
] |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
929 |
] |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
930 |
] |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
931 |
] |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
932 |
]. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
933 |
newWChild notNil ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
934 |
child width:newWChild |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
935 |
]. |
63 | 936 |
|
793 | 937 |
"/ (xpos < 0) ifTrue:[ xpos := 0 ]. |
938 |
||
2033
fc16e79f649b
size computation with bordered components
Claus Gittinger <cg@exept.de>
parents:
2031
diff
changeset
|
939 |
x2 := xpos + child width - 1. |
380
6eb402d01ae0
looks better if panels level is ~~ 0 AND subview has 0 level
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
940 |
|
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
941 |
(vL == #fit |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
942 |
or:[vL == #fitSpace |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
943 |
or:[resizeToMaxV]]) ifTrue:[ |
2033
fc16e79f649b
size computation with bordered components
Claus Gittinger <cg@exept.de>
parents:
2031
diff
changeset
|
944 |
child origin:(xpos @ (ypos rounded)) |
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
945 |
corner:(x2 @ (ypos + hEach - bwChild - 1) rounded). |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
946 |
advance := hEach |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
947 |
] ifFalse:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
948 |
child origin:(xpos@ypos). |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
949 |
advance := child heightIncludingBorder |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
950 |
]. |
133 | 951 |
|
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
952 |
index == numChilds ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
953 |
|y| |
133 | 954 |
|
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
955 |
(vL == #topFit or:[vL == #topSpaceFit]) ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
956 |
y := height - margin - 1. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
957 |
vL == #topSpaceFit ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
958 |
y := y - space |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
959 |
]. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
960 |
child corner:x2 @ y |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
961 |
]. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
962 |
]. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
963 |
index == 1 ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
964 |
|y yB| |
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
965 |
|
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
966 |
(vL == #bottomFit or:[vL == #bottomSpaceFit]) ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
967 |
y := margin + 0 + (child borderWidth * 2) - borderWidth. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
968 |
vL == #bottomSpaceFit ifTrue:[ |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
969 |
y := y + space |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
970 |
]. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
971 |
yB := child corner y. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
972 |
child origin:((child origin x) @ y) |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
973 |
corner:((child corner x) @ yB) |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
974 |
]. |
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
975 |
]. |
1307
f2ce08878d5e
added #bottomFit & #bottomSpaceFit layouts
Claus Gittinger <cg@exept.de>
parents:
1291
diff
changeset
|
976 |
|
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
977 |
ypos := ypos + advance + space. |
0 | 978 |
] |
155 | 979 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
980 |
"Modified: / 4.9.1995 / 18:43:29 / claus" |
1431
fd1e74d673ae
really care for margins when doing childPositions
Claus Gittinger <cg@exept.de>
parents:
1417
diff
changeset
|
981 |
"Modified: / 27.1.1998 / 21:14:32 / cg" |
0 | 982 |
! ! |
125 | 983 |
|
984 |
!VerticalPanelView methodsFor:'queries'! |
|
985 |
||
130 | 986 |
preferredExtent |
125 | 987 |
"return a good extent, one that makes subviews fit" |
988 |
||
980
6079922a5519
eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
989 |
|sumOfHeights maxWidth maxHeight m2 subViews| |
125 | 990 |
|
797 | 991 |
"/ If I have an explicit preferredExtent .. |
992 |
||
713
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
593
diff
changeset
|
993 |
preferredExtent notNil ifTrue:[ |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
994 |
^ preferredExtent |
713
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
593
diff
changeset
|
995 |
]. |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
593
diff
changeset
|
996 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
997 |
subViews := self subViewsToConsider. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
998 |
(subViews size == 0) ifTrue:[ |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
999 |
^ super preferredExtent. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1000 |
"/ ^ horizontalSpace @ verticalSpace]. |
1038 | 1001 |
]. |
1002 |
||
125 | 1003 |
|
1004 |
"compute net height needed" |
|
1005 |
||
1006 |
sumOfHeights := 0. |
|
1007 |
maxWidth := 0. |
|
1008 |
maxHeight := 0. |
|
1009 |
||
1010 |
subViews do:[:child | |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1011 |
|childsPreference| |
125 | 1012 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1013 |
childsPreference := child preferredExtent. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1014 |
sumOfHeights := sumOfHeights + childsPreference y. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1015 |
maxHeight := maxHeight max:childsPreference y. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1016 |
maxWidth := maxWidth max:childsPreference x. |
125 | 1017 |
|
1018 |
"/ sumOfHeights := sumOfHeights + child heightIncludingBorder. |
|
1019 |
"/ maxWidth := maxWidth max:(child widthIncludingBorder). |
|
1020 |
"/ maxHeight := maxHeight max:(child heightIncludingBorder). |
|
1021 |
]. |
|
321
00c17944cb00
preferredExtent computation used hSpace instead of vSpace
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
1022 |
|
125 | 1023 |
borderWidth ~~ 0 ifTrue:[ |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1024 |
sumOfHeights := sumOfHeights + (verticalSpace * 2). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1025 |
maxWidth := maxWidth + (horizontalSpace * 2). |
125 | 1026 |
]. |
321
00c17944cb00
preferredExtent computation used hSpace instead of vSpace
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
1027 |
|
125 | 1028 |
(vLayout == #fit or:[vLayout == #fitSpace]) ifTrue:[ |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1029 |
sumOfHeights := maxHeight * subViews size. |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1030 |
borderWidth ~~ 0 ifTrue:[ |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1031 |
sumOfHeights := sumOfHeights + (verticalSpace * 2). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1032 |
] |
125 | 1033 |
] ifFalse:[ |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1034 |
sumOfHeights := sumOfHeights + ((subViews size - 1) * verticalSpace). |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1035 |
((vLayout == #topSpace) or:[vLayout == #bottomSpace]) ifTrue:[ |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1036 |
sumOfHeights := sumOfHeights + verticalSpace |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1037 |
] ifFalse:[ |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1038 |
((vLayout == #center) or:[vLayout == #spread]) ifTrue:[ |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1039 |
sumOfHeights := sumOfHeights + (verticalSpace * 2) |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1040 |
] |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1041 |
]. |
125 | 1042 |
]. |
1043 |
||
1044 |
((hLayout == #leftSpace) or:[hLayout == #rightSpace]) ifTrue:[ |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1045 |
maxWidth := maxWidth + horizontalSpace |
125 | 1046 |
] ifFalse:[ |
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1047 |
((hLayout == #fitSpace) or:[hLayout == #center]) ifTrue:[ |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1048 |
maxWidth := maxWidth + (horizontalSpace * 2) |
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1049 |
] |
125 | 1050 |
]. |
380
6eb402d01ae0
looks better if panels level is ~~ 0 AND subview has 0 level
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1051 |
m2 := margin * 2. |
6eb402d01ae0
looks better if panels level is ~~ 0 AND subview has 0 level
Claus Gittinger <cg@exept.de>
parents:
341
diff
changeset
|
1052 |
^ (maxWidth + m2) @ (sumOfHeights + m2) |
321
00c17944cb00
preferredExtent computation used hSpace instead of vSpace
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
1053 |
|
1417
e9dffd6767a6
added ignoreInvisibleComponents support
Claus Gittinger <cg@exept.de>
parents:
1307
diff
changeset
|
1054 |
"Modified: / 17.1.1998 / 00:18:16 / cg" |
125 | 1055 |
! ! |
1056 |
||
980
6079922a5519
eliminated references to subViews instance variable (will vanish)
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
1057 |
!VerticalPanelView class methodsFor:'documentation'! |
205 | 1058 |
|
1059 |
version |
|
2305
f2850e54b0ab
only access originChanged, extentChanged and cornerChanged
Claus Gittinger <cg@exept.de>
parents:
2033
diff
changeset
|
1060 |
^ '$Header: /cvs/stx/stx/libwidg/VerticalPanelView.st,v 1.37 2000-11-08 09:16:01 cg Exp $' |
205 | 1061 |
! ! |