MenuEditor.st
changeset 407 578a7aaed19e
parent 406 a519e0d547f6
child 410 771f513ad451
--- a/MenuEditor.st	Sat Jan 10 12:12:09 1998 +0100
+++ b/MenuEditor.st	Fri Jan 16 15:03:04 1998 +0100
@@ -22,14 +22,14 @@
 
 Object subclass:#Item
 	instanceVariableNames:'activeHelpKey enabled label value nameKey indication shortcutKey
-		accessCharaterPos retriever icon iconAndLabel submenuChannel
+		accessCharacterPos retriever icon iconAndLabel submenuChannel
 		argument translateLabel isButton'
 	classVariableNames:''
 	poolDictionaries:''
 	privateIn:MenuEditor
 !
 
-SelectionInTreeView subclass:#Painter
+SelectionInTreeView subclass:#TreeView
 	instanceVariableNames:'images'
 	classVariableNames:'CopyBuffer Images'
 	poolDictionaries:''
@@ -79,7 +79,7 @@
 
 initialize
 
-    Painter initialize
+    TreeView initialize
 ! !
 
 !MenuEditor class methodsFor:'code generation'!
@@ -195,38 +195,6 @@
 )
 ! !
 
-!MenuEditor class methodsFor:'icons'!
-
-iconCreateItem
-    ^ Painter menuItemImage
-
-!
-
-iconCreateLink
-    ^ Painter linkSubmenuImage
-
-!
-
-iconCreateMenu
-    ^ Painter closedSubmenuImage
-!
-
-iconCreateSep
-    ^ Painter menuSeparatorImage
-
-!
-
-iconUnknown
-    "returns an image used for picked items containing an image
-    "
-
-    <resource: #fileImage>
-
-    ^ Image fromFile:'brokenImage.xpm'
-
-    "Modified: / 29.10.1997 / 03:22:06 / cg"
-! !
-
 !MenuEditor class methodsFor:'interface specs'!
 
 classDefineSpec
@@ -248,11 +216,11 @@
           #'window:' 
            #(#WindowSpec
               #'name:' 'MenuEditor'
-              #'layout:' #(#LayoutFrame 197 0 172 0 443 0 265 0)
+              #'layout:' #(#LayoutFrame 344 0 297 0 590 0 390 0)
               #'label:' 'MenuEditor'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1152 900)
-              #'bounds:' #(#Rectangle 197 172 444 266)
+              #'bounds:' #(#Rectangle 344 297 591 391)
               #'usePreferredExtent:' false
           )
           #'component:' 
@@ -271,6 +239,8 @@
                     #'layout:' #(#LayoutFrame 0 0.0 27 0 0 1.0 49 0)
                     #'tabable:' true
                     #'model:' #classNameChannel
+                    #'acceptOnReturn:' false
+                    #'acceptOnTab:' false
                 )
                  #(#HorizontalPanelViewSpec
                     #'name:' 'commitPanel'
@@ -400,7 +370,8 @@
             )
              #(#MenuItem
                 #'label:' 'Edit'
-                #'submenuChannel:' #menuPainter
+                #'accessCharacterPosition:' 1
+                #'submenuChannel:' #menuEdit
             )
              #(#MenuItem
                 #'label:' 'Test'
@@ -448,15 +419,15 @@
       )
 !
 
-menuPainter
+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:MenuEditor andSelector:#menuPainter
-     (Menu new fromLiteralArrayEncoding:(MenuEditor menuPainter)) startUp
+     MenuEditor new openOnClass:MenuEditor andSelector:#menuEdit
+     (Menu new fromLiteralArrayEncoding:(MenuEditor menuEdit)) startUp
     "
 
     <resource: #menu>
@@ -485,30 +456,30 @@
                 #'shortcutKeyCharacter:' #Paste
             )
              #(#MenuItem
-                #'label:' '='
+                #'label:' '-'
             )
              #(#MenuItem
                 #'label:' 'Create Item'
                 #'value:' #doCreateItem
-                #'labelImage:' #(#ResourceRetriever #MenuEditor #iconCreateItem 'Create Item')
+                #'labelImage:' #(#ResourceRetriever #MenuEditor #menuItemImage 'Create Item')
             )
              #(#MenuItem
                 #'label:' 'Create Separator'
                 #'value:' #doCreateSep
-                #'labelImage:' #(#ResourceRetriever #MenuEditor #iconCreateSep 'Create Separator')
+                #'labelImage:' #(#ResourceRetriever #MenuEditor #menuSeparatorImage 'Create Separator')
             )
              #(#MenuItem
                 #'label:' '-'
             )
              #(#MenuItem
-                #'label:' 'Create Submenu Static'
+                #'label:' 'Create Submenu'
                 #'value:' #doCreateMenu
-                #'labelImage:' #(#ResourceRetriever #MenuEditor #iconCreateMenu 'Create Submenu Static')
+                #'labelImage:' #(#ResourceRetriever #MenuEditor #submenuImage 'Create Submenu')
             )
              #(#MenuItem
-                #'label:' 'Create Submenu Dynamic'
+                #'label:' 'Create Submenu Link'
                 #'value:' #doCreateLink
-                #'labelImage:' #(#ResourceRetriever #MenuEditor #iconCreateLink 'Create Submenu Dynamic')
+                #'labelImage:' #(#ResourceRetriever #MenuEditor #linkSubmenuImage 'Create Submenu Link')
             )
           ) nil
           nil
@@ -559,14 +530,14 @@
                 #'isButton:' true
                 #'value:' #doCreateItem
                 #'enabled:' #hasAnySingleSelection
-                #'labelImage:' #(#ResourceRetriever nil #iconCreateItem)
+                #'labelImage:' #(#ResourceRetriever nil #menuItemImage)
             )
              #(#MenuItem
                 #'label:' 'createSeparator'
                 #'isButton:' true
                 #'value:' #doCreateSep
                 #'enabled:' #hasAnySingleSelection
-                #'labelImage:' #(#ResourceRetriever nil #iconCreateSep)
+                #'labelImage:' #(#ResourceRetriever nil #menuSeparatorImage)
             )
              #(#MenuItem
                 #'label:' '-'
@@ -576,14 +547,14 @@
                 #'isButton:' true
                 #'value:' #doCreateMenu
                 #'enabled:' #hasAnySingleSelection
-                #'labelImage:' #(#ResourceRetriever nil #iconCreateMenu)
+                #'labelImage:' #(#ResourceRetriever nil #submenuImage)
             )
              #(#MenuItem
                 #'label:' 'createLink'
                 #'isButton:' true
                 #'value:' #doCreateLink
                 #'enabled:' #hasAnySingleSelection
-                #'labelImage:' #(#ResourceRetriever nil #iconCreateLink)
+                #'labelImage:' #(#ResourceRetriever nil #linkSubmenuImage)
             )
              #(#MenuItem
                 #'label:' '-'
@@ -641,11 +612,11 @@
           #'window:' 
            #(#WindowSpec
               #'name:' 'Menu Builder'
-              #'layout:' #(#LayoutFrame 227 0 195 0 806 0 578 0)
+              #'layout:' #(#LayoutFrame 284 0 261 0 863 0 644 0)
               #'label:' 'Menu Builder'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1152 900)
-              #'bounds:' #(#Rectangle 227 195 807 579)
+              #'bounds:' #(#Rectangle 284 261 864 645)
               #'menu:' #menu
               #'usePreferredExtent:' false
           )
@@ -668,10 +639,10 @@
                          #(
                            #(#ArbitraryComponentSpec
                               #'name:' 'painterView'
-                              #'menu:' #menuPainter
+                              #'menu:' #menuEdit
                               #'hasHorizontalScrollBar:' true
                               #'hasVerticalScrollBar:' true
-                              #'component:' #painter
+                              #'component:' #treeView
                               #'hasBorder:' false
                           )
                            #(#ViewSpec
