UIPainter.st
changeset 1046 b3994c5e5e2f
parent 1041 56ae9768b7ff
child 1058 243d945b1daf
equal deleted inserted replaced
1045:c387bcacdf37 1046:b3994c5e5e2f
  2790     modified := false.
  2790     modified := false.
  2791 
  2791 
  2792     aspects := IdentityDictionary new.
  2792     aspects := IdentityDictionary new.
  2793 
  2793 
  2794     aspects at:#classNameChannel put:(
  2794     aspects at:#classNameChannel put:(
  2795 	(specClass notNil ifTrue:[specClass]
  2795         (specClass notNil ifTrue:[specClass]
  2796 			 ifFalse:['NewApplication']) asValue
  2796                          ifFalse:['NewApplication']) asValue
  2797     ).
  2797     ).
  2798     specSuperclass isNil ifTrue:[
  2798     specSuperclass isNil ifTrue:[
  2799 	specClass notNil ifTrue:[
  2799         specClass notNil ifTrue:[
  2800 	    (cls := self resolveName:specClass) notNil ifTrue:[
  2800             (cls := self resolveName:specClass) notNil ifTrue:[
  2801 		specSuperclass := cls superclass name.
  2801                 specSuperclass := cls superclass name.
  2802 	    ]
  2802             ]
  2803 	]
  2803         ]
  2804     ].
  2804     ].
  2805     aspects at:#superclassNameChannel put:(
  2805     aspects at:#superclassNameChannel put:(
  2806 	(specSuperclass notNil ifTrue:[specSuperclass]
  2806         (specSuperclass notNil ifTrue:[specSuperclass]
  2807 			 ifFalse:['ApplicationModel']) asValue
  2807                          ifFalse:['ApplicationModel']) asValue
  2808     ).
  2808     ).
  2809     aspects at:#superclassNameDefaults put:#('ApplicationModel' 'SimpleDialog') asValue.
  2809     aspects at:#superclassNameDefaults put:#('ApplicationModel' 'SimpleDialog') asValue.
  2810     aspects at:#methodNameChannel put:(
  2810     aspects at:#methodNameChannel put:(
  2811 	(specSelector notNil ifTrue:[specSelector asValue]
  2811         (specSelector notNil ifTrue:[specSelector asValue]
  2812 			    ifFalse:[#windowSpec]) asValue
  2812                             ifFalse:[#windowSpec]) asValue
  2813     ).
  2813     ).
       
  2814 
       
  2815     "/ the canvas ...
  2814 
  2816 
  2815     treeView    := TreeView new.
  2817     treeView    := TreeView new.
  2816     painterView := StandardSystemView new.
  2818     painterView := StandardSystemView new.
  2817     painterView name: self class defaultNameOfCanvas.
  2819     painterView name: self class defaultNameOfCanvas.
  2818     painterView label: self class defaultNameOfCanvas.
  2820     painterView label: self class defaultNameOfCanvas.
  2825     painter treeView:treeView.
  2827     painter treeView:treeView.
  2826     treeView model addDependent:self.
  2828     treeView model addDependent:self.
  2827 
  2829 
  2828     super openInterface:aSymbol.
  2830     super openInterface:aSymbol.
  2829 
  2831 
       
  2832 
  2830     topView := self window.
  2833     topView := self window.
  2831 
       
  2832     topView label:'GUI Painter'.
  2834     topView label:'GUI Painter'.
  2833 
  2835 
  2834     painterView openInGroup:(topView windowGroup).
  2836     painterView openInGroup:(topView windowGroup).
  2835     painterView application:self.
  2837     painterView application:self.
       
  2838 
       
  2839     "/ the selectionPanel ...
  2836 
  2840 
  2837     selectionPanel := UISelectionPanel new.
  2841     selectionPanel := UISelectionPanel new.
  2838     selectionPanel allButOpenInterface:#windowSpec.
  2842     selectionPanel allButOpenInterface:#windowSpec.
  2839     selectionPanel window openInGroup:(topView windowGroup).
  2843     selectionPanel window openInGroup:(topView windowGroup).
  2840     selectionPanel openWindow.
  2844     selectionPanel openWindow.
  2841     selectionPanel masterApplication:self.
  2845     selectionPanel masterApplication:self.
  2842 
  2846 
  2843     topView iconLabel:'GUI Painter'.
  2847     topView iconLabel:'GUI Painter'.
  2844     topView icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100).
  2848     topView icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100).
  2845 
  2849 
  2846     painterView iconLabel:'GUI Painter'.
  2850     painterView iconLabel:'GUI Canvas'.
  2847     painterView icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100).
  2851     painterView icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100).
  2848 
  2852 
  2849     topView bePartner.
  2853     topView bePartner.
  2850     painterView bePartner.
  2854     painterView bePartner.
  2851     selectionPanel window bePartner.
  2855     selectionPanel window bePartner.
  2852 
  2856 
  2853     selectionPanel window iconLabel:'GUI Painter'.
  2857     selectionPanel window iconLabel:'GUI Gallery'.
  2854     selectionPanel window icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100).
  2858     selectionPanel window icon:(Image fromFile:'bitmaps/UIPainter.xbm' resolution:100).
  2855 !
  2859 !
  2856 
  2860 
  2857 openOnClass:aClass
  2861 openOnClass:aClass
  2858     "opens the GUI Painter on aClass and #windowSpec"
  2862     "opens the GUI Painter on aClass and #windowSpec"