author | Claus Gittinger <cg@exept.de> |
Fri, 19 Mar 1999 21:05:54 +0100 | |
changeset 1066 | 5096f66ba82d |
parent 1063 | 9e710dbc7c92 |
child 1069 | 7196ca547f5d |
permissions | -rw-r--r-- |
163 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by eXept Software AG |
|
3 |
All Rights Reserved |
|
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 |
||
13 |
||
14 |
||
15 |
||
16 |
ApplicationModel subclass:#UILayoutTool |
|
221 | 17 |
instanceVariableNames:'modifiedHolder aspects selection layoutView tabList' |
163 | 18 |
classVariableNames:'' |
19 |
poolDictionaries:'' |
|
20 |
category:'Interface-UIPainter' |
|
21 |
! |
|
22 |
||
184 | 23 |
ApplicationModel subclass:#AlignmentOrigin |
163 | 24 |
instanceVariableNames:'' |
25 |
classVariableNames:'' |
|
26 |
poolDictionaries:'' |
|
27 |
privateIn:UILayoutTool |
|
28 |
! |
|
29 |
||
184 | 30 |
ApplicationModel subclass:#Extent |
31 |
instanceVariableNames:'' |
|
32 |
classVariableNames:'' |
|
33 |
poolDictionaries:'' |
|
34 |
privateIn:UILayoutTool |
|
35 |
! |
|
36 |
||
37 |
ApplicationModel subclass:#LayoutFrame |
|
38 |
instanceVariableNames:'' |
|
39 |
classVariableNames:'' |
|
40 |
poolDictionaries:'' |
|
41 |
privateIn:UILayoutTool |
|
42 |
! |
|
43 |
||
44 |
ApplicationModel subclass:#LayoutOrigin |
|
163 | 45 |
instanceVariableNames:'' |
46 |
classVariableNames:'' |
|
47 |
poolDictionaries:'' |
|
48 |
privateIn:UILayoutTool |
|
49 |
! |
|
50 |
||
51 |
ApplicationModel subclass:#Point |
|
52 |
instanceVariableNames:'' |
|
53 |
classVariableNames:'' |
|
54 |
poolDictionaries:'' |
|
55 |
privateIn:UILayoutTool |
|
56 |
! |
|
57 |
||
184 | 58 |
ApplicationModel subclass:#Rectangle |
163 | 59 |
instanceVariableNames:'' |
60 |
classVariableNames:'' |
|
61 |
poolDictionaries:'' |
|
62 |
privateIn:UILayoutTool |
|
63 |
! |
|
64 |
||
65 |
!UILayoutTool class methodsFor:'documentation'! |
|
66 |
||
67 |
copyright |
|
68 |
" |
|
69 |
COPYRIGHT (c) 1995 by eXept Software AG |
|
70 |
All Rights Reserved |
|
71 |
||
72 |
This software is furnished under a license and may be used |
|
73 |
only in accordance with the terms of that license and with the |
|
74 |
inclusion of the above copyright notice. This software may not |
|
75 |
be provided or otherwise made available to, or used by, any |
|
76 |
other person. No title to or ownership of the software is |
|
77 |
hereby transferred. |
|
78 |
" |
|
79 |
||
80 |
||
81 |
||
82 |
! |
|
83 |
||
84 |
documentation |
|
85 |
" |
|
86 |
used by the UIPainter to manipulate the layout of the selected component |
|
87 |
||
88 |
[author:] |
|
89 |
Claus Atzkern |
|
90 |
||
91 |
[see also:] |
|
92 |
UIPainter |
|
93 |
UIHelpTool |
|
94 |
UISpecificationTool |
|
95 |
" |
|
96 |
||
97 |
||
98 |
! ! |
|
99 |
||
100 |
!UILayoutTool class methodsFor:'constants'! |
|
101 |
||
102 |
label |
|
103 |
^ 'Layout' |
|
104 |
! ! |
|
105 |
||
184 | 106 |
!UILayoutTool class methodsFor:'help specs'! |
107 |
||
108 |
helpSpec |
|
741 | 109 |
"This resource specification was automatically generated |
110 |
by the UIHelpTool of ST/X." |
|
111 |
||
112 |
"Do not manually edit this!! If it is corrupted, |
|
113 |
the UIHelpTool may not be able to read the specification." |
|
293 | 114 |
|
184 | 115 |
" |
741 | 116 |
UIHelpTool openOnClass:UILayoutTool |
293 | 117 |
" |
118 |
||
741 | 119 |
<resource: #help> |
120 |
||
121 |
^super helpSpec addPairsFrom:#( |
|
122 |
||
123 |
#cornerX |
|
124 |
'Absolute corner x of the selected widget.' |
|
125 |
||
126 |
#cornerY |
|
127 |
'Absolute corner y of the selected widget.' |
|
128 |
||
129 |
#layoutTool |
|
130 |
'Tool to set the layout of the selected widget.' |
|
184 | 131 |
|
132 |
#leftAbsolute |
|
714 | 133 |
'Offset of the left edge; positive is to the right, negative to the left.' |
184 | 134 |
|
741 | 135 |
#leftRelative |
136 |
'Relative origin x of the selected widget.' |
|
201 | 137 |
|
138 |
#makeLeftAbsolute |
|
714 | 139 |
'Computes current left offset and relative origin x to an absolute origin x.' |
201 | 140 |
|
741 | 141 |
#makeLeftRelative |
142 |
'Compute current relative origin x and offset of the left edge to a relative origin x.' |
|
143 |
||
144 |
#makeTopAbsolute |
|
145 |
'Computes current top offset and relative origin y to an absolute origin y.' |
|
146 |
||
147 |
#makeTopRelative |
|
148 |
'Computes current relative origin y and offset of the top edge to a relative origin y.' |
|
149 |
||
150 |
#originX |
|
151 |
'Absolute origin x of the selected widget.' |
|
152 |
||
153 |
#originY |
|
154 |
'Absolute origin y of the selected widget.' |
|
155 |
||
184 | 156 |
#topAbsolute |
714 | 157 |
'Offset of the top edge; positive is to the bottom, negative to the top.' |
184 | 158 |
|
201 | 159 |
#topRelative |
714 | 160 |
'Relative origin y of the selected widget.' |
201 | 161 |
|
184 | 162 |
) |
163 |
! ! |
|
164 |
||
163 | 165 |
!UILayoutTool class methodsFor:'interface specs'! |
166 |
||
184 | 167 |
layoutOriginSpec |
741 | 168 |
"This resource specification was automatically generated |
169 |
by the UIPainter of ST/X." |
|
184 | 170 |
|
741 | 171 |
"Do not manually edit this!! If it is corrupted, |
172 |
the UIPainter may not be able to read the specification." |
|
184 | 173 |
|
174 |
" |
|
259 | 175 |
UIPainter new openOnClass:UILayoutTool andSelector:#layoutOriginSpec |
176 |
UILayoutTool new openInterface:#layoutOriginSpec |
|
184 | 177 |
" |
178 |
||
179 |
<resource: #canvas> |
|
180 |
||
181 |
^ |
|
259 | 182 |
|
184 | 183 |
#(#FullSpec |
690 | 184 |
#window: |
184 | 185 |
#(#WindowSpec |
741 | 186 |
#name: 'UILayoutTool' |
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
187 |
#layout: #(#LayoutFrame 216 0 173 0 560 0 354 0) |
741 | 188 |
#label: 'UILayoutTool' |
690 | 189 |
#min: #(#Point 10 10) |
190 |
#max: #(#Point 1152 900) |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
191 |
#bounds: #(#Rectangle 216 173 561 355) |
690 | 192 |
#usePreferredExtent: false |
184 | 193 |
) |
690 | 194 |
#component: |
184 | 195 |
#(#SpecCollection |
690 | 196 |
#collection: |
184 | 197 |
#( |
751 | 198 |
#(#FramedBoxSpec |
199 |
#name: 'FramedBox' |
|
200 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 108 0) |
|
201 |
#component: |
|
202 |
#(#SpecCollection |
|
203 |
#collection: |
|
204 |
#( |
|
205 |
#(#LabelSpec |
|
206 |
#name: 'labelRelative' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
207 |
#layout: #(#Point 87 6) |
751 | 208 |
#label: 'Relative:' |
209 |
) |
|
210 |
#(#LabelSpec |
|
211 |
#name: 'labelAbsolute' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
212 |
#layout: #(#Point 187 6) |
751 | 213 |
#label: 'Offset:' |
214 |
) |
|
215 |
#(#LabelSpec |
|
216 |
#name: 'labelLeft' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
217 |
#layout: #(#AlignmentOrigin 85 0 27 0 1 0) |
751 | 218 |
#label: 'Left:' |
219 |
) |
|
220 |
#(#InputFieldSpec |
|
221 |
#name: 'fieldLeftFraction' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
222 |
#layout: #(#LayoutFrame 87 0 24 0 137 0 46 0) |
751 | 223 |
#activeHelpKey: #leftRelative |
224 |
#tabable: true |
|
225 |
#model: #leftFraction |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
226 |
#group: #inputGroup |
751 | 227 |
#type: #numberOrNil |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
228 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
229 |
#modifiedChannel: #modifiedChannel |
751 | 230 |
) |
231 |
#(#ActionButtonSpec |
|
232 |
#name: 'actionRelativeLeft' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
233 |
#layout: #(#LayoutFrame 142 0 24 0 164 0 46 0) |
751 | 234 |
#activeHelpKey: #makeLeftRelative |
235 |
#model: #relativeLeft |
|
236 |
) |
|
237 |
#(#InputFieldSpec |
|
238 |
#name: 'fieldLeftOffset' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
239 |
#layout: #(#LayoutFrame 187 0 24 0 237 0 46 0) |
751 | 240 |
#activeHelpKey: #leftAbsolute |
241 |
#tabable: true |
|
242 |
#model: #leftOffset |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
243 |
#group: #inputGroup |
751 | 244 |
#type: #numberOrNil |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
245 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
246 |
#modifiedChannel: #modifiedChannel |
751 | 247 |
) |
248 |
#(#ActionButtonSpec |
|
249 |
#name: 'actionAbsoluteLeft' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
250 |
#layout: #(#LayoutFrame 242 0 24 0 264 0 46 0) |
751 | 251 |
#activeHelpKey: #makeLeftAbsolute |
252 |
#model: #absoluteLeft |
|
253 |
) |
|
254 |
#(#LabelSpec |
|
255 |
#name: 'labelTop' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
256 |
#layout: #(#AlignmentOrigin 85 0 54 0 1 0) |
751 | 257 |
#label: 'Top:' |
258 |
) |
|
259 |
#(#InputFieldSpec |
|
260 |
#name: 'fieldTopFraction' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
261 |
#layout: #(#LayoutFrame 87 0 51 0 137 0 73 0) |
751 | 262 |
#activeHelpKey: #topRelative |
263 |
#tabable: true |
|
264 |
#model: #topFraction |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
265 |
#group: #inputGroup |
751 | 266 |
#type: #numberOrNil |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
267 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
268 |
#modifiedChannel: #modifiedChannel |
751 | 269 |
) |
270 |
#(#ActionButtonSpec |
|
271 |
#name: 'actionRelativeTop' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
272 |
#layout: #(#LayoutFrame 142 0 51 0 164 0 73 0) |
751 | 273 |
#activeHelpKey: #makeTopRelative |
274 |
#model: #relativeTop |
|
275 |
) |
|
276 |
#(#InputFieldSpec |
|
277 |
#name: 'fieldTopOffset' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
278 |
#layout: #(#LayoutFrame 187 0 51 0 237 0 73 0) |
751 | 279 |
#activeHelpKey: #topAbsolute |
280 |
#tabable: true |
|
281 |
#model: #topOffset |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
282 |
#group: #inputGroup |
751 | 283 |
#type: #numberOrNil |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
284 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
285 |
#modifiedChannel: #modifiedChannel |
751 | 286 |
) |
287 |
#(#ActionButtonSpec |
|
288 |
#name: 'actionAbsoluteTop' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
289 |
#layout: #(#LayoutFrame 242 0 51 0 264 0 73 0) |
751 | 290 |
#activeHelpKey: #makeTopAbsolute |
291 |
#model: #absoluteTop |
|
292 |
) |
|
293 |
) |
|
294 |
) |
|
295 |
#label: 'Origin' |
|
296 |
#labelPosition: #topLeft |
|
184 | 297 |
) |
298 |
) |
|
299 |
) |
|
300 |
) |
|
922
0a5799408f54
assign all inputFields to a common group.
Claus Gittinger <cg@exept.de>
parents:
751
diff
changeset
|
301 |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
302 |
"Modified: / 13.8.1998 / 19:52:04 / cg" |
184 | 303 |
! |
304 |
||
305 |
layoutPointSpec |
|
741 | 306 |
"This resource specification was automatically generated |
307 |
by the UIPainter of ST/X." |
|
184 | 308 |
|
741 | 309 |
"Do not manually edit this!! If it is corrupted, |
310 |
the UIPainter may not be able to read the specification." |
|
184 | 311 |
|
312 |
" |
|
259 | 313 |
UIPainter new openOnClass:UILayoutTool andSelector:#layoutPointSpec |
314 |
UILayoutTool new openInterface:#layoutPointSpec |
|
184 | 315 |
" |
259 | 316 |
|
184 | 317 |
<resource: #canvas> |
318 |
||
319 |
^ |
|
259 | 320 |
|
184 | 321 |
#(#FullSpec |
690 | 322 |
#window: |
184 | 323 |
#(#WindowSpec |
741 | 324 |
#name: 'UILayoutTool' |
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
325 |
#layout: #(#LayoutFrame 216 0 173 0 493 0 296 0) |
741 | 326 |
#label: 'UILayoutTool' |
690 | 327 |
#min: #(#Point 10 10) |
328 |
#max: #(#Point 1152 900) |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
329 |
#bounds: #(#Rectangle 216 173 494 297) |
690 | 330 |
#usePreferredExtent: false |
184 | 331 |
) |
690 | 332 |
#component: |
184 | 333 |
#(#SpecCollection |
690 | 334 |
#collection: |
184 | 335 |
#( |
751 | 336 |
#(#FramedBoxSpec |
337 |
#name: 'FramedBox' |
|
338 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 94 0) |
|
339 |
#component: |
|
340 |
#(#SpecCollection |
|
341 |
#collection: |
|
342 |
#( |
|
343 |
#(#LabelSpec |
|
344 |
#name: 'labelOriginY' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
345 |
#layout: #(#AlignmentOrigin 83 0 14 0 1 0) |
751 | 346 |
#label: 'Left:' |
347 |
) |
|
348 |
#(#InputFieldSpec |
|
349 |
#name: 'fieldOriginX' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
350 |
#layout: #(#LayoutFrame 85 0 11 0 135 0 33 0) |
751 | 351 |
#activeHelpKey: #originX |
352 |
#tabable: true |
|
353 |
#model: #leftOffset |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
354 |
#group: #inputGroup |
751 | 355 |
#type: #numberOrNil |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
356 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
357 |
#modifiedChannel: #modifiedChannel |
751 | 358 |
) |
359 |
#(#LabelSpec |
|
360 |
#name: 'labelOriginX' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
361 |
#layout: #(#AlignmentOrigin 83 0 39 0 1 0) |
751 | 362 |
#label: 'Top:' |
363 |
) |
|
364 |
#(#InputFieldSpec |
|
365 |
#name: 'fieldOriginY' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
366 |
#layout: #(#LayoutFrame 85 0 36 0 135 0 58 0) |
751 | 367 |
#activeHelpKey: #originY |
368 |
#tabable: true |
|
369 |
#model: #topOffset |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
370 |
#group: #inputGroup |
751 | 371 |
#type: #numberOrNil |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
372 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
373 |
#modifiedChannel: #modifiedChannel |
751 | 374 |
) |
375 |
) |
|
376 |
) |
|
377 |
#label: 'Origin' |
|
378 |
#labelPosition: #topLeft |
|
184 | 379 |
) |
380 |
) |
|
381 |
) |
|
382 |
) |
|
922
0a5799408f54
assign all inputFields to a common group.
Claus Gittinger <cg@exept.de>
parents:
751
diff
changeset
|
383 |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
384 |
"Modified: / 13.8.1998 / 19:52:15 / cg" |
184 | 385 |
! |
386 |
||
163 | 387 |
slices |
388 |
^ #( |
|
389 |
( 'Frame' LayoutFrame) |
|
390 |
( 'Origin' LayoutOrigin) |
|
391 |
( 'Alig.Origin' AlignmentOrigin) |
|
392 |
( 'Point' Point) |
|
393 |
( 'Rectangle' Rectangle) |
|
394 |
( 'Extent' Extent) |
|
395 |
) |
|
396 |
||
397 |
! |
|
398 |
||
399 |
windowSpec |
|
741 | 400 |
"This resource specification was automatically generated |
401 |
by the UIPainter of ST/X." |
|
163 | 402 |
|
741 | 403 |
"Do not manually edit this!! If it is corrupted, |
404 |
the UIPainter may not be able to read the specification." |
|
163 | 405 |
|
406 |
" |
|
407 |
UIPainter new openOnClass:UILayoutTool andSelector:#windowSpec |
|
408 |
UILayoutTool new openInterface:#windowSpec |
|
741 | 409 |
UILayoutTool open |
163 | 410 |
" |
411 |
||
412 |
<resource: #canvas> |
|
413 |
||
414 |
^ |
|
415 |
||
416 |
#(#FullSpec |
|
741 | 417 |
#window: |
163 | 418 |
#(#WindowSpec |
741 | 419 |
#name: 'UILayoutTool' |
420 |
#layout: #(#LayoutFrame 571 0 290 0 870 0 589 0) |
|
421 |
#label: 'UILayoutTool' |
|
422 |
#min: #(#Point 10 10) |
|
423 |
#max: #(#Point 1152 900) |
|
424 |
#bounds: #(#Rectangle 571 290 871 590) |
|
425 |
#usePreferredExtent: false |
|
163 | 426 |
) |
741 | 427 |
#component: |
163 | 428 |
#(#SpecCollection |
741 | 429 |
#collection: |
163 | 430 |
#( |
431 |
#(#NoteBookViewSpec |
|
741 | 432 |
#name: 'NoteBook' |
433 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0) |
|
434 |
#activeHelpKey: #layoutTool |
|
435 |
#enableChannel: #enableChannel |
|
436 |
#tabable: true |
|
437 |
#model: #noteBookModel |
|
438 |
#menu: #noteBookList |
|
439 |
#style: #(#FontDescription #helvetica #medium #roman #'10') |
|
440 |
#direction: #bottom |
|
441 |
#canvas: #noteBookView |
|
163 | 442 |
) |
443 |
) |
|
444 |
) |
|
445 |
) |
|
446 |
! ! |
|
447 |
||
448 |
!UILayoutTool methodsFor:'accessing'! |
|
449 |
||
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
450 |
acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
451 |
"return the value of the instance variable 'acceptChannel' (automatically generated)" |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
452 |
|
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
453 |
^ masterApplication acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
454 |
! |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
455 |
|
163 | 456 |
layout |
457 |
"returns configued layout or nil |
|
458 |
" |
|
459 |
|appl| |
|
460 |
||
461 |
(appl := self noteBookView application) notNil ifTrue:[ |
|
462 |
^ appl layout |
|
463 |
]. |
|
464 |
^ nil |
|
465 |
! |
|
466 |
||
467 |
layoutType |
|
468 |
"returns current layout type or nil |
|
469 |
" |
|
470 |
|slice| |
|
471 |
||
472 |
(slice := self selectedSlice) notNil ifTrue:[ |
|
473 |
^ slice last |
|
474 |
]. |
|
475 |
^ nil |
|
476 |
! |
|
477 |
||
478 |
layoutView |
|
479 |
"returns current edited view |
|
480 |
" |
|
481 |
^ layoutView |
|
482 |
! |
|
483 |
||
484 |
layoutView:aView |
|
485 |
"change current edited view |
|
486 |
" |
|
283 | 487 |
self layoutView:aView type:nil |
488 |
! |
|
489 |
||
490 |
layoutView:aView type:aTypeOrNil |
|
491 |
"change current edited view |
|
492 |
" |
|
163 | 493 |
|type name list| |
494 |
||
495 |
layoutView := aView. |
|
496 |
||
283 | 497 |
aTypeOrNil notNil ifTrue:[ |
163 | 498 |
self class slices findFirst:[:e| |
283 | 499 |
e last == aTypeOrNil ifTrue:[name := e first. true] |
163 | 500 |
]. |
283 | 501 |
list := Array with:name |
502 |
] ifFalse:[ |
|
503 |
(type := UIPainterView layoutType:layoutView) notNil ifTrue:[ |
|
504 |
self class slices findFirst:[:e| |
|
505 |
e last == type ifTrue:[name := e first. true] |
|
506 |
]. |
|
507 |
list := tabList. |
|
235 | 508 |
|
283 | 509 |
type == #Extent ifTrue:[ |
510 |
aView superView specClass isLayoutContainer ifTrue:[ |
|
511 |
list := Array with:name |
|
512 |
] ifFalse:[ |
|
513 |
list := list copyWith:name |
|
514 |
] |
|
235 | 515 |
] |
516 |
] |
|
163 | 517 |
]. |
518 |
self noteBookList value:list. |
|
519 |
self noteBookModel value:name. |
|
520 |
self update. |
|
521 |
! |
|
522 |
||
523 |
modifiedHolder:aValueHolder |
|
524 |
"set the value holder set to true in case of modifying attributes |
|
525 |
" |
|
526 |
modifiedHolder notNil ifTrue:[ |
|
527 |
modifiedHolder removeDependent:self. |
|
528 |
]. |
|
529 |
||
530 |
(modifiedHolder := aValueHolder) notNil ifTrue:[ |
|
531 |
modifiedHolder addDependent:self. |
|
532 |
]. |
|
533 |
||
534 |
! |
|
535 |
||
536 |
update |
|
537 |
"update from view |
|
538 |
" |
|
539 |
|view appl| |
|
540 |
||
541 |
selection notNil ifTrue:[ |
|
542 |
(view := self layoutView) notNil ifTrue:[ |
|
543 |
(appl := self noteBookView application) notNil ifTrue:[ |
|
544 |
appl fetch:view |
|
545 |
] |
|
546 |
] |
|
547 |
]. |
|
548 |
||
549 |
! ! |
|
550 |
||
551 |
!UILayoutTool methodsFor:'aspects'! |
|
552 |
||
553 |
aspectFor:aKey |
|
554 |
"returns aspect for a key or nil |
|
555 |
" |
|
556 |
^ aspects at:aKey ifAbsent:[ super aspectFor:aKey ] |
|
557 |
||
558 |
||
559 |
! |
|
560 |
||
561 |
noteBookList |
|
562 |
"returns list of tab labels |
|
563 |
" |
|
564 |
|holder| |
|
565 |
||
566 |
(holder := builder bindingAt:#noteBookList) isNil ifTrue:[ |
|
567 |
holder := nil asValue. |
|
568 |
builder aspectAt:#noteBookList put:holder |
|
569 |
]. |
|
570 |
^ holder |
|
571 |
! |
|
572 |
||
573 |
noteBookModel |
|
574 |
"automatically generated by UIPainter ..." |
|
575 |
||
576 |
|holder| |
|
577 |
||
578 |
(holder := builder bindingAt:#noteBookModel) isNil ifTrue:[ |
|
579 |
holder := AspectAdaptor new subject:self; forAspect:#selection. |
|
580 |
builder aspectAt:#noteBookModel put:holder. |
|
581 |
]. |
|
582 |
^ holder |
|
583 |
! |
|
584 |
||
585 |
noteBookView |
|
586 |
"automatically generated by UIPainter ... |
|
587 |
" |
|
588 |
|holder| |
|
589 |
||
590 |
(holder := builder bindingAt:#noteBookView) isNil ifTrue:[ |
|
591 |
holder := SubCanvas new. |
|
592 |
builder aspectAt:#noteBookView put:holder |
|
593 |
]. |
|
594 |
^ holder |
|
595 |
! ! |
|
596 |
||
597 |
!UILayoutTool methodsFor:'change & update'! |
|
598 |
||
599 |
update:something with:aParameter from:changedObject |
|
600 |
"one of my models changed its value |
|
601 |
" |
|
602 |
changedObject ~~ modifiedHolder ifTrue:[ |
|
603 |
modifiedHolder value ~~ true ifTrue:[ |
|
604 |
modifiedHolder isNil ifFalse:[ |
|
605 |
modifiedHolder value:true |
|
606 |
] |
|
607 |
] |
|
608 |
] |
|
609 |
||
610 |
! ! |
|
611 |
||
612 |
!UILayoutTool methodsFor:'converting absolute'! |
|
613 |
||
614 |
absolute:what xOrY:xOrY |
|
615 |
|extent fraction offset fractSymb offsetSymb| |
|
616 |
||
617 |
extent := (self layoutView superView computeExtent) perform:xOrY. |
|
618 |
fractSymb := (what, 'Fraction') asSymbol. |
|
619 |
offsetSymb := (what, 'Offset') asSymbol. |
|
620 |
fraction := (self aspectFor:fractSymb) value. |
|
621 |
offset := (self aspectFor:offsetSymb) value. |
|
622 |
offset := offset + ((fraction * extent) asInteger). |
|
623 |
||
624 |
(self aspectFor:offsetSymb) value:offset. |
|
625 |
(self aspectFor:fractSymb) value:0. |
|
626 |
||
627 |
||
628 |
||
629 |
! |
|
630 |
||
631 |
absoluteBottom |
|
632 |
self absolute:'bottom' xOrY:#y |
|
633 |
||
634 |
! |
|
635 |
||
636 |
absoluteLeft |
|
637 |
self absolute:'left' xOrY:#x |
|
638 |
||
639 |
! |
|
640 |
||
641 |
absoluteRight |
|
642 |
self absolute:'right' xOrY:#x |
|
643 |
||
644 |
! |
|
645 |
||
646 |
absoluteTop |
|
647 |
self absolute:'top' xOrY:#y |
|
648 |
||
649 |
! ! |
|
650 |
||
651 |
!UILayoutTool methodsFor:'converting relative'! |
|
652 |
||
653 |
relative:what xOrY:xOrY |
|
654 |
|extent fraction offset fractSymb offsetSymb| |
|
655 |
||
656 |
extent := (self layoutView superView computeExtent) perform:xOrY. |
|
657 |
fractSymb := (what, 'Fraction') asSymbol. |
|
658 |
offsetSymb := (what, 'Offset') asSymbol. |
|
659 |
fraction := (self aspectFor:fractSymb) value. |
|
660 |
offset := (self aspectFor:offsetSymb) value. |
|
661 |
fraction := (fraction + (offset / extent)) asFloat. |
|
662 |
||
663 |
(fraction > 1.0) ifTrue:[ fraction := 1.0 ]. |
|
664 |
(fraction < 0.0) ifTrue:[ fraction := 0 ]. |
|
665 |
||
666 |
(self aspectFor:offsetSymb) value:0. |
|
667 |
(self aspectFor:fractSymb) value:fraction. |
|
668 |
||
669 |
||
670 |
||
671 |
! |
|
672 |
||
673 |
relativeBottom |
|
674 |
self relative:'bottom' xOrY:#y |
|
675 |
||
676 |
||
677 |
! |
|
678 |
||
679 |
relativeLeft |
|
680 |
self relative:'left' xOrY:#x |
|
681 |
||
682 |
! |
|
683 |
||
684 |
relativeRight |
|
685 |
self relative:'right' xOrY:#x |
|
686 |
||
687 |
! |
|
688 |
||
689 |
relativeTop |
|
690 |
self relative:'top' xOrY:#y |
|
691 |
||
692 |
! ! |
|
693 |
||
694 |
!UILayoutTool methodsFor:'initialization'! |
|
695 |
||
696 |
initialize |
|
697 |
"initialize channels |
|
698 |
" |
|
221 | 699 |
|slices size| |
700 |
||
163 | 701 |
super initialize. |
702 |
||
703 |
aspects := IdentityDictionary new. |
|
704 |
||
705 |
#( bottomFraction bottomOffset |
|
706 |
leftFraction leftOffset |
|
707 |
topFraction topOffset |
|
708 |
rightFraction rightOffset |
|
709 |
leftAlignmentFraction topAlignmentFraction |
|
710 |
) |
|
711 |
||
712 |
do:[:aKey||holder| |
|
713 |
holder := ValueHolder new. |
|
714 |
holder addDependent:self. |
|
715 |
aspects at:aKey put:holder. |
|
716 |
]. |
|
717 |
||
221 | 718 |
slices := self class slices. |
719 |
size := slices size - 1. |
|
720 |
tabList := Array new:size. |
|
163 | 721 |
|
221 | 722 |
1 to:size do:[:i| tabList at:i put:((slices at:i) first) ]. |
163 | 723 |
|
724 |
||
725 |
! ! |
|
726 |
||
727 |
!UILayoutTool methodsFor:'selection'! |
|
728 |
||
729 |
selectedSlice |
|
730 |
"returns slice assigned to selection or nil |
|
731 |
" |
|
732 |
selection notNil ifTrue:[ |
|
733 |
self class slices do:[:aSlice| |
|
734 |
aSlice first = selection ifTrue:[ |
|
735 |
^ aSlice |
|
736 |
] |
|
737 |
] |
|
738 |
]. |
|
739 |
^ nil |
|
740 |
||
741 |
! |
|
742 |
||
743 |
selection |
|
744 |
^ selection |
|
745 |
! |
|
746 |
||
747 |
selection:aSelection |
|
296 | 748 |
|appl slice sel noteBook| |
163 | 749 |
|
293 | 750 |
aSelection isNumber ifTrue:[ |
751 |
aSelection ~~ 0 ifTrue:[sel := tabList at:aSelection] |
|
752 |
] ifFalse:[ |
|
753 |
sel := aSelection |
|
754 |
]. |
|
755 |
selection = sel ifFalse:[ |
|
756 |
(selection := sel) notNil ifTrue:[ |
|
163 | 757 |
slice := self selectedSlice. |
758 |
appl := slice last asString. |
|
759 |
appl := Smalltalk classNamed:(self class name asString, '::', appl). |
|
760 |
appl := appl new. |
|
761 |
appl masterApplication:self. |
|
184 | 762 |
modifiedHolder value:true. |
163 | 763 |
]. |
296 | 764 |
noteBook := self noteBookView. |
765 |
noteBook client:appl. |
|
766 |
||
767 |
appl notNil ifTrue:[ |
|
768 |
noteBook scrolledView allViewBackground:(noteBook viewBackground). |
|
1033
21b3bc025e0c
removed the (stupid) fontSettings menu support.
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
769 |
"/ masterApplication updateFonts |
296 | 770 |
] |
163 | 771 |
]. |
772 |
self update |
|
293 | 773 |
|
163 | 774 |
! ! |
775 |
||
184 | 776 |
!UILayoutTool::AlignmentOrigin class methodsFor:'help specs'! |
163 | 777 |
|
184 | 778 |
helpSpec |
741 | 779 |
"This resource specification was automatically generated |
780 |
by the UIHelpTool of ST/X." |
|
781 |
||
782 |
"Do not manually edit this!! If it is corrupted, |
|
783 |
the UIHelpTool may not be able to read the specification." |
|
293 | 784 |
|
163 | 785 |
" |
741 | 786 |
UIHelpTool openOnClass:UILayoutTool::AlignmentOrigin |
293 | 787 |
" |
788 |
||
741 | 789 |
<resource: #help> |
790 |
||
791 |
^super helpSpec addPairsFrom:#( |
|
792 |
||
793 |
#alignBottomCenter |
|
794 |
'Aligns the selected widget bottomCenter to location.' |
|
795 |
||
796 |
#alignBottomLeft |
|
797 |
'Aligns the selected widget bottomLeft to location.' |
|
798 |
||
799 |
#alignBottomRight |
|
800 |
'Aligns the selected widget bottomRight to location.' |
|
801 |
||
802 |
#alignCenter |
|
803 |
'Aligns the selected widget center to location.' |
|
804 |
||
805 |
#alignHorizontal |
|
806 |
'Horizontal inset to the location point of the selected widget.' |
|
163 | 807 |
|
293 | 808 |
#alignLeftCenter |
714 | 809 |
'Aligns the selected widget leftCenter to location.' |
293 | 810 |
|
741 | 811 |
#alignRightCenter |
812 |
'Aligns the selected widget rightCenter to location.' |
|
293 | 813 |
|
814 |
#alignTopCenter |
|
714 | 815 |
'Aligns the selected widget topCenter to location.' |
163 | 816 |
|
293 | 817 |
#alignTopLeft |
714 | 818 |
'Aligns the selected widget topLeft to location.' |
293 | 819 |
|
820 |
#alignTopRight |
|
714 | 821 |
'Aligns the selected widget topRight to location.' |
293 | 822 |
|
823 |
#alignVertical |
|
714 | 824 |
'Vertical inset to the location point of the widget.' |
293 | 825 |
|
184 | 826 |
) |
163 | 827 |
! ! |
828 |
||
829 |
!UILayoutTool::AlignmentOrigin class methodsFor:'interface specs'! |
|
830 |
||
831 |
windowSpec |
|
741 | 832 |
"This resource specification was automatically generated |
833 |
by the UIPainter of ST/X." |
|
163 | 834 |
|
741 | 835 |
"Do not manually edit this!! If it is corrupted, |
836 |
the UIPainter may not be able to read the specification." |
|
163 | 837 |
|
838 |
" |
|
839 |
UIPainter new openOnClass:UILayoutTool::AlignmentOrigin andSelector:#windowSpec |
|
840 |
UILayoutTool::AlignmentOrigin new openInterface:#windowSpec |
|
741 | 841 |
UILayoutTool::AlignmentOrigin open |
163 | 842 |
" |
843 |
||
844 |
<resource: #canvas> |
|
845 |
||
846 |
^ |
|
847 |
||
848 |
#(#FullSpec |
|
690 | 849 |
#window: |
163 | 850 |
#(#WindowSpec |
741 | 851 |
#name: 'UILayoutTool-AlignmentOrigin' |
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
852 |
#layout: #(#LayoutFrame 291 0 130 0 695 0 336 0) |
741 | 853 |
#label: 'UILayoutTool-AlignmentOrigin' |
690 | 854 |
#min: #(#Point 10 10) |
855 |
#max: #(#Point 1152 900) |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
856 |
#bounds: #(#Rectangle 291 130 696 337) |
690 | 857 |
#usePreferredExtent: false |
163 | 858 |
) |
690 | 859 |
#component: |
163 | 860 |
#(#SpecCollection |
690 | 861 |
#collection: |
163 | 862 |
#( |
863 |
#(#UISubSpecification |
|
751 | 864 |
#name: 'layoutOriginSpec' |
865 |
#layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 111 0) |
|
690 | 866 |
#majorKey: #UILayoutTool |
867 |
#minorKey: #layoutOriginSpec |
|
163 | 868 |
) |
751 | 869 |
#(#FramedBoxSpec |
870 |
#name: 'FramedBox' |
|
871 |
#layout: #(#LayoutFrame 1 0.0 113 0 0 1.0 208 0) |
|
872 |
#component: |
|
873 |
#(#SpecCollection |
|
874 |
#collection: |
|
875 |
#( |
|
876 |
#(#LabelSpec |
|
877 |
#name: 'alignHLabel' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
878 |
#layout: #(#AlignmentOrigin 88 0 17 0 1 0) |
751 | 879 |
#label: 'Horizontal:' |
880 |
#adjust: #right |
|
881 |
) |
|
882 |
#(#LabelSpec |
|
883 |
#name: 'alignVLabel' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
884 |
#layout: #(#AlignmentOrigin 88 0 43 0 1 0) |
751 | 885 |
#label: 'Vertical:' |
886 |
#adjust: #right |
|
887 |
) |
|
888 |
#(#InputFieldSpec |
|
889 |
#name: 'leftAlignmentFractionField' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
890 |
#layout: #(#LayoutFrame 90 0 14 0 147 0 36 0) |
751 | 891 |
#activeHelpKey: #alignHorizontal |
892 |
#tabable: true |
|
893 |
#model: #leftAlignmentFraction |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
894 |
#group: #inputGroup |
751 | 895 |
#type: #numberOrNil |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
896 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
897 |
#modifiedChannel: #modifiedChannel |
751 | 898 |
) |
899 |
#(#InputFieldSpec |
|
900 |
#name: 'topAlignmentFractionField' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
901 |
#layout: #(#LayoutFrame 90 0 40 0 147 0 62 0) |
751 | 902 |
#activeHelpKey: #alignVertical |
903 |
#tabable: true |
|
904 |
#model: #topAlignmentFraction |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
905 |
#group: #inputGroup |
751 | 906 |
#type: #numberOrNil |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
907 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
908 |
#modifiedChannel: #modifiedChannel |
751 | 909 |
) |
910 |
#(#DividerSpec |
|
911 |
#name: 'separator1' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
912 |
#layout: #(#LayoutFrame 204 0 19 0 245 0 22 0) |
751 | 913 |
) |
914 |
#(#DividerSpec |
|
915 |
#name: 'separator2' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
916 |
#layout: #(#LayoutFrame 204 0 55 0 245 0 58 0) |
751 | 917 |
) |
918 |
#(#DividerSpec |
|
919 |
#name: 'separator3' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
920 |
#layout: #(#LayoutFrame 196 0 28 0 199 0 50 0) |
751 | 921 |
#orientation: #vertical |
922 |
) |
|
923 |
#(#DividerSpec |
|
924 |
#name: 'separator4' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
925 |
#layout: #(#LayoutFrame 250 0 28 0 253 0 50 0) |
751 | 926 |
#orientation: #vertical |
927 |
) |
|
928 |
#(#ActionButtonSpec |
|
929 |
#name: 'alignBottomRight' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
930 |
#layout: #(#LayoutFrame 245 0 50 0 259 0 64 0) |
751 | 931 |
#activeHelpKey: #alignBottomRight |
932 |
#model: #alignBottomRight |
|
933 |
) |
|
934 |
#(#ActionButtonSpec |
|
935 |
#name: 'alignTopLeft' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
936 |
#layout: #(#LayoutFrame 190 0 14 0 204 0 28 0) |
751 | 937 |
#activeHelpKey: #alignTopLeft |
938 |
#model: #alignTopLeft |
|
939 |
) |
|
940 |
#(#ActionButtonSpec |
|
941 |
#name: 'alignTopRight' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
942 |
#layout: #(#LayoutFrame 245 0 14 0 259 0 28 0) |
751 | 943 |
#activeHelpKey: #alignTopRight |
944 |
#model: #alignTopRight |
|
945 |
) |
|
946 |
#(#ActionButtonSpec |
|
947 |
#name: 'alignBottomLeft' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
948 |
#layout: #(#LayoutFrame 190 0 50 0 204 0 64 0) |
751 | 949 |
#activeHelpKey: #alignBottomLeft |
950 |
#model: #alignBottomLeft |
|
951 |
) |
|
952 |
#(#ActionButtonSpec |
|
953 |
#name: 'alignTopCenter' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
954 |
#layout: #(#LayoutFrame 217 0 14 0 231 0 28 0) |
751 | 955 |
#activeHelpKey: #alignTopCenter |
956 |
#model: #alignTopCenter |
|
957 |
) |
|
958 |
#(#ActionButtonSpec |
|
959 |
#name: 'alignBottomCenter' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
960 |
#layout: #(#LayoutFrame 217 0 50 0 231 0 64 0) |
751 | 961 |
#activeHelpKey: #alignBottomCenter |
962 |
#model: #alignBottomCenter |
|
963 |
) |
|
964 |
#(#ActionButtonSpec |
|
965 |
#name: 'alignLeftCenter' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
966 |
#layout: #(#LayoutFrame 190 0 32 0 204 0 46 0) |
751 | 967 |
#activeHelpKey: #alignLeftCenter |
968 |
#model: #alignLeftCenter |
|
969 |
) |
|
970 |
#(#ActionButtonSpec |
|
971 |
#name: 'alignRightCenter' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
972 |
#layout: #(#LayoutFrame 245 0 32 0 259 0 46 0) |
751 | 973 |
#activeHelpKey: #alignRightCenter |
974 |
#model: #alignRightCenter |
|
975 |
) |
|
976 |
#(#ActionButtonSpec |
|
977 |
#name: 'alignCenter' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
978 |
#layout: #(#LayoutFrame 217 0 32 0 231 0 46 0) |
751 | 979 |
#activeHelpKey: #alignCenter |
980 |
#model: #alignCenter |
|
981 |
) |
|
982 |
) |
|
983 |
) |
|
984 |
#label: 'Alignment' |
|
985 |
#labelPosition: #topLeft |
|
163 | 986 |
) |
987 |
) |
|
988 |
) |
|
989 |
) |
|
922
0a5799408f54
assign all inputFields to a common group.
Claus Gittinger <cg@exept.de>
parents:
751
diff
changeset
|
990 |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
991 |
"Modified: / 13.8.1998 / 19:57:47 / cg" |
163 | 992 |
! ! |
993 |
||
994 |
!UILayoutTool::AlignmentOrigin methodsFor:'accessing'! |
|
995 |
||
996 |
fetch:aView |
|
997 |
"fetch alignmentOrigin |
|
998 |
" |
|
252 | 999 |
|layout type| |
163 | 1000 |
|
1001 |
type := UIPainterView layoutType:aView. |
|
1002 |
layout := aView geometryLayout. |
|
1003 |
||
1004 |
layout isLayout ifTrue:[ |
|
1005 |
(self aspectFor:#leftOffset) value:(layout leftOffset). |
|
1006 |
(self aspectFor:#leftFraction) value:(layout leftFraction). |
|
1007 |
(self aspectFor:#topOffset) value:(layout topOffset). |
|
1008 |
(self aspectFor:#topFraction) value:(layout topFraction). |
|
1009 |
||
1010 |
type == #AlignmentOrigin ifTrue:[ |
|
1011 |
(self aspectFor:#leftAlignmentFraction) value:(layout leftAlignmentFraction). |
|
1012 |
(self aspectFor:#topAlignmentFraction) value:(layout topAlignmentFraction). |
|
1013 |
^ self |
|
1014 |
] |
|
1015 |
] ifFalse:[ |
|
1016 |
layout := aView computeOrigin. |
|
1017 |
||
1018 |
(self aspectFor:#leftOffset) value:(layout x). |
|
1019 |
(self aspectFor:#leftFraction) value:0. |
|
1020 |
(self aspectFor:#topOffset) value:(layout y). |
|
1021 |
(self aspectFor:#topFraction) value:0. |
|
1022 |
]. |
|
1023 |
(self aspectFor:#leftAlignmentFraction) value:0. |
|
1024 |
(self aspectFor:#topAlignmentFraction) value:0. |
|
1025 |
||
1026 |
||
1027 |
! |
|
1028 |
||
1029 |
layout |
|
1030 |
"returns current layout as alignmentOrigin |
|
1031 |
" |
|
1032 |
|layout| |
|
1033 |
||
1034 |
layout := Smalltalk::AlignmentOrigin new. |
|
1035 |
||
1036 |
layout leftOffset:((self aspectFor:#leftOffset) value) ? 0. |
|
1037 |
layout topOffset:((self aspectFor:#topOffset) value) ? 0. |
|
1038 |
layout leftFraction:((self aspectFor:#leftFraction) value) ? 0. |
|
1039 |
layout topFraction:((self aspectFor:#topFraction) value) ? 0. |
|
1040 |
||
1041 |
layout leftAlignmentFraction:((self aspectFor:#leftAlignmentFraction) value) ? 0. |
|
1042 |
layout topAlignmentFraction:((self aspectFor:#topAlignmentFraction) value) ? 0. |
|
1043 |
||
1044 |
^ layout |
|
1045 |
! ! |
|
1046 |
||
1047 |
!UILayoutTool::AlignmentOrigin methodsFor:'alignment'! |
|
1048 |
||
1049 |
alignBottomCenter |
|
1050 |
self makeAlignLeft:0.5 top:1 |
|
1051 |
||
1052 |
||
1053 |
! |
|
1054 |
||
1055 |
alignBottomLeft |
|
1056 |
self makeAlignLeft:0 top:1 |
|
1057 |
||
1058 |
||
1059 |
! |
|
1060 |
||
1061 |
alignBottomRight |
|
1062 |
self makeAlignLeft:1 top:1 |
|
1063 |
||
1064 |
||
1065 |
! |
|
1066 |
||
1067 |
alignCenter |
|
1068 |
self makeAlignLeft:0.5 top:0.5 |
|
1069 |
||
1070 |
||
1071 |
! |
|
1072 |
||
1073 |
alignLeftCenter |
|
1074 |
self makeAlignLeft:0 top:0.5 |
|
1075 |
||
1076 |
||
1077 |
! |
|
1078 |
||
1079 |
alignRightCenter |
|
1080 |
self makeAlignLeft:1 top:0.5 |
|
1081 |
||
1082 |
||
1083 |
! |
|
1084 |
||
1085 |
alignTopCenter |
|
1086 |
self makeAlignLeft:0.5 top:0 |
|
1087 |
||
1088 |
||
1089 |
! |
|
1090 |
||
1091 |
alignTopLeft |
|
1092 |
self makeAlignLeft:0 top:0 |
|
1093 |
||
1094 |
||
1095 |
! |
|
1096 |
||
1097 |
alignTopRight |
|
1098 |
self makeAlignLeft:1 top:0 |
|
1099 |
||
1100 |
||
1101 |
! |
|
1102 |
||
1103 |
makeAlignLeft:leftAlignmentFraction top:topAlignmentFraction |
|
1104 |
|lAF tAF lO tO ext| |
|
1105 |
||
1106 |
lAF := (self aspectFor:#leftAlignmentFraction) value ? 0. |
|
1107 |
tAF := (self aspectFor:#topAlignmentFraction) value ? 0. |
|
1108 |
ext := (self aspectFor:#layoutView) computeExtent. |
|
1109 |
||
1110 |
(self aspectFor:#leftAlignmentFraction) value:leftAlignmentFraction. |
|
1111 |
(self aspectFor:#topAlignmentFraction) value:topAlignmentFraction. |
|
1112 |
||
1113 |
lO := (self aspectFor:#leftOffset) value ? 0. |
|
1114 |
tO := (self aspectFor:#topOffset) value ? 0. |
|
1115 |
||
1116 |
lO := lO + (ext x * (leftAlignmentFraction - lAF)). |
|
1117 |
tO := tO + (ext y * (topAlignmentFraction - tAF)). |
|
1118 |
||
1119 |
(self aspectFor:#leftOffset) value:(lO rounded). |
|
1120 |
(self aspectFor:#topOffset) value:(tO rounded). |
|
1121 |
||
1122 |
! |
|
1123 |
||
1124 |
makeAlignTopRight |
|
1125 |
self makeAlignLeft:1 top:0 |
|
1126 |
||
1127 |
||
1128 |
! ! |
|
1129 |
||
184 | 1130 |
!UILayoutTool::Extent class methodsFor:'help specs'! |
1131 |
||
1132 |
helpSpec |
|
741 | 1133 |
"This resource specification was automatically generated |
1134 |
by the UIHelpTool of ST/X." |
|
1135 |
||
1136 |
"Do not manually edit this!! If it is corrupted, |
|
1137 |
the UIHelpTool may not be able to read the specification." |
|
293 | 1138 |
|
184 | 1139 |
" |
741 | 1140 |
UIHelpTool openOnClass:UILayoutTool::Extent |
293 | 1141 |
" |
1142 |
||
741 | 1143 |
<resource: #help> |
1144 |
||
1145 |
^super helpSpec addPairsFrom:#( |
|
1146 |
||
1147 |
#hrzExtent |
|
1148 |
'Horizontal extent of the selected widget.' |
|
184 | 1149 |
|
293 | 1150 |
#vrtExtent |
714 | 1151 |
'Vertical extent of the selected widget.' |
293 | 1152 |
|
184 | 1153 |
) |
1154 |
! ! |
|
1155 |
||
163 | 1156 |
!UILayoutTool::Extent class methodsFor:'interface specs'! |
1157 |
||
1158 |
windowSpec |
|
751 | 1159 |
"This resource specification was automatically generated |
1160 |
by the UIPainter of ST/X." |
|
163 | 1161 |
|
751 | 1162 |
"Do not manually edit this!! If it is corrupted, |
1163 |
the UIPainter may not be able to read the specification." |
|
163 | 1164 |
|
1165 |
" |
|
1166 |
UIPainter new openOnClass:UILayoutTool::Extent andSelector:#windowSpec |
|
1167 |
UILayoutTool::Extent new openInterface:#windowSpec |
|
751 | 1168 |
UILayoutTool::Extent open |
163 | 1169 |
" |
1170 |
||
1171 |
<resource: #canvas> |
|
1172 |
||
1173 |
^ |
|
1174 |
||
1175 |
#(#FullSpec |
|
690 | 1176 |
#window: |
163 | 1177 |
#(#WindowSpec |
741 | 1178 |
#name: 'UILayoutTool-Extent' |
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1179 |
#layout: #(#LayoutFrame 291 0 130 0 616 0 278 0) |
741 | 1180 |
#label: 'UILayoutTool-Extent' |
690 | 1181 |
#min: #(#Point 10 10) |
1182 |
#max: #(#Point 1152 900) |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1183 |
#bounds: #(#Rectangle 291 130 617 279) |
690 | 1184 |
#usePreferredExtent: false |
163 | 1185 |
) |
690 | 1186 |
#component: |
163 | 1187 |
#(#SpecCollection |
690 | 1188 |
#collection: |
163 | 1189 |
#( |
751 | 1190 |
#(#FramedBoxSpec |
1191 |
#name: 'FramedBox' |
|
1192 |
#layout: #(#LayoutFrame 0 0.0 6 0.0 0 1.0 100 0) |
|
1193 |
#component: |
|
1194 |
#(#SpecCollection |
|
1195 |
#collection: |
|
1196 |
#( |
|
1197 |
#(#LabelSpec |
|
1198 |
#name: 'labelWidth' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1199 |
#layout: #(#AlignmentOrigin 89 0 24 0 1 0.5) |
751 | 1200 |
#label: 'Width:' |
1201 |
#adjust: #right |
|
1202 |
) |
|
1203 |
#(#InputFieldSpec |
|
1204 |
#name: 'fieldLeftOffset' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1205 |
#layout: #(#LayoutFrame 90 0 13 0 140 0 35 0) |
751 | 1206 |
#activeHelpKey: #hrzExtent |
1207 |
#tabable: true |
|
1208 |
#model: #leftOffset |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1209 |
#group: #inputGroup |
751 | 1210 |
#type: #numberOrNil |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
1211 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
1212 |
#modifiedChannel: #modifiedChannel |
751 | 1213 |
) |
1214 |
#(#LabelSpec |
|
1215 |
#name: 'labelHeight' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1216 |
#layout: #(#AlignmentOrigin 89 0 49 0 1 0.5) |
751 | 1217 |
#label: 'Height:' |
1218 |
#adjust: #right |
|
1219 |
) |
|
1220 |
#(#InputFieldSpec |
|
1221 |
#name: 'fieldRightOffset' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1222 |
#layout: #(#LayoutFrame 90 0 38 0 140 0 60 0) |
751 | 1223 |
#activeHelpKey: #vrtExtent |
1224 |
#tabable: true |
|
1225 |
#model: #rightOffset |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1226 |
#group: #inputGroup |
751 | 1227 |
#type: #numberOrNil |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
1228 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
1229 |
#modifiedChannel: #modifiedChannel |
751 | 1230 |
) |
1231 |
) |
|
1232 |
) |
|
1233 |
#label: 'Extent' |
|
1234 |
#labelPosition: #topLeft |
|
163 | 1235 |
) |
1236 |
) |
|
1237 |
) |
|
1238 |
) |
|
922
0a5799408f54
assign all inputFields to a common group.
Claus Gittinger <cg@exept.de>
parents:
751
diff
changeset
|
1239 |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1240 |
"Modified: / 13.8.1998 / 19:58:04 / cg" |
163 | 1241 |
! ! |
1242 |
||
1243 |
!UILayoutTool::Extent methodsFor:'accessing'! |
|
1244 |
||
1245 |
fetch:aView |
|
1246 |
"fetch extent |
|
1247 |
" |
|
1248 |
|extent| |
|
1249 |
||
1250 |
extent := aView computeExtent. |
|
1251 |
||
1252 |
(self aspectFor:#leftOffset) value:(extent x). |
|
1253 |
(self aspectFor:#rightOffset) value:(extent y). |
|
1254 |
||
1255 |
||
1256 |
! |
|
1257 |
||
1258 |
layout |
|
1259 |
"returns current extent |
|
1260 |
" |
|
1261 |
^ Smalltalk::Point x:(((self aspectFor:#leftOffset) value) ? 0) |
|
1262 |
y:(((self aspectFor:#rightOffset) value) ? 0) |
|
1263 |
||
1264 |
! ! |
|
1265 |
||
184 | 1266 |
!UILayoutTool::LayoutFrame class methodsFor:'help specs'! |
1267 |
||
1268 |
helpSpec |
|
741 | 1269 |
"This resource specification was automatically generated |
1270 |
by the UIHelpTool of ST/X." |
|
1271 |
||
1272 |
"Do not manually edit this!! If it is corrupted, |
|
1273 |
the UIHelpTool may not be able to read the specification." |
|
293 | 1274 |
|
184 | 1275 |
" |
741 | 1276 |
UIHelpTool openOnClass:UILayoutTool::LayoutFrame |
293 | 1277 |
" |
1278 |
||
741 | 1279 |
<resource: #help> |
184 | 1280 |
|
741 | 1281 |
^super helpSpec addPairsFrom:#( |
293 | 1282 |
|
1283 |
#bottomAbsolute |
|
714 | 1284 |
'Offset of the bottom edge; positive is to the bottom, negative to the top.' |
293 | 1285 |
|
741 | 1286 |
#bottomRelative |
1287 |
'Relative corner y of the selected widget.' |
|
1288 |
||
1289 |
#makeBottomAbsolute |
|
1290 |
'Computes current bottom offset and relative corner y to an absolute corner y.' |
|
184 | 1291 |
|
1292 |
#makeBottomRelative |
|
714 | 1293 |
'Computes current relative corner y and offset of the bottom edge to a relative corner y.' |
184 | 1294 |
|
1295 |
#makeRightAbsolute |
|
714 | 1296 |
'Computes current right offset and relative corner x to an absolute corner x.' |
184 | 1297 |
|
741 | 1298 |
#makeRightRelative |
1299 |
'Computes current relative corner x and offset of the right edge to a relative corner x.' |
|
184 | 1300 |
|
1301 |
#rightAbsolute |
|
714 | 1302 |
'Offset of the right edge; positive is to the right, negative to the left.' |
184 | 1303 |
|
741 | 1304 |
#rightRelative |
1305 |
'Relative corner x of the selected widget.' |
|
1306 |
||
184 | 1307 |
) |
1308 |
! ! |
|
1309 |
||
1310 |
!UILayoutTool::LayoutFrame class methodsFor:'interface specs'! |
|
1311 |
||
1312 |
windowSpec |
|
751 | 1313 |
"This resource specification was automatically generated |
1314 |
by the UIPainter of ST/X." |
|
184 | 1315 |
|
751 | 1316 |
"Do not manually edit this!! If it is corrupted, |
1317 |
the UIPainter may not be able to read the specification." |
|
184 | 1318 |
|
1319 |
" |
|
1320 |
UIPainter new openOnClass:UILayoutTool::LayoutFrame andSelector:#windowSpec |
|
1321 |
UILayoutTool::LayoutFrame new openInterface:#windowSpec |
|
751 | 1322 |
UILayoutTool::LayoutFrame open |
184 | 1323 |
" |
1324 |
||
1325 |
<resource: #canvas> |
|
1326 |
||
1327 |
^ |
|
1328 |
||
1329 |
#(#FullSpec |
|
690 | 1330 |
#window: |
184 | 1331 |
#(#WindowSpec |
741 | 1332 |
#name: 'UILayoutTool-LayoutFrame' |
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1333 |
#layout: #(#LayoutFrame 291 0 130 0 689 0 363 0) |
741 | 1334 |
#label: 'UILayoutTool-LayoutFrame' |
690 | 1335 |
#min: #(#Point 10 10) |
1336 |
#max: #(#Point 1152 900) |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1337 |
#bounds: #(#Rectangle 291 130 690 364) |
690 | 1338 |
#usePreferredExtent: false |
751 | 1339 |
#forceRecursiveBackground: false |
184 | 1340 |
) |
690 | 1341 |
#component: |
184 | 1342 |
#(#SpecCollection |
690 | 1343 |
#collection: |
184 | 1344 |
#( |
1345 |
#(#UISubSpecification |
|
751 | 1346 |
#name: 'layoutOriginSpec' |
1347 |
#layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 110 0) |
|
690 | 1348 |
#majorKey: #UILayoutTool |
1349 |
#minorKey: #layoutOriginSpec |
|
184 | 1350 |
) |
751 | 1351 |
#(#FramedBoxSpec |
1352 |
#name: 'FramedBox' |
|
1353 |
#layout: #(#LayoutFrame 1 0.0 113 0 0 1.0 214 0) |
|
1354 |
#component: |
|
1355 |
#(#SpecCollection |
|
1356 |
#collection: |
|
1357 |
#( |
|
1358 |
#(#LabelSpec |
|
1359 |
#name: 'labelRight' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1360 |
#layout: #(#AlignmentOrigin 88 0 25 0 1 0.5) |
751 | 1361 |
#label: 'Right:' |
1362 |
) |
|
1363 |
#(#InputFieldSpec |
|
1364 |
#name: 'fieldRightFraction' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1365 |
#layout: #(#LayoutFrame 90 0 14 0 140 0 36 0) |
751 | 1366 |
#activeHelpKey: #rightRelative |
1367 |
#model: #rightFraction |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1368 |
#group: #inputGroup |
751 | 1369 |
#type: #numberOrNil |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
1370 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
1371 |
#modifiedChannel: #modifiedChannel |
751 | 1372 |
) |
1373 |
#(#ActionButtonSpec |
|
1374 |
#name: 'actionRelativeRight' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1375 |
#layout: #(#LayoutFrame 145 0 14 0 167 0 36 0) |
751 | 1376 |
#activeHelpKey: #makeRightRelative |
1377 |
#model: #relativeRight |
|
1378 |
) |
|
1379 |
#(#InputFieldSpec |
|
1380 |
#name: 'fieldRightOffset' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1381 |
#layout: #(#LayoutFrame 190 0 14 0 240 0 36 0) |
751 | 1382 |
#activeHelpKey: #rightAbsolute |
1383 |
#model: #rightOffset |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1384 |
#group: #inputGroup |
751 | 1385 |
#type: #numberOrNil |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
1386 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
1387 |
#modifiedChannel: #modifiedChannel |
751 | 1388 |
) |
1389 |
#(#ActionButtonSpec |
|
1390 |
#name: 'actionAbsoluteRight' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1391 |
#layout: #(#LayoutFrame 245 0 14 0 267 0 36 0) |
751 | 1392 |
#activeHelpKey: #makeRightAbsolute |
1393 |
#model: #absoluteRight |
|
1394 |
) |
|
1395 |
#(#LabelSpec |
|
1396 |
#name: 'labelBottom' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1397 |
#layout: #(#AlignmentOrigin 88 0 53 0 1 0.5) |
751 | 1398 |
#label: 'Bottom:' |
1399 |
) |
|
1400 |
#(#InputFieldSpec |
|
1401 |
#name: 'fieldBottomFraction' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1402 |
#layout: #(#LayoutFrame 90 0 42 0 140 0 64 0) |
751 | 1403 |
#activeHelpKey: #bottomRelative |
1404 |
#model: #bottomFraction |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1405 |
#group: #inputGroup |
751 | 1406 |
#type: #numberOrNil |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
1407 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
1408 |
#modifiedChannel: #modifiedChannel |
751 | 1409 |
) |
1410 |
#(#ActionButtonSpec |
|
1411 |
#name: 'actionRelativeBottom' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1412 |
#layout: #(#LayoutFrame 145 0 42 0 167 0 64 0) |
751 | 1413 |
#activeHelpKey: #makeBottomRelative |
1414 |
#model: #relativeBottom |
|
1415 |
) |
|
1416 |
#(#InputFieldSpec |
|
1417 |
#name: 'fieldBottomOffset' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1418 |
#layout: #(#LayoutFrame 190 0 42 0 240 0 64 0) |
751 | 1419 |
#activeHelpKey: #bottomAbsolute |
1420 |
#model: #bottomOffset |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1421 |
#group: #inputGroup |
751 | 1422 |
#type: #numberOrNil |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
1423 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
1424 |
#modifiedChannel: #modifiedChannel |
751 | 1425 |
) |
1426 |
#(#ActionButtonSpec |
|
1427 |
#name: 'actionAbsoluteBottom' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1428 |
#layout: #(#LayoutFrame 245 0 42 0 267 0 64 0) |
751 | 1429 |
#activeHelpKey: #makeBottomAbsolute |
1430 |
#model: #absoluteBottom |
|
1431 |
) |
|
1432 |
) |
|
1433 |
) |
|
1434 |
#label: 'Corner' |
|
1435 |
#labelPosition: #topLeft |
|
184 | 1436 |
) |
1437 |
) |
|
1438 |
) |
|
1439 |
) |
|
922
0a5799408f54
assign all inputFields to a common group.
Claus Gittinger <cg@exept.de>
parents:
751
diff
changeset
|
1440 |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1441 |
"Modified: / 13.8.1998 / 19:58:24 / cg" |
184 | 1442 |
! ! |
1443 |
||
1444 |
!UILayoutTool::LayoutFrame methodsFor:'accessing'! |
|
1445 |
||
1446 |
fetch:aView |
|
1447 |
|layout| |
|
1448 |
||
1449 |
layout := UIPainterView asLayoutFrameFromView:aView. |
|
1450 |
||
1451 |
(self aspectFor:#leftOffset) value:(layout leftOffset). |
|
1452 |
(self aspectFor:#leftFraction) value:(layout leftFraction). |
|
1453 |
(self aspectFor:#topOffset) value:(layout topOffset). |
|
1454 |
(self aspectFor:#topFraction) value:(layout topFraction). |
|
1455 |
(self aspectFor:#rightOffset) value:(layout rightOffset). |
|
1456 |
(self aspectFor:#bottomOffset) value:(layout bottomOffset). |
|
1457 |
(self aspectFor:#rightFraction) value:(layout rightFraction). |
|
1458 |
(self aspectFor:#bottomFraction) value:(layout bottomFraction). |
|
1459 |
||
1460 |
! |
|
1461 |
||
1462 |
layout |
|
1463 |
"returns current layout as layoutFrame |
|
1464 |
" |
|
1465 |
|layout| |
|
1466 |
||
1467 |
layout := Smalltalk::LayoutFrame new. |
|
1468 |
||
1469 |
layout leftOffset:((self aspectFor:#leftOffset) value) ? 0. |
|
1470 |
layout rightOffset:((self aspectFor:#rightOffset) value) ? 0. |
|
1471 |
layout topOffset:((self aspectFor:#topOffset) value) ? 0. |
|
1472 |
layout bottomOffset:((self aspectFor:#bottomOffset) value) ? 0. |
|
1473 |
layout leftFraction:((self aspectFor:#leftFraction) value) ? 0. |
|
1474 |
layout rightFraction:((self aspectFor:#rightFraction) value) ? 0. |
|
1475 |
layout topFraction:((self aspectFor:#topFraction) value) ? 0. |
|
1476 |
layout bottomFraction:((self aspectFor:#bottomFraction) value) ? 0. |
|
1477 |
||
1478 |
^ layout |
|
1479 |
||
1480 |
! ! |
|
1481 |
||
1482 |
!UILayoutTool::LayoutOrigin class methodsFor:'interface specs'! |
|
1483 |
||
1484 |
windowSpec |
|
741 | 1485 |
"This resource specification was automatically generated |
1486 |
by the UIPainter of ST/X." |
|
184 | 1487 |
|
741 | 1488 |
"Do not manually edit this!! If it is corrupted, |
1489 |
the UIPainter may not be able to read the specification." |
|
184 | 1490 |
|
1491 |
" |
|
1492 |
UIPainter new openOnClass:UILayoutTool::LayoutOrigin andSelector:#windowSpec |
|
1493 |
UILayoutTool::LayoutOrigin new openInterface:#windowSpec |
|
741 | 1494 |
UILayoutTool::LayoutOrigin open |
184 | 1495 |
" |
1496 |
||
1497 |
<resource: #canvas> |
|
1498 |
||
1499 |
^ |
|
1500 |
||
1501 |
#(#FullSpec |
|
741 | 1502 |
#window: |
184 | 1503 |
#(#WindowSpec |
741 | 1504 |
#name: 'UILayoutTool-LayoutOrigin' |
751 | 1505 |
#layout: #(#LayoutFrame 290 0 420 0 647 0 565 0) |
741 | 1506 |
#label: 'UILayoutTool-LayoutOrigin' |
1507 |
#min: #(#Point 10 10) |
|
1508 |
#max: #(#Point 1152 900) |
|
751 | 1509 |
#bounds: #(#Rectangle 290 420 648 566) |
741 | 1510 |
#usePreferredExtent: false |
184 | 1511 |
) |
741 | 1512 |
#component: |
184 | 1513 |
#(#SpecCollection |
741 | 1514 |
#collection: |
184 | 1515 |
#( |
1516 |
#(#UISubSpecification |
|
751 | 1517 |
#name: 'layoutOriginSpec' |
1518 |
#layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 110 0) |
|
741 | 1519 |
#majorKey: #UILayoutTool |
1520 |
#minorKey: #layoutOriginSpec |
|
184 | 1521 |
) |
1522 |
) |
|
1523 |
) |
|
1524 |
) |
|
1525 |
! ! |
|
1526 |
||
1527 |
!UILayoutTool::LayoutOrigin methodsFor:'accessing'! |
|
1528 |
||
1529 |
fetch:aView |
|
1530 |
"fetch layoutOrigin |
|
1531 |
" |
|
1532 |
|layout| |
|
1533 |
||
1534 |
layout := UIPainterView asLayoutFrameFromView:aView. |
|
1535 |
||
1536 |
(self aspectFor:#leftOffset) value:(layout leftOffset). |
|
1537 |
(self aspectFor:#leftFraction) value:(layout leftFraction). |
|
1538 |
(self aspectFor:#topOffset) value:(layout topOffset). |
|
1539 |
(self aspectFor:#topFraction) value:(layout topFraction). |
|
1540 |
||
1541 |
||
1542 |
! |
|
1543 |
||
1544 |
layout |
|
1545 |
"returns current layout as layoutOrigin |
|
1546 |
" |
|
1547 |
|layout| |
|
1548 |
||
1549 |
layout := Smalltalk::LayoutOrigin new. |
|
1550 |
||
1551 |
layout leftOffset:((self aspectFor:#leftOffset) value) ? 0. |
|
1552 |
layout topOffset:((self aspectFor:#topOffset) value) ? 0. |
|
1553 |
layout leftFraction:((self aspectFor:#leftFraction) value) ? 0. |
|
1554 |
layout topFraction:((self aspectFor:#topFraction) value) ? 0. |
|
1555 |
||
1556 |
^ layout |
|
1557 |
||
1558 |
! ! |
|
1559 |
||
1560 |
!UILayoutTool::Point class methodsFor:'interface specs'! |
|
1561 |
||
1562 |
windowSpec |
|
741 | 1563 |
"This resource specification was automatically generated |
1564 |
by the UIPainter of ST/X." |
|
184 | 1565 |
|
741 | 1566 |
"Do not manually edit this!! If it is corrupted, |
1567 |
the UIPainter may not be able to read the specification." |
|
184 | 1568 |
|
1569 |
" |
|
1570 |
UIPainter new openOnClass:UILayoutTool::Point andSelector:#windowSpec |
|
1571 |
UILayoutTool::Point new openInterface:#windowSpec |
|
741 | 1572 |
UILayoutTool::Point open |
184 | 1573 |
" |
1574 |
||
1575 |
<resource: #canvas> |
|
1576 |
||
1577 |
^ |
|
1578 |
||
1579 |
#(#FullSpec |
|
741 | 1580 |
#window: |
184 | 1581 |
#(#WindowSpec |
741 | 1582 |
#name: 'UILayoutTool-Point' |
751 | 1583 |
#layout: #(#LayoutFrame 324 0 410 0 618 0 547 0) |
741 | 1584 |
#label: 'UILayoutTool-Point' |
1585 |
#min: #(#Point 10 10) |
|
1586 |
#max: #(#Point 1152 900) |
|
751 | 1587 |
#bounds: #(#Rectangle 324 410 619 548) |
741 | 1588 |
#usePreferredExtent: false |
184 | 1589 |
) |
741 | 1590 |
#component: |
184 | 1591 |
#(#SpecCollection |
741 | 1592 |
#collection: |
184 | 1593 |
#( |
1594 |
#(#UISubSpecification |
|
751 | 1595 |
#name: 'layoutPointSpec' |
1596 |
#layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 100 0) |
|
741 | 1597 |
#majorKey: #UILayoutTool |
1598 |
#minorKey: #layoutPointSpec |
|
184 | 1599 |
) |
1600 |
) |
|
1601 |
) |
|
1602 |
) |
|
1603 |
! ! |
|
1604 |
||
1605 |
!UILayoutTool::Point methodsFor:'accessing'! |
|
1606 |
||
1607 |
fetch:aView |
|
1608 |
"fetch point |
|
1609 |
" |
|
1610 |
|origin| |
|
1611 |
||
1612 |
origin := aView computeOrigin. |
|
1613 |
||
1614 |
(self aspectFor:#leftOffset) value:(origin x). |
|
1615 |
(self aspectFor:#topOffset) value:(origin y). |
|
1616 |
||
1617 |
||
1618 |
! |
|
1619 |
||
1620 |
layout |
|
1621 |
"returns current layout as point |
|
1622 |
" |
|
1623 |
^ Smalltalk::Point x:(((self aspectFor:#leftOffset) value) ? 0) |
|
1624 |
y:(((self aspectFor:#topOffset) value) ? 0) |
|
1625 |
||
1626 |
! ! |
|
1627 |
||
1628 |
!UILayoutTool::Rectangle class methodsFor:'interface specs'! |
|
1629 |
||
1630 |
windowSpec |
|
741 | 1631 |
"This resource specification was automatically generated |
1632 |
by the UIPainter of ST/X." |
|
184 | 1633 |
|
741 | 1634 |
"Do not manually edit this!! If it is corrupted, |
1635 |
the UIPainter may not be able to read the specification." |
|
184 | 1636 |
|
1637 |
" |
|
1638 |
UIPainter new openOnClass:UILayoutTool::Rectangle andSelector:#windowSpec |
|
1639 |
UILayoutTool::Rectangle new openInterface:#windowSpec |
|
741 | 1640 |
UILayoutTool::Rectangle open |
184 | 1641 |
" |
1642 |
||
1643 |
<resource: #canvas> |
|
1644 |
||
1645 |
^ |
|
1646 |
||
1647 |
#(#FullSpec |
|
690 | 1648 |
#window: |
184 | 1649 |
#(#WindowSpec |
741 | 1650 |
#name: 'UILayoutTool-Rectangle' |
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1651 |
#layout: #(#LayoutFrame 291 0 130 0 632 0 328 0) |
741 | 1652 |
#label: 'UILayoutTool-Rectangle' |
690 | 1653 |
#min: #(#Point 10 10) |
1654 |
#max: #(#Point 1152 900) |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1655 |
#bounds: #(#Rectangle 291 130 633 329) |
690 | 1656 |
#usePreferredExtent: false |
184 | 1657 |
) |
690 | 1658 |
#component: |
184 | 1659 |
#(#SpecCollection |
690 | 1660 |
#collection: |
184 | 1661 |
#( |
1662 |
#(#UISubSpecification |
|
690 | 1663 |
#name: 'subSpecification' |
751 | 1664 |
#layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 96 0) |
690 | 1665 |
#majorKey: #UILayoutTool |
1666 |
#minorKey: #layoutPointSpec |
|
184 | 1667 |
) |
751 | 1668 |
#(#FramedBoxSpec |
1669 |
#name: 'FramedBox' |
|
1670 |
#layout: #(#LayoutFrame 1 0.0 99 0 0 1.0 194 0) |
|
1671 |
#component: |
|
1672 |
#(#SpecCollection |
|
1673 |
#collection: |
|
1674 |
#( |
|
1675 |
#(#LabelSpec |
|
1676 |
#name: 'labelCornerY' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1677 |
#layout: #(#AlignmentOrigin 83 0 16 0 1 0) |
751 | 1678 |
#label: 'Right:' |
1679 |
#adjust: #left |
|
1680 |
) |
|
1681 |
#(#InputFieldSpec |
|
1682 |
#name: 'fieldCornerX' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1683 |
#layout: #(#LayoutFrame 85 0 13 0 135 0 35 0) |
751 | 1684 |
#activeHelpKey: #cornerX |
1685 |
#tabable: true |
|
1686 |
#model: #rightOffset |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1687 |
#group: #inputGroup |
751 | 1688 |
#type: #numberOrNil |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
1689 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
1690 |
#modifiedChannel: #modifiedChannel |
751 | 1691 |
) |
1692 |
#(#LabelSpec |
|
1693 |
#name: 'labelCornerX' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1694 |
#layout: #(#AlignmentOrigin 83 0 41 0 1 0) |
751 | 1695 |
#label: 'Bottom:' |
1696 |
#adjust: #left |
|
1697 |
) |
|
1698 |
#(#InputFieldSpec |
|
1699 |
#name: 'fieldCornerY' |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1700 |
#layout: #(#LayoutFrame 85 0 38 0 135 0 60 0) |
751 | 1701 |
#activeHelpKey: #cornerY |
1702 |
#tabable: true |
|
1703 |
#model: #bottomOffset |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1704 |
#group: #inputGroup |
751 | 1705 |
#type: #numberOrNil |
1063
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
1706 |
#acceptChannel: #acceptChannel |
9e710dbc7c92
inputFields use modified & acceptChannels
Claus Gittinger <cg@exept.de>
parents:
1033
diff
changeset
|
1707 |
#modifiedChannel: #modifiedChannel |
751 | 1708 |
) |
1709 |
) |
|
1710 |
) |
|
1711 |
#label: 'Corner' |
|
1712 |
#labelPosition: #topLeft |
|
184 | 1713 |
) |
1714 |
) |
|
1715 |
) |
|
1716 |
) |
|
922
0a5799408f54
assign all inputFields to a common group.
Claus Gittinger <cg@exept.de>
parents:
751
diff
changeset
|
1717 |
|
949
2e3469100a6a
fixed layout (change with framedBox - sigh)
Claus Gittinger <cg@exept.de>
parents:
922
diff
changeset
|
1718 |
"Modified: / 13.8.1998 / 19:59:16 / cg" |
184 | 1719 |
! ! |
1720 |
||
1721 |
!UILayoutTool::Rectangle methodsFor:'accessing'! |
|
1722 |
||
1723 |
fetch:aView |
|
1724 |
"fetch rectangle |
|
1725 |
" |
|
1726 |
|origin corner| |
|
1727 |
||
1728 |
origin := aView computeOrigin. |
|
1729 |
corner := aView computeCorner. |
|
1730 |
||
1731 |
(self aspectFor:#leftOffset) value:(origin x). |
|
1732 |
(self aspectFor:#rightOffset) value:(corner x). |
|
1733 |
(self aspectFor:#topOffset) value:(origin y). |
|
1734 |
(self aspectFor:#bottomOffset) value:(corner y). |
|
1735 |
||
1736 |
||
1737 |
! |
|
1738 |
||
1739 |
layout |
|
1740 |
"returns current layout as rectangle |
|
1741 |
" |
|
1742 |
^ Smalltalk::Rectangle left:(((self aspectFor:#leftOffset) value) ? 0) |
|
1743 |
top:(((self aspectFor:#topOffset) value) ? 0) |
|
1744 |
right:(((self aspectFor:#rightOffset) value) ? 0) |
|
1745 |
bottom:(((self aspectFor:#bottomOffset) value) ? 0) |
|
1746 |
||
1747 |
||
1748 |
! ! |
|
1749 |
||
163 | 1750 |
!UILayoutTool class methodsFor:'documentation'! |
1751 |
||
1752 |
version |
|
1753 |
^ '$Header$' |
|
1754 |
! ! |