equal
deleted
inserted
replaced
20 category:'Interface-UIPainter' |
20 category:'Interface-UIPainter' |
21 ! |
21 ! |
22 |
22 |
23 SelectionInTreeView subclass:#TreeView |
23 SelectionInTreeView subclass:#TreeView |
24 instanceVariableNames:'lastDrawnMaster cvsEventsDisabled imageMasterParent |
24 instanceVariableNames:'lastDrawnMaster cvsEventsDisabled imageMasterParent |
25 imageEmptyParent imageMasterChild' |
25 imageEmptyParent imageMasterChild windowSpec' |
26 classVariableNames:'ImageMasterParent ImageMasterChild ImageEmptyParent' |
26 classVariableNames:'ImageMasterParent ImageMasterChild ImageEmptyParent' |
27 poolDictionaries:'' |
27 poolDictionaries:'' |
28 privateIn:UIPainter |
28 privateIn:UIPainter |
29 ! |
29 ! |
30 |
30 |
2642 "returns spec assigned to canvas |
2642 "returns spec assigned to canvas |
2643 " |
2643 " |
2644 |spec| |
2644 |spec| |
2645 |
2645 |
2646 spec := WindowSpec new. |
2646 spec := WindowSpec new. |
|
2647 |
2647 spec fromView:(self canvas topView) callBack:nil. |
2648 spec fromView:(self canvas topView) callBack:nil. |
2648 spec name:(listOfNodes at:1) name. |
2649 spec name:(listOfNodes at:1) name. |
|
2650 |
|
2651 windowSpec notNil ifTrue:[ |
|
2652 spec menu:(windowSpec menu). |
|
2653 spec flags:(windowSpec flags). |
|
2654 ]. |
2649 ^ spec |
2655 ^ spec |
|
2656 ! |
|
2657 |
|
2658 canvasSpec:aSpec |
|
2659 "update canvas from spec |
|
2660 " |
|
2661 |spec| |
|
2662 |
|
2663 self setAttributesFromWindowSpec:aSpec. |
|
2664 spec := aSpec copy. |
|
2665 spec menu:nil. |
|
2666 spec flags:nil. |
|
2667 |
|
2668 spec setAttributesIn:(self canvas topView) with:(UIBuilder new). |
2650 ! |
2669 ! |
2651 |
2670 |
2652 itemOfView:aView |
2671 itemOfView:aView |
2653 "returns item assigned to view or nil |
2672 "returns item assigned to view or nil |
2654 " |
2673 " |
2714 |
2733 |
2715 removeAll |
2734 removeAll |
2716 "remove all items other than canvas |
2735 "remove all items other than canvas |
2717 " |
2736 " |
2718 lastDrawnMaster := nil. |
2737 lastDrawnMaster := nil. |
|
2738 windowSpec := nil. |
2719 |
2739 |
2720 self canvas subViews copy do:[:aView| |
2740 self canvas subViews copy do:[:aView| |
2721 (aView isKindOf:InputView) ifFalse:[aView destroy] |
2741 (aView isKindOf:InputView) ifFalse:[aView destroy] |
2722 ]. |
2742 ]. |
2723 model root name:(self class defaultNameOfCanvas). |
2743 model root name:(self class defaultNameOfCanvas). |
2738 prnt contents view sizeChanged:nil. |
2758 prnt contents view sizeChanged:nil. |
2739 model remove:item |
2759 model remove:item |
2740 ] |
2760 ] |
2741 |
2761 |
2742 |
2762 |
|
2763 ! ! |
|
2764 |
|
2765 !UIPainter::TreeView methodsFor:'building'! |
|
2766 |
|
2767 generateFullSpecForComponents:aSpecArray |
|
2768 "generates an full spec for components |
|
2769 " |
|
2770 |fullSpec| |
|
2771 |
|
2772 fullSpec := FullSpec new. |
|
2773 |
|
2774 fullSpec fromBuilder:(self canvas topView) |
|
2775 components:(SpecCollection new collection:aSpecArray). |
|
2776 |
|
2777 windowSpec notNil ifTrue:[ |
|
2778 fullSpec window menu:(windowSpec menu). |
|
2779 fullSpec window flags:(windowSpec flags). |
|
2780 ]. |
|
2781 ^ fullSpec literalArrayEncoding. |
|
2782 ! |
|
2783 |
|
2784 setAttributesFromWindowSpec:aWindowSpec |
|
2785 "set windowSpec from argument a WindowSpec |
|
2786 " |
|
2787 windowSpec := WindowSpec new. |
|
2788 |
|
2789 windowSpec menu:(aWindowSpec menu). |
|
2790 windowSpec flags:(aWindowSpec flags). |
|
2791 |
|
2792 self canvasNameChanged:aWindowSpec name. |
2743 ! ! |
2793 ! ! |
2744 |
2794 |
2745 !UIPainter::TreeView methodsFor:'canvas selection'! |
2795 !UIPainter::TreeView methodsFor:'canvas selection'! |
2746 |
2796 |
2747 cvsSelection:aSelection |
2797 cvsSelection:aSelection |