@@ -744,6 +715,35 @@
       )
 ! !
 
+!MenuEditor class methodsFor:'resources'!
+
+linkSubmenuImage
+    "ImageEditor openOnClass:self andSelector:#linkSubmenuImage"
+
+    <resource: #image>
+    ^(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 1 17 17 17 17 17 17 17 17 17 32 1 34 34 34 34 34 34 34 34 34 240 1 34 34 34 34 34 34 34 34 34 240 1 255 255 255 255 255 255 255 255 255 240 1 0 0 0 0 0 0 0 0 0 240 1 3 51 51 1 17 17 17 17 17 240 1 3 51 51 48 34 34 34 34 34 240 1 3 51 51 51 2 34 34 34 34 240 1 3 51 51 51 48 255 255 255 255 240 1 0 0 0 51 51 0 0 0 0 240 1 17 17 17 3 51 48 16 48 17 240 1 34 34 34 32 51 51 0 51 2 240 1 34 34 34 34 3 51 51 51 48 240 1 255 255 255 255 240 51 51 51 51 0 1 0 0 0 0 0 3 51 51 48 240 1 17 17 17 17 17 16 0 51 1 240 1 34 34 34 34 34 34 32 48 34 240 1 34 34 34 34 34 34 32 2 34 240 2 255 255 255 255 255 255 255 255 255 240 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color grey:66.9978); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); add:(Color grey:49.9962); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; yourself); yourself!
+
+menuItemImage
+    "ImageEditor openOnClass:self andSelector:#menuItemImage"
+
+    <resource: #image>
+    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 81 85 85 85 85 85 80 85 85 85 85 85 95 85 85 85 85 85 80 85 85 85 85 85 80 0 0 0 0 0 0 21 85 85 85 85 129 26 170 170 170 170 200 27 175 235 235 174 192 27 171 171 171 254 192 27 171 171 235 174 192 27 171 171 171 174 192 27 171 171 235 174 192 26 170 170 170 170 196 47 255 255 255 255 193 0 0 0 0 0 0 85 85 85 85 85 80 85 85 85 85 85 88 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 88]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:66.9978)); at:4 put:((Color grey:49.9977)); 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 0 0 0 0 0 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 0 0 0 0]) ; yourself); yourself
+
+!
+
+menuSeparatorImage
+    "ImageEditor openOnClass:self andSelector:#menuSeparatorImage"
+
+    <resource: #image>
+    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 82 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 0 0 0 0 0 0 21 85 85 85 85 128 26 170 170 170 170 196 26 170 170 170 170 195 27 255 255 255 250 192 27 0 0 0 6 192 26 85 85 85 86 200 26 170 170 170 170 192 26 170 170 170 170 192 47 255 255 255 255 206 0 0 0 0 0 8 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 87 85 85 85 85 85 88 85 85 85 85 85 80 85 85 85 85 85 80]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:66.9978)); at:4 put:((Color grey:49.9977)); 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 0 0 0 0 0 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 0 0 0 0]) ; yourself); yourself!
+
+submenuImage
+    "ImageEditor openOnClass:self andSelector:#submenuImage"
+
+    <resource: #image>
+    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 21 85 85 85 85 128 26 170 170 170 170 192 26 170 170 170 170 192 31 255 255 255 255 199 16 0 0 0 0 192 21 85 85 85 85 204 26 170 170 170 170 192 26 170 170 170 170 192 31 255 255 255 255 200 16 0 0 0 0 192 21 85 85 85 85 192 26 170 170 170 170 192 26 170 170 170 170 207 31 255 255 255 255 192 16 0 0 0 0 192 21 85 85 85 85 192 26 170 170 170 170 192 26 170 170 170 170 192 47 255 255 255 255 192 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 grey:66.9978)); at:4 put:((Color grey:49.9962)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; yourself); yourself
+! !
+
 !MenuEditor class methodsFor:'slices'!
 
 slicesItem
@@ -808,11 +808,11 @@
           #'window:' 
            #(#WindowSpec
               #'name:' 'unnamed canvas'
-              #'layout:' #(#LayoutFrame 454 0 288 0 720 0 606 0)
+              #'layout:' #(#LayoutFrame 228 0 263 0 494 0 581 0)
               #'label:' 'unnamed canvas'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1160 870)
-              #'bounds:' #(#Rectangle 454 288 721 607)
+              #'bounds:' #(#Rectangle 228 263 495 582)
               #'usePreferredExtent:' false
           )
           #'component:' 
@@ -833,6 +833,8 @@
                     #'tabable:' true
                     #'model:' #nameKey
                     #'type:' #symbolOrNil
+                    #'acceptOnReturn:' false
+                    #'acceptOnTab:' false
                 )
                  #(#LabelSpec
                     #'name:' 'labelLabel'
@@ -847,6 +849,8 @@
                     #'activeHelpKey:' #label
                     #'tabable:' true
                     #'model:' #label
+                    #'acceptOnReturn:' false
+                    #'acceptOnTab:' false
                 )
                  #(#LabelSpec
                     #'name:' 'valueLabel'
@@ -862,6 +866,8 @@
                     #'tabable:' true
                     #'model:' #value
                     #'type:' #symbolOrNil
+                    #'acceptOnReturn:' false
+                    #'acceptOnTab:' false
                 )
                  #(#LabelSpec
                     #'name:' 'argumentLabel'
@@ -877,6 +883,8 @@
                     #'tabable:' true
                     #'model:' #argument
                     #'type:' #string
+                    #'acceptOnReturn:' false
+                    #'acceptOnTab:' false
                 )
                  #(#LabelSpec
                     #'name:' 'indicationLabel'
@@ -892,6 +900,8 @@
                     #'tabable:' true
                     #'model:' #indication
                     #'type:' #symbolOrNil
+                    #'acceptOnReturn:' false
+                    #'acceptOnTab:' false
                 )
                  #(#CheckBoxSpec
                     #'name:' 'translateLabelCheckBox'
@@ -931,11 +941,11 @@
           #'window:' 
            #(#WindowSpec
               #'name:' 'unnamed canvas'
-              #'layout:' #(#LayoutFrame 585 0 331 0 851 0 649 0)
+              #'layout:' #(#LayoutFrame 184 0 271 0 450 0 589 0)
               #'label:' 'unnamed canvas'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1280 1024)
-              #'bounds:' #(#Rectangle 585 331 852 650)
+              #'bounds:' #(#Rectangle 184 271 451 590)
               #'usePreferredExtent:' false
           )
           #'component:' 
@@ -957,6 +967,8 @@
                     #'tabable:' true
                     #'model:' #nameKey
                     #'type:' #symbolOrNil
+                    #'acceptOnReturn:' false
+                    #'acceptOnTab:' false
                 )
                  #(#LabelSpec
                     #'name:' 'labelLabel'
@@ -970,6 +982,8 @@
                     #'activeHelpKey:' #label
                     #'tabable:' true
                     #'model:' #label
+                    #'acceptOnReturn:' false
+                    #'acceptOnTab:' false
                 )
                  #(#InputFieldSpec
                     #'name:' 'menuField'
@@ -978,6 +992,8 @@
                     #'tabable:' true
                     #'model:' #submenuChannel
                     #'type:' #symbolOrNil
+                    #'acceptOnReturn:' false
+                    #'acceptOnTab:' false
                 )
                  #(#LabelSpec
                     #'name:' 'menuLabel'
@@ -985,6 +1001,13 @@
                     #'label:' 'Menu:'
                     #'resizeForLabel:' true
                 )
+                 #(#CheckBoxSpec
+                    #'name:' 'translateLabelCheckBox'
+                    #'layout:' #(#Point 20 110)
+                    #'activeHelpKey:' #translateLabel
+                    #'model:' #translateLabel
+                    #'label:' 'Translate Label'
+                )
               )
           )
       )
