UIPainterView.st
changeset 146 ae84facd80be
parent 141 d06c04391233
child 149 e652608690b1
equal deleted inserted replaced
145:163258b9561d 146:ae84facd80be
  1386 
  1386 
  1387 
  1387 
  1388 
  1388 
  1389 !
  1389 !
  1390 
  1390 
       
  1391 specForSelection
       
  1392     "returns spec assigned to current single selection or nil
       
  1393     "
       
  1394     ^ self specFor:(self singleSelection)
       
  1395 
       
  1396 
       
  1397 !
       
  1398 
  1391 updateFromSpec:aSpec
  1399 updateFromSpec:aSpec
  1392     "update current selected view from specification
  1400     "update current selected view from specification
  1393     "
  1401     "
  1394     |props name builder v|
  1402     |props name builder v|
  1395 
  1403 
  1537             args at:1 put:(prop identifier).
  1545             args at:1 put:(prop identifier).
  1538 
  1546 
  1539             (lyt := aView geometryLayout) notNil ifTrue:[
  1547             (lyt := aView geometryLayout) notNil ifTrue:[
  1540                 args at:2 put:#geometryLayout:
  1548                 args at:2 put:#geometryLayout:
  1541             ] ifFalse:[
  1549             ] ifFalse:[
  1542                 lyt extent.
  1550                 lyt := aView extent.
  1543                 args at:2 put:#extent:
  1551                 args at:2 put:#extent:
  1544             ].
  1552             ].
  1545             args at:3 put:(lyt copy).
  1553             args at:3 put:(lyt copy).
  1546             undoHistory addUndoSelector:#undoLayout: withArgs:args.
  1554             undoHistory addUndoSelector:#undoLayout: withArgs:args.
  1547         ]
  1555         ]
  1586     "undo method to set the old layout; see 'createUndoLayout:'
  1594     "undo method to set the old layout; see 'createUndoLayout:'
  1587     "
  1595     "
  1588     |view|
  1596     |view|
  1589 
  1597 
  1590     (view := self findViewWithId:(args at:1)) notNil ifTrue:[
  1598     (view := self findViewWithId:(args at:1)) notNil ifTrue:[
  1591         view perform:(args at:2) with:(args at:3)
  1599         view perform:(args at:2) with:(args at:3).
       
  1600         self changed:#layout.
  1592     ]
  1601     ]
  1593 !
  1602 !
  1594 
  1603 
  1595 undoRemove:args
  1604 undoRemove:args
  1596     "undo method when removing an object; see 'createUndoRemove:'
  1605     "undo method when removing an object; see 'createUndoRemove:'
  1633         ] ifFalse:[
  1642         ] ifFalse:[
  1634             spec setAttributesIn:view with:builder.
  1643             spec setAttributesIn:view with:builder.
  1635             self elementChangedSize:view.
  1644             self elementChangedSize:view.
  1636         ].
  1645         ].
  1637         listHolder propertyChanged:props.
  1646         listHolder propertyChanged:props.
  1638     ] ifFalse:[
  1647     ]
  1639         self halt
       
  1640     ]
       
  1641 
       
  1642 
       
  1643 
  1648 
  1644 ! !
  1649 ! !
  1645 
  1650 
  1646 !UIPainterView::ViewProperty class methodsFor:'documentation'!
  1651 !UIPainterView::ViewProperty class methodsFor:'documentation'!
  1647 
  1652