new toolbar + other features added
authortz
Wed, 21 Jan 1998 20:10:38 +0100
changeset 446 b513a621a7a4
parent 445 ddfa937f6d1d
child 447 664522b11cde
new toolbar + other features added
UIPainter.st
--- a/UIPainter.st	Wed Jan 21 20:06:31 1998 +0100
+++ b/UIPainter.st	Wed Jan 21 20:10:38 1998 +0100
@@ -11,11 +11,11 @@
 "
 
 
-ApplicationModel subclass:#UIPainter
+ToolApplicationModel subclass:#UIPainter
 	instanceVariableNames:'treeView selectionPanel tabSelection specClass specSelector
 		specSuperclass aspects layoutCanvas helpCanvas specCanvas
 		transcript'
-	classVariableNames:'IconStepUp IconStepOut IconStepIn IconStepDown'
+	classVariableNames:''
 	poolDictionaries:''
 	category:'Interface-UIPainter'
 !
@@ -99,6 +99,13 @@
 
 ! !
 
+!UIPainter class methodsFor:'accessing'!
+
+label
+
+    ^'GUI Builder'
+! !
+
 !UIPainter class methodsFor:'help specs'!
 
 helpSpec
@@ -275,169 +282,6 @@
     ^ stream contents
 ! !
 
-!UIPainter class methodsFor:'icons'!
-
-iconAlignB
-    "returns image assigned to align bottom
-    "
-
-    <resource: #fileImage>
-
-    ^ Image fromFile:'b_alignB.xbm'
-
-    "Modified: / 29.10.1997 / 03:18:16 / cg"
-!
-
-iconAlignCenterH
-    "returns image assigned to center horizontal
-    "
-
-    <resource: #fileImage>
-
-    ^ Image fromFile:'b_alignCH.xbm'
-
-    "Modified: / 29.10.1997 / 03:18:34 / cg"
-!
-
-iconAlignCenterV
-    "returns image assigned to center vertical
-    "
-
-    <resource: #fileImage>
-
-    ^ Image fromFile:'b_alignCV.xbm'
-
-    "Modified: / 29.10.1997 / 03:18:39 / cg"
-!
-
-iconAlignL
-    "returns image assigned to align left
-    "
-
-    <resource: #fileImage>
-
-    ^ Image fromFile:'b_alignL.xbm'
-
-    "Modified: / 29.10.1997 / 03:18:43 / cg"
-!
-
-iconAlignLR
-    "returns image assigned to align left and right
-    "
-
-    <resource: #fileImage>
-
-    ^ Image fromFile:'b_alignLR.xbm'
-
-    "Modified: / 29.10.1997 / 03:18:48 / cg"
-!
-
-iconAlignR
-    "returns image assigned to align right
-    "
-
-    <resource: #fileImage>
-
-    ^ Image fromFile:'b_alignR.xbm'
-
-    "Modified: / 29.10.1997 / 03:18:51 / cg"
-!
-
-iconAlignT
-    "returns image assigned to align top
-    "
-
-    <resource: #fileImage>
-
-    ^ Image fromFile:'b_alignT.xbm'
-
-    "Modified: / 29.10.1997 / 03:18:56 / cg"
-!
-
-iconAlignTB
-    "returns image assigned to align top and bottom
-    "
-
-    <resource: #fileImage>
-
-    ^ Image fromFile:'b_alignTB.xbm'
-
-    "Modified: / 29.10.1997 / 03:19:01 / cg"
-!
-
-iconInstall
-
-    <resource: #fileImage>
-
-    ^ Image fromFile:'bitmaps/xpmBitmaps/misc_tools/SaveButton.xpm'
-
-    "Modified: / 29.10.1997 / 03:19:06 / cg"
-!
-
-iconStepDown
-    "returns image assigned to step down (change hierarchy).
-    "
-
-    <resource: #fileImage>
-
-    IconStepDown isNil ifTrue:[
-        IconStepDown := ((Image fromFile:'stepOver.xpm') rotated:90) flipHorizontal
-    ].
-  ^ IconStepDown
-
-"
-IconStepDown := nil
-"
-
-    "Modified: / 29.10.1997 / 03:19:14 / cg"
-!
-
-iconStepIn
-    "returns image assigned to step in (change hierarchy).
-    "
-
-    <resource: #fileImage>
-
-    IconStepIn isNil ifTrue:[
-        IconStepIn := ((Image fromFile:'stepIn.xpm') rotated:90) flipHorizontal
-    ].
-  ^ IconStepIn
-
-    "Modified: / 29.10.1997 / 03:19:19 / cg"
-!
-
-iconStepOut
-    "returns image assigned to step out (change hierarchy).
-    "
-
-    <resource: #fileImage>
-
-    IconStepOut isNil ifTrue:[
-        IconStepOut := ((Image fromFile:'stepOut.xpm') rotated:90) flipHorizontal
-    ].
-  ^ IconStepOut
-
-    "Modified: / 29.10.1997 / 03:19:25 / cg"
-!
-
-iconStepUp
-    "returns image assigned to step up (change hierarchy).
-    "
-
-    <resource: #fileImage>
-
-    IconStepUp isNil ifTrue:[
-        IconStepUp := ((Image fromFile:'stepOver.xpm') rotated:90) flipHorizontal flipVertical
-    ].
-  ^ IconStepUp
-
-"
-IconStepUp := nil
-"
-
-    "Modified: / 29.10.1997 / 03:19:29 / cg"
-! !
-
 !UIPainter class methodsFor:'interface specs'!
 
 gridParametersSpec
@@ -450,100 +294,73 @@
      UIPainter new openOnClass:UIPainter andSelector:#gridParametersSpec
      UIPainter new openInterface:#gridParametersSpec
     "
-    "UIPainter open"
 
     <resource: #canvas>
 
     ^
-
+     
        #(#FullSpec
           #'window:' 
            #(#WindowSpec
               #'name:' 'Grid Parameters:'
-              #'layout:' #(#LayoutFrame 219 0 193 0 484 0 366 0)
+              #'layout:' #(#LayoutFrame 229 0 394 0 494 0 543 0)
               #'label:' 'Grid Parameters:'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1280 1024)
-              #'bounds:' #(#Rectangle 219 193 485 367)
+              #'bounds:' #(#Rectangle 229 394 495 544)
+              #'usePreferredExtent:' false
           )
           #'component:' 
            #(#SpecCollection
               #'collection:' 
                #(
-                 #(#LabelSpec
-                    #'name:' 'gridParameters'
-                    #'layout:' #(#LayoutOrigin 0 0 0 0)
-                    #'label:' 'Grid Parameters:'
-                    #'adjust:' #left
-                    #'resizeForLabel:' true
-                )
                  #(#CheckBoxSpec
                     #'name:' 'show'
-                    #'layout:' #(#Point 30 31)
+                    #'layout:' #(#Point 13 14)
                     #'model:' #showGrid
-                    #'label:' 'show grid'
+                    #'label:' 'Show grid'
                 )
                  #(#CheckBoxSpec
                     #'name:' 'align'
-                    #'layout:' #(#Point 30 57)
+                    #'layout:' #(#Point 117 14)
                     #'model:' #alignToGrid
-                    #'label:' 'align to grid'
+                    #'label:' 'Align to Grid'
                 )
                  #(#LabelSpec
                     #'name:' 'hrzLabel'
-                    #'layout:' #(#Point 90 94)
-                    #'label:' 'pixels horizontal'
+                    #'layout:' #(#AlignmentOrigin 136 0 62 0 1 0.5)
+                    #'label:' 'Horizontal Pixels:'
+                    #'adjust:' #right
                     #'resizeForLabel:' true
                 )
                  #(#InputFieldSpec
                     #'name:' 'hrzField'
-                    #'layout:' #(#LayoutFrame 33 0 91 0 86 0 113 0)
+                    #'layout:' #(#LayoutFrame 141 0 51 0 194 0 73 0)
                     #'model:' #hspace
                     #'type:' #numberOrNil
                 )
                  #(#LabelSpec
                     #'name:' 'vrtLabel'
-                    #'layout:' #(#Point 90 118)
-                    #'label:' 'pixels vertical'
+                    #'layout:' #(#AlignmentOrigin 137 0 85 0 1 0.5)
+                    #'label:' 'Vertical Pixels:'
+                    #'adjust:' #right
                     #'resizeForLabel:' true
                 )
                  #(#InputFieldSpec
                     #'name:' 'vrtField'
-                    #'layout:' #(#LayoutFrame 33 0 115 0 86 0 137 0)
+                    #'layout:' #(#LayoutFrame 141 0 74 0 194 0 96 0)
                     #'model:' #vspace
                     #'type:' #numberOrNil
                 )
-                 #(#HorizontalPanelViewSpec
-                    #'name:' 'horizontalPanelView1'
-                    #'layout:' #(#LayoutFrame 0 0.0 -30 1.0 0 1.0 0 1.0)
-                    #'component:' 
-                     #(#SpecCollection
-                        #'collection:' 
-                         #(
-                           #(#ActionButtonSpec
-                              #'name:' 'cancel'
-                              #'label:' 'cancel'
-                              #'model:' #cancel
-                              #'extent:' #(#Point 128 24)
-                          )
-                           #(#ActionButtonSpec
-                              #'name:' 'accept'
-                              #'label:' 'accept'
-                              #'model:' #accept
-                              #'extent:' #(#Point 129 24)
-                          )
-                        )
-                    )
-                    #'horizontalLayout:' #fitSpace
-                    #'verticalLayout:' #fitSpace
-                    #'horizontalSpace:' 3
-                    #'verticalSpace:' 3
+                 #(#UISubSpecification
+                    #'name:' 'uISubSpecifica1'
+                    #'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1)
+                    #'majorKey:' #ToolApplicationModel
+                    #'minorKey:' #windowSpecForCommitWithoutChannels
                 )
               )
           )
       )
-
-
 !
 
 nameAndSelectorSpec
@@ -564,10 +381,13 @@
        #(#FullSpec
           #'window:' 
            #(#WindowSpec
-              #'name:' 'NameAndSelectorSpec'
-              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
+              #'name:' 'Painter'
+              #'layout:' #(#LayoutFrame 101 0 328 0 491 0 497 0)
               #'label:' 'Painter'
-              #'bounds:' #(#Rectangle 0 0 391 170)
+              #'min:' #(#Point 10 10)
+              #'max:' #(#Point 1152 900)
+              #'bounds:' #(#Rectangle 101 328 492 498)
+              #'usePreferredExtent:' false
           )
           #'component:' 
            #(#SpecCollection
@@ -576,21 +396,21 @@
                  #(#LabelSpec
                     #'name:' 'classLabel'
                     #'layout:' #(#AlignmentOrigin 50 0.11 51 0 1 0.5)