@@ -1009,11 +1032,11 @@
           #'window:' 
            #(#WindowSpec
               #'name:' 'unnamed canvas'
-              #'layout:' #(#LayoutFrame 381 0 278 0 647 0 596 0)
+              #'layout:' #(#LayoutFrame 154 0 293 0 420 0 611 0)
               #'label:' 'unnamed canvas'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1280 1024)
-              #'bounds:' #(#Rectangle 381 278 648 597)
+              #'bounds:' #(#Rectangle 154 293 421 612)
               #'usePreferredExtent:' false
           )
           #'component:' 
@@ -1034,6 +1057,8 @@
                     #'tabable:' true
                     #'model:' #nameKey
                     #'type:' #symbolOrNil
+                    #'acceptOnReturn:' false
+                    #'acceptOnTab:' false
                 )
                  #(#LabelSpec
                     #'name:' 'labelLabel'
@@ -1048,6 +1073,8 @@
                     #'activeHelpKey:' #label
                     #'tabable:' true
                     #'model:' #label
+                    #'acceptOnReturn:' false
+                    #'acceptOnTab:' false
                 )
                  #(#CheckBoxSpec
                     #'name:' 'translateLabelCheckBox'
@@ -1080,11 +1107,11 @@
           #'window:' 
            #(#WindowSpec
               #'name:' 'unnamed canvas'
-              #'layout:' #(#LayoutFrame 427 0 345 0 693 0 663 0)
+              #'layout:' #(#LayoutFrame 279 0 272 0 545 0 590 0)
               #'label:' 'unnamed canvas'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1280 1024)
-              #'bounds:' #(#Rectangle 427 345 694 664)
+              #'bounds:' #(#Rectangle 279 272 546 591)
               #'usePreferredExtent:' false
           )
           #'component:' 
@@ -1104,6 +1131,8 @@
                     #'activeHelpKey:' #menuSelector
                     #'tabable:' true
                     #'model:' #label
+                    #'acceptOnReturn:' false
+                    #'acceptOnTab:' false
                 )
               )
           )
@@ -1178,11 +1207,11 @@
           #'window:' 
            #(#WindowSpec
               #'name:' 'unnamed canvas'
-              #'layout:' #(#LayoutFrame 196 0 489 0 454 0 776 0)
+              #'layout:' #(#LayoutFrame 401 0 145 0 659 0 432 0)
               #'label:' 'unnamed canvas'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1280 1024)
-              #'bounds:' #(#Rectangle 196 489 455 777)
+              #'bounds:' #(#Rectangle 401 145 660 433)
               #'usePreferredExtent:' false
           )
           #'component:' 
@@ -1203,6 +1232,8 @@
                     #'tabable:' true
                     #'model:' #shortcutKey
                     #'type:' #symbolOrNil
+                    #'acceptOnReturn:' false
+                    #'acceptOnTab:' false
                 )
                  #(#LabelSpec
                     #'name:' 'enabledLabel'
@@ -1218,6 +1249,8 @@
                     #'tabable:' true
                     #'model:' #enabled
                     #'type:' #symbolOrNil
+                    #'acceptOnReturn:' false
+                    #'acceptOnTab:' false
                 )
                  #(#LabelSpec
                     #'name:' 'accessCharLabel'
@@ -1231,8 +1264,10 @@
                     #'layout:' #(#LayoutFrame 220 0 79 0 0 1.0 101 0)
                     #'activeHelpKey:' #accessCharaterPos
                     #'tabable:' true
-                    #'model:' #accessCharaterPos
+                    #'model:' #accessCharacterPos
                     #'type:' #numberOrNil
+                    #'acceptOnReturn:' false
+                    #'acceptOnTab:' false
                 )
               )
           )
@@ -1258,11 +1293,11 @@
           #'window:' 
            #(#WindowSpec
               #'name:' 'unnamed canvas'
-              #'layout:' #(#LayoutFrame 424 0 309 0 668 0 450 0)
+              #'layout:' #(#LayoutFrame 296 0 296 0 540 0 437 0)
               #'label:' 'unnamed canvas'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1280 1024)
-              #'bounds:' #(#Rectangle 424 309 669 451)
+              #'bounds:' #(#Rectangle 296 296 541 438)
               #'usePreferredExtent:' false
           )
           #'component:' 
@@ -1283,6 +1318,8 @@
                     #'tabable:' true
                     #'model:' #retriever
                     #'type:' #symbolOrNil
+                    #'acceptOnReturn:' false
+                    #'acceptOnTab:' false
                 )
                  #(#LabelSpec
                     #'name:' 'iconLabel'
@@ -1298,6 +1335,8 @@
                     #'tabable:' true
                     #'model:' #icon
                     #'type:' #symbolOrNil
+                    #'acceptOnReturn:' false
+                    #'acceptOnTab:' false
                 )
                  #(#CheckBoxSpec
                     #'name:' 'iconAndLabel'
@@ -1335,46 +1374,39 @@
 !MenuEditor methodsFor:'accessing'!
 
 isModified: aBoolean         
+    "sets menu tree modifications; invoked by the painter."
 
     isModified := aBoolean
 !
 
-menuDefaultLink
-    ^ self class menuDefaultLink
-!
-
-selectorName
-    ^ self painter selectorName
-
-    "Created: 31.7.1997 / 14:11:28 / cg"
-!
-
 specClass
-    ^ specClass
+
+    ^specClass
 !
 
 specClass:aClass
+
     aClass isBehavior ifTrue:[specClass := aClass name]
-                     ifFalse:[specClass := aClass].
+                     ifFalse:[specClass := aClass]
 !
 
 submenuTest
-    "returns submenu assigned to item test
-    "
+    "returns submenu assigned to item test"
+
     |menu|
 
