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