-                    #'label:' 'class:'
+                    #'label:' 'Class:'
                     #'adjust:' #right
                     #'resizeForLabel:' true
                 )
                  #(#LabelSpec
                     #'name:' 'superClassLabel'
                     #'layout:' #(#AlignmentOrigin 50 0.11 77 0 1 0.5)
-                    #'label:' 'superclass:'
+                    #'label:' 'Superclass:'
                     #'adjust:' #right
                     #'resizeForLabel:' true
                 )
                  #(#LabelSpec
                     #'name:' 'selectorLabel'
                     #'layout:' #(#AlignmentOrigin 50 0.11 105 0 1 0.5)
-                    #'label:' 'selector:'
+                    #'label:' 'Selector:'
                     #'adjust:' #right
                     #'resizeForLabel:' true
                 )
@@ -603,7 +423,7 @@
                  #(#LabelSpec
                     #'name:' 'boxLabel'
                     #'layout:' #(#Point 2 10)
-                    #'label:' 'class & selector for code:'
+                    #'label:' 'Class and selector for interface:'
                     #'adjust:' #left
                     #'resizeForLabel:' true
                 )
@@ -620,40 +440,15 @@
                     #'model:' #superclassNameChannel
                     #'comboList:' #superclassNameDefaults
                 )
-                 #(#HorizontalPanelViewSpec
-                    #'name:' 'commitPanel'
-                    #'layout:' #(#LayoutFrame 0 0.0 -26 1.0 0 1.0 -2 1.0)
-                    #'component:' 
-                     #(#SpecCollection
-                        #'collection:' 
-                         #(
-                           #(#ActionButtonSpec
-                              #'name:' 'button1'
-                              #'label:' 'cancel'
-                              #'tabable:' true
-                              #'model:' #cancel
-                              #'extent:' #(#Point 190 24)
-                          )
-                           #(#ActionButtonSpec
-                              #'name:' 'button2'
-                              #'label:' 'ok'
-                              #'tabable:' true
-                              #'isDefault:' true
-                              #'model:' #accept
-                              #'extent:' #(#Point 190 22)
-                          )
-                        )
-                    )
-                    #'horizontalLayout:' #fitSpace
-                    #'verticalLayout:' #fit
-                    #'horizontalSpace:' 3
-                    #'verticalSpace:' 3
+                 #(#UISubSpecification
+                    #'name:' 'uISubSpecifica1'
+                    #'layout:' #(#LayoutFrame 0 0.0 -29 1 0 1.0 -5 1)
+                    #'majorKey:' #ToolApplicationModel
+                    #'minorKey:' #windowSpecForCommitWithoutChannels
                 )
               )
           )
       )
-
-    "Modified: 28.7.1997 / 16:49:49 / cg"
 !
 
 windowSpec
@@ -676,11 +471,12 @@
           #'window:' 
            #(#WindowSpec
               #'name:' 'Tree-View'
-              #'layout:' #(#LayoutFrame 61 0 445 0 574 0 905 0)
+              #'layout:' #(#LayoutFrame 536 0 334 0 1088 0 794 0)
               #'label:' 'Tree-View'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1160 870)
-              #'bounds:' #(#Rectangle 61 445 575 906)
+              #'bounds:' #(#Rectangle 536 334 1089 795)
+              #'menu:' #menu
               #'usePreferredExtent:' false
           )
           #'component:' 
@@ -688,98 +484,16 @@
               #'collection:' 
                #(
                  #(#MenuPanelSpec
-                    #'name:' 'menuPullDown'
-                    #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 25 0)
+                    #'name:' 'menuToolbarView'
+                    #'layout:' #(#LayoutFrame -1 0.0 0 0 -1 1.0 32 0)
+                    #'activeHelpKey:' #menuChangeHierarchy
                     #'tabable:' true
-                    #'menu:' #menuPullDown
-                )
-                 #(#HorizontalPanelViewSpec
-                    #'name:' 'menuContainer'
-                    #'layout:' #(#LayoutFrame 0 0.0 26 0 0 1.0 58 0)
-                    #'component:' 
-                     #(#SpecCollection
-                        #'collection:' 
-                         #(
-                           #(#MenuPanelSpec
-                              #'name:' 'menuChangeHierarchy'
-                              #'activeHelpKey:' #menuChangeHierarchy
-                              #'enableChannel:' #hasOneSelectionOtherThanCanvas
-                              #'tabable:' true
-                              #'menu:' #menuChangeHierarchy
-                              #'showSeparatingLines:' true
-                              #'extent:' #(#Point 120 30)
-                          )
-                           #(#MenuPanelSpec
-                              #'name:' 'menuAlignment'
-                              #'activeHelpKey:' #menuAlignment
-                              #'enableChannel:' #canMoveOrAlignSelection
-                              #'tabable:' true
-                              #'menu:' #menuAlignment
-                              #'showSeparatingLines:' true
-                              #'extent:' #(#Point 244 30)
-                          )
-                           #(#HorizontalPanelViewSpec
-                              #'name:' 'panelViewButtons'
-                              #'component:' 
-                               #(#SpecCollection
-                                  #'collection:' 
-                                   #(
-                                     #(#ArrowButtonSpec
-                                        #'name:' 'moveLeft'
-                                        #'activeHelpKey:' #moveSelectionLeft
-                                        #'tabable:' true
-                                        #'model:' #moveSelectionLeft
-                                        #'enableChannel:' #canMoveOrAlignSelection
-                                        #'isTriggerOnDown:' true
-                                        #'direction:' #left
-                                        #'extent:' #(#Point 22 24)
-                                    )
-                                     #(#ArrowButtonSpec
-                                        #'name:' 'moveRight'
-                                        #'activeHelpKey:' #moveSelectionRight
-                                        #'model:' #moveSelectionRight
-                                        #'enableChannel:' #canMoveOrAlignSelection
-                                        #'isTriggerOnDown:' true
-                                        #'direction:' #right
-                                        #'extent:' #(#Point 22 24)
-                                    )
-                                     #(#ArrowButtonSpec
-                                        #'name:' 'moveDown'
-                                        #'activeHelpKey:' #moveSelectionDown
-                                        #'model:' #moveSelectionDown
-                                        #'enableChannel:' #canMoveOrAlignSelection
-                                        #'isTriggerOnDown:' true
-                                        #'direction:' #down
-                                        #'extent:' #(#Point 22 24)
-                                    )
-                                     #(#ArrowButtonSpec
-                                        #'name:' 'moveUp'
-                                        #'activeHelpKey:' #moveSelectionUp
-                                        #'model:' #moveSelectionUp
-                                        #'enableChannel:' #canMoveOrAlignSelection
-                                        #'isTriggerOnDown:' true
-                                        #'direction:' #up
-                                        #'extent:' #(#Point 22 24)
-                                    )
-                                  )
-                              )
-                              #'level:' 1
-                              #'horizontalLayout:' #spreadSpace
-                              #'verticalLayout:' #fitSpace
-                              #'horizontalSpace:' 4
-                              #'verticalSpace:' 4
-                              #'extent:' #(#Point 125 32)
-                          )
-                        )
-                    )
-                    #'horizontalLayout:' #spread
-                    #'verticalLayout:' #fit
-                    #'horizontalSpace:' 3
-                    #'verticalSpace:' 3
+                    #'menu:' #menuToolbar
+                    #'showSeparatingLines:' true
                 )
                  #(#VariableVerticalPanelSpec
                     #'name:' 'vpanel'
-                    #'layout:' #(#LayoutFrame 0 0.0 59 0.0 0 1.0 0 1.0)
+                    #'layout:' #(#LayoutFrame 0 0.0 34 0.0 0 1.0 0 1.0)
                     #'component:' 
                      #(#SpecCollection
                         #'collection:' 
@@ -793,7 +507,7 @@
                                      #(#ArbitraryComponentSpec
                                         #'name:' 'treeView'
                                         #'tabable:' true
-                                        #'menu:' #menuCanvas
+                                        #'menu:' #menuEdit
                                         #'hasHorizontalScrollBar:' true
                                         #'hasVerticalScrollBar:' true
                                         #'miniScrollerHorizontal:' true
@@ -809,7 +523,7 @@
                                              #(
                                                #(#NoteBookViewSpec
                                                   #'name:' 'noteBook'
-                                                  #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 -30 1.0)
+                                                  #'layout:' #(#LayoutFrame 0 0.0 26 0.0 0 1.0 -30 1.0)
                                                   #'enableChannel:' #enableChannel
                                                   #'tabable:' true
                                                   #'model:' #tabModel
@@ -827,20 +541,20 @@
                                                          #(#ActionButtonSpec
                                                             #'name:' 'cancelButton'
                                                             #'activeHelpKey:' #cancel
-                                                            #'label:' 'cancel'
+                                                            #'label:' 'Cancel'
                                                             #'tabable:' true
                                                             #'model:' #cancel
                                                             #'enableChannel:' #modifiedChannel
-                                                            #'extent:' #(#Point 166 24)
+                                                            #'extent:' #(#Point 179 24)
                                                         )
                                                          #(#ActionButtonSpec
                                                             #'name:' 'acceptButton'
                                                             #'activeHelpKey:' #accept
-                                                            #'label:' 'accept'
+                                                            #'label:' 'OK'
                                                             #'tabable:' true
                                                             #'model:' #accept
                                                             #'enableChannel:' #modifiedChannel
-                                                            #'extent:' #(#Point 167 24)
+                                                            #'extent:' #(#Point 180 24)
                                                         )
                                                       )
                                                   )
@@ -849,6 +563,58 @@
                                                   #'horizontalSpace:' 3
                                                   #'verticalSpace:' 3
                                               )
