equal
deleted
inserted
replaced
1632 |
1632 |
1633 "Modified: / 25.10.1997 / 19:22:17 / cg" |
1633 "Modified: / 25.10.1997 / 19:22:17 / cg" |
1634 ! |
1634 ! |
1635 |
1635 |
1636 generateWindowSpec |
1636 generateWindowSpec |
1637 |spec addToSpec| |
1637 |spec addToSpec specsAlready| |
1638 |
1638 |
1639 spec := OrderedCollection new. |
1639 spec := OrderedCollection new. |
|
1640 specsAlready := IdentitySet new. |
1640 |
1641 |
1641 addToSpec := |
1642 addToSpec := |
1642 [:aView| |
1643 [:aView| |
1643 |vSpec| |
1644 |vSpec| |
1644 |
|
1645 "/ care for wrapped views ... |
1645 "/ care for wrapped views ... |
1646 vSpec := self fullSpecFor:aView. |
1646 vSpec := self fullSpecFor:aView. |
1647 vSpec isNil ifTrue:[ |
1647 vSpec isNil ifTrue:[ |
1648 aView subViews size == 1 ifTrue:[ |
1648 aView subViews size == 1 ifTrue:[ |
1649 vSpec := self fullSpecFor:(aView subViews first). |
1649 vSpec := self fullSpecFor:(aView subViews first). |
1655 noLabel:'Abort') |
1655 noLabel:'Abort') |
1656 ifFalse:[ |
1656 ifFalse:[ |
1657 AbortSignal raise |
1657 AbortSignal raise |
1658 ]. |
1658 ]. |
1659 ]. |
1659 ]. |
|
1660 (specsAlready includes:vSpec) ifTrue:[self halt]. |
|
1661 specsAlready add:vSpec. |
1660 spec add:vSpec |
1662 spec add:vSpec |
1661 ]. |
1663 ]. |
1662 |
1664 |
1663 self subViews do:addToSpec. |
1665 self subViews do:addToSpec. |
1664 self components do:addToSpec. |
1666 self components do:addToSpec. |
1665 spec := treeView generateFullSpecForComponents:spec named:methodName. |
1667 spec := treeView generateFullSpecForComponents:spec named:methodName. |
1666 ^ spec |
1668 ^ spec |
|
1669 |
|
1670 "Modified: / 30-07-2013 / 09:13:13 / cg" |
1667 ! |
1671 ! |
1668 |
1672 |
1669 generateWindowSpecMethodSource |
1673 generateWindowSpecMethodSource |
1670 ^ self |
1674 ^ self |
1671 generateWindowSpecMethodSourceFor:(self generateWindowSpec) |
1675 generateWindowSpecMethodSourceFor:(self generateWindowSpec) |
2502 subSpecs notEmptyOrNil ifTrue:[ |
2506 subSpecs notEmptyOrNil ifTrue:[ |
2503 mySpec component:(SpecCollection new collection:subSpecs) |
2507 mySpec component:(SpecCollection new collection:subSpecs) |
2504 ] |
2508 ] |
2505 ]. |
2509 ]. |
2506 ^ mySpec |
2510 ^ mySpec |
|
2511 |
|
2512 "Modified: / 30-07-2013 / 09:12:18 / cg" |
2507 ! |
2513 ! |
2508 |
2514 |
2509 fullSpecWithAbsolutePositionFor:aView |
2515 fullSpecWithAbsolutePositionFor:aView |
2510 |spec| |
2516 |spec| |
2511 |
2517 |
2583 "returns a copy of the spec assigned to an object" |
2589 "returns a copy of the spec assigned to an object" |
2584 |
2590 |
2585 |prop spec| |
2591 |prop spec| |
2586 |
2592 |
2587 (prop := self propertyOfView:aView) isNil ifTrue:[^ nil]. |
2593 (prop := self propertyOfView:aView) isNil ifTrue:[^ nil]. |
|
2594 "/ attention: the above prop may be a superview's prop, |
|
2595 "/ for subviews which have not been built by me |
|
2596 "/ (for example, in a box with a given viewClass like Inspector, |
|
2597 "/ we would return the boxes spec for the subviews. |
|
2598 "/ This is definitely NOT what we want (as it generates wrong specs). |
|
2599 "/ therefore check: |
|
2600 prop view == aView ifFalse:[^ nil]. |
2588 |
2601 |
2589 spec := prop spec copy. |
2602 spec := prop spec copy. |
2590 spec layoutFromView:aView. |
2603 spec layoutFromView:aView. |
2591 ^ spec |
2604 ^ spec |
|
2605 |
|
2606 "Modified (comment): / 30-07-2013 / 09:47:51 / cg" |
2592 ! |
2607 ! |
2593 |
2608 |
2594 specForSelection |
2609 specForSelection |
2595 "returns the spec assigned to current single selection or nil. |
2610 "returns the spec assigned to current single selection or nil. |
2596 Nil is also returned for multiple selections (sigh)" |
2611 Nil is also returned for multiple selections (sigh)" |