1472 component: |
1472 component: |
1473 (SpecCollection |
1473 (SpecCollection |
1474 collection: ( |
1474 collection: ( |
1475 (LabelSpec |
1475 (LabelSpec |
1476 label: 'Left:' |
1476 label: 'Left:' |
1477 name: 'GropLeftLabel' |
1477 name: 'CropLeftLabel' |
1478 layout: (LayoutFrame 14 0 24 0 90 0 46 0) |
1478 layout: (LayoutFrame 14 0 24 0 90 0 46 0) |
1479 activeHelpKey: gropLeft |
1479 activeHelpKey: cropLeft |
1480 translateLabel: true |
1480 translateLabel: true |
1481 adjust: left |
1481 adjust: left |
1482 ) |
1482 ) |
1483 (InputFieldSpec |
1483 (InputFieldSpec |
1484 name: 'GropLeftEntryField' |
1484 name: 'CropLeftEntryField' |
1485 layout: (LayoutFrame 95 0 24 0 125 0 46 0) |
1485 layout: (LayoutFrame 95 0 24 0 125 0 46 0) |
1486 activeHelpKey: gropLeft |
1486 activeHelpKey: cropLeft |
1487 tabable: true |
1487 tabable: true |
1488 model: gropLeftAmount |
1488 model: cropLeftAmount |
1489 type: number |
1489 type: number |
1490 acceptChannel: acceptChannel |
1490 acceptChannel: acceptChannel |
1491 acceptOnPointerLeave: false |
1491 acceptOnPointerLeave: false |
1492 ) |
1492 ) |
1493 (ActionButtonSpec |
1493 (ActionButtonSpec |
1494 label: 'Now' |
1494 label: 'Crop Now' |
1495 name: 'GropLeftNowButton' |
1495 name: 'CropLeftNowButton' |
1496 layout: (LayoutFrame 133 0 21 0 187 0 50 0) |
1496 layout: (LayoutFrame 133 0 21 0 232 0 50 0) |
1497 activeHelpKey: gropLeft |
1497 activeHelpKey: cropLeft |
1498 translateLabel: true |
1498 translateLabel: true |
1499 resizeForLabel: true |
1499 resizeForLabel: true |
1500 tabable: true |
1500 tabable: true |
1501 model: gropLeftNow |
1501 model: cropLeftNow |
1502 autoRepeat: true |
1502 autoRepeat: true |
1503 usePreferredWidth: true |
1503 usePreferredWidth: true |
1504 ) |
1504 ) |
1505 (LabelSpec |
1505 (LabelSpec |
1506 label: 'Right:' |
1506 label: 'Right:' |
1507 name: 'GropRightLabel' |
1507 name: 'CropRightLabel' |
1508 layout: (LayoutFrame 14 0 55 0 90 0 77 0) |
1508 layout: (LayoutFrame 14 0 55 0 90 0 77 0) |
1509 activeHelpKey: gropRight |
1509 activeHelpKey: cropRight |
1510 translateLabel: true |
1510 translateLabel: true |
1511 adjust: left |
1511 adjust: left |
1512 ) |
1512 ) |
1513 (InputFieldSpec |
1513 (InputFieldSpec |
1514 name: 'GropRightEntryField' |
1514 name: 'CropRightEntryField' |
1515 layout: (LayoutFrame 95 0 55 0 125 0 77 0) |
1515 layout: (LayoutFrame 95 0 55 0 125 0 77 0) |
1516 activeHelpKey: gropRight |
1516 activeHelpKey: cropRight |
1517 tabable: true |
1517 tabable: true |
1518 model: gropRightAmount |
1518 model: cropRightAmount |
1519 type: number |
1519 type: number |
1520 acceptChannel: acceptChannel |
1520 acceptChannel: acceptChannel |
1521 acceptOnPointerLeave: false |
1521 acceptOnPointerLeave: false |
1522 ) |
1522 ) |
1523 (ActionButtonSpec |
1523 (ActionButtonSpec |
1524 label: 'Now' |
1524 label: 'Crop Now' |
1525 name: 'GropRightButton' |
1525 name: 'CropRightButton' |
1526 layout: (LayoutFrame 133 0 51 0 187 0 80 0) |
1526 layout: (LayoutFrame 133 0 51 0 232 0 80 0) |
1527 activeHelpKey: gropRight |
1527 activeHelpKey: cropRight |
1528 translateLabel: true |
1528 translateLabel: true |
1529 resizeForLabel: true |
1529 resizeForLabel: true |
1530 tabable: true |
1530 tabable: true |
1531 model: gropRightNow |
1531 model: cropRightNow |
1532 autoRepeat: true |
1532 autoRepeat: true |
1533 usePreferredWidth: true |
1533 usePreferredWidth: true |
1534 ) |
1534 ) |
1535 (LabelSpec |
1535 (LabelSpec |
1536 label: 'Top:' |
1536 label: 'Top:' |
1537 name: 'GropTopLabel' |
1537 name: 'CropTopLabel' |
1538 layout: (LayoutFrame 14 0 85 0 90 0 107 0) |
1538 layout: (LayoutFrame 14 0 85 0 90 0 107 0) |
1539 activeHelpKey: gropTop |
1539 activeHelpKey: cropTop |
1540 translateLabel: true |
1540 translateLabel: true |
1541 adjust: left |
1541 adjust: left |
1542 ) |
1542 ) |
1543 (InputFieldSpec |
1543 (InputFieldSpec |
1544 name: 'GropTopEntryField' |
1544 name: 'CropTopEntryField' |
1545 layout: (LayoutFrame 95 0 85 0 125 0 107 0) |
1545 layout: (LayoutFrame 95 0 85 0 125 0 107 0) |
1546 activeHelpKey: gropTop |
1546 activeHelpKey: cropTop |
1547 tabable: true |
1547 tabable: true |
1548 model: gropTopAmount |
1548 model: cropTopAmount |
1549 type: number |
1549 type: number |
1550 acceptChannel: acceptChannel |
1550 acceptChannel: acceptChannel |
1551 acceptOnPointerLeave: false |
1551 acceptOnPointerLeave: false |
1552 ) |
1552 ) |
1553 (ActionButtonSpec |
1553 (ActionButtonSpec |
1554 label: 'Now' |
1554 label: 'Crop Now' |
1555 name: 'GropTopButton' |
1555 name: 'CropTopButton' |
1556 layout: (LayoutFrame 133 0 81 0 187 0 110 0) |
1556 layout: (LayoutFrame 133 0 81 0 232 0 110 0) |
1557 activeHelpKey: gropTop |
1557 activeHelpKey: cropTop |
1558 translateLabel: true |
1558 translateLabel: true |
1559 resizeForLabel: true |
1559 resizeForLabel: true |
1560 tabable: true |
1560 tabable: true |
1561 model: gropTopNow |
1561 model: cropTopNow |
1562 autoRepeat: true |
1562 autoRepeat: true |
1563 usePreferredWidth: true |
1563 usePreferredWidth: true |
1564 ) |
1564 ) |
1565 (LabelSpec |
1565 (LabelSpec |
1566 label: 'Bottom:' |
1566 label: 'Bottom:' |
1567 name: 'GropBottomLabel' |
1567 name: 'CropBottomLabel' |
1568 layout: (LayoutFrame 14 0 115 0 90 0 137 0) |
1568 layout: (LayoutFrame 14 0 115 0 90 0 137 0) |
1569 activeHelpKey: gropBottom |
1569 activeHelpKey: cropBottom |
1570 translateLabel: true |
1570 translateLabel: true |
1571 adjust: left |
1571 adjust: left |
1572 ) |
1572 ) |
1573 (InputFieldSpec |
1573 (InputFieldSpec |
1574 name: 'GropBottomEntryField' |
1574 name: 'CropBottomEntryField' |
1575 layout: (LayoutFrame 95 0 115 0 125 0 137 0) |
1575 layout: (LayoutFrame 95 0 115 0 125 0 137 0) |
1576 activeHelpKey: gropBottom |
1576 activeHelpKey: cropBottom |
1577 tabable: true |
1577 tabable: true |
1578 model: gropBottomAmount |
1578 model: cropBottomAmount |
1579 type: number |
1579 type: number |
1580 acceptChannel: acceptChannel |
1580 acceptChannel: acceptChannel |
1581 acceptOnPointerLeave: false |
1581 acceptOnPointerLeave: false |
1582 ) |
1582 ) |
1583 (ActionButtonSpec |
1583 (ActionButtonSpec |
1584 label: 'Now' |
1584 label: 'Crop Now' |
1585 name: 'GropBottomButton' |
1585 name: 'CropBottomButton' |
1586 layout: (LayoutFrame 133 0 111 0 187 0 140 0) |
1586 layout: (LayoutFrame 133 0 111 0 232 0 140 0) |
1587 activeHelpKey: gropBottom |
1587 activeHelpKey: cropBottom |
1588 translateLabel: true |
1588 translateLabel: true |
1589 resizeForLabel: true |
1589 resizeForLabel: true |
1590 tabable: true |
1590 tabable: true |
1591 model: gropBottomNow |
1591 model: cropBottomNow |
1592 autoRepeat: true |
1592 autoRepeat: true |
1593 usePreferredWidth: true |
1593 usePreferredWidth: true |
1594 ) |
1594 ) |
1595 (ActionButtonSpec |
1595 (ActionButtonSpec |
1596 label: 'Crop All' |
1596 label: 'Crop All' |
1597 name: 'Button4' |
1597 name: 'Button4' |
1598 layout: (LayoutFrame 133 0 148 0 237 0 176 0) |
1598 layout: (LayoutFrame 133 0 148 0 237 0 176 0) |
1599 activeHelpKey: gropAll |
1599 activeHelpKey: cropAll |
1600 visibilityChannel: cropBoxIsNotDialog |
|
1601 translateLabel: true |
1600 translateLabel: true |
1602 resizeForLabel: true |
1601 resizeForLabel: true |
1603 tabable: true |
1602 tabable: true |
1604 model: applyCropAction |
1603 model: applyCropAction |
1605 ) |
1604 ) |
1606 (HorizontalPanelViewSpec |
1605 (HorizontalPanelViewSpec |
1607 name: 'HorizontalPanel1' |
1606 name: 'HorizontalPanel1' |
1608 layout: (LayoutFrame 0 0.0 -30 1 -16 1.0 0 1) |
1607 layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
1609 visibilityChannel: cropBoxIsDialog |
1608 visibilityChannel: cropBoxIsDialog |
1610 horizontalLayout: fitSpace |
1609 horizontalLayout: fitSpace |
1611 verticalLayout: center |
1610 verticalLayout: center |
1612 horizontalSpace: 3 |
1611 horizontalSpace: 3 |
1613 verticalSpace: 3 |
1612 verticalSpace: 3 |
1620 name: 'Button1' |
1619 name: 'Button1' |
1621 translateLabel: true |
1620 translateLabel: true |
1622 resizeForLabel: true |
1621 resizeForLabel: true |
1623 tabable: true |
1622 tabable: true |
1624 model: cancel |
1623 model: cancel |
1625 extent: (Point 110 28) |
1624 extent: (Point 116 28) |
1626 ) |
1625 ) |
1627 (ActionButtonSpec |
1626 (ActionButtonSpec |
1628 label: 'Apply' |
1627 label: 'Apply' |
1629 name: 'Button3' |
1628 name: 'Button3' |
1630 translateLabel: true |
1629 translateLabel: true |
1631 resizeForLabel: true |
1630 resizeForLabel: true |
1632 tabable: true |
1631 tabable: true |
1633 model: applyCropAction |
1632 model: applyCropAction |
1634 extent: (Point 111 28) |
1633 extent: (Point 116 28) |
1635 ) |
1634 ) |
1636 (ActionButtonSpec |
1635 (ActionButtonSpec |
1637 label: 'OK' |
1636 label: 'OK' |
1638 name: 'Button2' |
1637 name: 'Button2' |
1639 translateLabel: true |
1638 translateLabel: true |
1640 resizeForLabel: true |
1639 resizeForLabel: true |
1641 tabable: true |
1640 tabable: true |
1642 model: accept |
1641 model: accept |
1643 extent: (Point 111 28) |
1642 extent: (Point 116 28) |
1644 ) |
1643 ) |
1645 ) |
1644 ) |
1646 |
1645 |
1647 ) |
1646 ) |
1648 keepSpaceForOSXResizeHandleH: true |
|
1649 ) |
|
1650 (LabelSpec |
|
1651 label: 'Floodfill Tolerance:' |
|
1652 name: 'Label1' |
|
1653 layout: (LayoutFrame 14 0 192 0 242 0 214 0) |
|
1654 activeHelpKey: floodFillMaxError |
|
1655 visibilityChannel: cropBoxIsNotDialog |
|
1656 translateLabel: true |
|
1657 adjust: left |
|
1658 ) |
|
1659 (LabelSpec |
|
1660 label: 'Hue:' |
|
1661 name: 'Label2' |
|
1662 layout: (LayoutFrame 51 0 220 0 127 0 242 0) |
|
1663 activeHelpKey: floodFillMaxError |
|
1664 visibilityChannel: cropBoxIsNotDialog |
|
1665 translateLabel: true |
|
1666 adjust: left |
|
1667 ) |
|
1668 (InputFieldSpec |
|
1669 name: 'EntryField2' |
|
1670 layout: (LayoutFrame 132 0 220 0 190 0 242 0) |
|
1671 activeHelpKey: floodFillMaxError |
|
1672 visibilityChannel: cropBoxIsNotDialog |
|
1673 tabable: true |
|
1674 model: floodFillMaxHueError |
|
1675 type: number |
|
1676 acceptChannel: acceptChannel |
|
1677 acceptOnPointerLeave: true |
|
1678 ) |
|
1679 (LabelSpec |
|
1680 label: 'Light:' |
|
1681 name: 'Label3' |
|
1682 layout: (LayoutFrame 51 0 246 0 127 0 268 0) |
|
1683 activeHelpKey: floodFillMaxError |
|
1684 visibilityChannel: cropBoxIsNotDialog |
|
1685 translateLabel: true |
|
1686 adjust: left |
|
1687 ) |
|
1688 (InputFieldSpec |
|
1689 name: 'EntryField3' |
|
1690 layout: (LayoutFrame 132 0 246 0 190 0 268 0) |
|
1691 activeHelpKey: floodFillMaxError |
|
1692 visibilityChannel: cropBoxIsNotDialog |
|
1693 tabable: true |
|
1694 model: floodFillMaxLightError |
|
1695 type: number |
|
1696 acceptChannel: acceptChannel |
|
1697 acceptOnPointerLeave: true |
|
1698 ) |
1647 ) |
1699 ) |
1648 ) |
1700 |
1649 |
1701 ) |
1650 ) |
1702 ) |
1651 ) |
1792 ) |
1741 ) |
1793 ) |
1742 ) |
1794 |
1743 |
1795 ) |
1744 ) |
1796 ) |
1745 ) |
|
1746 ! |
|
1747 |
|
1748 floodFillToleranceSpec |
|
1749 "This resource specification was automatically generated |
|
1750 by the UIPainter of ST/X." |
|
1751 |
|
1752 "Do not manually edit this!! If it is corrupted, |
|
1753 the UIPainter may not be able to read the specification." |
|
1754 |
|
1755 " |
|
1756 UIPainter new openOnClass:ImageEditor andSelector:#floodFillToleranceSpec |
|
1757 ImageEditor new openInterface:#floodFillToleranceSpec |
|
1758 " |
|
1759 |
|
1760 <resource: #canvas> |
|
1761 |
|
1762 ^ |
|
1763 #(FullSpec |
|
1764 name: floodFillToleranceSpec |
|
1765 window: |
|
1766 (WindowSpec |
|
1767 label: 'Flood Fill Tolerance' |
|
1768 name: 'Flood Fill Tolerance' |
|
1769 min: (Point 10 10) |
|
1770 bounds: (Rectangle 0 0 364 312) |
|
1771 ) |
|
1772 component: |
|
1773 (SpecCollection |
|
1774 collection: ( |
|
1775 (LabelSpec |
|
1776 label: 'Flood Fill Tolerance:' |
|
1777 name: 'Label1' |
|
1778 layout: (LayoutFrame 14 0 10 0 242 0 32 0) |
|
1779 activeHelpKey: floodFillMaxError |
|
1780 visibilityChannel: cropBoxIsNotDialog |
|
1781 translateLabel: true |
|
1782 adjust: left |
|
1783 ) |
|
1784 (LabelSpec |
|
1785 label: 'Hue:' |
|
1786 name: 'Label2' |
|
1787 layout: (LayoutFrame 51 0 38 0 127 0 60 0) |
|
1788 activeHelpKey: floodFillMaxError |
|
1789 visibilityChannel: cropBoxIsNotDialog |
|
1790 translateLabel: true |
|
1791 adjust: left |
|
1792 ) |
|
1793 (InputFieldSpec |
|
1794 name: 'EntryField2' |
|
1795 layout: (LayoutFrame 132 0 38 0 190 0 60 0) |
|
1796 activeHelpKey: floodFillMaxError |
|
1797 visibilityChannel: cropBoxIsNotDialog |
|
1798 tabable: true |
|
1799 model: floodFillMaxHueError |
|
1800 type: number |
|
1801 acceptChannel: acceptChannel |
|
1802 acceptOnPointerLeave: true |
|
1803 ) |
|
1804 (LabelSpec |
|
1805 label: 'Light:' |
|
1806 name: 'Label3' |
|
1807 layout: (LayoutFrame 51 0 64 0 127 0 86 0) |
|
1808 activeHelpKey: floodFillMaxError |
|
1809 visibilityChannel: cropBoxIsNotDialog |
|
1810 translateLabel: true |
|
1811 adjust: left |
|
1812 ) |
|
1813 (InputFieldSpec |
|
1814 name: 'EntryField3' |
|
1815 layout: (LayoutFrame 132 0 64 0 190 0 86 0) |
|
1816 activeHelpKey: floodFillMaxError |
|
1817 visibilityChannel: cropBoxIsNotDialog |
|
1818 tabable: true |
|
1819 model: floodFillMaxLightError |
|
1820 type: number |
|
1821 acceptChannel: acceptChannel |
|
1822 acceptOnPointerLeave: true |
|
1823 ) |
|
1824 (HorizontalPanelViewSpec |
|
1825 name: 'HorizontalPanel1' |
|
1826 layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
|
1827 visibilityChannel: cropBoxIsDialog |
|
1828 horizontalLayout: fitSpace |
|
1829 verticalLayout: center |
|
1830 horizontalSpace: 3 |
|
1831 verticalSpace: 3 |
|
1832 reverseOrderIfOKAtLeft: true |
|
1833 component: |
|
1834 (SpecCollection |
|
1835 collection: ( |
|
1836 (ActionButtonSpec |
|
1837 label: 'Cancel' |
|
1838 name: 'Button1' |
|
1839 translateLabel: true |
|
1840 resizeForLabel: true |
|
1841 tabable: true |
|
1842 model: cancel |
|
1843 extent: (Point 116 28) |
|
1844 ) |
|
1845 (ActionButtonSpec |
|
1846 label: 'Apply' |
|
1847 name: 'Button3' |
|
1848 translateLabel: true |
|
1849 resizeForLabel: true |
|
1850 tabable: true |
|
1851 model: applyCropAction |
|
1852 extent: (Point 116 28) |
|
1853 ) |
|
1854 (ActionButtonSpec |
|
1855 label: 'OK' |
|
1856 name: 'Button2' |
|
1857 translateLabel: true |
|
1858 resizeForLabel: true |
|
1859 tabable: true |
|
1860 model: accept |
|
1861 extent: (Point 116 28) |
|
1862 ) |
|
1863 ) |
|
1864 |
|
1865 ) |
|
1866 ) |
|
1867 ) |
|
1868 |
|
1869 ) |
|
1870 ) |
1797 ! |
1871 ! |
1798 |
1872 |
1799 shiftDialogSpec |
1873 shiftDialogSpec |
1800 "This resource specification was automatically generated |
1874 "This resource specification was automatically generated |
1801 by the UIPainter of ST/X." |
1875 by the UIPainter of ST/X." |
1917 |
1991 |
1918 ) |
1992 ) |
1919 ) |
1993 ) |
1920 ! |
1994 ! |
1921 |
1995 |
1922 uncropDialogSpec |
1996 uncropSpec |
1923 "This resource specification was automatically generated |
1997 "This resource specification was automatically generated |
1924 by the UIPainter of ST/X." |
1998 by the UIPainter of ST/X." |
1925 |
1999 |
1926 "Do not manually edit this!! If it is corrupted, |
2000 "Do not manually edit this!! If it is corrupted, |
1927 the UIPainter may not be able to read the specification." |
2001 the UIPainter may not be able to read the specification." |
1928 |
2002 |
1929 " |
2003 " |
1930 UIPainter new openOnClass:ImageEditor andSelector:#uncropDialogSpec |
2004 UIPainter new openOnClass:ImageEditor andSelector:#uncropSpec |
1931 ImageEditor new openInterface:#uncropDialogSpec |
2005 ImageEditor new openInterface:#uncropSpec |
1932 " |
2006 " |
1933 |
2007 |
1934 <resource: #canvas> |
2008 <resource: #canvas> |
1935 |
2009 |
1936 ^ |
2010 ^ |
1937 #(FullSpec |
2011 #(FullSpec |
1938 name: uncropDialogSpec |
2012 name: uncropSpec |
1939 window: |
2013 window: |
1940 (WindowSpec |
2014 (WindowSpec |
1941 label: 'Add Border(s)' |
2015 label: 'Add Border(s)' |
1942 name: 'Add Border(s)' |
2016 name: 'Add Border(s)' |
1943 min: (Point 10 10) |
2017 min: (Point 10 10) |
1944 max: (Point 800 478) |
2018 max: (Point 800 478) |
1945 bounds: (Rectangle 0 0 261 228) |
2019 bounds: (Rectangle 0 0 261 228) |
1946 ) |
2020 ) |
1947 component: |
2021 component: |
1948 (SpecCollection |
2022 (SpecCollection |
1949 collection: ( |
2023 collection: ( |
1950 (LabelSpec |
2024 (LabelSpec |
1951 label: 'Left:' |
2025 label: 'Left:' |
1952 name: 'Label1' |
2026 name: 'Label1' |
1953 layout: (LayoutFrame 14 0 21 0 90 0 43 0) |
2027 layout: (LayoutFrame 14 0 21 0 90 0 43 0) |
1954 translateLabel: true |
2028 translateLabel: true |
1955 adjust: right |
2029 adjust: right |
1956 ) |
2030 ) |
1957 (InputFieldSpec |
2031 (InputFieldSpec |
1958 name: 'EntryField1' |
2032 name: 'EntryField1' |
1959 layout: (LayoutFrame 95 0 21 0 132 0 43 0) |
2033 layout: (LayoutFrame 95 0 21 0 132 0 43 0) |
1960 model: gropLeftAmount |
2034 model: cropLeftAmount |
1961 type: number |
2035 type: number |
1962 acceptOnPointerLeave: false |
2036 acceptOnPointerLeave: false |
1963 ) |
2037 ) |
1964 (LabelSpec |
2038 (LabelSpec |
1965 label: 'Right:' |
2039 label: 'Right:' |
1966 name: 'Label2' |
2040 name: 'Label2' |
1967 layout: (LayoutFrame 14 0 51 0 90 0 73 0) |
2041 layout: (LayoutFrame 14 0 51 0 90 0 73 0) |
1968 translateLabel: true |
2042 translateLabel: true |
1969 adjust: right |
2043 adjust: right |
1970 ) |
2044 ) |
1971 (InputFieldSpec |
2045 (InputFieldSpec |
1972 name: 'EntryField2' |
2046 name: 'EntryField2' |
1973 layout: (LayoutFrame 95 0 51 0 132 0 73 0) |
2047 layout: (LayoutFrame 95 0 51 0 132 0 73 0) |
1974 model: gropRightAmount |
2048 model: cropRightAmount |
1975 type: number |
2049 type: number |
1976 acceptOnPointerLeave: false |
2050 acceptOnPointerLeave: false |
1977 ) |
2051 ) |
1978 (LabelSpec |
2052 (LabelSpec |
1979 label: 'Top:' |
2053 label: 'Top:' |
1980 name: 'Label3' |
2054 name: 'Label3' |
1981 layout: (LayoutFrame 14 0 81 0 90 0 103 0) |
2055 layout: (LayoutFrame 14 0 81 0 90 0 103 0) |
1982 translateLabel: true |
2056 translateLabel: true |
1983 adjust: right |
2057 adjust: right |
1984 ) |
2058 ) |
1985 (InputFieldSpec |
2059 (InputFieldSpec |
1986 name: 'EntryField3' |
2060 name: 'EntryField3' |
1987 layout: (LayoutFrame 95 0 81 0 132 0 103 0) |
2061 layout: (LayoutFrame 95 0 81 0 132 0 103 0) |
1988 model: gropTopAmount |
2062 model: cropTopAmount |
1989 type: number |
2063 type: number |
1990 acceptOnPointerLeave: false |
2064 acceptOnPointerLeave: false |
1991 ) |
2065 ) |
1992 (LabelSpec |
2066 (LabelSpec |
1993 label: 'Bottom:' |
2067 label: 'Bottom:' |
1994 name: 'Label4' |
2068 name: 'Label4' |
1995 layout: (LayoutFrame 14 0 111 0 90 0 133 0) |
2069 layout: (LayoutFrame 14 0 111 0 90 0 133 0) |
1996 translateLabel: true |
2070 translateLabel: true |
1997 adjust: right |
2071 adjust: right |
1998 ) |
2072 ) |
1999 (InputFieldSpec |
2073 (InputFieldSpec |
2000 name: 'EntryField4' |
2074 name: 'EntryField4' |
2001 layout: (LayoutFrame 95 0 111 0 132 0 133 0) |
2075 layout: (LayoutFrame 95 0 111 0 132 0 133 0) |
2002 model: gropBottomAmount |
2076 model: cropBottomAmount |
2003 type: number |
2077 type: number |
2004 acceptOnPointerLeave: false |
2078 acceptOnPointerLeave: false |
2005 ) |
2079 ) |
2006 (HorizontalPanelViewSpec |
2080 (HorizontalPanelViewSpec |
2007 name: 'HorizontalPanel1' |
2081 name: 'HorizontalPanel1' |
2008 layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
2082 layout: (LayoutFrame 0 0.0 -30 1 0 1.0 0 1) |
2009 horizontalLayout: fitSpace |
2083 horizontalLayout: fitSpace |
2010 verticalLayout: center |
2084 verticalLayout: center |
2011 horizontalSpace: 3 |
2085 horizontalSpace: 3 |
2012 verticalSpace: 3 |
2086 verticalSpace: 3 |
2013 reverseOrderIfOKAtLeft: true |
2087 reverseOrderIfOKAtLeft: true |
2014 component: |
2088 component: |
2015 (SpecCollection |
2089 (SpecCollection |
2016 collection: ( |
2090 collection: ( |
2017 (ActionButtonSpec |
2091 (ActionButtonSpec |
2018 label: 'Cancel' |
2092 label: 'Cancel' |
2019 name: 'Button1' |
2093 name: 'Button1' |
2020 translateLabel: true |
2094 translateLabel: true |
2021 model: cancel |
2095 model: cancel |
2022 extent: (Point 118 22) |
2096 extent: (Point 124 22) |
2023 ) |
|
2024 (ActionButtonSpec |
|
2025 label: 'OK' |
|
2026 name: 'Button2' |
|
2027 translateLabel: true |
|
2028 model: accept |
|
2029 extent: (Point 118 22) |
|
2030 ) |
|
2031 ) |
2097 ) |
2032 |
2098 (ActionButtonSpec |
2033 ) |
2099 label: 'OK' |
2034 ) |
2100 name: 'Button2' |
|
2101 translateLabel: true |
|
2102 model: accept |
|
2103 extent: (Point 125 22) |
|
2104 ) |
|
2105 ) |
|
2106 |
|
2107 ) |
2035 ) |
2108 ) |
2036 |
2109 ) |
2037 ) |
2110 |
2038 ) |
2111 ) |
2039 |
2112 ) |
2040 "Modified: / 13-02-2017 / 14:53:08 / cg" |
|
2041 ! |
2113 ! |
2042 |
2114 |
2043 windowSpec |
2115 windowSpec |
2044 "This resource specification was automatically generated |
2116 "This resource specification was automatically generated |
2045 by the UIPainter of ST/X." |
2117 by the UIPainter of ST/X." |
2102 (ViewSpec |
2174 (ViewSpec |
2103 name: 'ColorAnCropBox' |
2175 name: 'ColorAnCropBox' |
2104 component: |
2176 component: |
2105 (SpecCollection |
2177 (SpecCollection |
2106 collection: ( |
2178 collection: ( |
|
2179 (TabViewSpec |
|
2180 name: 'TabHeader1' |
|
2181 layout: (LayoutFrame 0 0 0 0 0 1 36 0) |
|
2182 model: colorCropTabSelectionIndexHolder |
|
2183 menu: colorCropTabLabelList |
|
2184 useIndex: true |
|
2185 translateLabel: true |
|
2186 ) |
|
2187 (ViewSpec |
|
2188 name: 'ColorBox' |
|
2189 layout: (LayoutFrame 0 0 36 0 0 1 0 1) |
|
2190 visibilityChannel: colorBoxVisibleHolder |
|
2191 component: |
|
2192 (SpecCollection |
|
2193 collection: ( |
|
2194 (MenuPanelSpec |
|
2195 name: 'MouseButtonColorToolBar' |
|
2196 layout: (LayoutFrame 0 0.0 0 0 0 1.0 24 0) |
|
2197 level: 0 |
|
2198 menu: menuMouseButtonColors |
|
2199 ) |
|
2200 (DataSetSpec |
|
2201 name: 'colorDataSetView' |
|
2202 layout: (LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0) |
|
2203 activeHelpKey: colorMapTable |
|
2204 style: (FontDescription helvetica medium roman 10) |
|
2205 model: selectedColors |
|
2206 menu: colorMapMenu |
|
2207 hasHorizontalScrollBar: true |
|
2208 hasVerticalScrollBar: true |
|
2209 miniScrollerHorizontal: true |
|
2210 miniScrollerVertical: true |
|
2211 dataList: listOfColors |
|
2212 has3Dseparators: true |
|
2213 doubleClickSelector: doubleClickOnColor: |
|
2214 columnHolder: colorTableColumns |
|
2215 multipleSelectOk: true |
|
2216 verticalSpacing: 1 |
|
2217 columnAdaptor: colorColumnAdaptor |
|
2218 ) |
|
2219 ) |
|
2220 |
|
2221 ) |
|
2222 ) |
|
2223 (ViewSpec |
|
2224 name: 'FloodFillBox' |
|
2225 layout: (LayoutFrame 0 0 36 0 0 1 0 1) |
|
2226 visibilityChannel: floodFillBoxVisibleHolder |
|
2227 component: |
|
2228 (SpecCollection |
|
2229 collection: ( |
|
2230 (UISubSpecification |
|
2231 name: 'SubSpecification2' |
|
2232 layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
|
2233 minorKey: floodFillToleranceSpec |
|
2234 ) |
|
2235 ) |
|
2236 |
|
2237 ) |
|
2238 ) |
2107 (ViewSpec |
2239 (ViewSpec |
2108 name: 'CropBox' |
2240 name: 'CropBox' |
2109 layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
2241 layout: (LayoutFrame 0 0 36 0 0 1 0 1) |
2110 visibilityChannel: cropBoxVisibleHolder |
2242 visibilityChannel: cropBoxVisibleHolder |
2111 component: |
2243 component: |
2112 (SpecCollection |
2244 (SpecCollection |
2113 collection: ( |
2245 collection: ( |
2114 (UISubSpecification |
2246 (UISubSpecification |
2115 name: 'SubSpecification1' |
2247 name: 'SubSpecification1' |
2116 layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
2248 layout: (LayoutFrame 0 0 0 0 0 1 0 1) |
2117 minorKey: cropDialogSpec |
2249 minorKey: cropSpec |
2118 ) |
2250 ) |
2119 ) |
2251 ) |
2120 |
2252 |
2121 ) |
2253 ) |
2122 ) |
|
2123 (MenuPanelSpec |
|
2124 name: 'MouseButtonColorToolBar' |
|
2125 layout: (LayoutFrame 0 0.0 0 0 0 1.0 24 0) |
|
2126 level: 0 |
|
2127 visibilityChannel: colorBoxVisibleHolder |
|
2128 menu: menuMouseButtonColors |
|
2129 ) |
|
2130 (DataSetSpec |
|
2131 name: 'colorDataSetView' |
|
2132 layout: (LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0) |
|
2133 activeHelpKey: colorMapTable |
|
2134 style: (FontDescription helvetica medium roman 10) |
|
2135 visibilityChannel: colorBoxVisibleHolder |
|
2136 model: selectedColors |
|
2137 menu: colorMapMenu |
|
2138 hasHorizontalScrollBar: true |
|
2139 hasVerticalScrollBar: true |
|
2140 miniScrollerHorizontal: true |
|
2141 miniScrollerVertical: true |
|
2142 dataList: listOfColors |
|
2143 has3Dseparators: true |
|
2144 doubleClickSelector: doubleClickOnColor: |
|
2145 columnHolder: colorTableColumns |
|
2146 multipleSelectOk: true |
|
2147 verticalSpacing: 1 |
|
2148 columnAdaptor: colorColumnAdaptor |
|
2149 ) |
2254 ) |
2150 ) |
2255 ) |
2151 |
2256 |
2152 ) |
2257 ) |
2153 ) |
2258 ) |
2818 (MenuItem |
2924 (MenuItem |
2819 activeHelpKey: editUndo |
2925 activeHelpKey: editUndo |
2820 enabled: canUndoHolder |
2926 enabled: canUndoHolder |
2821 label: 'Undo' |
2927 label: 'Undo' |
2822 itemValue: doUndo |
2928 itemValue: doUndo |
2823 translateLabel: true |
|
2824 ) |
2929 ) |
2825 (MenuItem |
2930 (MenuItem |
2826 label: '-' |
2931 label: '-' |
2827 ) |
2932 ) |
2828 (MenuItem |
2933 (MenuItem |
2829 enabled: imageIsLoadedHolder |
2934 enabled: imageIsLoadedHolder |
2830 label: 'Copy to Clipboard' |
2935 label: 'Copy to Clipboard' |
2831 itemValue: doCopyImageToClipboard |
2936 itemValue: doCopyImageToClipboard |
2832 translateLabel: true |
|
2833 ) |
2937 ) |
2834 (MenuItem |
2938 (MenuItem |
2835 label: '-' |
2939 label: '-' |
2836 ) |
2940 ) |
2837 (MenuItem |
2941 (MenuItem |
2838 activeHelpKey: editResize |
2942 activeHelpKey: editResize |
2839 enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2943 enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2840 label: 'Resize...' |
2944 label: 'Resize...' |
2841 itemValue: doResizeImage |
2945 itemValue: doResizeImage |
2842 translateLabel: true |
|
2843 ) |
2946 ) |
2844 (MenuItem |
2947 (MenuItem |
2845 activeHelpKey: editMagnifyImage |
2948 activeHelpKey: editMagnifyImage |
2846 enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2949 enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2847 label: 'Magnify...' |
2950 label: 'Magnify...' |
2848 itemValue: doMagnifyImage |
2951 itemValue: doMagnifyImage |
2849 translateLabel: true |
|
2850 ) |
2952 ) |
2851 (MenuItem |
2953 (MenuItem |
2852 activeHelpKey: editMagnifyImage |
2954 activeHelpKey: editMagnifyImage |
2853 enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2955 enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2854 label: 'Magnify By...' |
2956 label: 'Magnify By...' |
2855 itemValue: doMagnifyImageBy |
2957 itemValue: doMagnifyImageBy |
2856 translateLabel: true |
|
2857 ) |
2958 ) |
2858 (MenuItem |
2959 (MenuItem |
2859 activeHelpKey: editRotate |
2960 activeHelpKey: editRotate |
2860 enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2961 enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2861 label: 'Rotate...' |
2962 label: 'Rotate...' |
2862 itemValue: doRotateImage |
2963 itemValue: doRotateImage |
2863 translateLabel: true |
|
2864 ) |
2964 ) |
2865 (MenuItem |
2965 (MenuItem |
2866 activeHelpKey: edit3DProjection |
2966 activeHelpKey: edit3DProjection |
2867 enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2967 enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2868 label: '3D Projection...' |
2968 label: '3D Projection...' |
2869 itemValue: do3DProjection |
2969 itemValue: do3DProjection |
2870 translateLabel: true |
|
2871 ) |
2970 ) |
2872 (MenuItem |
2971 (MenuItem |
2873 enabled: imageIsLoadedAndAllowedToFlipHolder |
2972 enabled: imageIsLoadedAndAllowedToFlipHolder |
2874 label: 'Flip' |
2973 label: 'Flip' |
2875 translateLabel: true |
|
2876 submenu: |
2974 submenu: |
2877 (Menu |
2975 (Menu |
2878 ( |
2976 ( |
2879 (MenuItem |
2977 (MenuItem |
2880 activeHelpKey: editFlipVertical |
2978 activeHelpKey: editFlipVertical |
2881 enabled: imageIsLoadedAndNotReadonlyHolder |
2979 enabled: imageIsLoadedAndNotReadonlyHolder |
2882 label: 'Flip - Vertical' |
2980 label: 'Flip - Vertical' |
2883 itemValue: doFlipVertical |
2981 itemValue: doFlipVertical |
2884 translateLabel: true |
|
2885 labelImage: (ResourceRetriever ImageEditor flipVerticalIcon 'Flip - Vertical') |
2982 labelImage: (ResourceRetriever ImageEditor flipVerticalIcon 'Flip - Vertical') |
2886 ) |
2983 ) |
2887 (MenuItem |
2984 (MenuItem |
2888 activeHelpKey: editFlipHorizontal |
2985 activeHelpKey: editFlipHorizontal |
2889 enabled: imageIsLoadedAndNotReadonlyHolder |
2986 enabled: imageIsLoadedAndNotReadonlyHolder |
2890 label: 'Flip - Horizontal' |
2987 label: 'Flip - Horizontal' |
2891 itemValue: doFlipHorizontal |
2988 itemValue: doFlipHorizontal |
2892 translateLabel: true |
|
2893 labelImage: (ResourceRetriever ImageEditor flipHorizontalIcon 'Flip - Horizontal') |
2989 labelImage: (ResourceRetriever ImageEditor flipHorizontalIcon 'Flip - Horizontal') |
2894 ) |
2990 ) |
2895 ) |
2991 ) |
2896 nil |
2992 nil |
2897 nil |
2993 nil |
2957 (MenuItem |
3048 (MenuItem |
2958 activeHelpKey: uncropManual |
3049 activeHelpKey: uncropManual |
2959 enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
3050 enabled: imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
2960 label: 'Uncrop (Add Border)...' |
3051 label: 'Uncrop (Add Border)...' |
2961 itemValue: doUnCropManual |
3052 itemValue: doUnCropManual |
2962 translateLabel: true |
|
2963 ) |
3053 ) |
2964 (MenuItem |
3054 (MenuItem |
2965 activeHelpKey: shiftManual |
3055 activeHelpKey: shiftManual |
2966 enabled: imageIsLoadedAndAllowedToChangeImageDimension |
3056 enabled: imageIsLoadedAndAllowedToChangeImageDimension |
2967 label: 'Shift...' |
3057 label: 'Shift...' |
2968 itemValue: doShiftManual |
3058 itemValue: doShiftManual |
2969 translateLabel: true |
|
2970 ) |
3059 ) |
2971 (MenuItem |
3060 (MenuItem |
2972 label: '-' |
3061 label: '-' |
2973 ) |
3062 ) |
2974 (MenuItem |
3063 (MenuItem |
2975 activeHelpKey: fileEditMask |
3064 activeHelpKey: fileEditMask |
2976 enabled: hasMaskHolder |
3065 enabled: hasMaskHolder |
2977 label: 'Edit Mask' |
3066 label: 'Edit Mask' |
2978 itemValue: doEditMask |
3067 itemValue: doEditMask |
2979 translateLabel: true |
|
2980 ) |
3068 ) |
2981 (MenuItem |
3069 (MenuItem |
2982 enabled: imageIsLoadedAndNotReadonlyHolder |
3070 enabled: imageIsLoadedAndNotReadonlyHolder |
2983 label: 'Text...' |
3071 label: 'Text...' |
2984 itemValue: doInsertTextFromUser |
3072 itemValue: doInsertTextFromUser |
2985 translateLabel: true |
|
2986 ) |
3073 ) |
2987 (MenuItem |
3074 (MenuItem |
2988 label: '-' |
3075 label: '-' |
2989 ) |
3076 ) |
2990 (MenuItem |
3077 (MenuItem |
2991 enabled: imageIsLoadedHolder |
3078 enabled: imageIsLoadedHolder |
2992 label: 'Animation Sequence' |
3079 label: 'Animation Sequence' |
2993 translateLabel: true |
|
2994 submenu: |
3080 submenu: |
2995 (Menu |
3081 (Menu |
2996 ( |
3082 ( |
2997 (MenuItem |
3083 (MenuItem |
2998 enabled: imageHasNextImageHolder |
3084 enabled: imageHasNextImageHolder |
2999 label: 'Next in Sequence' |
3085 label: 'Next in Sequence' |
3000 itemValue: nextImageInSequence |
3086 itemValue: nextImageInSequence |
3001 translateLabel: true |
|
3002 ) |
3087 ) |
3003 (MenuItem |
3088 (MenuItem |
3004 enabled: imageHasPreviousImageHolder |
3089 enabled: imageHasPreviousImageHolder |
3005 label: 'Previous in Sequence' |
3090 label: 'Previous in Sequence' |
3006 itemValue: previousImageInSequence |
3091 itemValue: previousImageInSequence |
3007 translateLabel: true |
|
3008 ) |
3092 ) |
3009 (MenuItem |
3093 (MenuItem |
3010 label: '-' |
3094 label: '-' |
3011 ) |
3095 ) |
3012 (MenuItem |
3096 (MenuItem |
3013 enabled: imageHasImageSequenceHolder |
3097 enabled: imageHasImageSequenceHolder |
3014 label: 'Edit each from Sequence' |
3098 label: 'Edit each from Sequence' |
3015 itemValue: editEachImageFromSequence |
3099 itemValue: editEachImageFromSequence |
3016 translateLabel: true |
|
3017 ) |
3100 ) |
3018 ) |
3101 ) |
3019 nil |
3102 nil |
3020 nil |
3103 nil |
3021 ) |
3104 ) |
3022 ) |
3105 ) |
3023 ) |
3106 ) |
3024 nil |
3107 nil |
3025 nil |
3108 nil |
3026 ) |
3109 ) |
3027 |
|
3028 "Modified: / 18-02-2017 / 00:41:45 / cg" |
|
3029 ! |
3110 ! |
3030 |
3111 |
3031 menuFile |
3112 menuFile |
3032 "This resource specification was automatically generated |
3113 "This resource specification was automatically generated |
3033 by the MenuEditor of ST/X." |
3114 by the MenuEditor of ST/X." |
4001 ]. |
4082 ]. |
4002 |
4083 |
4003 ^ imagePreViewSubViews first |
4084 ^ imagePreViewSubViews first |
4004 ! ! |
4085 ! ! |
4005 |
4086 |
|
4087 !ImageEditor methodsFor:'actions'! |
|
4088 |
|
4089 applyCropAction |
|
4090 self cropLeft:(self cropLeftAmount value) right:(self cropRightAmount value) |
|
4091 top:(self cropTopAmount value) bottom:(self cropBottomAmount value) |
|
4092 |
|
4093 "Created: / 17-02-2017 / 14:34:35 / cg" |
|
4094 "Modified: / 19-02-2017 / 15:11:41 / cg" |
|
4095 ! |
|
4096 |
|
4097 cropBottomNow |
|
4098 self cropLeft:0 right:0 top:0 bottom:(self cropBottomAmount value) |
|
4099 |
|
4100 "Created: / 19-02-2017 / 15:07:36 / cg" |
|
4101 ! |
|
4102 |
|
4103 cropLeft:left right:right top:top bottom:bottom |
|
4104 |img| |
|
4105 |
|
4106 img := imageEditView image. |
|
4107 img isNil ifTrue:[^ self]. |
|
4108 |
|
4109 true "firstChange" ifTrue:[ |
|
4110 imageEditView makeUndo. |
|
4111 "/ firstChange := false. |
|
4112 ]. |
|
4113 imageEditView |
|
4114 makeSubImageX:left y:top |
|
4115 width:(img width - left - right) |
|
4116 height:(img height - top - bottom). |
|
4117 |
|
4118 self updateImagePreView. |
|
4119 self updateInfoLabel |
|
4120 |
|
4121 "Created: / 19-02-2017 / 15:07:58 / cg" |
|
4122 ! |
|
4123 |
|
4124 cropLeftNow |
|
4125 self cropLeft:(self cropLeftAmount value) right:0 top:0 bottom:0 |
|
4126 |
|
4127 "Created: / 19-02-2017 / 15:08:06 / cg" |
|
4128 ! |
|
4129 |
|
4130 cropRightNow |
|
4131 self cropLeft:0 right:(self cropRightAmount value) top:0 bottom:0 |
|
4132 |
|
4133 "Created: / 19-02-2017 / 15:08:12 / cg" |
|
4134 ! |
|
4135 |
|
4136 cropTopNow |
|
4137 self cropLeft:0 right:0 top:(self cropTopAmount value) bottom:0 |
|
4138 |
|
4139 "Created: / 19-02-2017 / 15:08:29 / cg" |
|
4140 ! ! |
|
4141 |
4006 !ImageEditor methodsFor:'aspects'! |
4142 !ImageEditor methodsFor:'aspects'! |
4007 |
4143 |
4008 activityInfoHolder |
4144 activityInfoHolder |
4009 ^ self infoLabelHolder |
4145 ^ self infoLabelHolder |
4010 |
4146 |
5023 ^ self imageIsLoadedAndNotReadonlyHolder |
5187 ^ self imageIsLoadedAndNotReadonlyHolder |
5024 |
5188 |
5025 "Created: / 16-02-2017 / 01:44:47 / cg" |
5189 "Created: / 16-02-2017 / 01:44:47 / cg" |
5026 ! |
5190 ! |
5027 |
5191 |
|
5192 imageIsLoadedAndAllowedToChangeImageDimension |
|
5193 "returns whether an image is loaded as value holder" |
|
5194 |
|
5195 ^ [ |
|
5196 self imageIsLoadedHolder value |
|
5197 and:[ self allowedToChangeImageDimension ] |
|
5198 ] |
|
5199 |
|
5200 "Created: / 16-02-2017 / 01:58:41 / cg" |
|
5201 ! |
|
5202 |
|
5203 imageIsLoadedAndAllowedToChangeImageDimensionAndDepth |
|
5204 "returns whether an image is loaded as value holder" |
|
5205 |
|
5206 ^ [ |
|
5207 self imageIsLoadedHolder value |
|
5208 and:[ self allowedToChangeImageDimensionAndDepth ] |
|
5209 ] |
|
5210 |
|
5211 "Modified: / 04-07-2010 / 10:15:43 / cg" |
|
5212 ! |
|
5213 |
5028 imageIsLoadedAndAllowedToFlipHolder |
5214 imageIsLoadedAndAllowedToFlipHolder |
5029 ^ self imageIsLoadedAndNotReadonlyHolder |
5215 ^ self imageIsLoadedAndNotReadonlyHolder |
5030 |
5216 |
5031 "Created: / 16-02-2017 / 01:57:02 / cg" |
5217 "Created: / 16-02-2017 / 01:57:02 / cg" |
|
5218 ! |
|
5219 |
|
5220 imageIsLoadedAndClassDefined |
|
5221 "returns whether an image is loaded as value holder" |
|
5222 |
|
5223 ^ [self hasClassAndSelectorDefinedHolder value |
|
5224 and:[self imageIsLoadedHolder value]] |
|
5225 |
|
5226 "Created: / 31-07-1998 / 02:04:18 / cg" |
|
5227 "Modified: / 04-07-2010 / 10:15:48 / cg" |
|
5228 ! |
|
5229 |
|
5230 imageIsLoadedAndNotReadonlyHolder |
|
5231 "returns whether an image is loaded and editable as value holder" |
|
5232 |
|
5233 ^ BlockValue |
|
5234 with:[:loaded | loaded and:[ self readOnly not ]] |
|
5235 argument:(self imageIsLoadedHolder) |
|
5236 |
|
5237 "Modified: / 16-02-2017 / 12:11:31 / cg" |
|
5238 ! |
|
5239 |
|
5240 imageIsLoadedHolder |
|
5241 "returns whether an image is loaded as value holder" |
|
5242 |
|
5243 |holder| |
|
5244 |
|
5245 (holder := builder bindingAt:#imageIsLoaded) isNil ifTrue:[ |
|
5246 builder aspectAt:#imageIsLoaded put:(holder := false asValue). |
|
5247 ]. |
|
5248 ^ holder |
|
5249 |
|
5250 "Created: / 04-07-2010 / 10:15:38 / cg" |
5032 ! ! |
5251 ! ! |
5033 |
5252 |
5034 !ImageEditor methodsFor:'menu item visibility'! |
5253 !ImageEditor methodsFor:'menu item visibility'! |
5035 |
5254 |
5036 isNotStandAloneAndMethodSaveAndLoadMenuItemsVisible |
5255 isNotStandAloneAndMethodSaveAndLoadMenuItemsVisible |
6908 self updateInfoLabel |
7127 self updateInfoLabel |
6909 ]. |
7128 ]. |
6910 ]. |
7129 ]. |
6911 |
7130 |
6912 bindings := IdentityDictionary new. |
7131 bindings := IdentityDictionary new. |
6913 bindings at:#gropLeftAmount put:(left := 1 asValue). |
7132 bindings at:#cropLeftAmount put:(left := 1 asValue). |
6914 bindings at:#gropRightAmount put:(right := 1 asValue). |
7133 bindings at:#cropRightAmount put:(right := 1 asValue). |
6915 bindings at:#gropTopAmount put:(top := 1 asValue). |
7134 bindings at:#cropTopAmount put:(top := 1 asValue). |
6916 bindings at:#gropBottomAmount put:(bottom := 1 asValue). |
7135 bindings at:#cropBottomAmount put:(bottom := 1 asValue). |
6917 bindings at:#acceptChannel put:acceptChannel. |
7136 bindings at:#acceptChannel put:acceptChannel. |
6918 |
7137 |
6919 bindings at:#gropLeftNow put:[ gropAction value:left value:0 value:0 value:0 ]. |
7138 bindings at:#cropLeftNow put:[ cropAction value:left value:0 value:0 value:0 ]. |
6920 bindings at:#gropRightNow put:[ gropAction value:0 value:right value:0 value:0 ]. |
7139 bindings at:#cropRightNow put:[ cropAction value:0 value:right value:0 value:0 ]. |
6921 bindings at:#gropTopNow put:[ gropAction value:0 value:0 value:top value:0 ]. |
7140 bindings at:#cropTopNow put:[ cropAction value:0 value:0 value:top value:0 ]. |
6922 bindings at:#gropBottomNow put:[ gropAction value:0 value:0 value:0 value:bottom ]. |
7141 bindings at:#cropBottomNow put:[ cropAction value:0 value:0 value:0 value:bottom ]. |
6923 |
7142 |
6924 bindings at:#applyCropAction put:[ gropAction value:left value:right value:top value:bottom ]. |
7143 bindings at:#applyCropAction put:[ cropAction value:left value:right value:top value:bottom ]. |
6925 |
7144 bindings at:#cropBoxIsDialog put:true. |
6926 (self openDialogInterface:#cropDialogSpec withBindings:bindings) |
7145 |
|
7146 (self openDialogInterface:#cropSpec withBindings:bindings) |
6927 ifFalse:[ |
7147 ifFalse:[ |
6928 firstChange ~~ true ifTrue:[ |
7148 firstChange ~~ true ifTrue:[ |
6929 imageEditView undo. |
7149 imageEditView undo. |
6930 self updateImagePreView. |
7150 self updateImagePreView. |
6931 ] |
7151 ] |
6932 ]. |
7152 ]. |
6933 |
7153 |
6934 "Created: / 07-09-1998 / 18:16:07 / cg" |
7154 "Created: / 07-09-1998 / 18:16:07 / cg" |
6935 "Modified: / 17-02-2017 / 14:33:19 / cg" |
7155 "Modified: / 19-02-2017 / 15:43:50 / cg" |
6936 ! |
7156 ! |
6937 |
7157 |
6938 doCropRight |
7158 doCropRight |
6939 "find a right border and cut it off" |
7159 "find a right border and cut it off" |
6940 |
7160 |
7241 ! |
7461 ! |
7242 |
7462 |
7243 doUnCropManual |
7463 doUnCropManual |
7244 "let user specify borders and add them" |
7464 "let user specify borders and add them" |
7245 |
7465 |
7246 |bindings left top right bottom img| |
7466 |bindings leftAmount topAmount rightAmount bottomAmount img| |
7247 |
7467 |
7248 bindings := IdentityDictionary new. |
7468 bindings := IdentityDictionary new. |
7249 bindings at:#gropLeftAmount put:(left := 1 asValue). |
7469 bindings at:#cropLeftAmount put:(leftAmount := 1 asValue). |
7250 bindings at:#gropRightAmount put:(right := 1 asValue). |
7470 bindings at:#cropRightAmount put:(rightAmount := 1 asValue). |
7251 bindings at:#gropTopAmount put:(top := 1 asValue). |
7471 bindings at:#cropTopAmount put:(topAmount := 1 asValue). |
7252 bindings at:#gropBottomAmount put:(bottom := 1 asValue). |
7472 bindings at:#cropBottomAmount put:(bottomAmount := 1 asValue). |
7253 (self openDialogInterface:#uncropDialogSpec withBindings:bindings) |
7473 bindings at:#cropBoxIsDialog put:true. |
|
7474 |
|
7475 (self openDialogInterface:#uncropSpec withBindings:bindings) |
7254 ifTrue:[ |
7476 ifTrue:[ |
7255 left := left value. |
7477 leftAmount := leftAmount value. |
7256 right := right value. |
7478 rightAmount := rightAmount value. |
7257 top := top value. |
7479 topAmount := topAmount value. |
7258 bottom := bottom value. |
7480 bottomAmount := bottomAmount value. |
7259 img := imageEditView image. |
7481 img := imageEditView image. |
7260 |
7482 |
7261 imageEditView |
7483 imageEditView |
7262 makeBorderedImageX:left y:top |
7484 makeBorderedImageX:leftAmount y:topAmount |
7263 width:(img width + left + right) |
7485 width:(img width + leftAmount + rightAmount) |
7264 height:(img height + top + bottom). |
7486 height:(img height + topAmount + bottomAmount). |
7265 self updateInfoLabel |
7487 self updateInfoLabel |
7266 ]. |
7488 ]. |
7267 |
7489 |
7268 "Created: / 07-09-1998 / 18:16:07 / cg" |
7490 "Created: / 07-09-1998 / 18:16:07 / cg" |
7269 "Modified: / 13-02-2017 / 14:51:35 / cg" |
7491 "Modified: / 19-02-2017 / 15:31:00 / cg" |
7270 ! |
7492 ! |
7271 |
7493 |
7272 doUndo |
7494 doUndo |
7273 "reverses last edit action" |
7495 "reverses last edit action" |
7274 |
7496 |