UILayoutTool.st
changeset 2949 325e4c28a579
parent 2794 56fb74312287
child 2953 934578ff722b
equal deleted inserted replaced
2948:b11312ccf82d 2949:325e4c28a579
   844 
   844 
   845         (usePreferredWidth false)
   845         (usePreferredWidth false)
   846         (usePreferredHeight false)
   846         (usePreferredHeight false)
   847         (useDynamicPreferredWidth false)
   847         (useDynamicPreferredWidth false)
   848         (useDynamicPreferredHeight false)
   848         (useDynamicPreferredHeight false)
       
   849         (keepSpaceForOSXResizeHandle false)
   849     )
   850     )
   850 
   851 
   851     do:[:aKeyOrPair| |holder key val|
   852     do:[:aKeyOrPair| |holder key val|
   852         (key := aKeyOrPair) isSymbol ifFalse:[
   853         (key := aKeyOrPair) isSymbol ifFalse:[
   853             key := aKeyOrPair first.
   854             key := aKeyOrPair first.
  1444      UIHelpTool openOnClass:UILayoutTool::Extent    
  1445      UIHelpTool openOnClass:UILayoutTool::Extent    
  1445     "
  1446     "
  1446 
  1447 
  1447     <resource: #help>
  1448     <resource: #help>
  1448 
  1449 
  1449     ^super helpSpec addPairsFrom:#(
  1450     ^ super helpSpec addPairsFrom:#(
  1450 
  1451 
  1451 #hrzExtent
  1452 #hrzExtent
  1452 'Horizontal extent of the selected widget.'
  1453 'Horizontal extent of the selected widget.'
       
  1454 
       
  1455 #useDynamicPreferredWidth
       
  1456 'Dynamically adapt to any change of the widget''s preferred width'
       
  1457 
       
  1458 #useDynamicPreferredHeight
       
  1459 'Dynamically adapt to any change of the widget''s preferred height'
       
  1460 
       
  1461 #usePreferredHeight
       
  1462 'Use the widget''s preferred height as initial size'
       
  1463 
       
  1464 #usePreferredWidth
       
  1465 'Use the widget''s preferred width as initial size'
       
  1466 
       
  1467 #useDefaultExtent
       
  1468 'Use the widget''s default extent as initial size'
  1453 
  1469 
  1454 #vrtExtent
  1470 #vrtExtent
  1455 'Vertical extent of the selected widget.'
  1471 'Vertical extent of the selected widget.'
  1456 
  1472 
  1457 )
  1473 )
  1480         window: 
  1496         window: 
  1481        (WindowSpec
  1497        (WindowSpec
  1482           label: 'UILayoutTool-Extent'
  1498           label: 'UILayoutTool-Extent'
  1483           name: 'UILayoutTool-Extent'
  1499           name: 'UILayoutTool-Extent'
  1484           min: (Point 10 10)
  1500           min: (Point 10 10)
  1485           bounds: (Rectangle 0 0 505 149)
  1501           bounds: (Rectangle 0 0 506 169)
  1486         )
  1502         )
  1487         component: 
  1503         component: 
  1488        (SpecCollection
  1504        (SpecCollection
  1489           collection: (
  1505           collection: (
  1490            (FramedBoxSpec
  1506            (FramedBoxSpec
  1491               label: 'Extent'
  1507               label: 'Extent'
  1492               name: 'FramedBox'
  1508               name: 'FramedBox'
  1493               layout: (LayoutFrame 0 0.0 6 0.0 0 1.0 145 0)
  1509               layout: (LayoutFrame 0 0.0 6 0.0 0 1.0 158 0)
  1494               labelPosition: topLeft
  1510               labelPosition: topLeft
  1495               translateLabel: true
  1511               translateLabel: true
  1496               component: 
  1512               component: 
  1497              (SpecCollection
  1513              (SpecCollection
  1498                 collection: (
  1514                 collection: (
  1537                     acceptChannel: acceptChannel
  1553                     acceptChannel: acceptChannel
  1538                     modifiedChannel: modifiedChannel
  1554                     modifiedChannel: modifiedChannel
  1539                     acceptOnPointerLeave: false
  1555                     acceptOnPointerLeave: false
  1540                   )
  1556                   )
  1541                  (CheckBoxSpec
  1557                  (CheckBoxSpec
  1542                     label: 'Use Preferred'
  1558                     label: 'Preferred'
  1543                     name: 'CheckBox1'
  1559                     name: 'CheckBox1'
  1544                     layout: (LayoutFrame 169 0 30 0 275 0 52 0)
  1560                     layout: (LayoutFrame 169 0 30 0 275 0 52 0)
       
  1561                     activeHelpKey: usePreferredWidth
  1545                     model: usePreferredWidth
  1562                     model: usePreferredWidth
  1546                     translateLabel: true
  1563                     translateLabel: true
  1547                   )
  1564                   )
  1548                  (CheckBoxSpec
  1565                  (CheckBoxSpec
  1549                     label: 'Dynamic'
  1566                     label: 'Dynamic'
  1550                     name: 'CheckBox3'
  1567                     name: 'CheckBox3'
  1551                     layout: (LayoutFrame 276 0 30 0 353 0 52 0)
  1568                     layout: (LayoutFrame 276 0 30 0 371 0 52 0)
       
  1569                     activeHelpKey: useDynamicPreferredWidth
  1552                     model: useDynamicPreferredWidth
  1570                     model: useDynamicPreferredWidth
  1553                     translateLabel: true
  1571                     translateLabel: true
  1554                   )
  1572                   )
  1555                  (CheckBoxSpec
  1573                  (CheckBoxSpec
  1556                     label: 'Use Preferred'
  1574                     label: 'Preferred'
  1557                     name: 'CheckBox2'
  1575                     name: 'CheckBox2'
  1558                     layout: (LayoutFrame 169 0 58 0 275 0 80 0)
  1576                     layout: (LayoutFrame 169 0 58 0 275 0 80 0)
       
  1577                     activeHelpKey: usePreferredHeight
  1559                     model: usePreferredHeight
  1578                     model: usePreferredHeight
  1560                     translateLabel: true
  1579                     translateLabel: true
  1561                   )
  1580                   )
  1562                  (CheckBoxSpec
  1581                  (CheckBoxSpec
  1563                     label: 'Dynamic'
  1582                     label: 'Dynamic'
  1564                     name: 'CheckBox4'
  1583                     name: 'CheckBox4'
  1565                     layout: (LayoutFrame 276 0 58 0 353 0 80 0)
  1584                     layout: (LayoutFrame 276 0 58 0 372 0 80 0)
       
  1585                     activeHelpKey: useDynamicPreferredHeight
  1566                     model: useDynamicPreferredHeight
  1586                     model: useDynamicPreferredHeight
  1567                     translateLabel: true
  1587                     translateLabel: true
  1568                   )
  1588                   )
  1569                  (CheckBoxSpec
  1589                  (CheckBoxSpec
  1570                     label: 'Use Widgets Default Extent'
  1590                     label: 'Use Widget''s Default Extent'
  1571                     name: 'useDefaultExtentCheckBox'
  1591                     name: 'useDefaultExtentCheckBox'
  1572                     layout: (Point 5 84)
  1592                     layout: (Point 5 84)
       
  1593                     activeHelpKey: useDefaultExtent
  1573                     enableChannel: defaultExtentEnabled
  1594                     enableChannel: defaultExtentEnabled
  1574                     tabable: true
  1595                     tabable: true
  1575                     model: useDefaultExtent
  1596                     model: useDefaultExtent
  1576                     translateLabel: true
  1597                     translateLabel: true
  1577                   )
  1598                   )
  1674 
  1695 
  1675     <resource: #help>
  1696     <resource: #help>
  1676 
  1697 
  1677     ^ super helpSpec addPairsFrom:#(
  1698     ^ super helpSpec addPairsFrom:#(
  1678 
  1699 
       
  1700 #bigBottomFixPartLayout
       
  1701 'Set layout for a big fixed area at the bottom of the widgets container'
       
  1702 
       
  1703 #bigHorizontalFixPartLayout
       
  1704 'Set layout for a big fixed-height area centered vertically in the widgets container'
       
  1705 
       
  1706 #bigTopFixPartLayout
       
  1707 'Set layout for a big fixed area at the top of the widgets container'
       
  1708 
  1679 #bottomAbsolute
  1709 #bottomAbsolute
  1680 'Offset of the bottom edge; positive is to the bottom, negative to the top.'
  1710 'Offset of the bottom edge; positive is to the bottom, negative to the top.'
  1681 
  1711 
  1682 #bigBottomFixPartLayout
       
  1683 'Set layout for a big fixed area at the bottom of the widgets container'
       
  1684 
       
  1685 #bottomFixPartLayout
  1712 #bottomFixPartLayout
  1686 'Set layout for a small fixed area at the bottom of the widgets container'
  1713 'Set layout for a small fixed area at the bottom of the widgets container'
  1687 
  1714 
  1688 #bottomHalfLayout
  1715 #bottomHalfLayout
  1689 'Set layout for the bottom half of the widgets container'
  1716 'Set layout for the bottom half of the widgets container'
  1701 'Set layout to fill all of the widgets container'
  1728 'Set layout to fill all of the widgets container'
  1702 
  1729 
  1703 #horizontalFixPartLayout
  1730 #horizontalFixPartLayout
  1704 'Set layout for a small fixed-height area centered vertically in the widgets container'
  1731 'Set layout for a small fixed-height area centered vertically in the widgets container'
  1705 
  1732 
  1706 #bigHorizontalFixPartLayout
  1733 #keepSpaceForOSXResizeHandle
  1707 'Set layout for a big fixed-height area centered vertically in the widgets container'
  1734 'Keep space at the right for the window resize handle under MAXOS-X; ignored when running on other systems'
  1708 
  1735 
  1709 #leftFixPartLayout
  1736 #leftFixPartLayout
  1710 'Set layout for a small fixed area at the left of the widgets container'
  1737 'Set layout for a small fixed area at the left of the widgets container'
  1711 
  1738 
  1712 #leftHalfLayout
  1739 #leftHalfLayout
  1743 'Relative corner x of the selected widget.'
  1770 'Relative corner x of the selected widget.'
  1744 
  1771 
  1745 #screenFrameLayout
  1772 #screenFrameLayout
  1746 ''
  1773 ''
  1747 
  1774 
       
  1775 #useDynamicPreferredWidth
       
  1776 'Dynamically adapt to any change of the widget''s preferred width'
       
  1777 
       
  1778 #useDynamicPreferredHeight
       
  1779 'Dynamically adapt to any change of the widget''s preferred height'
       
  1780 
       
  1781 #usePreferredHeight
       
  1782 'Use the widget''s preferred height as initial size'
       
  1783 
       
  1784 #usePreferredWidth
       
  1785 'Use the widget''s preferred width as initial size'
       
  1786 
       
  1787 
  1748 #topFixPartLayout
  1788 #topFixPartLayout
  1749 'Set layout for a small fixed area at the top of the widgets container'
  1789 'Set layout for a small fixed area at the top of the widgets container'
  1750 
       
  1751 #bigTopFixPartLayout
       
  1752 'Set layout for a big fixed area at the top of the widgets container'
       
  1753 
  1790 
  1754 #topHalfLayout
  1791 #topHalfLayout
  1755 'Set layout for the top half of the widgets container'
  1792 'Set layout for the top half of the widgets container'
  1756 
  1793 
  1757 #topLeftQuarterLayout
  1794 #topLeftQuarterLayout
  2187         window: 
  2224         window: 
  2188        (WindowSpec
  2225        (WindowSpec
  2189           label: 'UILayoutTool-LayoutFrame'
  2226           label: 'UILayoutTool-LayoutFrame'
  2190           name: 'UILayoutTool-LayoutFrame'
  2227           name: 'UILayoutTool-LayoutFrame'
  2191           min: (Point 10 10)
  2228           min: (Point 10 10)
  2192           bounds: (Rectangle 0 0 511 302)
  2229           bounds: (Rectangle 0 0 518 376)
  2193         )
  2230         )
  2194         component: 
  2231         component: 
  2195        (SpecCollection
  2232        (SpecCollection
  2196           collection: (
  2233           collection: (
  2197            (UISubSpecification
  2234            (UISubSpecification
  2201               minorKey: layoutOriginSpec
  2238               minorKey: layoutOriginSpec
  2202             )
  2239             )
  2203            (FramedBoxSpec
  2240            (FramedBoxSpec
  2204               label: 'Corner'
  2241               label: 'Corner'
  2205               name: 'FramedBox'
  2242               name: 'FramedBox'
  2206               layout: (LayoutFrame 1 0.0 113 0 0 1.0 214 0)
  2243               layout: (LayoutFrame 1 0.0 113 0 0 1.0 242 0)
  2207               labelPosition: topLeft
  2244               labelPosition: topLeft
  2208               translateLabel: true
  2245               translateLabel: true
  2209               component: 
  2246               component: 
  2210              (SpecCollection
  2247              (SpecCollection
  2211                 collection: (
  2248                 collection: (
  2212                  (LabelSpec
  2249                  (LabelSpec
  2213                     label: 'Right:'
  2250                     label: 'Right:'
  2214                     name: 'labelRight'
  2251                     name: 'labelRight'
  2215                     layout: (AlignmentOrigin 68 0 25 0 1 0.5)
  2252                     layout: (AlignmentOrigin 68 0 16 0 1 0)
  2216                     translateLabel: true
  2253                     translateLabel: true
  2217                   )
  2254                   )
  2218                  (ActionButtonSpec
  2255                  (ActionButtonSpec
  2219                     label: 'imageFractX'
  2256                     label: 'imageFractX'
  2220                     name: 'actionRelativeRight'
  2257                     name: 'actionRelativeRight'
  2269                     model: rightRelativeRight
  2306                     model: rightRelativeRight
  2270                   )
  2307                   )
  2271                  (LabelSpec
  2308                  (LabelSpec
  2272                     label: 'Bottom:'
  2309                     label: 'Bottom:'
  2273                     name: 'labelBottom'
  2310                     name: 'labelBottom'
  2274                     layout: (AlignmentOrigin 68 0 53 0 1 0.5)
  2311                     layout: (AlignmentOrigin 68 0 44 0 1 0)
  2275                     translateLabel: true
  2312                     translateLabel: true
  2276                   )
  2313                   )
  2277                  (ActionButtonSpec
  2314                  (ActionButtonSpec
  2278                     label: 'imageFractY'
  2315                     label: 'imageFractY'
  2279                     name: 'actionRelativeBottom'
  2316                     name: 'actionRelativeBottom'
  2326                     hasCharacterOrientedLabel: false
  2363                     hasCharacterOrientedLabel: false
  2327                     tabable: true
  2364                     tabable: true
  2328                     model: bottomRelativeBottom
  2365                     model: bottomRelativeBottom
  2329                   )
  2366                   )
  2330                  (CheckBoxSpec
  2367                  (CheckBoxSpec
  2331                     label: 'Use Preferred'
  2368                     label: 'Preferred'
  2332                     name: 'CheckBox1'
  2369                     name: 'CheckBox1'
  2333                     layout: (LayoutFrame 287 0 14 0 393 0 36 0)
  2370                     layout: (LayoutFrame 287 0 14 0 393 0 36 0)
       
  2371                     activeHelpKey: usePreferredWidth
  2334                     model: usePreferredWidth
  2372                     model: usePreferredWidth
  2335                     translateLabel: true
  2373                     translateLabel: true
  2336                   )
  2374                   )
  2337                  (CheckBoxSpec
  2375                  (CheckBoxSpec
  2338                     label: 'Use Preferred'
  2376                     label: 'Preferred'
  2339                     name: 'CheckBox2'
  2377                     name: 'CheckBox2'
  2340                     layout: (LayoutFrame 287 0 42 0 393 0 64 0)
  2378                     layout: (LayoutFrame 287 0 42 0 393 0 64 0)
       
  2379                     activeHelpKey: usePreferredHeight
  2341                     model: usePreferredHeight
  2380                     model: usePreferredHeight
  2342                     translateLabel: true
  2381                     translateLabel: true
  2343                   )
  2382                   )
  2344                  (CheckBoxSpec
  2383                  (CheckBoxSpec
  2345                     label: 'Dynamic'
  2384                     label: 'Dynamic'
  2346                     name: 'CheckBox3'
  2385                     name: 'CheckBox3'
  2347                     layout: (LayoutFrame 394 0 14 0 471 0 36 0)
  2386                     layout: (LayoutFrame 394 0 14 0 481 0 36 0)
       
  2387                     activeHelpKey: useDynamicPreferredWidth
  2348                     model: useDynamicPreferredWidth
  2388                     model: useDynamicPreferredWidth
  2349                     translateLabel: true
  2389                     translateLabel: true
  2350                   )
  2390                   )
  2351                  (CheckBoxSpec
  2391                  (CheckBoxSpec
  2352                     label: 'Dynamic'
  2392                     label: 'Dynamic'
  2353                     name: 'CheckBox4'
  2393                     name: 'CheckBox4'
  2354                     layout: (LayoutFrame 394 0 42 0 471 0 64 0)
  2394                     layout: (LayoutFrame 394 0 42 0 481 0 64 0)
       
  2395                     activeHelpKey: useDynamicPreferredWidth
  2355                     model: useDynamicPreferredHeight
  2396                     model: useDynamicPreferredHeight
       
  2397                     translateLabel: true
       
  2398                   )
       
  2399                  (CheckBoxSpec
       
  2400                     label: 'OSX-Resize'
       
  2401                     name: 'CheckBox5'
       
  2402                     layout: (LayoutFrame 287 0 70 0 480 0 92 0)
       
  2403                     activeHelpKey: keepSpaceForOSXResizeHandle
       
  2404                     model: keepSpaceForOSXResizeHandle
  2356                     translateLabel: true
  2405                     translateLabel: true
  2357                   )
  2406                   )
  2358                  )
  2407                  )
  2359                
  2408                
  2360               )
  2409               )
  2361             )
  2410             )
  2362            (MenuPanelSpec
  2411            (MenuPanelSpec
  2363               name: 'commonLayoutToolBar1'
  2412               name: 'commonLayoutToolBar1'
  2364               layout: (LayoutFrame 6 0.0 215 0 -4 1.0 247 0)
  2413               layout: (LayoutFrame 6 0.0 243 0 -4 1.0 275 0)
  2365               level: 0
  2414               level: 0
  2366               tabable: true
  2415               tabable: true
  2367               menu: commonFrameLayoutsMenu1
  2416               menu: commonFrameLayoutsMenu1
  2368               textDefault: true
  2417               textDefault: true
  2369             )
  2418             )
  2370            (MenuPanelSpec
  2419            (MenuPanelSpec
  2371               name: 'commonLayoutToolBar2'
  2420               name: 'commonLayoutToolBar2'
  2372               layout: (LayoutFrame 6 0.0 255 0 -4 1.0 287 0)
  2421               layout: (LayoutFrame 6 0.0 283 0 -4 1.0 315 0)
  2373               level: 0
  2422               level: 0
  2374               tabable: true
  2423               tabable: true
  2375               menu: commonFrameLayoutsMenu2
  2424               menu: commonFrameLayoutsMenu2
  2376               textDefault: true
  2425               textDefault: true
  2377             )
  2426             )
  2378            (MenuPanelSpec
  2427            (MenuPanelSpec
  2379               name: 'commonLayoutToolBar3'
  2428               name: 'commonLayoutToolBar3'
  2380               layout: (LayoutFrame 6 0.0 295 0 -4 1.0 327 0)
  2429               layout: (LayoutFrame 6 0.0 323 0 -4 1.0 355 0)
  2381               level: 0
  2430               level: 0
  2382               tabable: true
  2431               tabable: true
  2383               menu: commonFrameLayoutsMenu3
  2432               menu: commonFrameLayoutsMenu3
  2384               textDefault: true
  2433               textDefault: true
  2385             )
  2434             )
  2667 
  2716 
  2668     (self aspectFor:#usePreferredWidth) value:(aSpec usePreferredWidth).
  2717     (self aspectFor:#usePreferredWidth) value:(aSpec usePreferredWidth).
  2669     (self aspectFor:#usePreferredHeight) value:(aSpec usePreferredHeight).
  2718     (self aspectFor:#usePreferredHeight) value:(aSpec usePreferredHeight).
  2670     (self aspectFor:#useDynamicPreferredWidth) value:(aSpec useDynamicPreferredWidth).
  2719     (self aspectFor:#useDynamicPreferredWidth) value:(aSpec useDynamicPreferredWidth).
  2671     (self aspectFor:#useDynamicPreferredHeight) value:(aSpec useDynamicPreferredHeight).
  2720     (self aspectFor:#useDynamicPreferredHeight) value:(aSpec useDynamicPreferredHeight).
       
  2721 
       
  2722     (self aspectFor:#keepSpaceForOSXResizeHandle) value:(aSpec keepSpaceForOSXResizeHandle).
  2672 !
  2723 !
  2673 
  2724 
  2674 layout
  2725 layout
  2675     "returns the current layout as layoutFrame
  2726     "returns the current layout as layoutFrame
  2676     "
  2727     "
  3119 !
  3170 !
  3120 
  3171 
  3121 version_CVS
  3172 version_CVS
  3122     ^ '$Header$'
  3173     ^ '$Header$'
  3123 ! !
  3174 ! !
       
  3175