-    menu := self painter asMenu.
-
-    menu allItemsDo:[:anItem|
+    (menu := self treeView asMenu) allItemsDo:
+    [:anItem|
         anItem value:nil.
         anItem enabled:true.
     ].
-  ^ menu
+    ^menu
 !
 
 useHelpDictionary:aDictionary
+
     self noteBookView.
-    self helpTool dictionary:aDictionary.
+    self helpTool dictionary:aDictionary
 ! !
 
 !MenuEditor methodsFor:'accessing menu'!
@@ -1387,129 +1419,68 @@
 
 !
 
-menuButtons
-    "this window spec was automatically generated by the ST/X MenuEditor"
-
-    ^ self class menuButtons
-
-
-!
-
-menuPainter
-    "this window spec was automatically generated by the ST/X MenuEditor"
-
-    ^ self class menuPainter
-
-
-!
-
-menuPullDown
-    "this window spec was automatically generated by the ST/X MenuEditor"
-
-    ^ self class menuPullDown
-
-
-!
-
-menuToolbar
+menuEdit
     "this window spec was automatically generated by the UI Builder"
 
-    ^ self class menuToolbar
-
-
-! !
-
-!MenuEditor methodsFor:'actions'!
-
-accept
-    "automatically generated by UIPainter ..."
-
-    |painter node cont|
-
-    painter := self painter.
-    node := painter selectedNode.
-
-    node notNil ifTrue:[
-        self isHelpToolSelected ifTrue:[
-            self helpTool accept.
-            node contents activeHelpKey:(self helpTool helpKey)
-        ] ifFalse:[
-            cont := node contents buildFromAspects:aspects.
-            painter selectedNodeChanged
-        ]
-    ].
-    self modifiedChannel value:false.
-    isModified := true.
-!
-
-cancel
-    |node|
-
-    (node := self painter selectedNode) notNil ifTrue:[
-        self helpTool helpKey:(self helpKey).
-        aspects do:[:anAspect| anAspect value:nil ].
-        node contents toAspects:aspects.
-    ].
-    self modifiedChannel value:false.
+    ^ self class menuEdit
+
 
 ! !
 
 !MenuEditor methodsFor:'aspects'!
 
 aspectFor:aKey
-    "returns aspect for a key or nil
-    "
-  ^ aspects at:aKey ifAbsent:[ super aspectFor:aKey ]
+    "returns aspect for a key or nil"
+
+    ^aspects at: aKey ifAbsent: [super aspectFor:aKey]
 
 
 !
 
 enabledStepIn
-    ^ builder booleanValueAspectFor:#enabledStepIn
-
-    "Modified: 28.7.1997 / 12:51:55 / cg"
+    "returns whether user can put selected item in next submenu"
+
+    ^builder booleanValueAspectFor: #enabledStepIn
 !
 
 enabledStepOut
-    ^ builder booleanValueAspectFor:#enabledStepOut
-
-    "Modified: 28.7.1997 / 12:52:04 / cg"
+    "returns whether user can put selected item out of current parent submenu"
+
+    ^builder booleanValueAspectFor: #enabledStepOut
+                         
 !
 
 enabledStepOver
-    ^ builder booleanValueAspectFor:#enabledStepOver
-
-    "Modified: 28.7.1997 / 12:52:07 / cg"
+    "returns whether user can shift selected item up or down"
+
+    ^builder booleanValueAspectFor:#enabledStepOver
 !
 
 hasAnySingleSelection
-    ^ builder booleanValueAspectFor:#hasAnySingleSelection
-
-    "Modified: 28.7.1997 / 12:52:09 / cg"
+
+    ^builder booleanValueAspectFor: #hasAnySingleSelection
 !
 
 hasValidSelection
-    ^ builder booleanValueAspectFor:#hasValidSelection
-
-    "Modified: 28.7.1997 / 12:52:11 / cg"
+
+    ^builder booleanValueAspectFor: #hasValidSelection
 !
 
 hasValidSingleSelection
-    ^ builder booleanValueAspectFor:#hasValidSingleSelection
-
-    "Modified: 28.7.1997 / 12:52:13 / cg"
+
+    ^builder booleanValueAspectFor: #hasValidSingleSelection
 !
 
 modifiedChannel
-    "automatically generated by UIPainter ..."
-
-    ^ builder booleanValueAspectFor:#modifiedChannel
-
-    "Modified: 28.7.1997 / 12:52:14 / cg"
+
+    |holder|
+    (holder := builder bindingAt:#modifiedChannel) isNil ifTrue:[
+        builder aspectAt:#modifiedChannel put:(holder :=  false asValue).
+    ].
+    ^ holder
 !
 
 noteBookView
-    "automatically generated by UIPainter ..."
 
     |noteBook helpTool|
 
@@ -1531,10 +1502,8 @@
 !
 
 tabList
-    "automatically generated by UIPainter ..."
 
     |holder|
-
     (holder := builder bindingAt:#tabList) isNil ifTrue:[
         builder aspectAt:#tabList put:(holder := #('Properties') asValue).
     ].
@@ -1544,39 +1513,51 @@
 !
 
 tabModel
-    "automatically generated by UIPainter ..."
 
     |holder|
-
     (holder := builder bindingAt:#tabModel) isNil ifTrue:[
         holder := AspectAdaptor new subject:self; forAspect:#tabSelection.
         builder aspectAt:#tabModel put:holder.
     ].
     ^ holder
 
+!
+
+treeView
+    "returns the tree view representing hierarchically all the menu items"
+
+    |treeView|
+    (treeView := builder bindingAt:#treeView) isNil ifTrue:[
+        treeView := TreeView new.
+        treeView action:[:dummy|self menuChanged].
+        builder aspectAt: #treeView put: treeView
+    ].
+    ^treeView
 ! !
 
 !MenuEditor methodsFor:'change & update'!
 
 update:something with:aParameter from:changedObject
-    "one of my models changed its value
-    "
-    self modifiedChannel value:true.
+    "one of my value holders has changed its value, so let me set the editing menu as modified"            
+
+    self modifiedChannel value: true.
+    isModified := true.
 !
 
 updateEnabledChannels
-    "update enabled channels
-    "
-    |node parent next painter state|
-
-    painter := self painter.
-    node    := painter selectedNode.
-    state   := false.
-
-    node notNil ifTrue:[
+    "update enabled channels"
+
+    |node parent next state|
+
+    state := false.
+
+    (node  := self treeView selectedNode) notNil
+    ifTrue:
+    [
         self hasAnySingleSelection value:true.
-
-        (parent := node parent) notNil ifTrue:[
+        (parent := node parent) notNil
+        ifTrue:
+        [
             next := parent childAt:((parent indexOfChild:node) + 1).
             self enabledStepIn           value:(next notNil and:[next hasChildren]).
             self enabledStepOver         value:(parent children size > 1).
@@ -1585,13 +1566,14 @@
             self hasValidSelection       value:true.
           ^ self
         ]
-    ] ifFalse:[
+    ]
+    ifFalse:
+    [
         self hasAnySingleSelection value:false.
-
-        painter numberOfSelections ~~ 0 ifTrue:[
-            state := (painter isInSelection:1) not
+        self treeView numberOfSelections ~~ 0 ifTrue:[
+            state := (self treeView isInSelection:1) not
         ]
-    ].
+    ].          
     self enabledStepOver         value:false.
     self enabledStepIn           value:false.
     self enabledStepOut          value:false.
@@ -1601,64 +1583,82 @@
 
 !MenuEditor methodsFor:'event handling'!
 
-doesNotUnderstand:aMessage
-   |painter|
-
-   painter := self painter.
-
-   (painter respondsTo:(aMessage selector)) ifTrue:[
-        ^ aMessage sendTo:painter
-   ].
-   super doesNotUnderstand:aMessage
+doesNotUnderstand: aMessage
+    "detour incoming messages to the tree view"
+
+    (self treeView respondsTo: aMessage selector)
+    ifTrue:
+    [
+        ^aMessage sendTo: self treeView
+    ].
+    super doesNotUnderstand:aMessage
 
 
 ! !
 
 !MenuEditor methodsFor:'private'!
 
+checkMenuItemModified
+    "check menu item modification"
+
+    self modifiedChannel value
+    ifTrue:
+    [
+        ((YesNoBox title:'Menu item was modified!!\Save it?\' withCRs)        
+            noText:'No';
+            yesText:'Yes';
+            showAtPointer;
+            accepted) ifFalse: [self modifiedChannel value: false. ^true].
+        self accept
+    ].
+    ^true
+!
+
 helpKey
+
     |node|
-
-    (node := self painter selectedNode) notNil ifTrue:[
+    (node := self treeView selectedNode) notNil ifTrue:[
         ^ node contents activeHelpKey
     ].
     ^ nil
 !
 
 helpTool
-    ^ helpCanvas application
+
+    ^helpCanvas application
 ! !
 
 !MenuEditor methodsFor:'queries'!
 
 didInstall
-    "returns true if the menu was installed
-    "
-
-    ^ didInstall
+    "returns true if the menu was installed"
+
+    ^didInstall
 !
 
 isHelpToolSelected
-    "returns true if current selection is help tool
-    "
+    "returns true if current selection is help tool"
+
     (tabSelection ~~ 0 and:[slices notNil]) ifTrue:[
-        ^ (slices at:tabSelection) first = UIHelpTool label
+        ^(slices at:tabSelection) first = UIHelpTool label
     ].
-    ^ false
+    ^false
 !
 
 isStandAlone
-    "returns true in case of owner of the helptool
-    "
-    ^ self masterApplication isNil
+    "returns true in case of owner of the helptool"
+
+    ^self masterApplication isNil
 ! !
 
 !MenuEditor methodsFor:'selection'!
 
 menuChanged
+
     |node item slc sel old|
 
-    (node := self painter selectedNode) notNil ifTrue:[
+    aspects do: [:holder| holder removeDependent:self].
+    (node := self treeView selectedNode) notNil ifTrue:[
         aspects do:[:anAspect| anAspect value:nil ].
         item := node contents.
         item toAspects:aspects.
@@ -1680,7 +1680,6 @@
         ]
     ].
     self helpTool helpKey:(self helpKey).
-    self modifiedChannel value:false.
 
     slc ~= slices  ifTrue:[
         tabSelection ~~ 0 ifTrue:[
@@ -1701,16 +1700,18 @@
             self tabSelection:0.
         ]
     ].
-    self updateEnabledChannels
+    self updateEnabledChannels.
+    aspects do: [:holder| holder addDependent:self].
 !
 
 tabSelection
-    ^ tabSelection ? 0
+
+    ^tabSelection ? 0
 !
 
-tabSelection:aSelection
+tabSelection: aSelection
+
     |sel|
-
     tabSelection = aSelection ifTrue:[
         ^ self
     ].
@@ -1731,8 +1732,10 @@
         helpCanvas raise.
     ] ifFalse:[
         sel := (slices at:tabSelection) last.
+        aspects do: [:holder| holder release].
         specCanvas client:self spec:(self class perform:sel) builder:builder.
-        specCanvas raise.
+        aspects do: [:holder| holder addDependent:self].
+        specCanvas raise.  
     ]    
 
 ! !
@@ -1740,6 +1743,7 @@
 !MenuEditor methodsFor:'startup / release'!
 
 buildFrom:aClass andSelector:aSelector
+
     |oldClass newClass|
 
     oldClass := self specClass.
@@ -1749,7 +1753,7 @@
     (self isStandAlone and:[oldClass ~= newClass]) ifTrue:[
         self helpTool helpSpecFrom:newClass
     ].
-    self painter buildFrom:newClass andSelector:aSelector.
+    self treeView buildFrom: newClass andSelector: aSelector.
 
     aClass notNil & aSelector notNil
     ifTrue:
@@ -1795,8 +1799,8 @@
 !
 
 initialize
-    "initialize channels
-    "
+    "initialize value holders for the menu item properties"
+
     |holder|
 
     super initialize.
@@ -1805,7 +1809,7 @@
 
     #(
         label
-        accessCharaterPos
+        accessCharacterPos
         argument
         submenuChannel
         enabled
@@ -1821,14 +1825,12 @@
 
      ) do:[:aKey|
         aspects at:aKey put:(holder := ValueHolder new).
-        holder addDependent:self.
+        holder addDependent: self
     ].
 
     aspects at:#seperatorSelection put:(holder := SelectionInList new).
-    holder list:(Item separatorList).
+    holder list: Item separatorList.
     holder addDependent:self.
-
-
 !
 
 loadFromMessage: aMessage
@@ -1841,7 +1843,7 @@
         aClass := Smalltalk at: (readStream upTo: $ ) asSymbol.
         aSelector :=  readStream upToEnd asSymbol.
         self buildFrom: aClass andSelector: aSelector.
-        self painter selection: nil
+        self treeView selection: nil
     ]
 !
 
@@ -1872,7 +1874,7 @@
 
         (sel isKindOf:Menu) ifTrue:[
             self buildFrom:cls andSelector:nil.
-          ^ self painter buildFromMenu:sel.
+          ^ self treeView buildFromMenu:sel.
         ]
         
     ].
@@ -1881,16 +1883,56 @@
 
 !MenuEditor methodsFor:'user interactions'!
 
+accept
+    "invoked by button 'OK' and by save requests of menu item changes"
+
+    |node|
+    node := self treeView selectedNode.
+    node notNil
+    ifTrue:
+    [
+        self isHelpToolSelected
+        ifTrue:
+        [
+            self helpTool accept.
+            node contents activeHelpKey: self helpTool helpKey
+        ]
+        ifFalse:
+        [
+            self treeView updateNode: (node contents buildFromAspects: aspects)
+        ]
+    ].
+    self modifiedChannel value:false.
+    isModified := true
+!
+
+cancel
+    "invoked by button 'Cancel'"
+
+    |node|
+    (node := self treeView selectedNode) notNil
+    ifTrue:
+    [
+        self helpTool helpKey:(self helpKey).
+        aspects do:[:anAspect| anAspect value:nil].
+        node contents toAspects:aspects
+    ].
+    self modifiedChannel value:false
+
+!
+
 doBrowseAppClass
     "open a browser on the class"
 
     |cls|
 
-    cls := self resolveName:(self specClass).
-
-    cls notNil ifTrue:[
-        SystemBrowser openInClass:cls class selector:(self painter selectorName)
-    ] ifFalse:[
+    (cls := self resolveName: self specClass) notNil
+    ifTrue:
+    [
+        SystemBrowser openInClass:cls class selector: self treeView selectorName
+    ]
+    ifFalse:
+    [
         self information:'No valid class defined!!'.
     ]
 !
@@ -1924,7 +1966,7 @@
     resourceClass := (readStream upTo: $ ) asSymbol.
     resourceSelector := readStream upToEnd asSymbol.
     resourceClass size > 0 ifTrue: [(aspects at:#retriever) value: resourceClass].
-    resourceSelector size > 0 ifTrue: [(aspects at:#icon) value: resourceSelector].
+    resourceSelector size > 0 ifTrue: [(aspects at:#icon) value: resourceSelector. self modifiedChannel value: true].
 
     (aspects at:#retriever) value = specClass
     ifTrue:
@@ -1955,16 +1997,16 @@
 !
 
 doInstallSpec
-    |cls selector painter menu spec mthd category code|
+    |cls selector treeView menu spec mthd category code|
 
     cls := self resolveName:(self specClass).
 
     cls isNil ifTrue:[
         ^ self information:'No valid class defined!!'.
     ].
-    painter  := self painter.
-    selector := painter selectorName.
-    menu     := painter asMenu.
+    treeView  := self treeView.
+    selector := treeView selectorName.
+    menu     := treeView asMenu.
 
     menu isNil ifTrue:[
         ^ self information:'No menu defined.'
@@ -2020,7 +2062,7 @@
 
 doNew
 
-    self buildFrom:nil andSelector:(self painter selectorName)
+    self buildFrom:nil andSelector: self treeView selectorName
 !
 
 doPickAMenu
@@ -2033,15 +2075,15 @@
         ^ self
     ].
     view specClass == MenuPanelSpec ifTrue:[
-        ^ self painter buildFromMenu:(view asMenu)
+        ^ self treeView buildFromMenu: view asMenu
     ].
     ^ nil
 !
 
 doStepDown
-    "move selected child after next child
-    "
-    self painter selectedNodeChangeSequenceOrder:1.
+    "shift selected menu item one step down"
+
+    self treeView selectedNodeChangeSequenceOrder:1.
     isModified := true.
 
 
@@ -2050,9 +2092,9 @@
 !
 
 doStepIn
-    "move selected child into next parent node
-    "
-    self painter selectedNodeBecomeChildOfNext.
+    "move selected menu item into next submenu"
+
+    self treeView selectedNodeBecomeChildOfNext.
     isModified := true.
 
 
@@ -2062,16 +2104,16 @@
 !
 
 doStepOut
-    "move selected child out from parent node
-    "
-    self painter selectedNodeBecomeSisterOfParent.
+    "move selected menu item out from parent submenu"
+
+    self treeView selectedNodeBecomeSisterOfParent.
     isModified := true.
 !
 
 doStepUp
-    "move selected child before previous child
-    "
-    self painter selectedNodeChangeSequenceOrder:-1.
+    "shift selected menu item one step up"
+
+    self treeView selectedNodeChangeSequenceOrder:-1.
     isModified := true.
 !
 
@@ -2105,25 +2147,11 @@
             withResourceTypes: #(menu))
 ! !
 
-!MenuEditor methodsFor:'values'!
-
-painter
-    "automatically generated by UIPainter ..."
-
-    |painter|
-
-    (painter := builder bindingAt:#painter) isNil ifTrue:[
-        painter := Painter new.
-        painter action:[:dummy| self menuChanged ].
-        builder aspectAt:#painter put:painter.
-    ].
-  ^ painter
-! !
-
 !MenuEditor::Item class methodsFor:'constants'!
 
 separatorList
-   ^ #( 'blank' 'single line' 'double line' )
+
+    ^#('blank' 'single line' 'double line')
 !
 
 separatorSlices
@@ -2155,45 +2183,45 @@
 !MenuEditor::Item methodsFor:'accessing'!
 
 activeHelpKey
-    ^ activeHelpKey
+
+    ^activeHelpKey
 !
 
 activeHelpKey:aKey
+
     activeHelpKey := aKey
 !
 
 label
     "return the value of the instance variable 'label' (automatically generated)"
 
-    ^ label!
+    ^label
+!
 
 label:something
     "set the value of the instance variable 'label' (automatically generated)"
 
-    label := something ? '-'.
+    label := something ? '-'
 !
 
 separatorType
-    "returns separator type assigned to item or nil
-    "
-    |c|
-
-    label size > 1 ifFalse:[
-        label size == 0 ifTrue:[
-            ^ #blank
-        ].
-        c := label first.
-        c == $- ifTrue:[^ #single].
-        c == $= ifTrue:[^ #double].
+    "returns separator type assigned to item or nil"
+
+    label size > 1 
+    ifFalse:
+    [
+        label size  == 0  ifTrue:[^#blank].
+        label first == $- ifTrue:[^#single].
+        label first == $= ifTrue:[^#double].
     ].    
-  ^ nil
+    ^nil
 
 !
 
 submenuChannel
     "return the value of the instance variable 'submenuChannel' (automatically generated)"
 
-    ^ submenuChannel
+    ^submenuChannel
 !
 
 submenuChannel:aChannel
@@ -2205,8 +2233,8 @@
 !MenuEditor::Item methodsFor:'conversion'!
 
 asMenuItem
-    "converts self to a menu item
-    "
+    "converts self to a menu item"
+
     |item rcv|
 
     item := MenuItem labeled:label.
@@ -2214,7 +2242,7 @@
     self isSeparator ifFalse:[    
         item activeHelpKey:activeHelpKey.
         item enabled:enabled.
-        item accessCharacterPosition:accessCharaterPos.
+        item accessCharacterPosition:accessCharacterPos.
         item argument:argument.
         item submenuChannel:submenuChannel.
         item nameKey:nameKey.
@@ -2234,13 +2262,15 @@
             item labelImage:rcv
         ]
     ].
-  ^ item.
+    ^item
 !
 
 buildFromAspects:aspects
+
     |name|
-
-    self isSeparator ifFalse:[
+    self isSeparator 
+    ifFalse:
+    [
         name  := label.
         label := (aspects at:#label) value.
 
@@ -2248,15 +2278,15 @@
             (aspects at:#label) value:(label := name)
         ].
 
-        enabled             := (aspects at:#enabled) value.
-        value               := (aspects at:#value) value.
-        nameKey             := (aspects at:#nameKey) value.
-        indication          := (aspects at:#indication) value.
-        shortcutKey         := (aspects at:#shortcutKey) value.
-        accessCharaterPos   := (aspects at:#accessCharaterPos) value.
-        argument            := (aspects at:#argument) value.
-        translateLabel      := (aspects at:#translateLabel) value.
-        isButton            := (aspects at:#isButton) value.
+        enabled            := (aspects at:#enabled) value.
+        value              := (aspects at:#value) value.
+        nameKey            := (aspects at:#nameKey) value.
+        indication         := (aspects at:#indication) value.
+        shortcutKey        := (aspects at:#shortcutKey) value.
+        accessCharacterPos := (aspects at:#accessCharacterPos) value.
+        argument           := (aspects at:#argument) value.
+        translateLabel     := (aspects at:#translateLabel) value.
+        isButton           := (aspects at:#isButton) value.
 
         argument isString ifTrue:[
             argument size > 1 ifTrue:[
@@ -2265,17 +2295,20 @@
                 ]
             ]
         ].
-        submenuChannel      := (aspects at:#submenuChannel)    value.
-        retriever           := (aspects at:#retriever) value.
-        icon                := (aspects at:#icon) value.
-        iconAndLabel        := (aspects at:#iconAndLabel) value.
-    ] ifTrue:[
+        submenuChannel    := (aspects at:#submenuChannel) value.
+        retriever         := (aspects at:#retriever) value.
+        icon              := (aspects at:#icon) value.
+        iconAndLabel      := (aspects at:#iconAndLabel) value.
+    ]
+    ifTrue:
+    [
         name  := (aspects at:#seperatorSelection) selectionIndex.
         label := (self class separatorSlices at:name) last.
     ]
 !
 
 buildFromMenuItem:anItem
+
     |rtv|
 
     self label:(anItem label).
@@ -2293,20 +2326,20 @@
         indication := nil
     ].
 
-    nameKey           := anItem nameKey.
-    shortcutKey       := anItem shortcutKeyCharacter.
-    accessCharaterPos := anItem accessCharacterPosition.
-    argument          := anItem argument.
-    submenuChannel    := anItem submenuChannel.
-    translateLabel    := anItem translateLabel.
-    isButton          := anItem isButton.
-
-    (    ((rtv := anItem adornment) notNil)
-     and:[(rtv := rtv labelImage) isKindOf:ResourceRetriever]
-    ) ifTrue:[
+    nameKey            := anItem nameKey.
+    shortcutKey        := anItem shortcutKeyCharacter.
+    accessCharacterPos := anItem accessCharacterPosition.
+    argument           := anItem argument.
+    submenuChannel     := anItem submenuChannel.
+    translateLabel     := anItem translateLabel.
+    isButton           := anItem isButton.
+
+    (((rtv := anItem adornment) notNil)
+    and:[(rtv := rtv labelImage) isKindOf:ResourceRetriever])
+    ifTrue:
+    [
         retriever := rtv className.
         icon      := rtv selector.
-
         (iconAndLabel := rtv labelText notNil) ifTrue:[
             label := rtv labelText.
         ]
@@ -2314,53 +2347,54 @@
 !
 
 toAspects:aspects
+
     |type|
-
-    (type := self separatorType) notNil ifTrue:[
+    (type := self separatorType) notNil
+    ifTrue:
+    [
         type := self class separatorSlices findFirst:[:el| el first == type ].
         (aspects at:#seperatorSelection) selectionIndex:type.
-    ] ifFalse:[
-        (aspects at:#label)                 value:label.
-        (aspects at:#enabled)               value:enabled.
-        (aspects at:#value)                 value:value.
-        (aspects at:#nameKey)               value:nameKey.
-        (aspects at:#indication)            value:indication.
-        (aspects at:#shortcutKey)           value:shortcutKey.
-        (aspects at:#accessCharaterPos)     value:accessCharaterPos.
-        (aspects at:#translateLabel)        value:translateLabel.
-        (aspects at:#isButton)              value:isButton.
-
-        argument isSymbol ifTrue:[
-            (aspects at:#argument) value:'#', argument
-        ] ifFalse:[
-            (aspects at:#argument) value:argument.
-        ].
-        (aspects at:#submenuChannel)        value:submenuChannel.
-        (aspects at:#retriever)             value:retriever.
-        (aspects at:#icon)                  value:icon.
-        (aspects at:#iconAndLabel)          value:iconAndLabel.
+    ] 
+    ifFalse:
+    [
+        (aspects at:#label)                value:label.
+        (aspects at:#enabled)              value:enabled.
+        (aspects at:#value)                value:value.
+        (aspects at:#nameKey)              value:nameKey.
+        (aspects at:#indication)           value:indication.
+        (aspects at:#shortcutKey)          value:shortcutKey.
+        (aspects at:#accessCharacterPos)   value:accessCharacterPos.
+        (aspects at:#translateLabel)       value:translateLabel.
+        (aspects at:#isButton)             value:isButton.
+        (aspects at:#submenuChannel)       value:submenuChannel.
+        (aspects at:#retriever)            value:retriever.
+        (aspects at:#icon)                 value:icon.
+        (aspects at:#iconAndLabel)         value:iconAndLabel.
+        argument isSymbol
+            ifTrue: [(aspects at:#argument)value:'#', argument] 
+            ifFalse:[(aspects at:#argument)value:argument].
     ]
 ! !
 
 !MenuEditor::Item methodsFor:'queries'!
 
 isSeparator
-    "returns true if item is a seperator
-    "
-    ^ self separatorType notNil
+    "returns true if item is a seperator"
+
+    ^self separatorType notNil
 ! !
 
-!MenuEditor::Painter class methodsFor:'defaults'!
+!MenuEditor::TreeView class methodsFor:'defaults'!
 
 defaultMenuMessage   
-    "This message is the default yo be sent to the menuHolder to get a menu
-    "
-    ^ #menu
+    "this message is the default yo be sent to the menuHolder to get a menu"
+
+    ^#menu
 
 
 ! !
 
-!MenuEditor::Painter class methodsFor:'documentation'!
+!MenuEditor::TreeView class methodsFor:'documentation'!
 
 documentation
 "
@@ -2378,7 +2412,7 @@
 
 ! !
 
-!MenuEditor::Painter class methodsFor:'initialization'!
+!MenuEditor::TreeView class methodsFor:'initialization'!
 
 initialize
 
@@ -2387,63 +2421,33 @@
     Images := nil
 ! !
 
-!MenuEditor::Painter class methodsFor:'resources'!
-
-closedSubmenuImage
-    "ImageEditor openOnClass:self andSelector:#closedSubmenuImage"
-
-    <resource: #image>
-    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 21 85 85 85 85 128 26 170 170 170 170 192 26 170 170 170 170 192 31 255 255 255 255 199 16 0 0 0 0 192 21 85 85 85 85 204 26 170 170 170 170 192 26 170 170 170 170 192 31 255 255 255 255 200 16 0 0 0 0 192 21 85 85 85 85 192 26 170 170 170 170 192 26 170 170 170 170 207 31 255 255 255 255 192 16 0 0 0 0 192 21 85 85 85 85 192 26 170 170 170 170 192 26 170 170 170 170 192 47 255 255 255 255 192 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 grey:66.9978)); at:4 put:((Color grey:49.9962)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; yourself); yourself!
+!MenuEditor::TreeView class methodsFor:'resources'!
 
 images
     "returns an IdentityDictionary containing a list of images and keys used
     "
     ^ Images ?
         (Images := IdentityDictionary new
-            at: #menuItemImage      put: self menuItemImage;
-            at: #openedSubmenuImage put: self openedSubmenuImage;
-            at: #closedSubmenuImage put: self closedSubmenuImage;
-            at: #linkSubmenuImage   put: self linkSubmenuImage;
-            at: #menuSeparatorImage put: self menuSeparatorImage;
+            at: #menuItemImage      put: MenuEditor menuItemImage;
+            at: #menuSeparatorImage put: MenuEditor menuSeparatorImage;
+            at: #submenuImage       put: MenuEditor submenuImage;
+            at: #linkSubmenuImage   put: MenuEditor linkSubmenuImage;
             yourself)
 
 
 
-!
-
-linkSubmenuImage
-    "ImageEditor openOnClass:self andSelector:#linkSubmenuImage"
-
-    <resource: #image>
-    ^(Depth4Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 0 0 0 0 0 0 1 17 17 17 17 17 17 17 17 17 32 1 34 34 34 34 34 34 34 34 34 240 1 34 34 34 34 34 34 34 34 34 240 1 255 255 255 255 255 255 255 255 255 240 1 0 0 0 0 0 0 0 0 0 240 1 3 51 51 1 17 17 17 17 17 240 1 3 51 51 48 34 34 34 34 34 240 1 3 51 51 51 2 34 34 34 34 240 1 3 51 51 51 48 255 255 255 255 240 1 0 0 0 51 51 0 0 0 0 240 1 17 17 17 3 51 48 16 48 17 240 1 34 34 34 32 51 51 0 51 2 240 1 34 34 34 34 3 51 51 51 48 240 1 255 255 255 255 240 51 51 51 51 0 1 0 0 0 0 0 3 51 51 48 240 1 17 17 17 17 17 16 0 51 1 240 1 34 34 34 34 34 34 32 48 34 240 1 34 34 34 34 34 34 32 2 34 240 2 255 255 255 255 255 255 255 255 255 240 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; colorMap:((OrderedCollection new add:(Color black); add:(Color white); add:(Color grey:66.9978); add:(Color red:100.0 green:0.0 blue:0.0); add:(Color red:0.0 green:100.0 blue:0.0); add:(Color red:0.0 green:0.0 blue:100.0); add:(Color red:0.0 green:100.0 blue:100.0); add:(Color red:100.0 green:100.0 blue:0.0); add:(Color red:100.0 green:0.0 blue:100.0); add:(Color red:49.9962 green:0.0 blue:0.0); add:(Color red:0.0 green:49.9962 blue:0.0); add:(Color red:0.0 green:0.0 blue:49.9962); add:(Color red:0.0 green:49.9962 blue:49.9962); add:(Color red:49.9962 green:49.9962 blue:0.0); add:(Color red:49.9962 green:0.0 blue:49.9962); add:(Color grey:49.9962); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; yourself); yourself!
-
-menuItemImage
-    "ImageEditor openOnClass:self andSelector:#menuItemImage"
-
-    <resource: #image>
-    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 81 85 85 85 85 85 80 85 85 85 85 85 95 85 85 85 85 85 80 85 85 85 85 85 80 0 0 0 0 0 0 21 85 85 85 85 129 26 170 170 170 170 200 27 175 235 235 174 192 27 171 171 171 254 192 27 171 171 235 174 192 27 171 171 171 174 192 27 171 171 235 174 192 26 170 170 170 170 196 47 255 255 255 255 193 0 0 0 0 0 0 85 85 85 85 85 80 85 85 85 85 85 88 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 88]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:66.9978)); at:4 put:((Color grey:49.9977)); 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 0 0 0 0 0 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 0 0 0 0]) ; yourself); yourself!
-
-menuSeparatorImage
-    "ImageEditor openOnClass:self andSelector:#menuSeparatorImage"
-
-    <resource: #image>
-    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[85 85 85 85 85 82 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 80 0 0 0 0 0 0 21 85 85 85 85 128 26 170 170 170 170 196 26 170 170 170 170 195 27 255 255 255 250 192 27 0 0 0 6 192 26 85 85 85 86 200 26 170 170 170 170 192 26 170 170 170 170 192 47 255 255 255 255 206 0 0 0 0 0 8 85 85 85 85 85 80 85 85 85 85 85 80 85 85 85 85 85 87 85 85 85 85 85 88 85 85 85 85 85 80 85 85 85 85 85 80]) ; colorMap:(((Array new:4) at:1 put:((Color black)); at:2 put:((Color white)); at:3 put:((Color grey:66.9978)); at:4 put:((Color grey:49.9977)); 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 0 0 0 0 0 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 0 0 0 0]) ; yourself); yourself!
-
-openedSubmenuImage
-    "ImageEditor openOnClass:self andSelector:#openedSubmenuImage"
-
-    <resource: #image>
-    ^(Depth2Image new) width: 22; height: 22; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(#[0 0 0 0 0 13 21 85 85 85 85 128 26 170 170 170 170 192 26 170 170 170 170 192 31 255 255 255 255 192 16 0 0 0 0 192 21 85 85 85 85 192 26 170 170 170 170 200 26 170 170 170 170 192 31 255 255 255 255 192 16 0 0 0 0 192 21 85 85 85 85 200 26 170 170 170 170 192 26 170 170 170 170 200 31 255 255 255 255 192 16 0 0 0 0 192 21 85 85 85 85 192 26 170 170 170 170 192 26 170 170 170 170 192 47 255 255 255 255 192 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 grey:66.9978)); at:4 put:((Color grey:49.9962)); yourself)); mask:((Depth1Image new) width: 22; height: 22; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(#[255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 255 255 252 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]) ; yourself); yourself! !
-
-!MenuEditor::Painter methodsFor:'accessing'!
+! !
+
+!MenuEditor::TreeView methodsFor:'accessing'!
 
 selectorName
     ^ (listOfNodes first contents label) asSymbol
 ! !
 
-!MenuEditor::Painter methodsFor:'building'!
+!MenuEditor::TreeView methodsFor:'building'!
 
 buildFrom:aClass andSelector:aSelector
+
     |spec cls menu node|
 
     (aClass notNil and:[aSelector notNil]) ifTrue:[
@@ -2496,16 +2500,17 @@
 
     |node|
 
-    node := self nodeLabel:(anItem label).
+    node := self nodeLabel: anItem label.
     node contents buildFromMenuItem:anItem.
-    node name:(node contents label).
-    self subMenu:(anItem submenu) parent:node.
-  ^ node.
+    node name: node contents label.
+    self subMenu: anItem submenu parent:node.
+    ^node.
 
 
 !
 
 subMenu:aMenu parent:aParent
+
     |idx grp|
 
     aMenu isNil ifFalse:[
@@ -2523,7 +2528,7 @@
     ]
 ! !
 
-!MenuEditor::Painter methodsFor:'conversion'!
+!MenuEditor::TreeView methodsFor:'conversion'!
 
 asMenu
     |menu root|
@@ -2552,11 +2557,11 @@
 
 ! !
 
-!MenuEditor::Painter methodsFor:'drawing basics'!
+!MenuEditor::TreeView methodsFor:'drawing basics'!
 
 drawLabelIndex:anIndex atX:x y:yCenter
-    "draw text label assigned to a node at x y( center)
-    "
+    "draw text label assigned to a node at x y( center)"
+
     |y x2 type item|
 
     item := (listOfNodes at:anIndex) contents.
@@ -2576,84 +2581,75 @@
             ]    
         ]
     ]
-
-    "Modified: 28.7.1997 / 13:13:41 / cg"
 !
 
 figureFor:aNode
-    "access figure for a node
-    "
-    |item|
-
-    aNode hasChildren ifFalse:[
-        item := aNode contents.
-
-        item submenuChannel notNil ifTrue:[
-            ^ images at:#linkSubmenuImage
-        ].
-
-        item isSeparator ifTrue:[
-            ^ images at:#menuSeparatorImage
-        ].
-        ^ images at:#menuItemImage
+    "access figure for a node"
+
+    aNode hasChildren
+    ifFalse:
+    [
+        |item|
+        (item := aNode contents) submenuChannel notNil ifTrue:[^images at: #linkSubmenuImage].
+        item isSeparator ifTrue:[^images at: #menuSeparatorImage].
+        ^images at: #menuItemImage
     ].
-
-    aNode isExpandable ifTrue:[ 
-        ^ images at:#closedSubmenuImage
-    ].
-    ^ images at:#openedSubmenuImage
+    ^images at: #submenuImage
 ! !
 
-!MenuEditor::Painter methodsFor:'event handling'!
+!MenuEditor::TreeView methodsFor:'event handling'!
 
 keyPress:key x:x y:y
-    "any key pressed
-    "
+    "invoked if any key was pressed"
+
     <resource: #keyboard ( #Delete #BackSpace #Cut #Copy #Paste ) >
 
     (key == #Cut or:[key == #Delete or:[key == #BackSpace]]) ifTrue: [
         ^ self doCut
     ].
 
-    key == #Copy  ifTrue:[ ^ self doCopy].
-    key == #Paste ifTrue:[ ^ self doPaste].
+    key == #Copy  ifTrue:[^self doCopy].
+    key == #Paste ifTrue:[^self doPaste].
 
     super keyPress:key x:x y:y.
 
 ! !
 
-!MenuEditor::Painter methodsFor:'initialization'!
+!MenuEditor::TreeView methodsFor:'initialization'!
 
 fetchImageResources
     "initialize heavily used device resources - to avoid rendering
-     images again and again later; returns maximum extent of the images used.
-    "
-    |y x t|
-
-    t := super fetchImageResources.
-    y := t y.
-    x := t x.
-
-    images do:[:anIcon|
-        (t := anIcon heightOn:self) > y ifTrue:[y := t].
-        (t := anIcon widthOn:self)  > x ifTrue:[x := t].
+     images again and again later; returns maximum extent of the images used."
+
+    |defaultExtent imageWidth imageHeight maxWidth maxHeight|
+
+    defaultExtent := super fetchImageResources.
+    maxHeight := defaultExtent y.
+    maxWidth := defaultExtent x.
+
+    images do:
+    [:anIcon|
+        (imageWidth  := anIcon widthOn:self)  > maxWidth  ifTrue:[maxWidth  := imageWidth].
+        (imageHeight := anIcon heightOn:self) > maxHeight ifTrue:[maxHeight := imageHeight].
     ].
-  ^ x @ y
+    ^maxWidth@maxHeight
 
 !
 
 initialize
+
     super initialize.
 
     images := IdentityDictionary new.
 
-    self class images associationsDo:[:el|
-        images at:(el key) put:(el value onDevice:device)
-    ].
+    self class images associationsDo:[:imageAsso|images at: imageAsso key put:(imageAsso value onDevice:device)].
     self multipleSelectOk:true.
+    self showDirectoryIndicator: true.
+    self showDirectoryIndicatorForRoot: false.
+    self selectConditionBlock: [:i|self application checkMenuItemModified]
 ! !
 
-!MenuEditor::Painter methodsFor:'menus'!
+!MenuEditor::TreeView methodsFor:'menus'!
 
 doCopy
 
@@ -2670,6 +2666,7 @@
 !
 
 doCreateLink
+
     |node item|
 
     node := self nodeLabel:'undefined'.
@@ -2710,17 +2707,18 @@
     ].
 ! !
 
-!MenuEditor::Painter methodsFor:'private'!
+!MenuEditor::TreeView methodsFor:'private'!
 
 addElement:something
-    "add something after selection
-    "
+    "add something after selection"
+
     self selectedNodeAdd:something.
     self setModified.
 !
 
 nodeLabel:aLabel
-   ^ TreeItem name:aLabel contents:(MenuEditor::Item new label:aLabel).
+
+    ^TreeItem name:aLabel contents: (MenuEditor::Item new label:aLabel)
 !
 
 setModified 
@@ -2728,18 +2726,29 @@
     self topView application isModified: true
 ! !
 
-!MenuEditor::Painter methodsFor:'selection'!
-
-selectedNodeChanged
-    |node name index|
-
-    (index := self selectedIndex) ~~ 0 ifTrue:[
-        node := listOfNodes at:index.
-        name := node contents label.
-        list at:index put:name.
-        node name:name.
-        self redrawLine:index.
-    ]
+!MenuEditor::TreeView methodsFor:'queries'!
+
+xOfFigureLevel2:aLevel
+
+    ^super xOfFigureLevel: aLevel - 1 
+
+
+
+
+
+! !
+
+!MenuEditor::TreeView methodsFor:'selection'!
+
+updateNode: aNode
+
+    |name treeItem index|
+
+    name := aNode label.
+    treeItem := listOfNodes detect: [:n| n contents = aNode] ifNone: [1].
+    index := self indexOfNode: treeItem.
+    treeItem name: name.
+    self redrawLine: index.
 ! !
 
 !MenuEditor class methodsFor:'documentation'!