+                                               #(#HorizontalPanelViewSpec
+                                                  #'name:' 'panelViewButtons'
+                                                  #'layout:' #(#LayoutFrame 0 0.0 0 0 0 1.0 24 0)
+                                                  #'component:' 
+                                                   #(#SpecCollection
+                                                      #'collection:' 
+                                                       #(
+                                                         #(#ArrowButtonSpec
+                                                            #'name:' 'moveLeft'
+                                                            #'activeHelpKey:' #moveSelectionLeft
+                                                            #'tabable:' true
+                                                            #'model:' #moveSelectionLeft
+                                                            #'enableChannel:' #canMoveOrAlignSelection
+                                                            #'isTriggerOnDown:' true
+                                                            #'direction:' #left
+                                                            #'extent:' #(#Point 22 22)
+                                                        )
+                                                         #(#ArrowButtonSpec
+                                                            #'name:' 'moveRight'
+                                                            #'activeHelpKey:' #moveSelectionRight
+                                                            #'model:' #moveSelectionRight
+                                                            #'enableChannel:' #canMoveOrAlignSelection
+                                                            #'isTriggerOnDown:' true
+                                                            #'direction:' #right
+                                                            #'extent:' #(#Point 22 22)
+                                                        )
+                                                         #(#ArrowButtonSpec
+                                                            #'name:' 'moveDown'
+                                                            #'activeHelpKey:' #moveSelectionDown
+                                                            #'model:' #moveSelectionDown
+                                                            #'enableChannel:' #canMoveOrAlignSelection
+                                                            #'isTriggerOnDown:' true
+                                                            #'direction:' #down
+                                                            #'extent:' #(#Point 22 22)
+                                                        )
+                                                         #(#ArrowButtonSpec
+                                                            #'name:' 'moveUp'
+                                                            #'activeHelpKey:' #moveSelectionUp
+                                                            #'model:' #moveSelectionUp
+                                                            #'enableChannel:' #canMoveOrAlignSelection
+                                                            #'isTriggerOnDown:' true
+                                                            #'direction:' #up
+                                                            #'extent:' #(#Point 22 22)
+                                                        )
+                                                      )
+                                                  )
+                                                  #'level:' 1
+                                                  #'horizontalLayout:' #left
+                                                  #'verticalLayout:' #fit
+                                                  #'horizontalSpace:' 4
+                                                  #'verticalSpace:' 4
+                                              )
                                             )
                                         )
                                         #'borderWidth:' 1
@@ -876,15 +642,189 @@
 
 !UIPainter class methodsFor:'menu specs'!
 
-menuAlignment
+menu
     "this window spec was automatically generated by the ST/X MenuEditor"
 
     "do not manually edit this - the builder may not be able to
      handle the specification if its corrupted."
 
     "
-     MenuEditor new openOnClass:UIPainter andSelector:#menuAlignment
-     (Menu new fromLiteralArrayEncoding:(UIPainter menuAlignment)) startUp
+     MenuEditor new openOnClass:UIPainter andSelector:#menu
+     (Menu new fromLiteralArrayEncoding:(UIPainter menu)) startUp
+    "
+
+    <resource: #menu>
+
+    ^
+     
+       #(#Menu
+          
+           #(
+             #(#MenuItem
+                #'label:' 'About'
+                #'labelImage:' #(#ResourceRetriever nil #icon)
+                #'submenuChannel:' #menuAbout
+            )
+             #(#MenuItem
+                #'label:' 'File'
+                #'value:' #file
+                #'enabled:' #enableChannel
+                #'submenu:' 
+                 #(#Menu
+                    
+                     #(
+                       #(#MenuItem
+                          #'label:' 'New'
+                          #'value:' #doNew
+                      )
+                       #(#MenuItem
+                          #'label:' '-'
+                      )
+                       #(#MenuItem
+                          #'label:' 'Load From Class...'
+                          #'value:' #doFromClass
+                      )
+                       #(#MenuItem
+                          #'label:' 'Load From Class With Superclass...'
+                          #'value:' #loadFromClassWithSuperclass
+                      )
+                       #(#MenuItem
+                          #'label:' '-'
+                      )
+                       #(#MenuItem
+                          #'label:' 'Define Class And Selector...'
+                          #'value:' #defineClassAndSelector
+                      )
+                       #(#MenuItem
+                          #'label:' '-'
+                      )
+                       #(#MenuItem
+                          #'label:' 'Save Window Spec'
+                          #'value:' #doInstallSpec
+                      )
+                       #(#MenuItem
+                          #'label:' 'Save Help Spec'
+                          #'value:' #doInstallHelp
+                          #'enabled:' #hasSpecClass
+                      )
+                       #(#MenuItem
+                          #'label:' '-'
+                      )
+                       #(#MenuItem
+                          #'label:' 'Create Aspect Methods'
+                          #'value:' #doInstallAspects
+                          #'enabled:' #hasSpecClass
+                      )
+                       #(#MenuItem
+                          #'label:' 'Create Hook Methods'
+                          #'value:' #doInstallHooks
+                      )
+                       #(#MenuItem
+                          #'label:' '-'
+                      )
+                       #(#MenuItem
+                          #'label:' 'Show Window Spec'
+                          #'value:' #doWindowSpec
+                      )
+                       #(#MenuItem
+                          #'label:' 'Browse Application'
+                          #'value:' #doBrowseAppClass
+                          #'enabled:' #hasSpecClass
+                      )
+                       #(#MenuItem
+                          #'label:' 'Browse Aspect Methods'
+                          #'value:' #doBrowseAspectMethods
+                      )
+                       #(#MenuItem
+                          #'label:' '-'
+                      )
+                       #(#MenuItem
+                          #'label:' 'Pick a View '
+                          #'value:' #doPickAView
+                      )
+                       #(#MenuItem
+                          #'label:' '-'
+                      )
+                       #(#MenuItem
+                          #'label:' 'Exit'
+                          #'value:' #closeRequest
+                      )
+                    ) nil
+                    nil
+                )
+            )
+             #(#MenuItem
+                #'label:' 'Edit'
+                #'submenuChannel:' #menuEdit
+            )
+             #(#MenuItem
+                #'label:' 'Align'
+                #'submenuChannel:' #menuAlign
+            )
+             #(#MenuItem
+                #'label:' 'Test'
+                #'submenu:' 
+                 #(#Menu
+                    
+                     #(
+                       #(#MenuItem
+                          #'label:' 'Geometry Test Mode'
+                          #'indication:' #'testMode:'
+                      )
+                    ) nil
+                    nil
+                )
+            )
+             #(#MenuItem
+                #'label:' 'Settings'
+                #'submenu:' 
+                 #(#Menu
+                    
+                     #(
+                       #(#MenuItem
+                          #'label:' 'Undo Manager'
+                          #'value:' #openUndoMenu
+                      )
+                       #(#MenuItem
+                          #'label:' '-'
+                      )
+                       #(#MenuItem
+                          #'label:' 'Grid Manager'
+                          #'value:' #gridMenu
+                      )
+                    ) nil
+                    nil
+                )
+            )
+             #(#MenuItem
+                #'label:' 'History'
+                #'submenuChannel:' #menuHistory
+            )
+             #(#MenuItem
+                #'label:' ''
+            )
+             #(#MenuItem
+                #'label:' 'Gallery'
+                #'indication:' #galleryShown
+            )
+             #(#MenuItem
+                #'label:' 'Canvas'
+                #'indication:' #painterShown
+            )
+          ) nil
+          nil
+      )
+!
+
+menuAlign
+    "this window spec was automatically generated by the ST/X MenuEditor"
+
+    "do not manually edit this - the builder may not be able to
+     handle the specification if its corrupted."
+
+    "
+     MenuEditor new openOnClass:UIPainter andSelector:#menuAlign
+     (Menu new fromLiteralArrayEncoding:(UIPainter menuAlign)) startUp
     "
 
     <resource: #menu>
@@ -895,6 +835,316 @@
           
            #(
              #(#MenuItem
