832 self update |
832 self update |
833 |
833 |
834 "Modified: / 4.2.2000 / 22:31:41 / cg" |
834 "Modified: / 4.2.2000 / 22:31:41 / cg" |
835 ! ! |
835 ! ! |
836 |
836 |
837 !UILayoutTool::Rectangle class methodsFor:'interface specs'! |
837 !UILayoutTool::Extent class methodsFor:'help specs'! |
|
838 |
|
839 helpSpec |
|
840 "This resource specification was automatically generated |
|
841 by the UIHelpTool of ST/X." |
|
842 |
|
843 "Do not manually edit this!! If it is corrupted, |
|
844 the UIHelpTool may not be able to read the specification." |
|
845 |
|
846 " |
|
847 UIHelpTool openOnClass:UILayoutTool::Extent |
|
848 " |
|
849 |
|
850 <resource: #help> |
|
851 |
|
852 ^super helpSpec addPairsFrom:#( |
|
853 |
|
854 #hrzExtent |
|
855 'Horizontal extent of the selected widget.' |
|
856 |
|
857 #vrtExtent |
|
858 'Vertical extent of the selected widget.' |
|
859 |
|
860 ) |
|
861 ! ! |
|
862 |
|
863 !UILayoutTool::Extent class methodsFor:'interface specs'! |
838 |
864 |
839 windowSpec |
865 windowSpec |
840 "This resource specification was automatically generated |
866 "This resource specification was automatically generated |
841 by the UIPainter of ST/X." |
867 by the UIPainter of ST/X." |
842 |
868 |
843 "Do not manually edit this!! If it is corrupted, |
869 "Do not manually edit this!! If it is corrupted, |
844 the UIPainter may not be able to read the specification." |
870 the UIPainter may not be able to read the specification." |
845 |
871 |
846 " |
872 " |
847 UIPainter new openOnClass:UILayoutTool::Rectangle andSelector:#windowSpec |
873 UIPainter new openOnClass:UILayoutTool::Extent andSelector:#windowSpec |
848 UILayoutTool::Rectangle new openInterface:#windowSpec |
874 UILayoutTool::Extent new openInterface:#windowSpec |
849 UILayoutTool::Rectangle open |
875 UILayoutTool::Extent open |
|
876 " |
|
877 |
|
878 <resource: #canvas> |
|
879 |
|
880 ^ |
|
881 #(#FullSpec |
|
882 #name: #windowSpec |
|
883 #window: |
|
884 #(#WindowSpec |
|
885 #label: 'UILayoutTool-Extent' |
|
886 #name: 'UILayoutTool-Extent' |
|
887 #min: #(#Point 10 10) |
|
888 #max: #(#Point 1152 900) |
|
889 #bounds: #(#Rectangle 506 24 832 173) |
|
890 ) |
|
891 #component: |
|
892 #(#SpecCollection |
|
893 #collection: #( |
|
894 #(#FramedBoxSpec |
|
895 #label: 'Extent' |
|
896 #name: 'FramedBox' |
|
897 #layout: #(#LayoutFrame 0 0.0 6 0.0 0 1.0 137 0) |
|
898 #labelPosition: #topLeft |
|
899 #component: |
|
900 #(#SpecCollection |
|
901 #collection: #( |
|
902 #(#LabelSpec |
|
903 #label: 'Width:' |
|
904 #name: 'labelWidth' |
|
905 #layout: #(#AlignmentOrigin 89 0 24 0 1 0.5) |
|
906 #adjust: #right |
|
907 ) |
|
908 #(#InputFieldSpec |
|
909 #attributes: |
|
910 #(#tabable |
|
911 true |
|
912 ) |
|
913 #name: 'fieldLeftOffset' |
|
914 #layout: #(#LayoutFrame 90 0 13 0 140 0 35 0) |
|
915 #activeHelpKey: #hrzExtent |
|
916 #enableChannel: #notUsingDefaultExtent |
|
917 #tabable: true |
|
918 #model: #leftOffset |
|
919 #group: #inputGroup |
|
920 #type: #numberOrNil |
|
921 #acceptOnLostFocus: true |
|
922 #acceptChannel: #acceptChannel |
|
923 #modifiedChannel: #modifiedChannel |
|
924 #acceptOnPointerLeave: false |
|
925 ) |
|
926 #(#LabelSpec |
|
927 #label: 'Height:' |
|
928 #name: 'labelHeight' |
|
929 #layout: #(#AlignmentOrigin 89 0 49 0 1 0.5) |
|
930 #adjust: #right |
|
931 ) |
|
932 #(#InputFieldSpec |
|
933 #attributes: |
|
934 #(#tabable |
|
935 true |
|
936 ) |
|
937 #name: 'fieldRightOffset' |
|
938 #layout: #(#LayoutFrame 90 0 38 0 140 0 60 0) |
|
939 #activeHelpKey: #vrtExtent |
|
940 #enableChannel: #notUsingDefaultExtent |
|
941 #tabable: true |
|
942 #model: #rightOffset |
|
943 #group: #inputGroup |
|
944 #type: #numberOrNil |
|
945 #acceptOnLostFocus: true |
|
946 #acceptChannel: #acceptChannel |
|
947 #modifiedChannel: #modifiedChannel |
|
948 #acceptOnPointerLeave: false |
|
949 ) |
|
950 #(#CheckBoxSpec |
|
951 #attributes: |
|
952 #(#tabable |
|
953 true |
|
954 ) |
|
955 #label: 'Use Widgets Default Extent' |
|
956 #name: 'useDefaultExtentCheckBox' |
|
957 #layout: #(#Point 5 74) |
|
958 #enableChannel: #defaultExtentEnabled |
|
959 #tabable: true |
|
960 #model: #useDefaultExtent |
|
961 #translateLabel: true |
|
962 ) |
|
963 ) |
|
964 |
|
965 ) |
|
966 ) |
|
967 ) |
|
968 |
|
969 ) |
|
970 ) |
|
971 ! ! |
|
972 |
|
973 !UILayoutTool::Extent methodsFor:'accessing'! |
|
974 |
|
975 fetch:aView spec:aSpec |
|
976 "fetch extent |
|
977 " |
|
978 |extent| |
|
979 |
|
980 extent := aView computeExtent. |
|
981 |
|
982 (self aspectFor:#leftOffset) value:(extent x). |
|
983 (self aspectFor:#rightOffset) value:(extent y). |
|
984 |
|
985 (self aspectFor:#useDefaultExtent) value:aSpec useDefaultExtent |
|
986 ! |
|
987 |
|
988 layout |
|
989 "returns current extent |
|
990 " |
|
991 ^ Smalltalk::Point x:(((self aspectFor:#leftOffset) value) ? 0) |
|
992 y:(((self aspectFor:#rightOffset) value) ? 0) |
|
993 |
|
994 ! ! |
|
995 |
|
996 !UILayoutTool::LayoutOrigin class methodsFor:'interface specs'! |
|
997 |
|
998 windowSpec |
|
999 "This resource specification was automatically generated |
|
1000 by the UIPainter of ST/X." |
|
1001 |
|
1002 "Do not manually edit this!! If it is corrupted, |
|
1003 the UIPainter may not be able to read the specification." |
|
1004 |
|
1005 " |
|
1006 UIPainter new openOnClass:UILayoutTool::LayoutOrigin andSelector:#windowSpec |
|
1007 UILayoutTool::LayoutOrigin new openInterface:#windowSpec |
|
1008 UILayoutTool::LayoutOrigin open |
850 " |
1009 " |
851 |
1010 |
852 <resource: #canvas> |
1011 <resource: #canvas> |
853 |
1012 |
854 ^ |
1013 ^ |
855 |
1014 |
856 #(#FullSpec |
1015 #(#FullSpec |
857 #window: |
1016 #window: |
858 #(#WindowSpec |
1017 #(#WindowSpec |
859 #name: 'UILayoutTool-Rectangle' |
1018 #name: 'UILayoutTool-LayoutOrigin' |
860 #layout: #(#LayoutFrame 291 0 130 0 632 0 328 0) |
1019 #layout: #(#LayoutFrame 290 0 420 0 647 0 565 0) |
861 #label: 'UILayoutTool-Rectangle' |
1020 #label: 'UILayoutTool-LayoutOrigin' |
862 #min: #(#Point 10 10) |
1021 #min: #(#Point 10 10) |
863 #max: #(#Point 1152 900) |
1022 #max: #(#Point 1152 900) |
864 #bounds: #(#Rectangle 291 130 633 329) |
1023 #bounds: #(#Rectangle 290 420 648 566) |
865 #usePreferredExtent: false |
1024 #usePreferredExtent: false |
866 ) |
1025 ) |
867 #component: |
1026 #component: |
868 #(#SpecCollection |
1027 #(#SpecCollection |
869 #collection: |
1028 #collection: |
870 #( |
1029 #( |
871 #(#UISubSpecification |
1030 #(#UISubSpecification |
872 #name: 'subSpecification' |
1031 #name: 'layoutOriginSpec' |
873 #layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 96 0) |
1032 #layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 110 0) |
874 #majorKey: #UILayoutTool |
1033 #majorKey: #UILayoutTool |
875 #minorKey: #layoutPointSpec |
1034 #minorKey: #layoutOriginSpec |
876 ) |
|
877 #(#FramedBoxSpec |
|
878 #name: 'FramedBox' |
|
879 #layout: #(#LayoutFrame 1 0.0 99 0 0 1.0 194 0) |
|
880 #component: |
|
881 #(#SpecCollection |
|
882 #collection: |
|
883 #( |
|
884 #(#LabelSpec |
|
885 #name: 'labelCornerY' |
|
886 #layout: #(#AlignmentOrigin 83 0 16 0 1 0) |
|
887 #label: 'Right:' |
|
888 #adjust: #left |
|
889 ) |
|
890 #(#InputFieldSpec |
|
891 #name: 'fieldCornerX' |
|
892 #layout: #(#LayoutFrame 85 0 13 0 135 0 35 0) |
|
893 #activeHelpKey: #cornerX |
|
894 #tabable: true |
|
895 #model: #rightOffset |
|
896 #group: #inputGroup |
|
897 #type: #numberOrNil |
|
898 #acceptOnLostFocus: true |
|
899 #acceptChannel: #acceptChannel |
|
900 #modifiedChannel: #modifiedChannel |
|
901 ) |
|
902 #(#LabelSpec |
|
903 #name: 'labelCornerX' |
|
904 #layout: #(#AlignmentOrigin 83 0 41 0 1 0) |
|
905 #label: 'Bottom:' |
|
906 #adjust: #left |
|
907 ) |
|
908 #(#InputFieldSpec |
|
909 #name: 'fieldCornerY' |
|
910 #layout: #(#LayoutFrame 85 0 38 0 135 0 60 0) |
|
911 #activeHelpKey: #cornerY |
|
912 #tabable: true |
|
913 #model: #bottomOffset |
|
914 #group: #inputGroup |
|
915 #type: #numberOrNil |
|
916 #acceptOnLostFocus: true |
|
917 #acceptChannel: #acceptChannel |
|
918 #modifiedChannel: #modifiedChannel |
|
919 ) |
|
920 ) |
|
921 ) |
|
922 #label: 'Corner' |
|
923 #labelPosition: #topLeft |
|
924 ) |
1035 ) |
925 ) |
1036 ) |
926 ) |
1037 ) |
927 ) |
1038 ) |
928 |
1039 ! ! |
929 "Modified: / 13.8.1998 / 19:59:16 / cg" |
1040 |
930 ! ! |
1041 !UILayoutTool::LayoutOrigin methodsFor:'accessing'! |
931 |
|
932 !UILayoutTool::Rectangle methodsFor:'accessing'! |
|
933 |
1042 |
934 fetch:aView spec:aSpec |
1043 fetch:aView spec:aSpec |
935 "fetch rectangle |
1044 "fetch layoutOrigin |
936 " |
1045 " |
937 |origin corner| |
1046 |layout| |
938 |
1047 |
939 origin := aView computeOrigin. |
1048 layout := UIPainterView asLayoutFrameFromView:aView. |
940 corner := aView computeCorner. |
1049 |
941 |
1050 (self aspectFor:#leftOffset) value:(layout leftOffset). |
942 (self aspectFor:#leftOffset) value:(origin x). |
1051 (self aspectFor:#leftFraction) value:(layout leftFraction). |
943 (self aspectFor:#rightOffset) value:(corner x). |
1052 (self aspectFor:#topOffset) value:(layout topOffset). |
944 (self aspectFor:#topOffset) value:(origin y). |
1053 (self aspectFor:#topFraction) value:(layout topFraction). |
945 (self aspectFor:#bottomOffset) value:(corner y). |
|
946 |
1054 |
947 |
1055 |
948 ! |
1056 ! |
949 |
1057 |
950 layout |
1058 layout |
951 "returns current layout as rectangle |
1059 "returns current layout as layoutOrigin |
952 " |
1060 " |
953 ^ Smalltalk::Rectangle left:(((self aspectFor:#leftOffset) value) ? 0) |
1061 |layout| |
954 top:(((self aspectFor:#topOffset) value) ? 0) |
1062 |
955 right:(((self aspectFor:#rightOffset) value) ? 0) |
1063 layout := Smalltalk::LayoutOrigin new. |
956 bottom:(((self aspectFor:#bottomOffset) value) ? 0) |
1064 |
957 |
1065 layout leftOffset:((self aspectFor:#leftOffset) value) ? 0. |
|
1066 layout topOffset:((self aspectFor:#topOffset) value) ? 0. |
|
1067 layout leftFraction:((self aspectFor:#leftFraction) value) ? 0. |
|
1068 layout topFraction:((self aspectFor:#topFraction) value) ? 0. |
|
1069 |
|
1070 ^ layout |
958 |
1071 |
959 ! ! |
1072 ! ! |
960 |
1073 |
961 !UILayoutTool::AlignmentOrigin class methodsFor:'help specs'! |
1074 !UILayoutTool::AlignmentOrigin class methodsFor:'help specs'! |
962 |
1075 |
1372 self makeAlignLeft:1 top:0 |
1485 self makeAlignLeft:1 top:0 |
1373 |
1486 |
1374 |
1487 |
1375 ! ! |
1488 ! ! |
1376 |
1489 |
1377 !UILayoutTool::LayoutOrigin class methodsFor:'interface specs'! |
|
1378 |
|
1379 windowSpec |
|
1380 "This resource specification was automatically generated |
|
1381 by the UIPainter of ST/X." |
|
1382 |
|
1383 "Do not manually edit this!! If it is corrupted, |
|
1384 the UIPainter may not be able to read the specification." |
|
1385 |
|
1386 " |
|
1387 UIPainter new openOnClass:UILayoutTool::LayoutOrigin andSelector:#windowSpec |
|
1388 UILayoutTool::LayoutOrigin new openInterface:#windowSpec |
|
1389 UILayoutTool::LayoutOrigin open |
|
1390 " |
|
1391 |
|
1392 <resource: #canvas> |
|
1393 |
|
1394 ^ |
|
1395 |
|
1396 #(#FullSpec |
|
1397 #window: |
|
1398 #(#WindowSpec |
|
1399 #name: 'UILayoutTool-LayoutOrigin' |
|
1400 #layout: #(#LayoutFrame 290 0 420 0 647 0 565 0) |
|
1401 #label: 'UILayoutTool-LayoutOrigin' |
|
1402 #min: #(#Point 10 10) |
|
1403 #max: #(#Point 1152 900) |
|
1404 #bounds: #(#Rectangle 290 420 648 566) |
|
1405 #usePreferredExtent: false |
|
1406 ) |
|
1407 #component: |
|
1408 #(#SpecCollection |
|
1409 #collection: |
|
1410 #( |
|
1411 #(#UISubSpecification |
|
1412 #name: 'layoutOriginSpec' |
|
1413 #layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 110 0) |
|
1414 #majorKey: #UILayoutTool |
|
1415 #minorKey: #layoutOriginSpec |
|
1416 ) |
|
1417 ) |
|
1418 ) |
|
1419 ) |
|
1420 ! ! |
|
1421 |
|
1422 !UILayoutTool::LayoutOrigin methodsFor:'accessing'! |
|
1423 |
|
1424 fetch:aView spec:aSpec |
|
1425 "fetch layoutOrigin |
|
1426 " |
|
1427 |layout| |
|
1428 |
|
1429 layout := UIPainterView asLayoutFrameFromView:aView. |
|
1430 |
|
1431 (self aspectFor:#leftOffset) value:(layout leftOffset). |
|
1432 (self aspectFor:#leftFraction) value:(layout leftFraction). |
|
1433 (self aspectFor:#topOffset) value:(layout topOffset). |
|
1434 (self aspectFor:#topFraction) value:(layout topFraction). |
|
1435 |
|
1436 |
|
1437 ! |
|
1438 |
|
1439 layout |
|
1440 "returns current layout as layoutOrigin |
|
1441 " |
|
1442 |layout| |
|
1443 |
|
1444 layout := Smalltalk::LayoutOrigin new. |
|
1445 |
|
1446 layout leftOffset:((self aspectFor:#leftOffset) value) ? 0. |
|
1447 layout topOffset:((self aspectFor:#topOffset) value) ? 0. |
|
1448 layout leftFraction:((self aspectFor:#leftFraction) value) ? 0. |
|
1449 layout topFraction:((self aspectFor:#topFraction) value) ? 0. |
|
1450 |
|
1451 ^ layout |
|
1452 |
|
1453 ! ! |
|
1454 |
|
1455 !UILayoutTool::Point class methodsFor:'interface specs'! |
1490 !UILayoutTool::Point class methodsFor:'interface specs'! |
1456 |
1491 |
1457 windowSpec |
1492 windowSpec |
1458 "This resource specification was automatically generated |
1493 "This resource specification was automatically generated |
1459 by the UIPainter of ST/X." |
1494 by the UIPainter of ST/X." |
1515 layout |
1550 layout |
1516 "returns current layout as point |
1551 "returns current layout as point |
1517 " |
1552 " |
1518 ^ Smalltalk::Point x:(((self aspectFor:#leftOffset) value) ? 0) |
1553 ^ Smalltalk::Point x:(((self aspectFor:#leftOffset) value) ? 0) |
1519 y:(((self aspectFor:#topOffset) value) ? 0) |
1554 y:(((self aspectFor:#topOffset) value) ? 0) |
1520 |
|
1521 ! ! |
|
1522 |
|
1523 !UILayoutTool::Extent class methodsFor:'help specs'! |
|
1524 |
|
1525 helpSpec |
|
1526 "This resource specification was automatically generated |
|
1527 by the UIHelpTool of ST/X." |
|
1528 |
|
1529 "Do not manually edit this!! If it is corrupted, |
|
1530 the UIHelpTool may not be able to read the specification." |
|
1531 |
|
1532 " |
|
1533 UIHelpTool openOnClass:UILayoutTool::Extent |
|
1534 " |
|
1535 |
|
1536 <resource: #help> |
|
1537 |
|
1538 ^super helpSpec addPairsFrom:#( |
|
1539 |
|
1540 #hrzExtent |
|
1541 'Horizontal extent of the selected widget.' |
|
1542 |
|
1543 #vrtExtent |
|
1544 'Vertical extent of the selected widget.' |
|
1545 |
|
1546 ) |
|
1547 ! ! |
|
1548 |
|
1549 !UILayoutTool::Extent class methodsFor:'interface specs'! |
|
1550 |
|
1551 windowSpec |
|
1552 "This resource specification was automatically generated |
|
1553 by the UIPainter of ST/X." |
|
1554 |
|
1555 "Do not manually edit this!! If it is corrupted, |
|
1556 the UIPainter may not be able to read the specification." |
|
1557 |
|
1558 " |
|
1559 UIPainter new openOnClass:UILayoutTool::Extent andSelector:#windowSpec |
|
1560 UILayoutTool::Extent new openInterface:#windowSpec |
|
1561 UILayoutTool::Extent open |
|
1562 " |
|
1563 |
|
1564 <resource: #canvas> |
|
1565 |
|
1566 ^ |
|
1567 #(#FullSpec |
|
1568 #name: #windowSpec |
|
1569 #window: |
|
1570 #(#WindowSpec |
|
1571 #label: 'UILayoutTool-Extent' |
|
1572 #name: 'UILayoutTool-Extent' |
|
1573 #min: #(#Point 10 10) |
|
1574 #max: #(#Point 1152 900) |
|
1575 #bounds: #(#Rectangle 506 24 832 173) |
|
1576 ) |
|
1577 #component: |
|
1578 #(#SpecCollection |
|
1579 #collection: #( |
|
1580 #(#FramedBoxSpec |
|
1581 #label: 'Extent' |
|
1582 #name: 'FramedBox' |
|
1583 #layout: #(#LayoutFrame 0 0.0 6 0.0 0 1.0 137 0) |
|
1584 #labelPosition: #topLeft |
|
1585 #component: |
|
1586 #(#SpecCollection |
|
1587 #collection: #( |
|
1588 #(#LabelSpec |
|
1589 #label: 'Width:' |
|
1590 #name: 'labelWidth' |
|
1591 #layout: #(#AlignmentOrigin 89 0 24 0 1 0.5) |
|
1592 #adjust: #right |
|
1593 ) |
|
1594 #(#InputFieldSpec |
|
1595 #attributes: |
|
1596 #(#tabable |
|
1597 true |
|
1598 ) |
|
1599 #name: 'fieldLeftOffset' |
|
1600 #layout: #(#LayoutFrame 90 0 13 0 140 0 35 0) |
|
1601 #activeHelpKey: #hrzExtent |
|
1602 #enableChannel: #notUsingDefaultExtent |
|
1603 #tabable: true |
|
1604 #model: #leftOffset |
|
1605 #group: #inputGroup |
|
1606 #type: #numberOrNil |
|
1607 #acceptOnLostFocus: true |
|
1608 #acceptChannel: #acceptChannel |
|
1609 #modifiedChannel: #modifiedChannel |
|
1610 #acceptOnPointerLeave: false |
|
1611 ) |
|
1612 #(#LabelSpec |
|
1613 #label: 'Height:' |
|
1614 #name: 'labelHeight' |
|
1615 #layout: #(#AlignmentOrigin 89 0 49 0 1 0.5) |
|
1616 #adjust: #right |
|
1617 ) |
|
1618 #(#InputFieldSpec |
|
1619 #attributes: |
|
1620 #(#tabable |
|
1621 true |
|
1622 ) |
|
1623 #name: 'fieldRightOffset' |
|
1624 #layout: #(#LayoutFrame 90 0 38 0 140 0 60 0) |
|
1625 #activeHelpKey: #vrtExtent |
|
1626 #enableChannel: #notUsingDefaultExtent |
|
1627 #tabable: true |
|
1628 #model: #rightOffset |
|
1629 #group: #inputGroup |
|
1630 #type: #numberOrNil |
|
1631 #acceptOnLostFocus: true |
|
1632 #acceptChannel: #acceptChannel |
|
1633 #modifiedChannel: #modifiedChannel |
|
1634 #acceptOnPointerLeave: false |
|
1635 ) |
|
1636 #(#CheckBoxSpec |
|
1637 #attributes: |
|
1638 #(#tabable |
|
1639 true |
|
1640 ) |
|
1641 #label: 'Use Widgets Default Extent' |
|
1642 #name: 'useDefaultExtentCheckBox' |
|
1643 #layout: #(#Point 5 74) |
|
1644 #enableChannel: #defaultExtentEnabled |
|
1645 #tabable: true |
|
1646 #model: #useDefaultExtent |
|
1647 #translateLabel: true |
|
1648 ) |
|
1649 ) |
|
1650 |
|
1651 ) |
|
1652 ) |
|
1653 ) |
|
1654 |
|
1655 ) |
|
1656 ) |
|
1657 ! ! |
|
1658 |
|
1659 !UILayoutTool::Extent methodsFor:'accessing'! |
|
1660 |
|
1661 fetch:aView spec:aSpec |
|
1662 "fetch extent |
|
1663 " |
|
1664 |extent| |
|
1665 |
|
1666 extent := aView computeExtent. |
|
1667 |
|
1668 (self aspectFor:#leftOffset) value:(extent x). |
|
1669 (self aspectFor:#rightOffset) value:(extent y). |
|
1670 |
|
1671 (self aspectFor:#useDefaultExtent) value:aSpec useDefaultExtent |
|
1672 ! |
|
1673 |
|
1674 layout |
|
1675 "returns current extent |
|
1676 " |
|
1677 ^ Smalltalk::Point x:(((self aspectFor:#leftOffset) value) ? 0) |
|
1678 y:(((self aspectFor:#rightOffset) value) ? 0) |
|
1679 |
1555 |
1680 ! ! |
1556 ! ! |
1681 |
1557 |
1682 !UILayoutTool::LayoutFrame class methodsFor:'help specs'! |
1558 !UILayoutTool::LayoutFrame class methodsFor:'help specs'! |
1683 |
1559 |
2381 right:1 offset:0 |
2257 right:1 offset:0 |
2382 top:0 offset:0 |
2258 top:0 offset:0 |
2383 bottom:0.5 offset:0 |
2259 bottom:0.5 offset:0 |
2384 ! ! |
2260 ! ! |
2385 |
2261 |
|
2262 !UILayoutTool::Rectangle class methodsFor:'interface specs'! |
|
2263 |
|
2264 windowSpec |
|
2265 "This resource specification was automatically generated |
|
2266 by the UIPainter of ST/X." |
|
2267 |
|
2268 "Do not manually edit this!! If it is corrupted, |
|
2269 the UIPainter may not be able to read the specification." |
|
2270 |
|
2271 " |
|
2272 UIPainter new openOnClass:UILayoutTool::Rectangle andSelector:#windowSpec |
|
2273 UILayoutTool::Rectangle new openInterface:#windowSpec |
|
2274 UILayoutTool::Rectangle open |
|
2275 " |
|
2276 |
|
2277 <resource: #canvas> |
|
2278 |
|
2279 ^ |
|
2280 |
|
2281 #(#FullSpec |
|
2282 #window: |
|
2283 #(#WindowSpec |
|
2284 #name: 'UILayoutTool-Rectangle' |
|
2285 #layout: #(#LayoutFrame 291 0 130 0 632 0 328 0) |
|
2286 #label: 'UILayoutTool-Rectangle' |
|
2287 #min: #(#Point 10 10) |
|
2288 #max: #(#Point 1152 900) |
|
2289 #bounds: #(#Rectangle 291 130 633 329) |
|
2290 #usePreferredExtent: false |
|
2291 ) |
|
2292 #component: |
|
2293 #(#SpecCollection |
|
2294 #collection: |
|
2295 #( |
|
2296 #(#UISubSpecification |
|
2297 #name: 'subSpecification' |
|
2298 #layout: #(#LayoutFrame 1 0.0 6 0 0 1.0 96 0) |
|
2299 #majorKey: #UILayoutTool |
|
2300 #minorKey: #layoutPointSpec |
|
2301 ) |
|
2302 #(#FramedBoxSpec |
|
2303 #name: 'FramedBox' |
|
2304 #layout: #(#LayoutFrame 1 0.0 99 0 0 1.0 194 0) |
|
2305 #component: |
|
2306 #(#SpecCollection |
|
2307 #collection: |
|
2308 #( |
|
2309 #(#LabelSpec |
|
2310 #name: 'labelCornerY' |
|
2311 #layout: #(#AlignmentOrigin 83 0 16 0 1 0) |
|
2312 #label: 'Right:' |
|
2313 #adjust: #left |
|
2314 ) |
|
2315 #(#InputFieldSpec |
|
2316 #name: 'fieldCornerX' |
|
2317 #layout: #(#LayoutFrame 85 0 13 0 135 0 35 0) |
|
2318 #activeHelpKey: #cornerX |
|
2319 #tabable: true |
|
2320 #model: #rightOffset |
|
2321 #group: #inputGroup |
|
2322 #type: #numberOrNil |
|
2323 #acceptOnLostFocus: true |
|
2324 #acceptChannel: #acceptChannel |
|
2325 #modifiedChannel: #modifiedChannel |
|
2326 ) |
|
2327 #(#LabelSpec |
|
2328 #name: 'labelCornerX' |
|
2329 #layout: #(#AlignmentOrigin 83 0 41 0 1 0) |
|
2330 #label: 'Bottom:' |
|
2331 #adjust: #left |
|
2332 ) |
|
2333 #(#InputFieldSpec |
|
2334 #name: 'fieldCornerY' |
|
2335 #layout: #(#LayoutFrame 85 0 38 0 135 0 60 0) |
|
2336 #activeHelpKey: #cornerY |
|
2337 #tabable: true |
|
2338 #model: #bottomOffset |
|
2339 #group: #inputGroup |
|
2340 #type: #numberOrNil |
|
2341 #acceptOnLostFocus: true |
|
2342 #acceptChannel: #acceptChannel |
|
2343 #modifiedChannel: #modifiedChannel |
|
2344 ) |
|
2345 ) |
|
2346 ) |
|
2347 #label: 'Corner' |
|
2348 #labelPosition: #topLeft |
|
2349 ) |
|
2350 ) |
|
2351 ) |
|
2352 ) |
|
2353 |
|
2354 "Modified: / 13.8.1998 / 19:59:16 / cg" |
|
2355 ! ! |
|
2356 |
|
2357 !UILayoutTool::Rectangle methodsFor:'accessing'! |
|
2358 |
|
2359 fetch:aView spec:aSpec |
|
2360 "fetch rectangle |
|
2361 " |
|
2362 |origin corner| |
|
2363 |
|
2364 origin := aView computeOrigin. |
|
2365 corner := aView computeCorner. |
|
2366 |
|
2367 (self aspectFor:#leftOffset) value:(origin x). |
|
2368 (self aspectFor:#rightOffset) value:(corner x). |
|
2369 (self aspectFor:#topOffset) value:(origin y). |
|
2370 (self aspectFor:#bottomOffset) value:(corner y). |
|
2371 |
|
2372 |
|
2373 ! |
|
2374 |
|
2375 layout |
|
2376 "returns current layout as rectangle |
|
2377 " |
|
2378 ^ Smalltalk::Rectangle left:(((self aspectFor:#leftOffset) value) ? 0) |
|
2379 top:(((self aspectFor:#topOffset) value) ? 0) |
|
2380 right:(((self aspectFor:#rightOffset) value) ? 0) |
|
2381 bottom:(((self aspectFor:#bottomOffset) value) ? 0) |
|
2382 |
|
2383 |
|
2384 ! ! |
|
2385 |
2386 !UILayoutTool class methodsFor:'documentation'! |
2386 !UILayoutTool class methodsFor:'documentation'! |
2387 |
2387 |
2388 version |
2388 version |
2389 ^ '$Header$' |
2389 ^ '$Header$' |
2390 ! ! |
2390 ! ! |