479 "returns current edited view |
479 "returns current edited view |
480 " |
480 " |
481 ^ layoutView |
481 ^ layoutView |
482 ! |
482 ! |
483 |
483 |
484 layoutView:aView |
484 layoutView:aView type:aTypeOrNil spec:aSpec |
485 "change current edited view |
485 "change current edited view |
486 " |
486 " |
487 self layoutView:aView type:nil |
|
488 ! |
|
489 |
|
490 layoutView:aView type:aTypeOrNil |
|
491 "change current edited view |
|
492 " |
|
493 |type name list| |
487 |type name list| |
494 |
488 |
495 layoutView := aView. |
489 layoutView := aView. |
|
490 layoutSpec := aSpec. |
496 |
491 |
497 aTypeOrNil notNil ifTrue:[ |
492 aTypeOrNil notNil ifTrue:[ |
498 self class slices findFirst:[:e| |
493 self class slices findFirst:[:e| |
499 e last == aTypeOrNil ifTrue:[name := e first. true] |
494 e last == aTypeOrNil ifTrue:[name := e first. true] |
500 ]. |
495 ]. |
553 aspectFor:aKey |
548 aspectFor:aKey |
554 "returns aspect for a key or nil |
549 "returns aspect for a key or nil |
555 " |
550 " |
556 ^ aspects at:aKey ifAbsent:[ super aspectFor:aKey ] |
551 ^ aspects at:aKey ifAbsent:[ super aspectFor:aKey ] |
557 |
552 |
|
553 |
|
554 ! |
|
555 |
|
556 notUsingDefaultExtent |
|
557 |holder| |
|
558 |
|
559 (holder := builder bindingAt:#notUsingDefaultExtent) isNil ifTrue:[ |
|
560 holder := BlockValue forLogicalNot:(self aspectFor:#useDefaultExtent). |
|
561 builder aspectAt:#notUsingDefaultExtent put:holder. |
|
562 ]. |
|
563 ^ holder |
558 |
564 |
559 ! |
565 ! |
560 |
566 |
561 noteBookList |
567 noteBookList |
562 "returns list of tab labels |
568 "returns list of tab labels |
705 #( bottomFraction bottomOffset |
711 #( bottomFraction bottomOffset |
706 leftFraction leftOffset |
712 leftFraction leftOffset |
707 topFraction topOffset |
713 topFraction topOffset |
708 rightFraction rightOffset |
714 rightFraction rightOffset |
709 leftAlignmentFraction topAlignmentFraction |
715 leftAlignmentFraction topAlignmentFraction |
|
716 useDefaultExtent |
710 ) |
717 ) |
711 |
718 |
712 do:[:aKey||holder| |
719 do:[:aKey||holder| |
713 holder := ValueHolder new. |
720 holder := ValueHolder new. |
714 holder addDependent:self. |
721 holder addDependent:self. |
890 #activeHelpKey: #alignHorizontal |
897 #activeHelpKey: #alignHorizontal |
891 #tabable: true |
898 #tabable: true |
892 #model: #leftAlignmentFraction |
899 #model: #leftAlignmentFraction |
893 #group: #inputGroup |
900 #group: #inputGroup |
894 #type: #numberOrNil |
901 #type: #numberOrNil |
|
902 #acceptOnLostFocus: true |
895 #acceptChannel: #acceptChannel |
903 #acceptChannel: #acceptChannel |
896 #modifiedChannel: #modifiedChannel |
904 #modifiedChannel: #modifiedChannel |
897 ) |
905 ) |
898 #(#InputFieldSpec |
906 #(#InputFieldSpec |
899 #name: 'topAlignmentFractionField' |
907 #name: 'topAlignmentFractionField' |
1170 <resource: #canvas> |
1179 <resource: #canvas> |
1171 |
1180 |
1172 ^ |
1181 ^ |
1173 |
1182 |
1174 #(#FullSpec |
1183 #(#FullSpec |
|
1184 #name: #windowSpec |
1175 #window: |
1185 #window: |
1176 #(#WindowSpec |
1186 #(#WindowSpec |
1177 #name: 'UILayoutTool-Extent' |
1187 #name: 'UILayoutTool-Extent' |
1178 #layout: #(#LayoutFrame 291 0 130 0 616 0 278 0) |
1188 #layout: #(#LayoutFrame 20 0 61 0 345 0 209 0) |
|
1189 #level: 0 |
1179 #label: 'UILayoutTool-Extent' |
1190 #label: 'UILayoutTool-Extent' |
1180 #min: #(#Point 10 10) |
1191 #min: #(#Point 10 10) |
1181 #max: #(#Point 1152 900) |
1192 #max: #(#Point 1152 900) |
1182 #bounds: #(#Rectangle 291 130 617 279) |
1193 #bounds: #(#Rectangle 20 61 346 210) |
1183 #usePreferredExtent: false |
1194 #usePreferredExtent: false |
|
1195 #returnIsOKInDialog: true |
|
1196 #escapeIsCancelInDialog: true |
1184 ) |
1197 ) |
1185 #component: |
1198 #component: |
1186 #(#SpecCollection |
1199 #(#SpecCollection |
1187 #collection: |
1200 #collection: |
1188 #( |
1201 #( |
1189 #(#FramedBoxSpec |
1202 #(#FramedBoxSpec |
1190 #name: 'FramedBox' |
1203 #name: 'FramedBox' |
1191 #layout: #(#LayoutFrame 0 0.0 6 0.0 0 1.0 100 0) |
1204 #layout: #(#LayoutFrame 0 0.0 6 0.0 0 1.0 137 0) |
1192 #component: |
1205 #component: |
1193 #(#SpecCollection |
1206 #(#SpecCollection |
1194 #collection: |
1207 #collection: |
1195 #( |
1208 #( |
1196 #(#LabelSpec |
1209 #(#LabelSpec |
1201 ) |
1214 ) |
1202 #(#InputFieldSpec |
1215 #(#InputFieldSpec |
1203 #name: 'fieldLeftOffset' |
1216 #name: 'fieldLeftOffset' |
1204 #layout: #(#LayoutFrame 90 0 13 0 140 0 35 0) |
1217 #layout: #(#LayoutFrame 90 0 13 0 140 0 35 0) |
1205 #activeHelpKey: #hrzExtent |
1218 #activeHelpKey: #hrzExtent |
|
1219 #enableChannel: #notUsingDefaultExtent |
1206 #tabable: true |
1220 #tabable: true |
1207 #model: #leftOffset |
1221 #model: #leftOffset |
1208 #group: #inputGroup |
1222 #group: #inputGroup |
1209 #type: #numberOrNil |
1223 #type: #numberOrNil |
1210 #acceptChannel: #acceptChannel |
1224 #acceptOnLostFocus: true |
1211 #modifiedChannel: #modifiedChannel |
1225 #acceptChannel: #acceptChannel |
|
1226 #modifiedChannel: #modifiedChannel |
1212 ) |
1227 ) |
1213 #(#LabelSpec |
1228 #(#LabelSpec |
1214 #name: 'labelHeight' |
1229 #name: 'labelHeight' |
1215 #layout: #(#AlignmentOrigin 89 0 49 0 1 0.5) |
1230 #layout: #(#AlignmentOrigin 89 0 49 0 1 0.5) |
1216 #label: 'Height:' |
1231 #label: 'Height:' |
1218 ) |
1233 ) |
1219 #(#InputFieldSpec |
1234 #(#InputFieldSpec |
1220 #name: 'fieldRightOffset' |
1235 #name: 'fieldRightOffset' |
1221 #layout: #(#LayoutFrame 90 0 38 0 140 0 60 0) |
1236 #layout: #(#LayoutFrame 90 0 38 0 140 0 60 0) |
1222 #activeHelpKey: #vrtExtent |
1237 #activeHelpKey: #vrtExtent |
|
1238 #enableChannel: #notUsingDefaultExtent |
1223 #tabable: true |
1239 #tabable: true |
1224 #model: #rightOffset |
1240 #model: #rightOffset |
1225 #group: #inputGroup |
1241 #group: #inputGroup |
1226 #type: #numberOrNil |
1242 #type: #numberOrNil |
1227 #acceptChannel: #acceptChannel |
1243 #acceptOnLostFocus: true |
1228 #modifiedChannel: #modifiedChannel |
1244 #acceptChannel: #acceptChannel |
|
1245 #modifiedChannel: #modifiedChannel |
|
1246 ) |
|
1247 #(#CheckBoxSpec |
|
1248 #name: 'useDefaultExtentCheckBox' |
|
1249 #layout: #(#LayoutFrame -1 0 75 0 135 0 97 0) |
|
1250 #model: #useDefaultExtent |
|
1251 #label: 'Use Widgets Default Extent' |
|
1252 #translateLabel: true |
1229 ) |
1253 ) |
1230 ) |
1254 ) |
1231 ) |
1255 ) |
1232 #label: 'Extent' |
1256 #label: 'Extent' |
1233 #labelPosition: #topLeft |
1257 #labelPosition: #topLeft |
1234 ) |
1258 ) |
1235 ) |
1259 ) |
1236 ) |
1260 ) |
1237 ) |
1261 ) |
1238 |
|
1239 "Modified: / 13.8.1998 / 19:58:04 / cg" |
|
1240 ! ! |
1262 ! ! |
1241 |
1263 |
1242 !UILayoutTool::Extent methodsFor:'accessing'! |
1264 !UILayoutTool::Extent methodsFor:'accessing'! |
1243 |
1265 |
1244 fetch:aView |
1266 fetch:aView spec:aSpec |
1245 "fetch extent |
1267 "fetch extent |
1246 " |
1268 " |
1247 |extent| |
1269 |extent| |
1248 |
1270 |
1249 extent := aView computeExtent. |
1271 extent := aView computeExtent. |
1250 |
1272 |
1251 (self aspectFor:#leftOffset) value:(extent x). |
1273 (self aspectFor:#leftOffset) value:(extent x). |
1252 (self aspectFor:#rightOffset) value:(extent y). |
1274 (self aspectFor:#rightOffset) value:(extent y). |
1253 |
1275 |
1254 |
1276 (self aspectFor:#useDefaultExtent) value:aSpec useDefaultExtent |
1255 ! |
1277 ! |
1256 |
1278 |
1257 layout |
1279 layout |
1258 "returns current extent |
1280 "returns current extent |
1259 " |
1281 " |
1527 #layout: #(#LayoutFrame 90 0 14 0 140 0 36 0) |
1549 #layout: #(#LayoutFrame 90 0 14 0 140 0 36 0) |
1528 #activeHelpKey: #rightRelative |
1550 #activeHelpKey: #rightRelative |
1529 #model: #rightFraction |
1551 #model: #rightFraction |
1530 #group: #inputGroup |
1552 #group: #inputGroup |
1531 #type: #numberOrNil |
1553 #type: #numberOrNil |
|
1554 #acceptOnLostFocus: true |
1532 #acceptChannel: #acceptChannel |
1555 #acceptChannel: #acceptChannel |
1533 #modifiedChannel: #modifiedChannel |
1556 #modifiedChannel: #modifiedChannel |
1534 ) |
1557 ) |
1535 #(#ActionButtonSpec |
1558 #(#ActionButtonSpec |
1536 #name: 'actionRelativeRight' |
1559 #name: 'actionRelativeRight' |
1543 #layout: #(#LayoutFrame 190 0 14 0 240 0 36 0) |
1566 #layout: #(#LayoutFrame 190 0 14 0 240 0 36 0) |
1544 #activeHelpKey: #rightAbsolute |
1567 #activeHelpKey: #rightAbsolute |
1545 #model: #rightOffset |
1568 #model: #rightOffset |
1546 #group: #inputGroup |
1569 #group: #inputGroup |
1547 #type: #numberOrNil |
1570 #type: #numberOrNil |
|
1571 #acceptOnLostFocus: true |
1548 #acceptChannel: #acceptChannel |
1572 #acceptChannel: #acceptChannel |
1549 #modifiedChannel: #modifiedChannel |
1573 #modifiedChannel: #modifiedChannel |
1550 ) |
1574 ) |
1551 #(#ActionButtonSpec |
1575 #(#ActionButtonSpec |
1552 #name: 'actionAbsoluteRight' |
1576 #name: 'actionAbsoluteRight' |
1564 #layout: #(#LayoutFrame 90 0 42 0 140 0 64 0) |
1588 #layout: #(#LayoutFrame 90 0 42 0 140 0 64 0) |
1565 #activeHelpKey: #bottomRelative |
1589 #activeHelpKey: #bottomRelative |
1566 #model: #bottomFraction |
1590 #model: #bottomFraction |
1567 #group: #inputGroup |
1591 #group: #inputGroup |
1568 #type: #numberOrNil |
1592 #type: #numberOrNil |
|
1593 #acceptOnLostFocus: true |
1569 #acceptChannel: #acceptChannel |
1594 #acceptChannel: #acceptChannel |
1570 #modifiedChannel: #modifiedChannel |
1595 #modifiedChannel: #modifiedChannel |
1571 ) |
1596 ) |
1572 #(#ActionButtonSpec |
1597 #(#ActionButtonSpec |
1573 #name: 'actionRelativeBottom' |
1598 #name: 'actionRelativeBottom' |
1580 #layout: #(#LayoutFrame 190 0 42 0 240 0 64 0) |
1605 #layout: #(#LayoutFrame 190 0 42 0 240 0 64 0) |
1581 #activeHelpKey: #bottomAbsolute |
1606 #activeHelpKey: #bottomAbsolute |
1582 #model: #bottomOffset |
1607 #model: #bottomOffset |
1583 #group: #inputGroup |
1608 #group: #inputGroup |
1584 #type: #numberOrNil |
1609 #type: #numberOrNil |
|
1610 #acceptOnLostFocus: true |
1585 #acceptChannel: #acceptChannel |
1611 #acceptChannel: #acceptChannel |
1586 #modifiedChannel: #modifiedChannel |
1612 #modifiedChannel: #modifiedChannel |
1587 ) |
1613 ) |
1588 #(#ActionButtonSpec |
1614 #(#ActionButtonSpec |
1589 #name: 'actionAbsoluteBottom' |
1615 #name: 'actionAbsoluteBottom' |
2026 #activeHelpKey: #cornerX |
2052 #activeHelpKey: #cornerX |
2027 #tabable: true |
2053 #tabable: true |
2028 #model: #rightOffset |
2054 #model: #rightOffset |
2029 #group: #inputGroup |
2055 #group: #inputGroup |
2030 #type: #numberOrNil |
2056 #type: #numberOrNil |
|
2057 #acceptOnLostFocus: true |
2031 #acceptChannel: #acceptChannel |
2058 #acceptChannel: #acceptChannel |
2032 #modifiedChannel: #modifiedChannel |
2059 #modifiedChannel: #modifiedChannel |
2033 ) |
2060 ) |
2034 #(#LabelSpec |
2061 #(#LabelSpec |
2035 #name: 'labelCornerX' |
2062 #name: 'labelCornerX' |