+                #'label:' 'Align Left'
+                #'value:' #alignSelectionLeft
+                #'activeHelpKey:' #alignSelectionLeft
+                #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignL 'Align Left')
+            )
+             #(#MenuItem
+                #'label:' 'Align Right'
+                #'value:' #alignSelectionRight
+                #'activeHelpKey:' #alignSelectionRight
+                #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignR 'Align Right')
+            )
+             #(#MenuItem
+                #'label:' 'Align Left & Right'
+                #'value:' #alignSelectionLeftAndRight
+                #'activeHelpKey:' #alignSelectionLeftAndRight
+                #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignLR 'Align Left & Right')
+            )
+             #(#MenuItem
+                #'label:' 'Align top'
+                #'value:' #alignSelectionTop
+                #'activeHelpKey:' #alignSelectionTop
+                #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignT 'Align top')
+            )
+             #(#MenuItem
+                #'label:' 'Align Bottom'
+                #'value:' #alignSelectionBottom
+                #'activeHelpKey:' #alignSelectionBottom
+                #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignB 'Align Bottom')
+            )
+             #(#MenuItem
+                #'label:' 'Align Top & Bottom'
+                #'value:' #alignSelectionTopAndBottom
+                #'activeHelpKey:' #alignSelectionTopAndBottom
+                #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignTB 'Align Top & Bottom')
+            )
+             #(#MenuItem
+                #'label:' 'Align Centered Horizontal'
+                #'value:' #alignSelectionCenterHor
+                #'activeHelpKey:' #alignSelectionCenterHor
+                #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignCenterH 'Align Centered Horizontal')
+            )
+             #(#MenuItem
+                #'label:' 'Align Centered Vertical'
+                #'value:' #alignSelectionCenterVer
+                #'activeHelpKey:' #alignSelectionCenterVer
+                #'labelImage:' #(#ResourceRetriever #UIPainter #iconAlignCenterV 'Align Centered Vertical')
+            )
+             #(#MenuItem
+                #'label:' '-'
+            )
+             #(#MenuItem
+                #'label:' 'Spread Horizontal'
+                #'value:' #spreadSelectionHor
+                #'activeHelpKey:' #spreadSelectionHor
+            )
+             #(#MenuItem
+                #'label:' 'Spread Vertical'
+                #'value:' #spreadSelectionVer
+                #'activeHelpKey:' #spreadSelectionVer
+            )
+             #(#MenuItem
+                #'label:' '-'
+            )
+             #(#MenuItem
+                #'label:' 'Center Horizontal In Frame'
+                #'value:' #centerSelectionHor
+                #'activeHelpKey:' #centerSelectionHor
+            )
+             #(#MenuItem
+                #'label:' 'Center Vertical In Frame'
+                #'value:' #centerSelectionVer
+                #'activeHelpKey:' #centerSelectionVer
+            )
+          ) nil
+          nil
+      )
+!
+
+menuEdit
+    "this window spec was automatically generated by the ST/X MenuEditor"
+
+    "do not manually edit this - the builder may not be able to
+     handle the specification if its corrupted."
+
+    "
+     MenuEditor new openOnClass:UIPainter andSelector:#menuEdit
+     (Menu new fromLiteralArrayEncoding:(UIPainter menuEdit)) startUp
+    "
+
+    <resource: #menu>
+
+    ^
+     
+       #(#Menu
+          
+           #(
+             #(#MenuItem
+                #'label:' 'Cut'
+                #'value:' #deleteSelection
+                #'enabled:' #hasSelection
+                #'shortcutKeyCharacter:' #Cut
+            )
+             #(#MenuItem
+                #'label:' 'Copy'
+                #'value:' #copySelection
+                #'enabled:' #hasSelection
+                #'shortcutKeyCharacter:' #Copy
+            )
+             #(#MenuItem
+                #'label:' 'Paste'
+                #'nameKey:' #paste
+                #'value:' #paste
+                #'enabled:' #canPaste
+                #'submenu:' 
+                 #(#Menu
+                    
+                     #(
+                       #(#MenuItem
+                          #'label:' 'Paste'
+                          #'value:' #pasteBuffer
+                          #'activeHelpKey:' #pasteBuffer
+                          #'shortcutKeyCharacter:' #Paste
+                      )
+                       #(#MenuItem
+                          #'label:' 'Keep Layout'
+                          #'value:' #pasteWithLayout
+                          #'activeHelpKey:' #pasteWithLayout
+                          #'enabled:' #canKeepLayoutInSelection
+                      )
+                    ) nil
+                    nil
+                )
+            )
+             #(#MenuItem
+                #'label:' '-'
+            )
+             #(#MenuItem
+                #'label:' 'Undo'
+                #'nameKey:' #undo
+                #'value:' #undoLast
+                #'enabled:' #hasUndoHistory
+                #'shortcutKeyCharacter:' #Cmdu
+            )
+             #(#MenuItem
+                #'label:' '-'
+            )
+             #(#MenuItem
+                #'label:' 'Dimension'
+                #'value:' #dimension
+                #'enabled:' #hasSelection
+                #'submenu:' 
+                 #(#Menu
+                    
+                     #(
+                       #(#MenuItem
+                          #'label:' 'Default Extent'
+                          #'value:' #setToDefaultExtent
+                          #'activeHelpKey:' #setToDefaultExtent
+                          #'enabled:' #canMoveOrAlignSelection
+                      )
+                       #(#MenuItem
+                          #'label:' 'Default Width'
+                          #'value:' #setToDefaultWidth
+                          #'activeHelpKey:' #setToDefaultWidth
+                          #'enabled:' #canMoveOrAlignSelection
+                      )
+                       #(#MenuItem
+                          #'label:' 'Default Height'
+                          #'value:' #setToDefaultHeight
+                          #'activeHelpKey:' #setToDefaultHeight
+                          #'enabled:' #canMoveOrAlignSelection
+                      )
+                       #(#MenuItem
+                          #'label:' '-'
+                      )
+                       #(#MenuItem
+                          #'label:' 'Copy Extent'
+                          #'value:' #copyExtent
+                          #'activeHelpKey:' #copyExtent
+                          #'enabled:' #hasSingleSelection
+                      )
+                       #(#MenuItem
+                          #'label:' '-'
+                      )
+                       #(#MenuItem
+                          #'label:' 'Paste Extent'
+                          #'value:' #pasteExtent
+                          #'activeHelpKey:' #pasteExtent
+                          #'enabled:' #canMoveOrAlignSelection
+                      )
+                       #(#MenuItem
+                          #'label:' 'Paste Width'
+                          #'value:' #pasteWidth
+                          #'activeHelpKey:' #pasteWidth
+                          #'enabled:' #canMoveOrAlignSelection
+                      )
+                       #(#MenuItem
+                          #'label:' 'Paste Height'
+                          #'value:' #pasteHeight
+                          #'activeHelpKey:' #pasteHeight
+                          #'enabled:' #canMoveOrAlignSelection
+                      )
+                       #(#MenuItem
+                          #'label:' '-'
+                      )
+                       #(#MenuItem
+                          #'label:' 'Copy Layout'
+                          #'value:' #copyLayout
+                          #'activeHelpKey:' #copyLayout
+                          #'enabled:' #hasSingleSelection
+                      )
+                       #(#MenuItem
+                          #'label:' 'Paste Layout'
+                          #'value:' #pasteLayout
+                          #'activeHelpKey:' #pasteLayout
+                          #'enabled:' #canMoveOrAlignSelection
+                      )
+                    ) nil
+                    nil
+                )
+            )
+             #(#MenuItem
+                #'label:' 'Align'
+                #'submenuChannel:' #menuAlign
+            )
+          ) nil
+          nil
+      )
+!
+
+menuToolbar
+    "this window spec was automatically generated by the ST/X MenuEditor"
+
+    "do not manually edit this - the builder may not be able to
+     handle the specification if its corrupted."
+
+    "
+     MenuEditor new openOnClass:UIPainter andSelector:#menuToolbar
+     (Menu new fromLiteralArrayEncoding:(UIPainter menuToolbar)) startUp
+    "
+
+    <resource: #menu>
+
+    ^
+     
+       #(#Menu
+          
+           #(
+             #(#MenuItem
+                #'label:' 'Run'
+                #'isButton:' true
+                #'value:' #doStartApplication
+                #'labelImage:' #(#ResourceRetriever nil #runIcon)
+            )
+             #(#MenuItem
+                #'label:' '-'
+            )
+             #(#MenuItem
+                #'label:' 'New'
+                #'isButton:' true
+                #'value:' #doNew
+                #'labelImage:' #(#ResourceRetriever nil #newIcon)
+            )
+             #(#MenuItem
+                #'label:' 'Load'
+                #'isButton:' true
+                #'value:' #doFromClass
+                #'labelImage:' #(#ResourceRetriever nil #loadIcon)
+            )
+             #(#MenuItem
+                #'label:' 'Save'
+                #'isButton:' true
+                #'value:' #doInstallSpec
+                #'labelImage:' #(#ResourceRetriever nil #saveIcon)
+            )
+             #(#MenuItem
+                #'label:' '-'
+            )
+             #(#MenuItem
+                #'label:' 'stepUp'
+                #'isButton:' true
+                #'value:' #doStepUp
+                #'enabled:' #enabledStepOver
+                #'labelImage:' #(#ResourceRetriever nil #upIcon)
+            )
+             #(#MenuItem
+                #'label:' 'stepDown'
+                #'isButton:' true
+                #'value:' #doStepDown
+                #'enabled:' #enabledStepOver
+                #'labelImage:' #(#ResourceRetriever nil #downIcon)
+            )
+             #(#MenuItem
+                #'label:' 'stepIn'
+                #'isButton:' true
+                #'value:' #doStepIn
+                #'enabled:' #enabledStepIn
+                #'labelImage:' #(#ResourceRetriever nil #downRightIcon)
+            )
+             #(#MenuItem
+                #'label:' 'stepOut'
+                #'isButton:' true
+                #'value:' #doStepOut
+                #'enabled:' #enabledStepOut
+                #'labelImage:' #(#ResourceRetriever nil #leftDownIcon)
+            )
+             #(#MenuItem
+                #'label:' '-'
+            )
+             #(#MenuItem
                 #'label:' 'align left'
                 #'isButton:' true
                 #'value:' #alignSelectionLeft
@@ -916,9 +1166,6 @@
                 #'labelImage:' #(#ResourceRetriever nil #iconAlignLR)
             )
              #(#MenuItem
-                #'label:' '-'
-            )
-             #(#MenuItem
                 #'label:' 'align top'
                 #'isButton:' true
                 #'value:' #alignSelectionTop
@@ -959,531 +1206,66 @@
           ) nil
           nil
       )
