author | Claus Gittinger <cg@exept.de> |
Tue, 24 Feb 2015 16:46:36 +0100 | |
changeset 5282 | 382e6cfb447d |
parent 5020 | 67d4d7034f64 |
child 5477 | 931002803ea7 |
permissions | -rw-r--r-- |
0 | 1 |
" |
5 | 2 |
COPYRIGHT (c) 1991 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 |
" |
|
2203 | 12 |
"{ Package: 'stx:libwidg' }" |
13 |
||
118 | 14 |
SimpleView subclass:#FramedBox |
2203 | 15 |
instanceVariableNames:'label labelChannel labelPosition fgColor showFrame frame3D |
16 |
horizontalSpace verticalSpace innerHorizontalSpace |
|
17 |
innerVerticalSpace' |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
18 |
classVariableNames:'' |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
19 |
poolDictionaries:'' |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
20 |
category:'Views-Layout' |
0 | 21 |
! |
22 |
||
914
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
23 |
!FramedBox class methodsFor:'documentation'! |
38 | 24 |
|
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1991 by Claus Gittinger |
|
59 | 28 |
All Rights Reserved |
0 | 29 |
|
38 | 30 |
This software is furnished under a license and may be used |
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
39 |
documentation |
|
40 |
" |
|
41 |
a frame around something. The frame may have a label, whose position |
|
133 | 42 |
is controlled by the labelPosition variable, a symbol which may be one of: |
3673 | 43 |
[#topCenter #topLeft #topRight #bottomLeft #bottomCenter #bottomRight #hidden] |
38 | 44 |
|
133 | 45 |
The default labelPosition is controlled by the styleSheet variable: |
46 |
'framedBoxLabelPosition' (usually, #topCenter). |
|
47 |
||
38 | 48 |
Its also possible, to not show the frame but only the label, by setting |
49 |
showFrame to false. |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
50 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
51 |
The distance from the outer viewBorder to the frame is controlled by |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
52 |
horizontalSpace / verticalSpace. The default is the fonts height. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
53 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
54 |
The distance from the frame to the interior area is controlled by |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
55 |
innerHorizontalSpace / innerVerticalSpace. The default is 0. |
585 | 56 |
|
57 |
[author:] |
|
58 |
Claus Gittinger |
|
685 | 59 |
|
60 |
[see also:] |
|
61 |
PanelView Separator |
|
38 | 62 |
" |
0 | 63 |
! |
64 |
||
125 | 65 |
examples |
66 |
" |
|
67 |
simple: |
|
593 | 68 |
[exBegin] |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
69 |
|top frame1 frame2 frame3| |
125 | 70 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
71 |
top := StandardSystemView new. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
72 |
top extent:300@200. |
125 | 73 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
74 |
frame1 := FramedBox origin:0.0@0.0 corner:0.5@0.5 in:top. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
75 |
frame1 label:'frame1'. |
3 | 76 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
77 |
frame2 := FramedBox origin:0.5@0.0 corner:1.0@0.5 in:top. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
78 |
frame2 label:'frame2'. |
125 | 79 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
80 |
frame3 := FramedBox origin:0.0@0.5 corner:1.0@1.0 in:top. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
81 |
frame3 label:'frame3'. |
0 | 82 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
83 |
top open |
593 | 84 |
[exEnd] |
125 | 85 |
|
86 |
||
1019
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
87 |
non-string label: |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
88 |
[exBegin] |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
89 |
|top frame| |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
90 |
|
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
91 |
top := StandardSystemView new. |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
92 |
top extent:300@200. |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
93 |
|
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
94 |
frame := FramedBox origin:0.0@0.0 corner:1.0@1.0 in:top. |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
95 |
frame label:(Image fromFile:'bitmaps/SBrowser.xbm'). |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
96 |
|
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
97 |
top open |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
98 |
[exEnd] |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
99 |
|
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
100 |
|
125 | 101 |
placing something inside: |
593 | 102 |
[exBegin] |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
103 |
|top frame1 frame2 frame3 v1 v2 v3| |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
104 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
105 |
top := StandardSystemView new. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
106 |
top extent:300@200. |
3 | 107 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
108 |
frame1 := FramedBox origin:0.0@0.0 corner:0.5@0.5 in:top. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
109 |
frame1 label:'frame1'. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
110 |
v1 := View origin:0.0@0.0 corner:1.0@1.0 in:frame1. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
111 |
v1 viewBackground:(Color yellow); |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
112 |
level:1. |
125 | 113 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
114 |
frame2 := FramedBox origin:0.5@0.0 corner:1.0@0.5 in:top. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
115 |
frame2 label:'frame2'. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
116 |
v2 := View origin:0.0@0.0 corner:1.0@1.0 in:frame2. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
117 |
v2 viewBackground:(Color red); |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
118 |
level:1. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
119 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
120 |
frame3 := FramedBox origin:0.0@0.5 corner:1.0@1.0 in:top. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
121 |
frame3 label:'frame3'. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
122 |
v3 := View origin:0.0@0.0 corner:1.0@1.0 in:frame3. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
123 |
v3 viewBackground:(Color green); |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
124 |
level:1. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
125 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
126 |
top open |
593 | 127 |
[exEnd] |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
128 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
129 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
130 |
placing something inside a frame in a dialog: |
593 | 131 |
[exBegin] |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
132 |
|box panel frame1 frame2 frame3 v1 v1b v2 v3| |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
133 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
134 |
box := Dialog new. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
135 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
136 |
frame1 := FramedBox label:'frame1'. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
137 |
panel := HorizontalPanelView origin:0.0@0.0 corner:1.0@1.0 in:frame1. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
138 |
v1 := View extent:100@100 in:panel. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
139 |
v1 viewBackground:(Color red); |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
140 |
level:1. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
141 |
v1b := View extent:100@100 in:panel. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
142 |
v1b viewBackground:(Color yellow); |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
143 |
level:1. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
144 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
145 |
box addComponent:frame1. |
0 | 146 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
147 |
frame2 := FramedBox label:'frame2'. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
148 |
v2 := View origin:0.0@0.0 corner:1.0@1.0 in:frame2. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
149 |
v2 viewBackground:(Color green); |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
150 |
level:1. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
151 |
box addComponent:frame2. |
0 | 152 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
153 |
frame3 := FramedBox label:'frame3'. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
154 |
v3 := View origin:0.0@0.0 corner:1.0@1.0 in:frame3. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
155 |
v3 viewBackground:(Color blue); |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
156 |
level:1. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
157 |
box addComponent:frame3. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
158 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
159 |
box addOkButton. |
593 | 160 |
box stickAtBottomWithVariableHeight:frame3. |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
161 |
box open |
593 | 162 |
[exEnd] |
125 | 163 |
|
0 | 164 |
|
125 | 165 |
placing something inside a frame in a dialog: |
593 | 166 |
[exBegin] |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
167 |
|box panel frame1 frame2 frame3 v1 v1b v2 v3| |
125 | 168 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
169 |
box := Dialog new. |
0 | 170 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
171 |
frame1 := FramedBox label:'frame1'. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
172 |
panel := VerticalPanelView origin:0.0@0.0 corner:1.0@1.0 in:frame1. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
173 |
v1 := View extent:100@100 in:panel. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
174 |
v1 viewBackground:(Color red); |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
175 |
level:1. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
176 |
v1b := View extent:100@100 in:panel. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
177 |
v1b viewBackground:(Color yellow); |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
178 |
level:1. |
125 | 179 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
180 |
box addComponent:frame1. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
181 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
182 |
frame2 := FramedBox label:'frame2'. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
183 |
v2 := View origin:0.0@0.0 corner:1.0@1.0 in:frame2. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
184 |
v2 viewBackground:(Color green); |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
185 |
level:1. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
186 |
box addComponent:frame2. |
0 | 187 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
188 |
frame3 := FramedBox label:'frame3'. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
189 |
v3 := View origin:0.0@0.0 corner:1.0@1.0 in:frame3. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
190 |
v3 viewBackground:(Color blue); |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
191 |
level:1. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
192 |
box addComponent:frame3. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
193 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
194 |
box addOkButton. |
593 | 195 |
box stickAtBottomWithVariableHeight:frame3. |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
196 |
box open |
593 | 197 |
[exEnd] |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
198 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
199 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
200 |
simple again, default spacings: |
593 | 201 |
[exBegin] |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
202 |
|top frame v| |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
203 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
204 |
top := StandardSystemView new. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
205 |
top extent:300@200. |
125 | 206 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
207 |
frame := FramedBox origin:0.0@0.0 corner:0.5@0.5 in:top. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
208 |
frame label:'frame'. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
209 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
210 |
v := View origin:0.0@0.0 corner:1.0@1.0 in:frame. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
211 |
v viewBackground:(Color yellow); level:1. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
212 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
213 |
top open |
593 | 214 |
[exEnd] |
125 | 215 |
|
216 |
||
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
217 |
changing spacings: |
593 | 218 |
[exBegin] |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
219 |
|top frame v| |
0 | 220 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
221 |
top := StandardSystemView new. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
222 |
top extent:300@200. |
125 | 223 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
224 |
frame := FramedBox origin:0.0@0.0 corner:0.5@0.5 in:top. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
225 |
frame label:'frame'. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
226 |
frame horizontalSpace:30. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
227 |
frame verticalSpace:20. |
125 | 228 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
229 |
v := View origin:0.0@0.0 corner:1.0@1.0 in:frame. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
230 |
v viewBackground:(Color yellow); level:1. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
231 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
232 |
top open |
593 | 233 |
[exEnd] |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
234 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
235 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
236 |
changing inner spacings: |
593 | 237 |
[exBegin] |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
238 |
|top frame v| |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
239 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
240 |
top := StandardSystemView new. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
241 |
top extent:300@200. |
125 | 242 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
243 |
frame := FramedBox origin:0.0@0.0 corner:0.5@0.5 in:top. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
244 |
frame label:'frame'. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
245 |
frame innerHorizontalSpace:30. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
246 |
frame innerVerticalSpace:20. |
0 | 247 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
248 |
v := View origin:0.0@0.0 corner:1.0@1.0 in:frame. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
249 |
v viewBackground:(Color yellow); level:1. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
250 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
251 |
top open |
593 | 252 |
[exEnd] |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
253 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
254 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
255 |
label only (no frame around): |
593 | 256 |
[exBegin] |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
257 |
|top frame v| |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
258 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
259 |
top := StandardSystemView new. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
260 |
top extent:300@200. |
0 | 261 |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
262 |
frame := FramedBox origin:0.0@0.0 corner:0.5@0.5 in:top. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
263 |
frame label:'frame'. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
264 |
frame showFrame:false. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
265 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
266 |
v := View origin:0.0@0.0 corner:1.0@1.0 in:frame. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
267 |
v viewBackground:(Color yellow); level:1. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
268 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
269 |
top open |
593 | 270 |
[exEnd] |
125 | 271 |
" |
195 | 272 |
! ! |
273 |
||
274 |
!FramedBox methodsFor:'accessing'! |
|
275 |
||
276 |
font:aFont |
|
664 | 277 |
"set the frame labelstrings font. |
278 |
CAVEAT: with the addition of Text objects, |
|
279 |
this method is going to be obsoleted by a textStyle |
|
280 |
method, which allows specific control over |
|
281 |
normalFont/boldFont/italicFont parameters." |
|
195 | 282 |
|
4890 | 283 |
(self font ~= aFont) ifTrue:[ |
664 | 284 |
super font:aFont. |
2913
bdf4fb09cfc0
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2614
diff
changeset
|
285 |
self invalidate |
195 | 286 |
] |
664 | 287 |
|
1555
49aee7cb2f36
label changes are redrawn immediately
Claus Gittinger <cg@exept.de>
parents:
1364
diff
changeset
|
288 |
"Modified: / 6.6.1998 / 20:05:05 / cg" |
195 | 289 |
! |
290 |
||
291 |
foregroundColor |
|
292 |
"return the frame labels foreground color" |
|
293 |
||
294 |
^ fgColor |
|
295 |
! |
|
296 |
||
297 |
foregroundColor:aColor |
|
298 |
"set the frame labels foreground color" |
|
299 |
||
300 |
aColor ~= fgColor ifTrue:[ |
|
721
4a01084cf643
use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
301 |
fgColor := aColor. |
2913
bdf4fb09cfc0
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2614
diff
changeset
|
302 |
self invalidateRepairNow:true |
195 | 303 |
] |
721
4a01084cf643
use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
304 |
|
1555
49aee7cb2f36
label changes are redrawn immediately
Claus Gittinger <cg@exept.de>
parents:
1364
diff
changeset
|
305 |
"Modified: / 6.6.1998 / 19:23:14 / cg" |
195 | 306 |
! |
307 |
||
308 |
frameShown |
|
309 |
"return true, if frame is shown; |
|
310 |
if false, oly the label is shown. |
|
311 |
OBSOLETE; use #showFrame." |
|
312 |
||
3672 | 313 |
^ self showFrame |
195 | 314 |
! |
315 |
||
316 |
horizontalSpace |
|
317 |
"return the number of pixels by which the frame is inset horizontally. |
|
318 |
The default, nil, lets the box compute the horizontal inset from the |
|
319 |
labels font height." |
|
320 |
||
321 |
^ horizontalSpace |
|
322 |
||
323 |
"Modified: 5.9.1995 / 17:24:21 / claus" |
|
324 |
! |
|
325 |
||
326 |
horizontalSpace:aNumber |
|
327 |
"set the number of pixels by which the frame is inset horizontally. |
|
328 |
The default, nil, lets the box compute the horizontal inset from the |
|
329 |
labels font height." |
|
330 |
||
331 |
horizontalSpace := aNumber |
|
332 |
! |
|
333 |
||
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
334 |
innerHorizontalSpace:aNumber |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
335 |
"set the number of pixels by which the interior is inset horizontally from the frame. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
336 |
The default is 0" |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
337 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
338 |
innerHorizontalSpace := aNumber |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
339 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
340 |
"Created: 10.1.1996 / 14:39:20 / cg" |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
341 |
! |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
342 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
343 |
innerVerticalSpace:aNumber |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
344 |
"set the number of pixels by which the interior is inset vertically from the frame. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
345 |
The default is 0" |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
346 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
347 |
innerVerticalSpace := aNumber |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
348 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
349 |
"Created: 10.1.1996 / 14:39:35 / cg" |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
350 |
! |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
351 |
|
195 | 352 |
label |
353 |
"return the frames labelstring" |
|
354 |
||
355 |
^ label |
|
356 |
! |
|
357 |
||
1019
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
358 |
label:aStringOrImage |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
359 |
"set the frames labelstring or labelImage" |
195 | 360 |
|
1019
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
361 |
(label ~= aStringOrImage) ifTrue:[ |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
362 |
(aStringOrImage isString |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
363 |
and:[aStringOrImage isEmpty]) ifTrue:[ |
721
4a01084cf643
use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
364 |
label := nil |
4a01084cf643
use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
365 |
] ifFalse:[ |
1019
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
366 |
label := aStringOrImage. |
721
4a01084cf643
use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
367 |
]. |
2913
bdf4fb09cfc0
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2614
diff
changeset
|
368 |
self invalidateRepairNow:true |
195 | 369 |
] |
370 |
||
1555
49aee7cb2f36
label changes are redrawn immediately
Claus Gittinger <cg@exept.de>
parents:
1364
diff
changeset
|
371 |
"Modified: / 5.9.1995 / 17:20:05 / claus" |
49aee7cb2f36
label changes are redrawn immediately
Claus Gittinger <cg@exept.de>
parents:
1364
diff
changeset
|
372 |
"Modified: / 6.6.1998 / 19:23:17 / cg" |
195 | 373 |
! |
374 |
||
375 |
labelPosition |
|
376 |
"return the labelPosition, which is a symbol describing |
|
377 |
the labels position." |
|
378 |
||
379 |
^ labelPosition |
|
380 |
! |
|
381 |
||
382 |
labelPosition:aSymbol |
|
383 |
"define the position of the label; |
|
384 |
aSymbol may be one of: |
|
721
4a01084cf643
use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
385 |
#topLeft, #topCenter, #topRight; |
3672 | 386 |
#bottomLeft, #bottomCenter or #bottomRight |
387 |
#hidden" |
|
195 | 388 |
|
389 |
labelPosition ~~ aSymbol ifTrue:[ |
|
721
4a01084cf643
use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
390 |
labelPosition := aSymbol. |
2913
bdf4fb09cfc0
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2614
diff
changeset
|
391 |
self invalidate |
195 | 392 |
] |
721
4a01084cf643
use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
393 |
|
1555
49aee7cb2f36
label changes are redrawn immediately
Claus Gittinger <cg@exept.de>
parents:
1364
diff
changeset
|
394 |
"Modified: / 6.6.1998 / 20:04:22 / cg" |
195 | 395 |
! |
396 |
||
397 |
layout:something |
|
398 |
"OBSOLETE compatibility interface. Will vanish. |
|
399 |
In the meantime, try to figure out what is meant ... a kludge" |
|
400 |
||
2364 | 401 |
<resource:#obsolete> |
402 |
||
195 | 403 |
something isLayout ifTrue:[^ super layout:something]. |
404 |
||
405 |
self obsoleteMethodWarning:'use #labelPosition:'. |
|
406 |
^ self labelPosition:something |
|
407 |
||
408 |
"Modified: 31.8.1995 / 23:07:00 / claus" |
|
409 |
! |
|
410 |
||
1019
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
411 |
setLabel:anImage |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
412 |
"set the frames label. |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
413 |
same as #label: for ST-80 GroupBox compatibility" |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
414 |
|
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
415 |
^ self label:anImage |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
416 |
|
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
417 |
"Created: 17.2.1997 / 11:03:04 / cg" |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
418 |
"Modified: 17.2.1997 / 11:03:24 / cg" |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
419 |
! |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
420 |
|
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
421 |
setLabelString:anImage |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
422 |
"set the frames label. |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
423 |
same as #label: for ST-80 GroupBox compatibility" |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
424 |
|
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
425 |
^ self label:anImage |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
426 |
|
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
427 |
"Modified: 17.2.1997 / 11:03:19 / cg" |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
428 |
! |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
429 |
|
195 | 430 |
showFrame |
431 |
"return if the view shows its frame. |
|
432 |
If false, only the label is drawn" |
|
433 |
||
434 |
^ showFrame |
|
435 |
||
436 |
"Modified: 5.9.1995 / 17:21:37 / claus" |
|
437 |
! |
|
438 |
||
439 |
showFrame:aBoolean |
|
440 |
"turn on/off showing of the frame - |
|
3672 | 441 |
without a frame, only the label is shown at its position. |
442 |
(unless the label is nil or #hidden)" |
|
195 | 443 |
|
444 |
aBoolean ~~ showFrame ifTrue:[ |
|
721
4a01084cf643
use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
445 |
showFrame := aBoolean. |
2913
bdf4fb09cfc0
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2614
diff
changeset
|
446 |
self invalidate |
195 | 447 |
] |
721
4a01084cf643
use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
448 |
|
1555
49aee7cb2f36
label changes are redrawn immediately
Claus Gittinger <cg@exept.de>
parents:
1364
diff
changeset
|
449 |
"Modified: / 6.6.1998 / 20:03:50 / cg" |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
450 |
! |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
451 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
452 |
verticalSpace |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
453 |
"return the number of pixels by which the frame is inset vertically. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
454 |
The default, nil, lets the box compute the vertical inset from the |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
455 |
labels font height." |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
456 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
457 |
^ verticalSpace |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
458 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
459 |
"Modified: 5.9.1995 / 17:24:21 / claus" |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
460 |
"Created: 10.1.1996 / 14:38:21 / cg" |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
461 |
! |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
462 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
463 |
verticalSpace:aNumber |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
464 |
"set the number of pixels by which the frame is inset vertically. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
465 |
The default, nil, lets the box compute the vertical inset from the |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
466 |
labels font height." |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
467 |
|
1555
49aee7cb2f36
label changes are redrawn immediately
Claus Gittinger <cg@exept.de>
parents:
1364
diff
changeset
|
468 |
verticalSpace := aNumber. |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
469 |
|
1555
49aee7cb2f36
label changes are redrawn immediately
Claus Gittinger <cg@exept.de>
parents:
1364
diff
changeset
|
470 |
"Created: / 10.1.1996 / 14:38:31 / cg" |
49aee7cb2f36
label changes are redrawn immediately
Claus Gittinger <cg@exept.de>
parents:
1364
diff
changeset
|
471 |
"Modified: / 6.6.1998 / 20:04:39 / cg" |
0 | 472 |
! ! |
473 |
||
2227 | 474 |
!FramedBox methodsFor:'accessing-channels'! |
2203 | 475 |
|
476 |
labelChannel |
|
477 |
"return the labelChannel - or nil" |
|
478 |
||
479 |
^ labelChannel. |
|
480 |
||
481 |
||
482 |
! |
|
483 |
||
484 |
labelChannel:aValueHolder |
|
485 |
"set the labelChannel - a valueHolder holding a string |
|
486 |
which is shown as my logo |
|
487 |
" |
|
488 |
labelChannel notNil ifTrue:[ |
|
489 |
labelChannel removeDependent:self. |
|
490 |
]. |
|
491 |
||
492 |
(labelChannel := aValueHolder) notNil ifTrue:[ |
|
493 |
labelChannel addDependent:self. |
|
494 |
self label:(labelChannel value). |
|
495 |
]. |
|
496 |
! ! |
|
497 |
||
2227 | 498 |
!FramedBox methodsFor:'change & update'! |
2203 | 499 |
|
500 |
update:what with:aPara from:aModel |
|
501 |
"the MVC way of changing the label ... |
|
502 |
" |
|
2614 | 503 |
aModel == labelChannel ifTrue:[ |
2203 | 504 |
self label:(aModel value). |
2614 | 505 |
^ self |
2203 | 506 |
]. |
507 |
^ super update:what with:aPara from:aModel |
|
508 |
! ! |
|
509 |
||
0 | 510 |
!FramedBox methodsFor:'drawing'! |
511 |
||
512 |
drawFrame |
|
513 |
"redraw the frame" |
|
514 |
||
133 | 515 |
|halfSepX halfSepY w h| |
0 | 516 |
|
38 | 517 |
" |
518 |
if there is no label, give more real estate to the inside |
|
519 |
" |
|
520 |
label isNil ifTrue:[ |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
521 |
halfSepX := halfSepY := 2 |
38 | 522 |
] ifFalse:[ |
1019
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
523 |
halfSepX := halfSepY := (label heightOn:self) // 2. |
38 | 524 |
]. |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
525 |
|
133 | 526 |
horizontalSpace notNil ifTrue:[ |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
527 |
halfSepX := horizontalSpace. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
528 |
]. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
529 |
verticalSpace notNil ifTrue:[ |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
530 |
halfSepY := verticalSpace. |
133 | 531 |
]. |
38 | 532 |
|
1635
095c31e9c914
fixed drawingPosition, with big margin (i.e. 3D level)
Claus Gittinger <cg@exept.de>
parents:
1555
diff
changeset
|
533 |
halfSepX := halfSepX + margin. |
095c31e9c914
fixed drawingPosition, with big margin (i.e. 3D level)
Claus Gittinger <cg@exept.de>
parents:
1555
diff
changeset
|
534 |
halfSepY := halfSepY + margin. |
095c31e9c914
fixed drawingPosition, with big margin (i.e. 3D level)
Claus Gittinger <cg@exept.de>
parents:
1555
diff
changeset
|
535 |
|
133 | 536 |
w := width - halfSepX - halfSepX. |
537 |
h := height - halfSepY - halfSepY. |
|
38 | 538 |
|
59 | 539 |
frame3D ifFalse:[ |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
540 |
self displayRectangleX:halfSepX |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
541 |
y:halfSepY |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
542 |
width:w |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
543 |
height:h. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
544 |
^ self |
0 | 545 |
]. |
38 | 546 |
|
547 |
w := w + 1. |
|
548 |
h := h + 1. |
|
7 | 549 |
|
685 | 550 |
self paint:lightColor. |
551 |
self displayRectangleX:halfSepX |
|
552 |
y:halfSepY |
|
553 |
width:w |
|
554 |
height:h. |
|
555 |
||
0 | 556 |
self paint:shadowColor. |
133 | 557 |
self displayRectangleX:halfSepX-1 |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
558 |
y:halfSepY-1 |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
559 |
width:w |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
560 |
height:h. |
0 | 561 |
|
1019
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
562 |
"Modified: 17.2.1997 / 11:04:34 / cg" |
0 | 563 |
! |
564 |
||
565 |
redraw |
|
566 |
"redraw the frame and name if present" |
|
567 |
||
568 |
|labelLen l x y| |
|
569 |
||
1084 | 570 |
self clear. |
571 |
||
3672 | 572 |
(label isNil or:[ labelPosition == #hidden]) ifTrue:[ |
914
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
573 |
labelLen := 0 |
0 | 574 |
] ifFalse:[ |
1019
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
575 |
label isString ifTrue:[ |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
576 |
l := ' ' , label , ' '. |
4890 | 577 |
gc createFontOnDevice. |
1019
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
578 |
] ifFalse:[ |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
579 |
l := label |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
580 |
]. |
1084 | 581 |
labelLen := l widthOn:self |
0 | 582 |
]. |
583 |
||
38 | 584 |
showFrame ifTrue:[ |
914
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
585 |
self drawFrame. |
38 | 586 |
]. |
587 |
||
0 | 588 |
labelLen > 0 ifTrue:[ |
914
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
589 |
labelLen < width ifTrue:[ |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
590 |
(labelPosition == #topLeft |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
591 |
or:[labelPosition == #topCenter |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
592 |
or:[labelPosition == #topRight]]) ifTrue:[ |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
593 |
" |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
594 |
label at top |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
595 |
" |
4890 | 596 |
y := gc font ascent + margin. |
914
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
597 |
] ifFalse:[ |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
598 |
" |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
599 |
label at bottom |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
600 |
" |
4890 | 601 |
y := height - margin - gc font descent. |
914
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
602 |
]. |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
603 |
(labelPosition == #topLeft |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
604 |
or:[labelPosition == #bottomLeft]) ifTrue:[ |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
605 |
" |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
606 |
label at left |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
607 |
" |
4890 | 608 |
x := gc font height + margin |
914
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
609 |
] ifFalse:[ |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
610 |
(labelPosition == #topRight |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
611 |
or:[labelPosition == #bottomRight]) ifTrue:[ |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
612 |
" |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
613 |
label at right |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
614 |
" |
4898 | 615 |
x := width - margin - labelLen - gc font height |
914
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
616 |
] ifFalse:[ |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
617 |
" |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
618 |
label at center |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
619 |
" |
1635
095c31e9c914
fixed drawingPosition, with big margin (i.e. 3D level)
Claus Gittinger <cg@exept.de>
parents:
1555
diff
changeset
|
620 |
x := (width - margin - labelLen) // 2 |
914
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
621 |
] |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
622 |
]. |
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
623 |
self paint:fgColor on:viewBackground. |
1019
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
624 |
label isString ifTrue:[ |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
625 |
self displayOpaqueString:l x:x y:y |
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
626 |
] ifFalse:[ |
4898 | 627 |
l displayOpaqueOn:self x:x y:y - gc font ascent |
1019
0d027812861e
allow image-labels (for compatibility with ST-80's GroupBox)
Claus Gittinger <cg@exept.de>
parents:
993
diff
changeset
|
628 |
] |
914
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
629 |
] |
0 | 630 |
] |
914
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
631 |
|
1084 | 632 |
"Modified: 28.2.1997 / 21:28:09 / cg" |
0 | 633 |
! ! |
634 |
||
195 | 635 |
!FramedBox methodsFor:'event handling'! |
636 |
||
637 |
sizeChanged:how |
|
2913
bdf4fb09cfc0
invalidate checks itself for shown-flag
Claus Gittinger <cg@exept.de>
parents:
2614
diff
changeset
|
638 |
self invalidate. |
195 | 639 |
super sizeChanged:how |
721
4a01084cf643
use #invalidate instead of #redraw
Claus Gittinger <cg@exept.de>
parents:
713
diff
changeset
|
640 |
|
993 | 641 |
"Modified: 8.2.1997 / 15:19:52 / cg" |
195 | 642 |
! ! |
643 |
||
644 |
!FramedBox methodsFor:'initialization'! |
|
645 |
||
944 | 646 |
fetchDeviceResources |
647 |
"fetch device colors, to avoid reallocation at redraw time" |
|
648 |
||
649 |
super fetchDeviceResources. |
|
650 |
||
4898 | 651 |
fgColor := fgColor onDevice:self graphicsDevice. |
944 | 652 |
|
653 |
"Created: 15.2.1997 / 16:57:56 / cg" |
|
654 |
! |
|
655 |
||
195 | 656 |
initStyle |
959 | 657 |
"setup style specifics. |
658 |
The default position is top-center, except for ms-windows, where |
|
195 | 659 |
the text is positioned at top-left" |
660 |
||
1364 | 661 |
<resource: #style (#'framedBox.foregroundColor' |
662 |
#'framedBox.labelPosition' |
|
1845
84f68da8e19b
added framedBox.font attribute in styleSheet
Claus Gittinger <cg@exept.de>
parents:
1635
diff
changeset
|
663 |
#'framedBox.font' |
1364 | 664 |
#'framedBox.3DFrame')> |
608 | 665 |
|
195 | 666 |
super initStyle. |
667 |
||
4914 | 668 |
fgColor := StyleSheet at:'framedBox.foregroundColor' default:self blackColor. |
1364 | 669 |
labelPosition := StyleSheet at:'framedBox.labelPosition' default:#topCenter. |
670 |
frame3D := StyleSheet at:'framedBox.3DFrame' default:true. |
|
4890 | 671 |
self basicFont:(StyleSheet at:'framedBox.font' default:(StyleSheet at:'label.font' default:self font)). |
4022
e34a6aeee9c6
no more direct accesses to borderWidth and borderColor
Claus Gittinger <cg@exept.de>
parents:
3862
diff
changeset
|
672 |
self borderWidth:0. |
608 | 673 |
|
1364 | 674 |
"Modified: / 26.10.1997 / 17:00:57 / cg" |
195 | 675 |
! |
676 |
||
677 |
initialize |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
678 |
innerHorizontalSpace := innerVerticalSpace := 0. |
195 | 679 |
super initialize. |
680 |
showFrame := true |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
681 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
682 |
"Modified: 10.1.1996 / 14:38:40 / cg" |
2592 | 683 |
! |
684 |
||
685 |
release |
|
686 |
||
687 |
labelChannel notNil ifTrue:[ |
|
688 |
labelChannel removeDependent:self. |
|
689 |
labelChannel := nil. |
|
690 |
]. |
|
691 |
super release |
|
195 | 692 |
! ! |
693 |
||
125 | 694 |
!FramedBox methodsFor:'queries'! |
695 |
||
195 | 696 |
preferredExtent |
572 | 697 |
"compute the boxes preferredExtent from the components' sizes. |
698 |
Redefined to add space for the frame to the default extent" |
|
195 | 699 |
|
4144 | 700 |
|sep sep2| |
195 | 701 |
|
3753
e56e38d631cd
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3673
diff
changeset
|
702 |
"/ If I have an explicit preferredExtent.. |
e56e38d631cd
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3673
diff
changeset
|
703 |
explicitExtent notNil ifTrue:[ |
e56e38d631cd
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3673
diff
changeset
|
704 |
^ explicitExtent |
e56e38d631cd
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3673
diff
changeset
|
705 |
]. |
797 | 706 |
|
3753
e56e38d631cd
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
3673
diff
changeset
|
707 |
"/ If I have a cached preferredExtent value.. |
713
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
685
diff
changeset
|
708 |
preferredExtent notNil ifTrue:[ |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
685
diff
changeset
|
709 |
^ preferredExtent |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
685
diff
changeset
|
710 |
]. |
0c38ad51016d
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
685
diff
changeset
|
711 |
|
4898 | 712 |
sep := gc font heightOn:self graphicsDevice. |
5020 | 713 |
sep2 := sep + sep. |
195 | 714 |
|
3672 | 715 |
true "showFrame" ifFalse:[ |
4144 | 716 |
^ super preferredExtent + (0 @ sep2) |
195 | 717 |
]. |
4144 | 718 |
^ super preferredExtent + (sep2 @ sep2) |
572 | 719 |
|
914
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
720 |
"Modified: 3.1.1997 / 22:02:56 / cg" |
195 | 721 |
! |
722 |
||
125 | 723 |
viewRectangle |
724 |
"return the inside area |
|
725 |
- redefined to save frame from relative computations." |
|
726 |
||
685 | 727 |
|mH mV sepH sepV imH imV lw| |
125 | 728 |
|
4898 | 729 |
sepH := sepV := gc font heightOn:self graphicsDevice. |
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
730 |
horizontalSpace notNil ifTrue:[ |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
731 |
sepH := horizontalSpace |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
732 |
]. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
733 |
verticalSpace notNil ifTrue:[ |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
734 |
sepV := verticalSpace |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
735 |
]. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
736 |
|
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
737 |
mH := sepH * 2. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
738 |
mV := sepV * 2. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
739 |
imH := innerHorizontalSpace * 2. |
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
740 |
imV := innerVerticalSpace * 2. |
125 | 741 |
|
3672 | 742 |
true "showFrame" ifFalse:[ |
685 | 743 |
sepH := mH := lw := 0. |
744 |
] ifTrue:[ |
|
745 |
lw := 2. |
|
125 | 746 |
]. |
685 | 747 |
|
748 |
^ ((sepH + innerHorizontalSpace + lw) @ (innerVerticalSpace + sepV + lw)) |
|
749 |
extent:((width - imH - mH - lw - lw) @ (height - imV - mV - lw - lw)) |
|
125 | 750 |
|
751 |
"/ |m2 sepH sepV| |
|
752 |
"/ |
|
753 |
"/ sepV := font height. |
|
754 |
"/ |
|
755 |
"/ showFrame ifFalse:[ |
|
756 |
"/ ^ (0 @ sepV) extent:(width @ (height - sepV - sepV)) |
|
757 |
"/ ]. |
|
758 |
"/ sepH := sepV // 2. |
|
759 |
"/ ^ (sepH @ sepH) extent:((width - sepH - sepH) @ (height - sepV - sepV)) |
|
277
243d138cf316
more frame layout control added
Claus Gittinger <cg@exept.de>
parents:
205
diff
changeset
|
760 |
|
914
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
761 |
"Modified: 3.1.1997 / 22:03:08 / cg" |
125 | 762 |
! ! |
763 |
||
914
c2435be998ba
care for font being on device before querying
Claus Gittinger <cg@exept.de>
parents:
797
diff
changeset
|
764 |
!FramedBox class methodsFor:'documentation'! |
205 | 765 |
|
766 |
version |
|
5020 | 767 |
^ '$Header: /cvs/stx/stx/libwidg/FramedBox.st,v 1.59 2014-05-07 15:44:16 cg Exp $' |
4022
e34a6aeee9c6
no more direct accesses to borderWidth and borderColor
Claus Gittinger <cg@exept.de>
parents:
3862
diff
changeset
|
768 |
! |
e34a6aeee9c6
no more direct accesses to borderWidth and borderColor
Claus Gittinger <cg@exept.de>
parents:
3862
diff
changeset
|
769 |
|
e34a6aeee9c6
no more direct accesses to borderWidth and borderColor
Claus Gittinger <cg@exept.de>
parents:
3862
diff
changeset
|
770 |
version_CVS |
5020 | 771 |
^ '$Header: /cvs/stx/stx/libwidg/FramedBox.st,v 1.59 2014-05-07 15:44:16 cg Exp $' |
205 | 772 |
! ! |
4890 | 773 |