UILayoutTool.st
changeset 1077 46793bf50415
parent 1074 49ef9991d1d5
child 1198 6b7cfe55105b
equal deleted inserted replaced
1076:4391fcd36dcf 1077:46793bf50415
  1306     ^super helpSpec addPairsFrom:#(
  1306     ^super helpSpec addPairsFrom:#(
  1307 
  1307 
  1308 #bottomAbsolute
  1308 #bottomAbsolute
  1309 'Offset of the bottom edge; positive is to the bottom, negative to the top.'
  1309 'Offset of the bottom edge; positive is to the bottom, negative to the top.'
  1310 
  1310 
       
  1311 #bottomFixPartLayout
       
  1312 'Set the layout for a fixed area at the bottom of the widgets containers space'
       
  1313 
       
  1314 #bottomHalfLayout
       
  1315 'Set the layout for the bottom half of the widgets containers space'
       
  1316 
  1311 #bottomRelative
  1317 #bottomRelative
  1312 'Relative corner y of the selected widget.'
  1318 'Relative corner y of the selected widget.'
  1313 
  1319 
       
  1320 #leftHalfLayout
       
  1321 'Set the layout for the left half of the widgets containers space'
       
  1322 
  1314 #makeBottomAbsolute
  1323 #makeBottomAbsolute
  1315 'Computes current bottom offset and relative corner y to an absolute corner y.'
  1324 'Computes current bottom offset and relative corner y to an absolute corner y.'
  1316 
  1325 
  1317 #makeBottomRelative
  1326 #makeBottomRelative
  1318 'Computes current relative corner y and offset of the bottom edge to a relative corner y.'
  1327 'Computes current relative corner y and offset of the bottom edge to a relative corner y.'
  1324 'Computes current relative corner x and offset of the right edge to a relative corner x.'
  1333 'Computes current relative corner x and offset of the right edge to a relative corner x.'
  1325 
  1334 
  1326 #rightAbsolute
  1335 #rightAbsolute
  1327 'Offset of the right edge; positive is to the right, negative to the left.'
  1336 'Offset of the right edge; positive is to the right, negative to the left.'
  1328 
  1337 
       
  1338 #rightHalfLayout
       
  1339 'Set the layout for the right half of the widgets containers space'
       
  1340 
  1329 #rightRelative
  1341 #rightRelative
  1330 'Relative corner x of the selected widget.'
  1342 'Relative corner x of the selected widget.'
  1331 
  1343 
       
  1344 #topFixPartLayout
       
  1345 'Set the layout for a fixed area at the top of the widgets containers space'
       
  1346 
  1332 #topHalfLayout
  1347 #topHalfLayout
  1333 'Set the layout for the top half of the widgets containers space'
  1348 'Set the layout for the top half of the widgets containers space'
  1334 
  1349 
  1335 #bottomHalfLayout
  1350 #topLeftQuarterLayout
  1336 'Set the layout for the bottom half of the widgets containers space'
  1351 'Set the layout for the top-left quarter of the widgets containers space'
  1337 
  1352 
  1338 #leftHalfLayout
  1353 #topRightQuarterLayout
  1339 'Set the layout for the left half of the widgets containers space'
  1354 'Set the layout for the top-right quarter of the widgets containers space'
  1340 
  1355 
  1341 #rightHalfLayout
  1356 #bottomRightQuarterLayout
  1342 'Set the layout for the right half of the widgets containers space'
  1357 'Set the layout for the bottom-right quarter of the widgets containers space'
  1343 
  1358 
       
  1359 #bottomLeftQuarterLayout
       
  1360 'Set the layout for the bottom-left quarter of the widgets containers space'
  1344 
  1361 
  1345 )
  1362 )
  1346 ! !
  1363 ! !
  1347 
  1364 
  1348 !UILayoutTool::LayoutFrame class methodsFor:'image specs'!
  1365 !UILayoutTool::LayoutFrame class methodsFor:'image specs'!
       
  1366 
       
  1367 setBottomFixPartIcon
       
  1368     "This resource specification was automatically generated
       
  1369      by the ImageEditor of ST/X."
       
  1370 
       
  1371     "Do not manually edit this!! If it is corrupted,
       
  1372      the ImageEditor may not be able to read the specification."
       
  1373 
       
  1374     "
       
  1375      self setBottomFixPartIcon inspect
       
  1376      ImageEditor openOnClass:self andSelector:#setBottomFixPartIcon
       
  1377     "
       
  1378 
       
  1379     <resource: #image>
       
  1380 
       
  1381     ^Icon
       
  1382         constantNamed:#'UILayoutTool::LayoutFrame setBottomFixPartIcon'
       
  1383         ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@H"H"@BH"H @!!DQD@DQDR@BDQDP@QDQH@H"H"@BH"H @@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@@X@A @F@@X@A @F@@X@A @G???????????????<b') ; yourself); yourself]!
  1349 
  1384 
  1350 setBottomHalfIcon
  1385 setBottomHalfIcon
  1351     "This resource specification was automatically generated
  1386     "This resource specification was automatically generated
  1352      by the ImageEditor of ST/X."
  1387      by the ImageEditor of ST/X."
  1353 
  1388 
  1452     <resource: #image>
  1487     <resource: #image>
  1453 
  1488 
  1454     ^Icon
  1489     ^Icon
  1455         constantNamed:#'UILayoutTool::LayoutFrame setToRightQuarterIcon'
  1490         constantNamed:#'UILayoutTool::LayoutFrame setToRightQuarterIcon'
  1456         ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@"H"H@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@"H"H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@?8C? O>@?8C? O>@?8C? @F@@X@A @F@@X@A??<b') ; yourself); yourself]!
  1491         ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@"H"H@@@@@@BDQD @@@@@@HQDR@@@@@@@!!DQH@@@@@@BDQD @@@@@@HQDR@@@@@@@"H"H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'??>@?8C? O>@?8C? O>@?8C? @F@@X@A @F@@X@A??<b') ; yourself); yourself]!
       
  1492 
       
  1493 setTopFixPartIcon
       
  1494     "This resource specification was automatically generated
       
  1495      by the ImageEditor of ST/X."
       
  1496 
       
  1497     "Do not manually edit this!! If it is corrupted,
       
  1498      the ImageEditor may not be able to read the specification."
       
  1499 
       
  1500     "
       
  1501      self setTopFixPartIcon inspect
       
  1502      ImageEditor openOnClass:self andSelector:#setTopFixPartIcon
       
  1503     "
       
  1504 
       
  1505     <resource: #image>
       
  1506 
       
  1507     ^Icon
       
  1508         constantNamed:#'UILayoutTool::LayoutFrame setTopFixPartIcon'
       
  1509         ifAbsentPut:[(Depth4Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@BH"H @"H"H@HQDQ@ADQD @!!DQD@DQDR@BH"H @"H"H@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'???????????????? @F@@X@A @F@@X@A @F@@X@A??<b') ; yourself); yourself]!
  1457 
  1510 
  1458 setTopHalfIcon
  1511 setTopHalfIcon
  1459     "This resource specification was automatically generated
  1512     "This resource specification was automatically generated
  1460      by the ImageEditor of ST/X."
  1513      by the ImageEditor of ST/X."
  1461 
  1514 
  1700             )
  1753             )
  1701              #(#MenuItem
  1754              #(#MenuItem
  1702                 #label: 'setTopLeftQuarterFrame'
  1755                 #label: 'setTopLeftQuarterFrame'
  1703                 #translateLabel: true
  1756                 #translateLabel: true
  1704                 #isButton: true
  1757                 #isButton: true
       
  1758                 #activeHelpKey: #topLeftQuarterLayout
  1705                 #nameKey: #setTopLeftQuarterFrame
  1759                 #nameKey: #setTopLeftQuarterFrame
  1706                 #value: #setTopLeftQuarterFrame
  1760                 #value: #setTopLeftQuarterFrame
  1707                 #labelImage: #(#ResourceRetriever nil #setTopLeftQuarterIcon)
  1761                 #labelImage: #(#ResourceRetriever nil #setTopLeftQuarterIcon)
  1708             )
  1762             )
  1709              #(#MenuItem
  1763              #(#MenuItem
  1710                 #label: 'setTopRightQuarterFrame'
  1764                 #label: 'setTopRightQuarterFrame'
  1711                 #translateLabel: true
  1765                 #translateLabel: true
  1712                 #isButton: true
  1766                 #isButton: true
       
  1767                 #activeHelpKey: #topRightQuarterLayout
  1713                 #nameKey: #setTopRightQuarterFrame
  1768                 #nameKey: #setTopRightQuarterFrame
  1714                 #value: #setTopRightQuarterFrame
  1769                 #value: #setTopRightQuarterFrame
  1715                 #labelImage: #(#ResourceRetriever nil #setToRightQuarterIcon)
  1770                 #labelImage: #(#ResourceRetriever nil #setToRightQuarterIcon)
  1716             )
  1771             )
  1717              #(#MenuItem
  1772              #(#MenuItem
  1718                 #label: 'setBottomRightQuarterFrame'
  1773                 #label: 'setBottomRightQuarterFrame'
  1719                 #translateLabel: true
  1774                 #translateLabel: true
  1720                 #isButton: true
  1775                 #isButton: true
       
  1776                 #activeHelpKey: #bottomRightQuarterLayout
  1721                 #nameKey: #setBottomRightQuarterFrame
  1777                 #nameKey: #setBottomRightQuarterFrame
  1722                 #value: #setBottomRightQuarterFrame
  1778                 #value: #setBottomRightQuarterFrame
  1723                 #labelImage: #(#ResourceRetriever nil #setBottomRightQuarterIcon)
  1779                 #labelImage: #(#ResourceRetriever nil #setBottomRightQuarterIcon)
  1724             )
  1780             )
  1725              #(#MenuItem
  1781              #(#MenuItem
  1726                 #label: 'setBottomLeftQuarterFrame'
  1782                 #label: 'setBottomLeftQuarterFrame'
  1727                 #translateLabel: true
  1783                 #translateLabel: true
       
  1784                 #activeHelpKey: #bottomLeftQuarterLayout
  1728                 #isButton: true
  1785                 #isButton: true
  1729                 #nameKey: #setBottomLeftQuarterFrame
  1786                 #nameKey: #setBottomLeftQuarterFrame
  1730                 #value: #setBottomLeftQuarterFrame
  1787                 #value: #setBottomLeftQuarterFrame
  1731                 #labelImage: #(#ResourceRetriever nil #setBottomLeftQuarterIcon)
  1788                 #labelImage: #(#ResourceRetriever nil #setBottomLeftQuarterIcon)
       
  1789             )
       
  1790              #(#MenuItem
       
  1791                 #label: ''
       
  1792             )
       
  1793              #(#MenuItem
       
  1794                 #label: 'setTopFixPartFrame'
       
  1795                 #translateLabel: true
       
  1796                 #isButton: true
       
  1797                 #nameKey: #setTopFixPartFrame
       
  1798                 #value: #setTopFixPartFrame
       
  1799                 #activeHelpKey: #topFixPartLayout
       
  1800                 #labelImage: #(#ResourceRetriever nil #setTopFixPartIcon)
       
  1801             )
       
  1802              #(#MenuItem
       
  1803                 #label: 'setBottomFixPartFrame'
       
  1804                 #translateLabel: true
       
  1805                 #isButton: true
       
  1806                 #nameKey: #setBottomFixPartFrame
       
  1807                 #value: #setBottomFixPartFrame
       
  1808                 #activeHelpKey: #bottomFixPartLayout
       
  1809                 #labelImage: #(#ResourceRetriever nil #setBottomFixPartIcon)
  1732             )
  1810             )
  1733           ) nil
  1811           ) nil
  1734           nil
  1812           nil
  1735       )
  1813       )
  1736 ! !
  1814 ! !
  1773 
  1851 
  1774 ! !
  1852 ! !
  1775 
  1853 
  1776 !UILayoutTool::LayoutFrame methodsFor:'common frames'!
  1854 !UILayoutTool::LayoutFrame methodsFor:'common frames'!
  1777 
  1855 
       
  1856 setBottomFixPartFrame
       
  1857     self
       
  1858         setFrameLeft:0   offset:0 
       
  1859         right:1          offset:0 
       
  1860         top:1            offset:-30 
       
  1861         bottom:1         offset:0
       
  1862 !
       
  1863 
  1778 setBottomHalfFrame
  1864 setBottomHalfFrame
  1779     self
  1865     self
  1780         setFrameLeft:0  offset:0 
  1866         setFrameLeft:0  offset:0 
  1781         right:1         offset:0 
  1867         right:1         offset:0 
  1782         top:0.5         offset:0 
  1868         top:0.5         offset:0 
  1823     self
  1909     self
  1824         setFrameLeft:0.5 offset:0 
  1910         setFrameLeft:0.5 offset:0 
  1825         right:1          offset:0 
  1911         right:1          offset:0 
  1826         top:0            offset:0 
  1912         top:0            offset:0 
  1827         bottom:1         offset:0
  1913         bottom:1         offset:0
       
  1914 !
       
  1915 
       
  1916 setTopFixPartFrame
       
  1917     self
       
  1918         setFrameLeft:0   offset:0 
       
  1919         right:1          offset:0 
       
  1920         top:0            offset:0 
       
  1921         bottom:0         offset:30
  1828 !
  1922 !
  1829 
  1923 
  1830 setTopHalfFrame
  1924 setTopHalfFrame
  1831     self
  1925     self
  1832         setFrameLeft:0   offset:0 
  1926         setFrameLeft:0   offset:0