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