-!
-
-menuCanvas
-    "this window spec was automatically generated by the ST/X MenuEditor"
-
-    "do not manually edit this - the builder may not be able to
-     handle the specification if its corrupted."
-
-    "
-     MenuEditor new openOnClass:UIPainter andSelector:#menuCanvas
-     (Menu new fromLiteralArrayEncoding:(UIPainter menuCanvas)) startUp
-    "
-
-    <resource: #menu>
-
-    ^
-
-       #(#Menu
-           #(
-             #(#MenuItem
-                #'label:' 'copy'
-                #'value:' #copySelection
-                #'enabled:' #hasSelection
-                #'shortcutKeyCharacter:' #Copy
-            )
-             #(#MenuItem
-                #'label:' 'cut'
-                #'value:' #deleteSelection
-                #'enabled:' #hasSelection
-                #'shortcutKeyCharacter:' #Cut
-            )
-             #(#MenuItem
-                #'label:' 'paste'
-                #'nameKey:' #paste
-                #'enabled:' #canPaste
-                #'value:' #paste
-                #'submenu:' 
-                 #(#Menu
-
-                     #(
-                       #(#MenuItem
-                          #'label:' 'paste'
-                          #'value:' #pasteBuffer
-                          #'activeHelpKey:' #pasteBuffer
-                          #'shortcutKeyCharacter:' #Paste
-                      )
-                       #(#MenuItem
-                          #'label:' 'keep layout'
-                          #'value:' #pasteWithLayout
-                          #'enabled:' #canKeepLayoutInSelection
-                          #'activeHelpKey:' #pasteWithLayout
-                      )
-                    ) nil
-                    nil
-                )
-            )
-             #(#MenuItem
-                #'label:' '-'
-            )
-             #(#MenuItem
-                #'label:' 'undo'
-                #'nameKey:' #undo
-                #'enabled:' #hasUndoHistory
-                #'shortcutKeyCharacter:' #Cmdu
-                #'value:' #undoLast
-            )
-             #(#MenuItem
-                #'label:' '-'
-            )
-             #(#MenuItem
-                #'label:' 'dimension'
-                #'value:' #dimension
-                #'enabled:' #hasSelection
-                #'submenu:' 
-                 #(#Menu
-
-                     #(
-                       #(#MenuItem
-                          #'label:' 'default extent'
-                          #'value:' #setToDefaultExtent
-                          #'enabled:' #canMoveOrAlignSelection
-                          #'activeHelpKey:' #setToDefaultExtent
-                      )
-                       #(#MenuItem
-                          #'label:' 'default width'
-                          #'value:' #setToDefaultWidth
-                          #'enabled:' #canMoveOrAlignSelection
-                          #'activeHelpKey:' #setToDefaultWidth
-                      )
-                       #(#MenuItem
-                          #'label:' 'default height'
-                          #'value:' #setToDefaultHeight
-                          #'enabled:' #canMoveOrAlignSelection
-                          #'activeHelpKey:' #setToDefaultHeight
-                      )
-                       #(#MenuItem
-                          #'label:' 'copy extent'
-                          #'value:' #copyExtent
-                          #'enabled:' #hasSingleSelection
-                          #'activeHelpKey:' #copyExtent
-                      )
-                       #(#MenuItem
-                          #'label:' 'paste extent'
-                          #'value:' #pasteExtent
-                          #'enabled:' #canMoveOrAlignSelection
-                          #'activeHelpKey:' #pasteExtent
-                      )
-                       #(#MenuItem
-                          #'label:' 'paste width'
-                          #'value:' #pasteWidth
-                          #'enabled:' #canMoveOrAlignSelection
-                          #'activeHelpKey:' #pasteWidth
-                      )
-                       #(#MenuItem
-                          #'label:' 'paste height'
-                          #'value:' #pasteHeight
-                          #'enabled:' #canMoveOrAlignSelection
-                          #'activeHelpKey:' #pasteHeight
-                      )
-                       #(#MenuItem
-                          #'label:' 'copy  layout'
-                          #'value:' #copyLayout
-                          #'enabled:' #hasSingleSelection
-                          #'activeHelpKey:' #copyLayout
-                      )
-                       #(#MenuItem
-                          #'label:' 'paste layout'
-                          #'value:' #pasteLayout
-                          #'enabled:' #canMoveOrAlignSelection
-                          #'activeHelpKey:' #pasteLayout
-                      )
-                    )
-                    #(3 1 3)
-                    nil
-                )
-            )
-             #(#MenuItem
-                #'label:' 'align'
-                #'value:' #align
-                #'enabled:' #canMoveOrAlignSelection
-                #'submenu:' 
-                 #(#Menu
-
-                     #(
-                       #(#MenuItem
-                          #'label:' 'align left'
-                          #'value:' #alignSelectionLeft
-                          #'activeHelpKey:' #alignSelectionLeft
-                          #'labelImage:' 
-                           #(#ResourceRetriever
-                              #UIPainter #iconAlignL
-                              'align left'
-                          )
-                      )
-                       #(#MenuItem
-                          #'label:' 'align right'
-                          #'value:' #alignSelectionRight
-                          #'activeHelpKey:' #alignSelectionRight
-                          #'labelImage:' 
-                           #(#ResourceRetriever
-                              #UIPainter #iconAlignR
-                              'align right'
-                          )
-                      )
-                       #(#MenuItem
-                          #'label:' 'align left & right'
-                          #'value:' #alignSelectionLeftAndRight
-                          #'activeHelpKey:' #alignSelectionLeftAndRight
-                          #'labelImage:' 
-                           #(#ResourceRetriever
-                              #UIPainter #iconAlignLR
-                              'align left & right'
-                          )
-                      )
-                       #(#MenuItem
-                          #'label:' 'align top'
-                          #'value:' #alignSelectionTop
-                          #'activeHelpKey:' #alignSelectionTop
-                          #'labelImage:' 
-                           #(#ResourceRetriever
-                              #UIPainter #iconAlignT
-                              'align top'
-                          )
-                      )
-                       #(#MenuItem
-                          #'label:' 'align bottom'
-                          #'value:' #alignSelectionBottom
-                          #'activeHelpKey:' #alignSelectionBottom
-                          #'labelImage:' 
-                           #(#ResourceRetriever
-                              #UIPainter #iconAlignB
-                              'align bottom'
-                          )
-                      )
-                       #(#MenuItem
-                          #'label:' 'align top & bottom'
-                          #'value:' #alignSelectionTopAndBottom
-                          #'activeHelpKey:' #alignSelectionTopAndBottom
-                          #'labelImage:' 
-                           #(#ResourceRetriever
-                              #UIPainter #iconAlignTB
-                              'align top & bottom'
-                          )
-                      )
-                       #(#MenuItem
-                          #'label:' 'align centered horizontal'
-                          #'value:' #alignSelectionCenterHor
-                          #'activeHelpKey:' #alignSelectionCenterHor
-                          #'labelImage:' 
-                           #(#ResourceRetriever
-                              #UIPainter #iconAlignCenterH
-                              'align centered horizontal'
-                          )
-                      )
-                       #(#MenuItem
-                          #'label:' 'align centered vertical'
-                          #'value:' #alignSelectionCenterVer
-                          #'activeHelpKey:' #alignSelectionCenterVer
-                          #'labelImage:' 
-                           #(#ResourceRetriever
-                              #UIPainter #iconAlignCenterV
-                              'align centered vertical'
-                          )
-                      )
-                       #(#MenuItem
-                          #'label:' 'spread horizontal'
-                          #'value:' #spreadSelectionHor
-                          #'activeHelpKey:' #spreadSelectionHor
-                      )
-                       #(#MenuItem
-                          #'label:' 'spread vertical'
-                          #'value:' #spreadSelectionVer
-                          #'activeHelpKey:' #spreadSelectionVer
-                      )
-                       #(#MenuItem
-                          #'label:' 'center horizontal in frame'
-                          #'value:' #centerSelectionHor
-                          #'activeHelpKey:' #centerSelectionHor
-                      )
-                       #(#MenuItem
-                          #'label:' 'center vertical in frame'
-                          #'value:' #centerSelectionVer
-                          #'activeHelpKey:' #centerSelectionVer
-                      )
-                    )
-                    #(8 2)
-                    nil
-                )
-            )
-          ) nil
-          nil
-      )
+! !
+
+!UIPainter class methodsFor:'resources'!
+
+icon
+
+    ^self startGUIBuilderIcon subImageIn: (0@0 extent: (24@16))
+
+
 
 
 !
 
