UIPainter.st
changeset 2950 9277c8ef8f03
parent 2947 9bbc38256343
child 2952 3b055207c961
equal deleted inserted replaced
2949:325e4c28a579 2950:9277c8ef8f03
  1360         window: 
  1360         window: 
  1361        (WindowSpec
  1361        (WindowSpec
  1362           label: 'GUI Painter'
  1362           label: 'GUI Painter'
  1363           name: 'GUI Painter'
  1363           name: 'GUI Painter'
  1364           min: (Point 560 460)
  1364           min: (Point 560 460)
  1365           bounds: (Rectangle 0 0 683 568)
  1365           bounds: (Rectangle 0 0 834 575)
  1366           menu: menu
  1366           menu: menu
  1367           icon: defaultIcon
  1367           icon: defaultIcon
  1368         )
  1368         )
  1369         component: 
  1369         component: 
  1370        (SpecCollection
  1370        (SpecCollection
  1490                                       activeHelpKey: commitCancel
  1490                                       activeHelpKey: commitCancel
  1491                                       translateLabel: true
  1491                                       translateLabel: true
  1492                                       tabable: true
  1492                                       tabable: true
  1493                                       model: cancel
  1493                                       model: cancel
  1494                                       enableChannel: modifiedChannel
  1494                                       enableChannel: modifiedChannel
  1495                                       extent: (Point 231 24)
  1495                                       extent: (Point 274 24)
  1496                                     )
  1496                                     )
  1497                                    (ActionButtonSpec
  1497                                    (ActionButtonSpec
  1498                                       label: 'OK'
  1498                                       label: 'OK'
  1499                                       name: 'acceptButton'
  1499                                       name: 'acceptButton'
  1500                                       activeHelpKey: commitOK
  1500                                       activeHelpKey: commitOK
  1501                                       translateLabel: true
  1501                                       translateLabel: true
  1502                                       tabable: true
  1502                                       tabable: true
  1503                                       model: accept
  1503                                       model: accept
  1504                                       enableChannel: modifiedChannel
  1504                                       enableChannel: modifiedChannel
  1505                                       extent: (Point 231 24)
  1505                                       extent: (Point 274 24)
  1506                                     )
  1506                                     )
  1507                                    )
  1507                                    )
  1508                                  
  1508                                  
  1509                                 )
  1509                                 )
  1510                               )
  1510                               )
  1513                           )
  1513                           )
  1514                         )
  1514                         )
  1515                        )
  1515                        )
  1516                      
  1516                      
  1517                     )
  1517                     )
  1518                     handles: (Any 0.30592105263158 1.0)
  1518                     handles: (Any 0.3 1.0)
  1519                   )
  1519                   )
  1520                  )
  1520                  )
  1521                
  1521                
  1522               )
  1522               )
  1523             )
  1523             )
  4822 
  4822 
  4823     self isLayoutToolSelected ifTrue:[
  4823     self isLayoutToolSelected ifTrue:[
  4824         layoutTool := self layoutTool.
  4824         layoutTool := self layoutTool.
  4825 
  4825 
  4826         (layout := layoutTool layout) notNil ifTrue:[
  4826         (layout := layoutTool layout) notNil ifTrue:[
       
  4827             "/ cg->ca: the following code should be moded to the layoutTool
       
  4828             "/ (i.e. layoutTool saveInSpec:spec.
       
  4829 
  4827             layoutTool layoutType == #Extent ifTrue:[
  4830             layoutTool layoutType == #Extent ifTrue:[
  4828                 layoutView := layoutTool layoutView.
  4831                 layoutView := layoutTool layoutView.
  4829 
  4832 
  4830                 layoutView == self canvas ifTrue:[
  4833                 layoutView == self canvas ifTrue:[
  4831                     layoutView extent:layout.
  4834                     layoutView extent:layout.
  4854                 spec useDefaultExtent:false.
  4857                 spec useDefaultExtent:false.
  4855                 spec usePreferredWidth:(layoutTool aspectFor:#usePreferredWidth) value.
  4858                 spec usePreferredWidth:(layoutTool aspectFor:#usePreferredWidth) value.
  4856                 spec usePreferredHeight:(layoutTool aspectFor:#usePreferredHeight) value.
  4859                 spec usePreferredHeight:(layoutTool aspectFor:#usePreferredHeight) value.
  4857                 spec useDynamicPreferredWidth:(layoutTool aspectFor:#useDynamicPreferredWidth) value.
  4860                 spec useDynamicPreferredWidth:(layoutTool aspectFor:#useDynamicPreferredWidth) value.
  4858                 spec useDynamicPreferredHeight:(layoutTool aspectFor:#useDynamicPreferredHeight) value.
  4861                 spec useDynamicPreferredHeight:(layoutTool aspectFor:#useDynamicPreferredHeight) value.
       
  4862                 layoutTool layoutType == #LayoutFrame ifTrue:[
       
  4863                     spec keepSpaceForOSXResizeHandle:(layoutTool aspectFor:#keepSpaceForOSXResizeHandle) value.
       
  4864                 ].
  4859                 painter setLayout:layout.
  4865                 painter setLayout:layout.
  4860                 spec layout:layout.
  4866                 spec layout:layout.
  4861                 painter updateFromSpec:spec.
  4867                 painter updateFromSpec:spec.
  4862             ].
  4868             ].
  4863         ]
  4869         ]