-menuChangeHierarchy
-    "this window spec was automatically generated by the ST/X MenuEditor"
-
-    "do not manually edit this - the builder may not be able to
-     handle the specification if its corrupted."
-
-    "
-     MenuEditor new openOnClass:UIPainter andSelector:#menuChangeHierarchy
-     (Menu new fromLiteralArrayEncoding:(UIPainter menuChangeHierarchy)) startUp
-    "
-
-    <resource: #menu>
-
-    ^
-     
-       #(#Menu
-          
-           #(
-             #(#MenuItem
-                #'label:' 'stepUp'
-                #'isButton:' true
-                #'value:' #doStepUp
-                #'labelImage:' #(#ResourceRetriever #UIPainter #iconStepUp)
-            )
-             #(#MenuItem
-                #'label:' 'stepDown'
-                #'isButton:' true
-                #'value:' #doStepDown
-                #'labelImage:' #(#ResourceRetriever #UIPainter #iconStepDown)
-            )
-             #(#MenuItem
-                #'label:' 'stepIn'
-                #'isButton:' true
-                #'value:' #doStepIn
-                #'enabled:' #canMoveSelectionIntoContainer
-                #'labelImage:' #(#ResourceRetriever #UIPainter #iconStepIn)
-            )
-             #(#MenuItem
-                #'label:' 'stepOut'
-                #'isButton:' true
-                #'value:' #doStepOut
-                #'enabled:' #canMoveSelectionOutOfContainer
-                #'labelImage:' #(#ResourceRetriever #UIPainter #iconStepOut)
-            )
-          ) nil
-          nil
-      )
-!
-
-menuPullDown
-    "this window spec was automatically generated by the ST/X MenuEditor"
-
-    "do not manually edit this - the builder may not be able to
-     handle the specification if its corrupted."
-
-    "
-     MenuEditor new openOnClass:UIPainter andSelector:#menuPullDown
-     (Menu new fromLiteralArrayEncoding:(UIPainter menuPullDown)) startUp
-    "
-
-    <resource: #menu>
-
-    ^
-     
-       #(#Menu
-          
-           #(
-             #(#MenuItem
-                #'label:' 'file'
-                #'value:' #file
-                #'enabled:' #enableChannel
-                #'submenu:' 
-                 #(#Menu
-                    
-                     #(
-                       #(#MenuItem
-                          #'label:' 'new'
-                          #'value:' #doNew
-                      )
-                       #(#MenuItem
-                          #'label:' 'from class ...'
-                          #'value:' #doFromClass
-                      )
-                       #(#MenuItem
-                          #'label:' 'pick a view '
-                          #'value:' #doPickAView
-                      )
-                       #(#MenuItem
-                          #'label:' '-'
-                      )
-                       #(#MenuItem
-                          #'label:' 'quit'
-                          #'value:' #closeRequest
-                      )
-                    ) nil
-                    nil
-                )
-            )
-             #(#MenuItem
-                #'label:' 'misc'
-                #'value:' #misc
-                #'enabled:' #enableChannel
-                #'submenu:' 
-                 #(#Menu
-                    
-                     #(
-                       #(#MenuItem
-                          #'label:' 'grid'
-                          #'value:' #grid
-                          #'submenu:' 
-                           #(#Menu
-                              
-                               #(
-                                 #(#MenuItem
-                                    #'label:' 'show'
-                                    #'indication:' #'gridShown:'
-                                )
-                                 #(#MenuItem
-                                    #'label:' 'align'
-                                    #'indication:' #'gridAlign:'
-                                )
-                                 #(#MenuItem
-                                    #'label:' '-'
-                                )
-                                 #(#MenuItem
-                                    #'label:' 'menu'
-                                    #'value:' #gridMenu
-                                )
-                              ) nil
-                              nil
-                          )
-                      )
-                       #(#MenuItem
-                          #'label:' 'undo'
-                          #'value:' #undo
-                          #'submenu:' 
-                           #(#Menu
-                              
-                               #(
-                                 #(#MenuItem
-                                    #'label:' 'last'
-                                    #'value:' #undoLast
-                                )
-                                 #(#MenuItem
-                                    #'label:' 'menu'
-                                    #'value:' #openUndoMenu
-                                )
-                                 #(#MenuItem
-                                    #'label:' '-'
-                                )
-                                 #(#MenuItem
-                                    #'label:' 'delete'
-                                    #'value:' #removeUndoHistory
-                                )
-                              ) nil
-                              nil
-                          )
-                      )
-                    ) nil
-                    nil
-                )
-            )
-             #(#MenuItem
-                #'label:' 'code'
-                #'value:' #code
-                #'enabled:' #enableChannel
-                #'submenu:' 
-                 #(#Menu
-                    
-                     #(
-                       #(#MenuItem
-                          #'label:' 'class && method ...'
-                          #'value:' #defineClassAndSelector
-                      )
-                       #(#MenuItem
-                          #'label:' '-'
-                      )
-                       #(#MenuItem
-                          #'label:' 'install window spec.'
-                          #'value:' #doInstallSpec
-                      )
-                       #(#MenuItem
-                          #'label:' 'install aspects'
-                          #'value:' #doInstallAspects
-                          #'enabled:' #hasSpecClass
-                      )
-                       #(#MenuItem
-                          #'label:' 'install hooks'
-                          #'value:' #doInstallHooks
-                      )
-                       #(#MenuItem
-                          #'label:' 'install help spec.'
-                          #'value:' #doInstallHelp
-                          #'enabled:' #hasSpecClass
-                      )
-                       #(#MenuItem
-                          #'label:' '-'
-                      )
-                       #(#MenuItem
-                          #'label:' 'show window spec.'
-                          #'value:' #doWindowSpec
-                      )
-                       #(#MenuItem
-                          #'label:' 'browse application'
-                          #'value:' #doBrowseAppClass
-                          #'enabled:' #hasSpecClass
-                      )
-                       #(#MenuItem
-                          #'label:' 'browse aspect methods'
-                          #'value:' #doBrowseAspectMethods
-                      )
-                    ) nil
-                    nil
-                )
-            )
-             #(#MenuItem
-                #'label:' 'test'
-                #'nameKey:' #test
-                #'value:' #test
-                #'submenu:' 
-                 #(#Menu
-                    
-                     #(
-                       #(#MenuItem
-                          #'label:' 'geometry test mode'
-                          #'indication:' #'testMode:'
-                      )
-                    ) nil
-                    nil
-                )
-            )
-             #(#MenuItem
-                #'label:' ''
-            )
-             #(#MenuItem
-                #'label:' 'Gallery'
-                #'indication:' #galleryShown
-            )
-             #(#MenuItem
-                #'label:' 'Canvas'
-                #'indication:' #painterShown
-            )
-             #(#MenuItem
-                #'label:' ''
-            )
-             #(#MenuItem
-                #'label:' '-'
-            )
-             #(#MenuItem
-                #'label:' 'Install'
-                #'value:' #doInstallSpec
-                #'labelImage:' #(#ResourceRetriever nil #iconInstall 'Install')
-            )
-             #(#MenuItem
-                #'label:' '-'
-            )
-             #(#MenuItem
-                #'label:' 'Run'
-                #'value:' #doStartApplication
-            )
-             #(#MenuItem
-                #'label:' '-'
-            )
-          ) nil
-          nil
-      )
-
-    "Modified: / 31.10.1997 / 17:35:38 / cg"
-! !
+iconAlignB
+    "ImageEditor openOnClass:self andSelector:#iconAlignB"
+
+    <resource: #image>
+    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 7 0 0 0 0 0 7 0 80 0 0 0 7 0 112 0 0 0 7 0 112 0 0 0 7 0 112 0 0 80 7 0 112 0 0 112 7 0 112 11 0 112 7 0 112 0 0 112 7 0 112 1 0 112 7 0 112 0 0 112 7 0 112 11 0 0 0 0 0 0 10 170 170 170 170 0 10 170 170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9977)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 120 3 0 120 0 0 121 224 0 121 224 0 121 224 0 121 224 30 121 224 30 121 224 30 121 224 30 121 225 30 121 224 30 121 224 30 121 224 30 121 224 63 255 240 63 255 240 0 0 0 0 0 3 0 0 0]) ; yourself); yourself!
+
+iconAlignCenterH
+    "ImageEditor openOnClass:self andSelector:#iconAlignCenterH"
+
+    <resource: #image>
+    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 84 0 0 0 5 80 84 170 170 170 165 80 85 85 89 85 85 80 85 85 42 21 85 90 85 84 170 133 85 88 85 82 170 161 85 80 85 74 170 168 85 80 85 69 85 85 85 80 85 85 85 85 85 88 84 0 0 0 5 80 84 170 170 170 165 80 85 85 89 85 85 88 85 85 42 21 85 80 85 84 170 133 85 80 85 82 170 161 85 80 85 74 170 168 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 88]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9977 blue:49.9977); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 31 255 192 31 255 224 15 255 224 0 248 0 1 252 0 3 254 0 7 255 0 7 255 0 0 0 0 31 255 192 31 255 224 15 255 224 0 248 0 1 252 0 3 254 0 7 255 0 3 255 0 0 0 0 0 0 0]) ; yourself); yourself!
+
+iconAlignCenterV
+    "ImageEditor openOnClass:self andSelector:#iconAlignCenterV"
+
+    <resource: #image>
+    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 84 21 85 5 80 85 84 149 85 37 80 80 84 148 21 37 80 82 20 148 133 37 80 82 132 148 161 37 80 82 160 148 168 37 82 82 168 148 170 37 80 82 170 148 170 165 80 82 169 148 170 101 80 82 164 148 169 37 80 82 148 148 165 37 80 82 84 148 149 37 80 85 84 149 85 37 88 85 84 149 85 37 80 85 84 149 85 37 80 85 85 85 85 85 80 85 85 85 85 85 88 85 85 85 85 85 80 85 85 85 85 85 80]) ; colorMap:((OrderedCollection new add:(Color white); add:(Color black); add:(Color red:0.0 green:49.9992 blue:49.9992); add:(Color red:100.0 green:0.0 blue:0.0); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 1 1 128 192 1 192 224 49 216 224 57 220 224 61 222 224 63 223 224 63 223 224 63 223 224 63 223 224 63 223 224 61 222 224 57 220 224 17 200 227 1 192 224 1 192 224 0 192 96 0 0 0 0 0 3 0 0 0]) ; yourself); yourself!
+
+iconAlignL
+    "ImageEditor openOnClass:self andSelector:#iconAlignL"
+
+    <resource: #image>
+    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 2 128 0 0 0 0 2 128 0 0 0 0 2 133 85 85 0 9 2 135 255 255 0 0 2 128 0 0 0 0 2 128 0 0 0 0 2 128 0 0 0 0 2 128 0 0 0 0 2 133 85 85 80 0 2 135 255 255 240 0 2 128 0 0 0 5 2 128 0 0 0 0 2 128 0 0 0 0 2 128 0 0 0 0 2 133 85 0 0 0 2 135 255 0 0 0 2 128 0 0 0 0 2 128 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9992)); at:4 put:((Color grey:66.9993)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 24 0 0 31 255 128 31 255 128 31 255 128 31 255 128 24 0 0 24 0 0 31 255 224 31 255 224 31 255 224 31 255 224 24 0 0 24 0 0 31 248 0 31 248 0 31 248 0 31 248 0 24 0 0 0 0 0 0 0 0]) ; yourself); yourself!
+
+iconAlignLR
+    "ImageEditor openOnClass:self andSelector:#iconAlignLR"
+
+    <resource: #image>
+    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 2 128 0 0 40 0 2 128 0 0 40 0 2 133 85 85 40 9 2 135 255 255 40 0 2 128 0 0 40 0 2 128 0 0 40 0 2 128 0 0 40 0 2 128 0 0 40 0 2 133 85 85 40 0 2 135 255 255 40 0 2 128 0 0 40 5 2 128 0 0 40 0 2 128 0 0 40 0 2 128 0 0 40 0 2 133 85 85 40 0 2 135 255 252 40 0 2 128 0 0 40 0 2 128 0 0 40 0 0 0 0 0 0 5 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9992)); at:4 put:((Color grey:66.9993)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 24 0 96 31 255 224 31 255 224 31 255 224 31 255 224 24 0 96 24 0 96 31 255 224 31 255 224 31 255 224 31 255 224 24 0 96 24 0 96 31 255 224 31 255 224 31 254 224 31 255 224 24 0 96 0 0 0 0 0 0]) ; yourself); yourself!
+
+iconAlignR
+    "ImageEditor openOnClass:self andSelector:#iconAlignR"
+
+    <resource: #image>
+    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 40 0 0 0 0 0 40 0 0 5 85 85 40 9 0 7 255 255 40 0 0 0 0 0 40 0 0 0 0 0 40 0 0 0 0 0 40 0 0 0 0 0 40 0 0 85 85 85 40 0 0 127 255 255 40 0 0 0 0 0 40 5 0 0 0 0 40 0 0 0 0 0 40 0 0 0 0 0 40 0 0 0 5 85 40 0 0 0 7 255 40 0 0 0 0 0 40 0 0 0 0 0 40 0 0 0 0 0 0 5 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9992)); at:4 put:((Color grey:66.9993)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 96 7 255 224 7 255 224 7 255 224 7 255 224 0 0 96 0 0 96 31 255 224 31 255 224 31 255 224 31 255 224 0 0 96 0 0 96 0 127 224 0 127 224 0 127 224 0 127 224 0 0 96 0 0 0 0 0 0]) ; yourself); yourself!
+
+iconAlignT
+    "ImageEditor openOnClass:self andSelector:#iconAlignT"
+
+    <resource: #image>
+    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10 170 170 170 170 0 10 170 170 170 170 0 0 0 0 0 0 0 0 80 5 0 80 11 0 112 7 0 112 0 0 112 7 0 112 1 0 112 7 0 112 0 0 112 7 0 112 11 0 112 7 0 112 0 0 0 7 0 112 0 0 0 7 0 112 0 0 0 7 0 112 0 0 0 7 0 112 0 0 0 7 0 0 0 0 0 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9977)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 3 0 0 0 63 255 240 63 255 240 30 121 224 30 121 224 30 121 224 30 121 224 30 121 225 30 121 224 30 121 224 30 121 224 0 121 224 0 121 224 0 121 224 0 121 224 0 120 0 0 120 3 0 0 0 0 0 0 0 0 0]) ; yourself); yourself!
+
+iconAlignTB
+    "ImageEditor openOnClass:self andSelector:#iconAlignTB"
+
+    <resource: #image>
+    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 10 170 170 170 170 0 10 170 170 170 170 0 0 0 0 0 0 0 0 80 5 0 80 7 0 112 7 0 112 0 0 112 7 0 112 0 0 112 7 0 112 0 0 112 7 0 112 8 0 112 7 0 112 0 0 112 7 0 112 1 0 112 7 0 112 0 0 112 7 0 112 0 0 112 7 0 64 0 0 0 0 0 0 0 10 170 170 170 170 0 10 170 170 170 170 0 0 0 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color red:0.0 green:0.0 blue:49.9977)); at:4 put:((Color grey:66.9978)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 3 0 0 0 63 255 240 63 255 240 30 121 224 30 121 225 30 121 224 30 121 224 30 121 224 30 121 224 30 121 224 30 121 224 30 121 225 30 121 225 30 121 160 30 121 224 63 255 240 63 255 242 0 0 0 0 0 0 0 0 0]) ; yourself); yourself! !
 
 !UIPainter methodsFor:'actions'!
 
@@ -1930,33 +1712,10 @@
 
 !UIPainter methodsFor:'menu accessing'!
 
-menuAlignment
-    "returns the pull down menu which keeps the alignment operations
-    "
-    ^ self class menuAlignment
-
-!
-
-menuCanvas
+menuEdit
     "returns the middle button menu used by the painter and the tree view
     "
     ^ [ treeView canvas showMiddleButtonMenu ]
-!
-
-menuChangeHierarchy
-    "returns the hierarchy pull down menu
-    "
-    ^ self class menuChangeHierarchy
-
-
-!
-
-menuPullDown
-    "returns the main pull down menu
-    "
-    ^ self class menuPullDown
-
-
 ! !
 
 !UIPainter methodsFor:'printing'!
@@ -1969,6 +1728,22 @@
 
 !UIPainter methodsFor:'private'!
 
+checkModified
+    "check interface modification
+    "
+    self painter isModified
+    ifTrue:
+    [
+        ((YesNoBox title:'Interface was modified!!')        
+            noText:'Cancel';
+            yesText:'Waste it and proceed';
+            showAtPointer;
+            accepted) ifFalse: [^false].
+        self painter resetModification
+    ].
+    ^true
+!
+
 hideUIView:aView
     "hide the view which is an application or top view
     "
@@ -2019,6 +1794,16 @@
     specSelector := (selector ? '').
     specSuperclass := superClassName.
 
+    specClass notNil & selector notNil
+    ifTrue:
+    [
+        |className message|
+        specClass isClass ifTrue: [className := specClass name].
+        specClass isString ifTrue: [className := specClass].
+        message := className, ' ', specSelector.
+        self addToHistory: message -> #loadFromMessage:.
+        self valueOfInfoLabel value: className, ' << ', specSelector
+    ].
     "Modified: 24.6.1997 / 19:07:01 / cg"
 !
 
@@ -2139,8 +1924,8 @@
 
     self isModified ifTrue:[
         whatToDo := DialogBox 
-                        confirmWithCancel:'accept change made in ' , tabSelection printString , ' section ?'
-                        labels:#('cancel' 'ignore' 'accept')
+                        confirmWithCancel:'Accept change made in ' , tabSelection printString , ' section?'
+                        labels:#('Cancel' 'Ignore' 'Accept')
                         default:3.
         whatToDo isNil ifTrue:[^self].
         whatToDo == true ifTrue:[
@@ -2163,7 +1948,7 @@
     |view list spec slices size property tabComponent|
 
     self isModified ifTrue:[
-        (self confirm:'accept change made in ' , tabSelection printString , ' section ?') ifTrue:[
+        (self confirm:'Accept change made in ' , tabSelection printString , ' section ?') ifTrue:[
             self accept
         ]
     ].
@@ -2222,11 +2007,7 @@
 closeRequest
     "close all windows open by builder
     "
-    self painter isModified ifTrue:[
-        (self confirm:'quit without without saving your modifications ?') ifFalse:[
-            ^ self
-        ]
-    ].
+    self checkModified ifFalse:[^self].
 
     treeView model removeDependent:self.
     self painter release.
@@ -2391,7 +2172,303 @@
     "Modified: / 25.10.1997 / 19:11:51 / cg"
 ! !
 
-!UIPainter methodsFor:'user interaction - dialog'!
+!UIPainter methodsFor:'user interactions'!
+
+doBrowseAppClass
+    "open a browser on the class"
+
+    |cls|
+
+    self painter isModified ifTrue:[
+        self warn:'The current interface has not yet been saved.\\The browser will show the code of the old interface.' withCRs.
+    ].
+    cls := self resolveName:specClass.
+
+    cls notNil ifTrue:[
+        SystemBrowser openInClass:cls
+    ] ifFalse:[
+        self information:'No class defined!!'.
+    ].
+
+!
+
+doBrowseAspectMethods
+    "open a browser on the aspect methods"
+
+    |cls methods|
+
+    self painter isModified ifTrue:[
+        self warn:'The current interface has not yet been saved.\\The browser may show the code of the old aspect methods.' withCRs.
+    ].
+    cls := self resolveName:specClass.
+
+    cls notNil ifTrue:[
+        methods := self painter aspectMethods.
+        methods isEmpty ifTrue:[
+            self warn:'No aspect methods have been saved yet!!'.
+            ^ self.
+        ].
+        SystemBrowser browseMethods:methods title:'Aspect methods'.
+    ] ifFalse:[
+        self information:'No class defined!!'.
+    ].
+
+    "Created: / 25.10.1997 / 19:07:55 / cg"
+!
+
+doFromClass
+
+    self loadFromInClassesOf: #Object
+!
+
+doInstallAspects
+    "install aspects and actions
+    "
+    |code|
+
+    self hasSpecClassAndSelector ifFalse:[
+        self defineClassAndSelector
+    ].
+
+    self checkClassAndSelector ifFalse:[
+        ^ self
+    ].
+
+    self painter className:specClass
+        superclassName:specSuperclass
+              selector:specSelector.
+
+    code := self painter generateAspectMethods.
+    (ReadStream on:code) fileIn.
+
+!
+
+doInstallHelp
+    "install help text
+    "
+    self helpTool installHelpSpecInto:specClass
+!
+
+doInstallHooks
+    "install application hooks
+    "
+    |code|
+
+    self hasSpecClassAndSelector ifFalse:[
+        self defineClassAndSelector
+    ].
+
+    self checkClassAndSelector ifFalse:[
+        ^ self
+    ].
+
+    self painter className:specClass
+        superclassName:specSuperclass
+              selector:specSelector.
+
+    code := self painter generateHookMethods.
+    (ReadStream on:code) fileIn.
+
+    "Created: / 31.10.1997 / 17:37:54 / cg"
+!
+
+doInstallSpec
+    "install window specification
+    "
+    |code painter|
+
+    self hasSpecClassAndSelector ifFalse:[
+        self defineClassAndSelector
+    ].
+
+    self checkClassAndSelector ifFalse:[
+        ^ self
+    ].
+
+    self isModified ifTrue:[
+        (self confirm:'Accept change made in ' , tabSelection printString , ' section?') ifTrue:[
+            self accept
+        ] ifFalse:[
+            (self confirm:'Load old interface?') ifFalse:[
+                ^ self
+            ]
+        ]
+    ].
+
+    painter := self painter.
+
+    painter className:specClass
+       superclassName:specSuperclass
+             selector:specSelector.
+
+    code := painter generateWindowSpecMethodSource withCRs.
+    painter resetModification.
+    (ReadStream on:code) fileIn.
+
+    "Modified: / 26.10.1997 / 15:47:48 / cg"
+!
+
+doNew
+    "remove all components and associated resources
+    "
+    self painter isModified ifTrue:[
+        (self confirm:'Edit a new interface without saving current?') ifFalse:[
+            ^ self
+        ]
+    ].
+    self painter removeAll
+!
+
+doPickAView
+    "pick a view and setup specifications
+    "
+    |painter view cls spec app|
+
+    self painter isModified ifTrue:[
+        (self confirm:'pick another interface without saving your modifications ?') ifFalse:[
+            ^ self
+        ]
+    ].
+
+    (view := Screen current viewFromUser) notNil ifTrue:[
+        view == Screen current rootView ifFalse:[
+            painter := self painter.
+            spec    := UISpecification fromView:view topView.
+
+         "/ ok, got it
+
+            (app := view application) notNil ifTrue:[
+                cls := app class
+            ] ifFalse:[
+                cls := view class
+            ].
+            self setClass:cls selector:nil.
+
+            painter setupFromSpec:spec.
+        ]
+    ]
+
+    "Modified: / 1.11.1997 / 13:47:49 / cg"
+!
+
+doStartApplication
+    "start current edited application
+    "
+    |cls app infoMessage|
+
+    self isModified ifTrue:[
+        (self confirm:'Accept change made in ' , tabSelection printString , ' section?') ifTrue:[
+            self accept.
+            "/  "XXX must be fixed - canvas changes are not recorded in the history
+            "/  so isModified returns false here
+            "/
+            "/ self painter isModified ifTrue:[
+            "/
+                (self confirm:'Reinstall the new interface?' withCRs) ifTrue:[
+                    self doInstallSpec
+                ]
+            "/ ].
+        ]
+    ].
+    self painter isModified ifTrue:[
+        (self confirm:'The current interface has not yet been reinstalled!!\\Start anyway (based upon the previous interface)?' withCRs) ifFalse:[
+            ^ self
+        ]
+    ].
+
+    (specClass isNil or:[specSelector size < 2]) ifTrue:[
+        infoMessage := 'No class or selector defined!!'.
+    ] ifFalse:[
+        cls := self resolveName:specClass.
+
+        cls isNil ifTrue:[
+            infoMessage := 'Class not existant!!'.
+        ] ifFalse:[
+            (cls respondsTo:specSelector) ifFalse:[
+                infoMessage := ('No method for: #' 
+                                , specSelector , ' in ' , cls name
+                                , '\\(did you install the interface?)') withCRs.
+            ]
+        ]
+    ].
+
+    infoMessage notNil ifTrue:[
+        ^ self information:infoMessage
+    ].
+    app := cls new.
+    (app respondsTo:#openInterface:) ifFalse:[
+        ^ self warn:('The application does not respond to the ''openInterface:'' message.\\(maybe its supposed to be used as subApplication/subCanvas)') withCRs.
+    ].        
+    app openInterface:specSelector
+
+    "Modified: / 29.10.1997 / 19:01:50 / cg"
+!
+
+doWindowSpec
+   "create the window specification but do not write to application; instead
+    open a view
+   "
+   |code v|
+
+   code := self painter generateWindowSpecMethodSource.
+
+   v := CodeView open.
+   v contents:code.
+   v label:'windowSpec'.
+
+!
+
+loadFromClassWithSuperclass
+
+    |box|
+    box := EnterBox new.
+    box title:'Name of superclass:'.
+    box okText:'OK'.
+    box abortText:'Cancel'.
+    box initialText: 'ApplicationModel'.
+    box showAtPointer.
+    box accepted
+    ifTrue:
+    [            
+        self loadFromInClassesOf: box contents asSymbol
+    ]
+
+!
+
+loadFromInClassesOf: aSuperclassOrSymbol
+
+    self loadFromMessage: 
+        (ResourceSelectionBrowser
+            request: 'Load Interface From Class'
+            onSuperclass: aSuperclassOrSymbol
+            andClass: specClass
+            andSelector: nil
+            withResourceTypes: #(canvas))
+!
+
+loadFromMessage: aMessage
+
+    ((aMessage size > 0) and: [self checkModified])
+    ifTrue:
+    [
+        |readStream aClass aSelector|
+        readStream := aMessage readStream.
+        (aClass := Smalltalk at: (readStream upTo: $ ) asSymbol) notNil
+        ifTrue:
+        [
+            aSelector :=  readStream upToEnd asSymbol.
+            self setClass: aClass selector: aSelector.
+            (aClass respondsTo:aSelector) 
+            ifTrue:
+            [
+                self painter setupFromSpec:(aClass perform:aSelector).
+            ]
+        ]
+    ]
+
+! !
+
+!UIPainter methodsFor:'user interactions - dialog'!
 
 checkClassAndSelector
     "check for class & superclass"
@@ -2406,10 +2483,10 @@
         superclass := self resolveName:specSuperclass.
 
         superclass isNil ifTrue:[
-            self warn:'no class named ' , specSuperclass , ' exists.'.
+            self warn:'No class named ' , specSuperclass , ' exists!!'.
             ^ false.
         ].
-        (self confirm:'create ' , specClass , ' ?') ifTrue:[
+        (self confirm:'Create ' , specClass , '?') ifTrue:[
             superclass subclass:(specClass asSymbol)
                        instanceVariableNames:''
                        classVariableNames:''
@@ -2420,7 +2497,7 @@
         ^ false.
     ].
     cls isBehavior ifFalse:[
-        self warn:'a global named ' , specClass , ' exists, but is no class.'.
+        self warn:'A global named ' , specClass , ' exists, but is no class.'.
         ^ false.
     ].
 
@@ -2436,12 +2513,12 @@
 
     specSuperclass notNil ifTrue:[
         superclass isNil ifTrue:[
-            self warn:'no class named ' , specSuperclass , ' exists.'.
+            self warn:'No class named ' , specSuperclass , ' exists!!'.
             ^ false.
         ].
 
         (cls isSubclassOf:superclass) ifFalse:[
-            self information:('a global named ' , specClass , ' exists,\' ,
+            self information:('A global named ' , specClass , ' exists,\' ,
                               'but is not a subclass of ' , superclass name , '.\\' ,
                               'Check and try again if that is not what you want.') withCRs.
         ]
@@ -2529,7 +2606,7 @@
 
 ! !
 
-!UIPainter methodsFor:'user interaction - move'!
+!UIPainter methodsFor:'user interactions - move'!
 
 doStepDown
     "move selected component after the next component in the hierarchy of
@@ -2557,316 +2634,6 @@
     treeView doStepOver:-1
 ! !
 
-!UIPainter methodsFor:'user interaction - pullDown'!
-
-doBrowseAppClass
-    "open a browser on the class"
-
-    |cls|
-
-    self painter isModified ifTrue:[
-        self warn:'the change have not yet been reinstalled.\\The browser will show the old interfaces code.' withCRs.
-    ].
-    cls := self resolveName:specClass.
-
-    cls notNil ifTrue:[
-        SystemBrowser openInClass:cls
-    ] ifFalse:[
-        self information:'no class yet'.
-    ].
-
-!
-
-doBrowseAspectMethods
-    "open a browser on the aspect methods"
-
-    |cls methods|
-
-    self painter isModified ifTrue:[
-        self warn:'the changes have not yet been reinstalled.\\The browser may show old code.' withCRs.
-    ].
-    cls := self resolveName:specClass.
-
-    cls notNil ifTrue:[
-        methods := self painter aspectMethods.
-        methods isEmpty ifTrue:[
-            self warn:'no aspect methods have been installed yet.'.
-            ^ self.
-        ].
-        SystemBrowser browseMethods:methods title:'aspect methods'.
-    ] ifFalse:[
-        self information:'no class yet'.
-    ].
-
-    "Created: / 25.10.1997 / 19:07:55 / cg"
-!
-
-doFromClass
-    "setup new specification from a class and selector accessed through
-     to a dialog
-    "
-    |className methodName cls sel accepted failed spec s painter|
-
-    self painter isModified ifTrue:[
-        (self confirm:'edit another interface without saving your modifications ?') ifFalse:[
-            ^ self
-        ]
-    ].
-
-    className  := (specClass ? '') asValue.
-    methodName := (specSelector ? '') asValue.
-    painter    := self painter.
-
-    (s := painter className) notNil ifTrue:[
-        className value:s
-    ].
-    (s := painter methodName) notNil ifTrue:[
-        methodName value:s
-    ].
-
-    failed := false.
-    [
-        accepted :=
-            (DialogBox new
-                addTextLabel:'Classes name:';
-                addInputFieldOn:className; 
-                addVerticalSpace;
-                addTextLabel:'methods name:';
-                addInputFieldOn:methodName; 
-                addAbortButton; 
-                addOkButton; 
-                open
-            ) accepted.
-
-         accepted ifTrue:[
-            cls := self resolveName:className value.
-
-            cls isNil ifTrue:[
-                failed := true.
-                self warn:'no such class'.
-            ] ifFalse:[
-                sel := methodName value asSymbol.
-                (cls respondsTo:sel ) ifFalse:[
-                    failed := true.
-                    self warn:'no such method'
-                ] ifTrue:[
-                    spec := cls perform:sel.
-                    spec isArray ifFalse:[
-                        failed := true.
-                        self warn:'not a windowSpec method'    
-                    ].
-                    "/ ok, got it
-                
-                    self setClass:cls selector:sel.
-
-                    painter setupFromSpec:spec.
-
-                    ^ self
-                 ]
-            ]
-         ]
-    ] doWhile:[accepted and:[failed]].
-
-    "Modified: 24.6.1997 / 18:59:29 / cg"
-!
-
-doInstallAspects
-    "install aspects and actions
-    "
-    |code|
-
-    self hasSpecClassAndSelector ifFalse:[
-        self defineClassAndSelector
-    ].
-
-    self checkClassAndSelector ifFalse:[
-        ^ self
-    ].
-
-    self painter className:specClass
-        superclassName:specSuperclass
-              selector:specSelector.
-
-    code := self painter generateAspectMethods.
-    (ReadStream on:code) fileIn.
-
-!
-
-doInstallHelp
-    "install help text
-    "
-    self helpTool installHelpSpecInto:specClass
-!
-
-doInstallHooks
-    "install application hooks
-    "
-    |code|
-
-    self hasSpecClassAndSelector ifFalse:[
-        self defineClassAndSelector
-    ].
-
-    self checkClassAndSelector ifFalse:[
-        ^ self
-    ].
-
-    self painter className:specClass
-        superclassName:specSuperclass
-              selector:specSelector.
-
-    code := self painter generateHookMethods.
-    (ReadStream on:code) fileIn.
-
-    "Created: / 31.10.1997 / 17:37:54 / cg"
-!
-
-doInstallSpec
-    "install window specification
-    "
-    |code painter|
-
-    self hasSpecClassAndSelector ifFalse:[
-        self defineClassAndSelector
-    ].
-
-    self checkClassAndSelector ifFalse:[
-        ^ self
-    ].
-
-    self isModified ifTrue:[
-        (self confirm:'accept change made in ' , tabSelection printString , ' section ?') ifTrue:[
-            self accept
-        ] ifFalse:[
-            (self confirm:'install old specification ?') ifFalse:[
-                ^ self
-            ]
-        ]
-    ].
-
-    painter := self painter.
-
-    painter className:specClass
-       superclassName:specSuperclass
-             selector:specSelector.
-
-    code := painter generateWindowSpecMethodSource withCRs.
-    painter resetModification.
-    (ReadStream on:code) fileIn.
-
-    "Modified: / 26.10.1997 / 15:47:48 / cg"
-!
-
-doNew
-    "remove all components and associated resources
-    "
-    self painter isModified ifTrue:[
-        (self confirm:'edit a new interface without saving your modifications ?') ifFalse:[
-            ^ self
-        ]
-    ].
-    self painter removeAll
-!
-
-doPickAView
-    "pick a view and setup specifications
-    "
-    |painter view cls spec app|
-
-    self painter isModified ifTrue:[
-        (self confirm:'pick another interface without saving your modifications ?') ifFalse:[
-            ^ self
-        ]
-    ].
-
-    (view := Screen current viewFromUser) notNil ifTrue:[
-        view == Screen current rootView ifFalse:[
-            painter := self painter.
-            spec    := UISpecification fromView:view topView.
-
-         "/ ok, got it
-
-            (app := view application) notNil ifTrue:[
-                cls := app class
-            ] ifFalse:[
-                cls := view class
-            ].
-            self setClass:cls selector:nil.
-
-            painter setupFromSpec:spec.
-        ]
-    ]
-
-    "Modified: / 1.11.1997 / 13:47:49 / cg"
-!
-
-doStartApplication
-    "start current edited application
-    "
-    |cls app infoMessage|
-
-    self isModified ifTrue:[
-        (self confirm:'accept change made in ' , tabSelection printString , ' section ?') ifTrue:[
-            self accept.
-            "/  "XXX must be fixed - canvas changes are not recorded in the history
-            "/  so isModified returns false here
-            "/
-            "/ self painter isModified ifTrue:[
-            "/
-                (self confirm:'reinstall the new spec ?' withCRs) ifTrue:[
-                    self doInstallSpec
-                ]
-            "/ ].
-        ]
-    ].
-    self painter isModified ifTrue:[
-        (self confirm:'the changed spec has not yet been reinstalled.\\Start anyway (based upon the previous interface) ?' withCRs) ifFalse:[
-            ^ self
-        ]
-    ].
-
-    (specClass isNil or:[specSelector size < 2]) ifTrue:[
-        infoMessage := 'no class or selector defined'.
-    ] ifFalse:[
-        cls := self resolveName:specClass.
-
-        cls isNil ifTrue:[
-            infoMessage := 'class not existant'.
-        ] ifFalse:[
-            (cls respondsTo:specSelector) ifFalse:[
-                infoMessage := ('no method for: #' 
-                                , specSelector , ' in ' , cls name
-                                , '\\(did you install the spec ?)') withCRs.
-            ]
-        ]
-    ].
-
-    infoMessage notNil ifTrue:[
-        ^ self information:infoMessage
-    ].
-    app := cls new.
-    (app respondsTo:#openInterface:) ifFalse:[
-        ^ self warn:('The application does not respond to the ''openInterface:'' message.\\(maybe its supposed to be used as subApplication/subCanvas)') withCRs.
-    ].        
-    app openInterface:specSelector
-
-    "Modified: / 29.10.1997 / 19:01:50 / cg"
-!
-
-doWindowSpec
-   "create the window specification but do not write to application; instead
-    open a view
-   "
-   |code v|
-
-   code := self painter generateWindowSpecMethodSource.
-
-   v := CodeView open.
-   v contents:code.
-   v label:'windowSpec'.
-
-! !
-
 !UIPainter::TreeView class methodsFor:'constants'!
 
 defaultNameOfCanvas
@@ -3184,7 +2951,7 @@
      and:[(self propertyDetect:[:p| p name = name]) isNil
      and:[node name ~= name]]]
     ) ifTrue:[
-        node name:name.
+        node name: name.
         self redrawLine:1.
     ].
 !
@@ -3215,8 +2982,8 @@
 
             (end := self lastLineShown) > listOfNodes size ifTrue:[
                 end := listOfNodes size
-            ].
-            item name:aProperty name.
+            ].                          
+            item name: aProperty name.
 
             [idx <= end] whileTrue:[
                 (listOfNodes at:idx) == item ifTrue:[
@@ -3303,6 +3070,14 @@
 
 !UIPainter::TreeView methodsFor:'initialization'!
 
+destroy
+    "destroy images"
+
+    super destroy.
+
+    Images removeAll
+!
+
 initialize
     "initialization; set multiple select and model
     "
@@ -3319,12 +3094,15 @@
 figureFor:aNode
     "returns image for an spec item"
 
-    |cls|
+    |cls image|
 
     cls := aNode contents spec class.
-    aNode contents spec isNil ifTrue: [cls := UISpecification].
+    aNode contents spec isNil ifTrue: [cls := WindowSpec].
     cls := cls withAllSuperclasses detect: [:cls| cls class implements: #icon] ifNone: [^nil].
-    ^Images at: cls name ifAbsent: [Images at: cls name put: (cls icon onDevice: device)]
+    image := Images at: cls name ifAbsent: [Images at: cls name put: cls icon].
+    image device ~~ device ifTrue: [image := image onDevice: device].
+    image extent y > 16 ifTrue: [image := image magnifiedBy: 16/image extent y].
+    ^image
 !
 
 selectionChangedFrom:oldSelection