new ui-layout
authorClaus Gittinger <cg@exept.de>
Tue, 29 Oct 2002 10:43:02 +0100
changeset 1637 2b0f24d74f8e
parent 1636 85ab98a850c8
child 1638 5afc56236859
new ui-layout
ImageEditor.st
--- a/ImageEditor.st	Tue Oct 29 10:42:40 2002 +0100
+++ b/ImageEditor.st	Tue Oct 29 10:43:02 2002 +0100
@@ -15,7 +15,7 @@
 ToolApplicationModel subclass:#ImageEditor
 	instanceVariableNames:'imageEditView colorMapMode editMode mouseKeyColorMode
 		selectedColorIndex postOpenAction imageSeqNr'
-	classVariableNames:'LastDirectory MaskClipboard'
+	classVariableNames:'LastDirectory LastSizeString MaskClipboard LastColormapMode'
 	poolDictionaries:''
 	category:'Interface-UIPainter'
 !
@@ -207,22 +207,25 @@
 'Copy'
 
 #drawModeFill
-'Flood-fill'
+'Flood-Fill'
 
 #drawModeFilledBox
-'Fill Rectangle'
+'Filled Rectangle'
 
 #drawModePaste
 'Paste'
 
 #drawModePasteUnder
-'Paste under'
+'Paste Under'
+
+#drawModePasteWithMask
+'Paste With Mask'
 
 #drawModePoint
 'Point'
 
 #fileGrabImage
-'Pick from screen.'
+'Pick from Screen.'
 
 #fileLoadFromClass
 'Load from Method'
@@ -231,22 +234,22 @@
 'Load from File.'
 
 #fileNewImage
-'New image'
+'New Image'
 
 #filePrint
 'Print'
 
 #fileSaveAs
-'Save to file.'
+'Save to File.'
 
 #fileSaveMaskAs
-'Save to file.'
+'Save to File.'
 
 #fileSaveMethod
-'Save as method'
+'Save as Method'
 
 #fileSaveMethodAs
-'Save as method'
+'Save as Method'
 
 )
 !
@@ -318,31 +321,34 @@
 'Find and remove top border.'
 
 #drawModeBox
-'Switches to box-drawing mode.'
+'Rectangle Drawing Mode.'
 
 #drawModeCopy
-'Switches to area-copy mode.'
+'Area Copy Mode.'
 
 #drawModeFill
-'Switches to flood-fill mode.'
+'Flood Fill Mode.'
 
 #drawModeFilledBox
-'Switches to filled-box drawing mode.'
+'Filled Rectangle Drawing Mode.'
 
 #drawModePaste
-'Switches to paste mode.'
+'Paste Mode.'
 
 #drawModePasteUnder
-'Switches to paste under mode.'
+'Paste-Under Mode.'
+
+#drawModePasteWithMask
+'Paste-with-Mask Mode.'
 
 #drawModePoint
-'Switches to point-drawing mode.'
+'Point Drawing Mode.'
 
 #editFlipHorizontal
-'Flips the image horizontally.'
+'Flip the image horizontally.'
 
 #editFlipVertical
-'Flips the image vertically.'
+'Flip the image vertically.'
 
 #editMagnifyImage
 'Magnify the image.'
@@ -396,7 +402,7 @@
 'Increase magnification.'
 
 #mouseKeyColorMode
-'Toggles between left and right mouse button color.'
+'Toggle between left and right mouse button color.'
 
 #previewView
 'Shows a preview of the image.'
@@ -411,6 +417,66 @@
 
 !ImageEditor class methodsFor:'image specs'!
 
+copyIcon
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
+    "
+     self copyIcon inspect
+     ImageEditor openOnClass:self andSelector:#copyIcon
+     Icon flushCachedIcons
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:#'ImageEditor class copyIcon'
+        ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@** @@J)UUTB*Z*)@*&**PJ)**$B*Z*)@*&**PJ)**$@@Z*)@@F**P@AUUT@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@C? O>@??3??O?<??3??O?<??3??@_<A?0@@@@a') ; yourself); yourself]
+!
+
+fillIcon
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
+    "
+     self fillIcon inspect
+     ImageEditor openOnClass:self andSelector:#fillIcon
+     Icon flushCachedIcons
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:#'ImageEditor class fillIcon'
+        ifAbsentPut:[(Depth2Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@ @@@@*H@@D*(@@DUUP@EAUU@AAEU@@@@U@@DDA@@@@@@@@PP@@@@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C @Q@BN@I<@?8C?0[?!!G<@O P\@@ D@@@@@@@@@a') ; yourself); yourself]
+!
+
+fillRectIcon
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
+    "
+     self fillRectIcon inspect
+     ImageEditor openOnClass:self andSelector:#fillRectIcon
+     Icon flushCachedIcons
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:#'ImageEditor class fillRectIcon'
+        ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@@@@@@@@@@@@D@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C?0O?@?<C?0O?@?<C?0O?@?<C?0@@@@@@@a') ; yourself); yourself]
+!
+
 leftMouseKeyIcon
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
@@ -430,6 +496,109 @@
         ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@EJJ@@AR" @@T((@@@@@@@B** @@**(@@J**@@B** @@**(@@J**@@@**@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@?0G? _>A?8G? _>A?8G? _>A?8G? O<@_ @@@b') ; yourself); yourself]
 !
 
+pasteIcon
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
+    "
+     self pasteIcon inspect
+     ImageEditor openOnClass:self andSelector:#pasteIcon
+     Icon flushCachedIcons
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:#'ImageEditor class pasteIcon'
+        ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3@3M&X@@SL0L0A&@@D3LC@@A @AL3@3@FX@@QDPY&Y&
+@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a') ; yourself); yourself]
+!
+
+pasteUnderIcon
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
+    "
+     self pasteUnderIcon inspect
+     ImageEditor openOnClass:self andSelector:#pasteUnderIcon
+     Icon flushCachedIcons
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:#'ImageEditor class pasteUnderIcon'
+        ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3@3M&X@@SL0L0A&@@D3LC@@A @AL3@3@FX@@QDPY&Y&
+@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a') ; yourself); yourself]
+!
+
+pasteWithMaskIcon
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
+    "
+     self pasteWithMaskIcon inspect
+     ImageEditor openOnClass:self andSelector:#pasteWithMaskIcon
+     Icon flushCachedIcons
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:#'ImageEditor class pasteWithMaskIcon'
+        ifAbsentPut:[(Depth4Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(4 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@AU@@@@@CHE@E@2@@@ QDQD@0@@L@@@@@H@@BL#H2L#@@@QDQDQL @@D3L@@@@@@AL3@3M&X@@SL0L3A&@@D3LCL0A @AL3@3LFX@@QDPY&Y&
+@@@@@@@@@@@b') ; colorMapFromArray:#[0 0 0 0 0 128 128 128 0 128 128 128 212 208 200 255 255 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'C0A?8O?0??C?<O?0??C?>O?8??#?>O?8_? G>@@a') ; yourself); yourself]
+!
+
+pointIcon
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
+    "
+     self pointIcon inspect
+     ImageEditor openOnClass:self andSelector:#pointIcon
+     Icon flushCachedIcons
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:#'ImageEditor class pointIcon'
+        ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@B@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 255 255]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@0@G@@8@G@@8@G@@8@G@@X@B@@@@@@@@@a') ; yourself); yourself]
+!
+
+rectIcon
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
+    "
+     self rectIcon inspect
+     ImageEditor openOnClass:self andSelector:#rectIcon
+     Icon flushCachedIcons
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:#'ImageEditor class rectIcon'
+        ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@A@@@@@@@@@@@@@@@C@@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@C?0HA@ DB@PHA@ DB@PHA@ DC?0@@@@@@@a') ; yourself); yourself]
+!
+
 rightMouseKeyIcon
     "This resource specification was automatically generated
      by the ImageEditor of ST/X."
@@ -447,6 +616,26 @@
     ^Icon
         constantNamed:#'ImageEditor rightMouseKeyIcon'
         ifAbsentPut:[(Depth2Image new) width: 16; height: 16; photometric:(#palette); bitsPerSample:(#(2 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@JJE@@B"!!P@@((T@@@@@@@B** @@**(@@J**@@B** @@**(@@J**@@@**@@@@@@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0 255 255 255]; mask:((Depth1Image new) width: 16; height: 16; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@?0G? _>A?8G? _>A?8G? _>A?8G? O<@_ @@@b') ; yourself); yourself]
+!
+
+specialIcon
+    "This resource specification was automatically generated
+     by the ImageEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the ImageEditor may not be able to read the specification."
+
+    "
+     self specialIcon inspect
+     ImageEditor openOnClass:self andSelector:#specialIcon
+     Icon flushCachedIcons
+    "
+
+    <resource: #image>
+
+    ^Icon
+        constantNamed:#'ImageEditor class specialIcon'
+        ifAbsentPut:[(Depth1Image new) width: 14; height: 14; photometric:(#palette); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@L@@@@B@@@@@0@@@@@@@@@@@@@@@P@@@@@@@@@a') ; colorMapFromArray:#[0 0 0 255 0 0]; mask:((Depth1Image new) width: 14; height: 14; photometric:(#blackIs0); bitsPerSample:(#(1 )); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@L@@0@G @^@A8@G @L@@0@@@@L@@0@@@@@a') ; yourself); yourself]
 ! !
 
 !ImageEditor class methodsFor:'interface specs'!
@@ -967,7 +1156,7 @@
           #label: 'Image Editor'
           #name: 'Image Editor'
           #min: #(#Point 400 320)
-          #bounds: #(#Rectangle 16 42 514 386)
+          #bounds: #(#Rectangle 105 601 555 951)
           #menu: #menu
         )
         #component: 
@@ -983,17 +1172,22 @@
            #(#VariableHorizontalPanelSpec
               #name: 'variableHorizontalPanel1'
               #layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0)
+              #snapMode: #both
+              #barLevel: 1
               #component: 
              #(#SpecCollection
                 #collection: #(
                  #(#ViewSpec
-                    #name: 'view1'
+                    #name: 'leftView'
+                    #level: 1
                     #component: 
                    #(#SpecCollection
                       #collection: #(
                        #(#VariableVerticalPanelSpec
                           #name: 'VariableVerticalPanel1'
                           #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
+                          #level: 0
+                          #snapMode: #both
                           #component: 
                          #(#SpecCollection
                             #collection: #(
@@ -1005,6 +1199,7 @@
                                    #(#MenuPanelSpec
                                       #name: 'MouseButtonColorToolBar'
                                       #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 24 0)
+                                      #level: 0
                                       #menu: #menuMouseButtonColors
                                     )
                                    #(#DataSetSpec
@@ -1085,65 +1280,84 @@
                              )
                            
                           )
-                          #handles: #(#Any 0.723776 1.0)
+                          #handles: #(#Any 0.5 1.0)
                         )
                        )
                      
                     )
                   )
                  #(#ViewSpec
-                    #name: 'view2'
-                    #level: -1
+                    #name: 'rightView'
                     #component: 
                    #(#SpecCollection
                       #collection: #(
-                       #(#ArbitraryComponentSpec
-                          #name: 'imageEditView'
-                          #layout: #(#LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0)
-                          #hasHorizontalScrollBar: true
-                          #hasVerticalScrollBar: true
-                          #hasBorder: false
-                          #component: #ImageEditView
-                        )
-                       #(#LabelSpec
-                          #name: 'coordLabel'
-                          #layout: #(#LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0)
-                          #level: -1
-                          #labelChannel: #imageInfoHolder
-                          #resizeForLabel: false
-                          #adjust: #left
+                       #(#MenuPanelSpec
+                          #name: 'ToolBar1'
+                          #layout: #(#LayoutFrame 0 0 0 0.0 28 0 0 1.0)
+                          #level: 1
+                          #menu: #toolsMenuToolbar
+                          #verticalLayout: true
+                          #centerItems: true
+                          #textDefault: true
                         )
-                       #(#ArrowButtonSpec
-                          #name: 'magnifyDownButton'
-                          #layout: #(#LayoutFrame -80 1 -22 1 -58 1 0 1)
-                          #activeHelpKey: #magnifyImageDown
-                          #model: #doMagnifyDown
-                          #enableChannel: #imageIsLoaded
-                          #isTriggerOnDown: true
-                          #direction: #left
-                        )
-                       #(#ArrowButtonSpec
-                          #name: 'magnifyUpButton'
-                          #layout: #(#LayoutFrame -24 1 -22 1 -2 1 0 1)
-                          #activeHelpKey: #magnifyImageUp
-                          #model: #doMagnifyUp
-                          #enableChannel: #imageIsLoaded
-                          #isTriggerOnDown: true
-                          #direction: #right
-                        )
-                       #(#InputFieldSpec
-                          #name: 'magnificationInputField'
-                          #layout: #(#LayoutFrame -57 1 -22 1 -26 1 0 1)
-                          #activeHelpKey: #magnificationNumber
-                          #enableChannel: #imageIsLoaded
-                          #model: #valueOfMagnification
-                          #type: #numberInRange
-                          #acceptOnReturn: false
-                          #acceptOnTab: false
-                          #numChars: 2
-                          #minValue: 1
-                          #maxValue: 99
-                          #acceptOnPointerLeave: false
+                       #(#ViewSpec
+                          #name: 'editingView'
+                          #layout: #(#LayoutFrame 28 0.0 0 0.0 0 1.0 0 1.0)
+                          #level: 1
+                          #component: 
+                         #(#SpecCollection
+                            #collection: #(
+                             #(#ArbitraryComponentSpec
+                                #name: 'imageEditView'
+                                #layout: #(#LayoutFrame 2 0.0 2 0.0 -2 1.0 -24 1.0)
+                                #hasHorizontalScrollBar: true
+                                #hasVerticalScrollBar: true
+                                #hasBorder: false
+                                #component: #ImageEditView
+                              )
+                             #(#LabelSpec
+                                #name: 'coordLabel'
+                                #layout: #(#LayoutFrame 2 0.0 -22 1 -83 1.0 0 1.0)
+                                #level: -1
+                                #labelChannel: #imageInfoHolder
+                                #resizeForLabel: false
+                                #adjust: #left
+                              )
+                             #(#ArrowButtonSpec
+                                #name: 'magnifyDownButton'
+                                #layout: #(#LayoutFrame -80 1 -22 1 -58 1 0 1)
+                                #activeHelpKey: #magnifyImageDown
+                                #model: #doMagnifyDown
+                                #enableChannel: #imageIsLoaded
+                                #isTriggerOnDown: true
+                                #direction: #left
+                              )
+                             #(#ArrowButtonSpec
+                                #name: 'magnifyUpButton'
+                                #layout: #(#LayoutFrame -24 1 -22 1 -2 1 0 1)
+                                #activeHelpKey: #magnifyImageUp
+                                #model: #doMagnifyUp
+                                #enableChannel: #imageIsLoaded
+                                #isTriggerOnDown: true
+                                #direction: #right
+                              )
+                             #(#InputFieldSpec
+                                #name: 'magnificationInputField'
+                                #layout: #(#LayoutFrame -57 1 -22 1 -26 1 0 1)
+                                #activeHelpKey: #magnificationNumber
+                                #enableChannel: #imageIsLoaded
+                                #model: #valueOfMagnification
+                                #type: #numberInRange
+                                #acceptOnReturn: false
+                                #acceptOnTab: false
+                                #numChars: 2
+                                #minValue: 1
+                                #maxValue: 99
+                                #acceptOnPointerLeave: false
+                              )
+                             )
+                           
+                          )
                         )
                        )
                      
@@ -1152,7 +1366,7 @@
                  )
                
               )
-              #handles: #(#Any 0.276 1.0)
+              #handles: #(#Any 0.3 1.0)
             )
            #(#UISubSpecification
               #name: 'infoBarSubSpec'
@@ -1235,132 +1449,131 @@
      #(#Menu
         #(
          #(#MenuItem
+            #activeHelpKey: #file
             #label: '&File'
             #translateLabel: true
-            #activeHelpKey: #file
-            #shortcutKeyCharacter: #Cmdf
             #submenu: 
            #(#Menu
               #(
                #(#MenuItem
+                  #activeHelpKey: #fileNewImage
                   #label: 'New...'
+                  #itemValue: #doNewImage
                   #translateLabel: true
-                  #value: #doNewImage
-                  #activeHelpKey: #fileNewImage
                 )
                #(#MenuItem
                   #label: '-'
                 )
                #(#MenuItem
+                  #activeHelpKey: #fileLoadFromClass
                   #label: 'Load...'
+                  #itemValue: #doLoadFromClass
                   #translateLabel: true
-                  #value: #doLoadFromClass
-                  #activeHelpKey: #fileLoadFromClass
                 )
                #(#MenuItem
+                  #activeHelpKey: #fileLoadFromFile
                   #label: 'Load from File...'
+                  #itemValue: #doLoadFromFile
                   #translateLabel: true
-                  #value: #doLoadFromFile
-                  #activeHelpKey: #fileLoadFromFile
                 )
                #(#MenuItem
+                  #activeHelpKey: #fileGrabImage
                   #label: 'Grab from Screen'
+                  #itemValue: #grabScreenImage
                   #translateLabel: true
-                  #value: #grabScreenImage
-                  #activeHelpKey: #fileGrabImage
                 )
                #(#MenuItem
+                  #enabled: #imageHasNextImage
                   #label: 'Next in Sequence'
+                  #itemValue: #nextImageInSequence
                   #translateLabel: true
-                  #value: #nextImageInSequence
-                  #enabled: #imageHasNextImage
                 )
                #(#MenuItem
                   #label: '-'
                 )
                #(#MenuItem
-                  #label: 'Save'
-                  #translateLabel: true
-                  #value: #doSaveMethod
                   #activeHelpKey: #fileSaveMethod
                   #enabled: #imageIsLoadedAndClassDefined
+                  #label: 'Save'
+                  #itemValue: #doSaveMethod
+                  #translateLabel: true
                 )
                #(#MenuItem
-                  #label: 'Save As...'
-                  #translateLabel: true
-                  #value: #doSaveMethodAs
                   #activeHelpKey: #fileSaveMethodAs
                   #enabled: #imageIsLoaded
+                  #label: 'Save As...'
+                  #itemValue: #doSaveMethodAs
+                  #translateLabel: true
                 )
                #(#MenuItem
                   #label: '-'
                 )
                #(#MenuItem
-                  #label: 'Save to File...'
-                  #translateLabel: true
-                  #value: #doSaveImageFileAs
                   #activeHelpKey: #fileSaveAs
                   #enabled: #imageIsLoaded
+                  #label: 'Save to File...'
+                  #itemValue: #doSaveImageFileAs
+                  #translateLabel: true
                 )
                #(#MenuItem
-                  #label: 'Save Mask to File...'
-                  #translateLabel: true
-                  #value: #doSaveImageMaskFileAs
                   #activeHelpKey: #fileSaveMaskAs
                   #enabled: #imageIsLoaded
+                  #label: 'Save Mask to File...'
+                  #itemValue: #doSaveImageMaskFileAs
+                  #translateLabel: true
                 )
                #(#MenuItem
-                  #label: 'Save As Button to File...'
-                  #translateLabel: true
-                  #value: #doSaveButtonImageToFileAs
                   #activeHelpKey: #fileSaveButtonImageAs
                   #enabled: #imageIsLoaded
+                  #label: 'Save As Button to File...'
+                  #itemValue: #doSaveButtonImageToFileAs
+                  #translateLabel: true
                 )
                #(#MenuItem
                   #label: '-'
                 )
                #(#MenuItem
-                  #label: 'Show storeString'
-                  #translateLabel: true
-                  #value: #doShowStoreString
                   #activeHelpKey: #fileShowStoreString
                   #enabled: #imageIsLoaded
+                  #label: 'Show storeString'
+                  #itemValue: #doShowStoreString
+                  #translateLabel: true
                 )
                #(#MenuItem
-                  #label: 'Edit Mask'
-                  #translateLabel: true
-                  #value: #doEditMask
                   #activeHelpKey: #fileEditMask
                   #enabled: #imageIsLoaded
+                  #label: 'Edit Mask'
+                  #itemValue: #doEditMask
+                  #translateLabel: true
                 )
                #(#MenuItem
                   #label: '-'
                 )
                #(#MenuItem
-                  #label: 'Print'
-                  #translateLabel: true
-                  #value: #doPrint
                   #activeHelpKey: #filePrint
                   #enabled: #imageIsLoaded
+                  #label: 'Print'
+                  #itemValue: #doPrint
+                  #translateLabel: true
                 )
                #(#MenuItem
                   #label: '-'
                 )
                #(#MenuItem
-                  #label: 'Browse Class'
-                  #translateLabel: true
-                  #value: #doBrowseClass
                   #activeHelpKey: #fileBrowseClass
                   #enabled: #hasClassDefined
+                  #label: 'Browse Class'
+                  #itemValue: #doBrowseClass
+                  #translateLabel: true
                 )
                #(#MenuItem
                   #label: '-'
                 )
                #(#MenuItem
+                  #activeHelpKey: #fileExit
                   #label: 'Exit'
+                  #itemValue: #closeRequest
                   #translateLabel: true
-                  #value: #closeRequest
-                  #activeHelpKey: #fileExit
                 )
                )
               nil
@@ -1368,69 +1581,69 @@
             )
           )
          #(#MenuItem
+            #activeHelpKey: #edit
+            #enabled: #imageIsLoaded
             #label: 'Edit'
             #translateLabel: true
-            #activeHelpKey: #edit
-            #enabled: #imageIsLoaded
             #submenu: 
            #(#Menu
               #(
                #(#MenuItem
-                  #label: 'Undo'
-                  #translateLabel: true
-                  #value: #doUndo
                   #activeHelpKey: #editUndo
                   #enabled: #valueOfCanUndo
+                  #label: 'Undo'
+                  #itemValue: #doUndo
+                  #translateLabel: true
                 )
                #(#MenuItem
                   #label: '-'
                 )
                #(#MenuItem
+                  #activeHelpKey: #editFlipVertical
                   #label: 'Flip - Vertical'
+                  #itemValue: #doFlipVertical
                   #translateLabel: true
-                  #value: #doFlipVertical
-                  #activeHelpKey: #editFlipVertical
                 )
                #(#MenuItem
+                  #activeHelpKey: #editFlipHorizontal
                   #label: 'Flip - Horizontal'
+                  #itemValue: #doFlipHorizontal
                   #translateLabel: true
-                  #value: #doFlipHorizontal
-                  #activeHelpKey: #editFlipHorizontal
                 )
                #(#MenuItem
                   #label: '-'
                 )
                #(#MenuItem
+                  #activeHelpKey: #editResize
                   #label: 'Resize...'
+                  #itemValue: #doResizeImage
                   #translateLabel: true
-                  #value: #doResizeImage
-                  #activeHelpKey: #editResize
                 )
                #(#MenuItem
+                  #activeHelpKey: #editMagnifyImage
                   #label: 'Magnify...'
+                  #itemValue: #doMagnifyImage
                   #translateLabel: true
-                  #value: #doMagnifyImage
-                  #activeHelpKey: #editMagnifyImage
                 )
                #(#MenuItem
+                  #activeHelpKey: #editMagnifyImage
                   #label: 'Magnify By...'
+                  #itemValue: #doMagnifyImageBy
                   #translateLabel: true
-                  #value: #doMagnifyImageBy
-                  #activeHelpKey: #editMagnifyImage
                 )
                #(#MenuItem
+                  #activeHelpKey: #editRotate
                   #label: 'Rotate...'
+                  #itemValue: #doRotateImage
                   #translateLabel: true
-                  #value: #doRotateImage
-                  #activeHelpKey: #editRotate
                 )
                #(#MenuItem
                   #label: '-'
                 )
                #(#MenuItem
                   #label: 'Invert'
+                  #itemValue: #doNegativeImage
                   #translateLabel: true
-                  #value: #doNegativeImage
                 )
                #(#MenuItem
                   #label: '-'
@@ -1442,46 +1655,46 @@
                  #(#Menu
                     #(
                      #(#MenuItem
+                        #activeHelpKey: #cropAll
                         #label: 'All'
+                        #itemValue: #doCropAll
                         #translateLabel: true
-                        #value: #doCropAll
-                        #activeHelpKey: #cropAll
                       )
                      #(#MenuItem
                         #label: '-'
                       )
                      #(#MenuItem
+                        #activeHelpKey: #cropLeft
                         #label: 'Left'
+                        #itemValue: #doCropLeft
                         #translateLabel: true
-                        #value: #doCropLeft
-                        #activeHelpKey: #cropLeft
                       )
                      #(#MenuItem
+                        #activeHelpKey: #cropRight
                         #label: 'Right'
+                        #itemValue: #doCropRight
                         #translateLabel: true
-                        #value: #doCropRight
-                        #activeHelpKey: #cropRight
                       )
                      #(#MenuItem
+                        #activeHelpKey: #cropTop
                         #label: 'Top'
+                        #itemValue: #doCropTop
                         #translateLabel: true
-                        #value: #doCropTop
-                        #activeHelpKey: #cropTop
                       )
                      #(#MenuItem
+                        #activeHelpKey: #cropBottom
                         #label: 'Bottom'
+                        #itemValue: #doCropBottom
                         #translateLabel: true
-                        #value: #doCropBottom
-                        #activeHelpKey: #cropBottom
                       )
                      #(#MenuItem
                         #label: '-'
                       )
                      #(#MenuItem
+                        #activeHelpKey: #cropManual
                         #label: 'Manual...'
+                        #itemValue: #doCropManual
                         #translateLabel: true
-                        #value: #doCropManual
-                        #activeHelpKey: #cropManual
                       )
                      )
                     nil
@@ -1489,16 +1702,16 @@
                   )
                 )
                #(#MenuItem
+                  #activeHelpKey: #shiftManual
                   #label: 'Shift...'
+                  #itemValue: #doShiftManual
                   #translateLabel: true
-                  #value: #doShiftManual
-                  #activeHelpKey: #shiftManual
                 )
                #(#MenuItem
+                  #activeHelpKey: #uncropManual
                   #label: 'Ungrop (Add Border)...'
+                  #itemValue: #doUnCropManual
                   #translateLabel: true
-                  #value: #doUnCropManual
-                  #activeHelpKey: #uncropManual
                 )
                )
               nil
@@ -1506,45 +1719,51 @@
             )
           )
          #(#MenuItem
+            #enabled: #imageIsLoaded
+            #label: 'Mode'
+            #translateLabel: true
+            #submenuChannel: #modeMenu
+          )
+         #(#MenuItem
+            #activeHelpKey: #colorMap
+            #enabled: #imageIsLoaded
             #label: 'ColorMap'
             #translateLabel: true
-            #activeHelpKey: #colorMap
-            #enabled: #imageIsLoaded
             #submenu: 
            #(#Menu
               #(
                #(#MenuItem
+                  #activeHelpKey: #colorMap8
                   #label: '8-Plane'
+                  #itemValue: #colorMapMode:
                   #translateLabel: true
-                  #value: #colorMapMode:
-                  #activeHelpKey: #colorMap8
                   #argument: '8-plane'
                   #choice: #colorMapMode
                   #choiceValue: '8-plane'
                 )
                #(#MenuItem
+                  #activeHelpKey: #colorMap4
                   #label: '4-Plane'
+                  #itemValue: #colorMapMode:
                   #translateLabel: true
-                  #value: #colorMapMode:
-                  #activeHelpKey: #colorMap4
                   #argument: '4-plane'
                   #choice: #colorMapMode
                   #choiceValue: '4-plane'
                 )
                #(#MenuItem
+                  #activeHelpKey: #colorMap2
                   #label: '2-Plane'
+                  #itemValue: #colorMapMode:
                   #translateLabel: true
-                  #value: #colorMapMode:
-                  #activeHelpKey: #colorMap2
                   #argument: '2-plane'
                   #choice: #colorMapMode
                   #choiceValue: '2-plane'
                 )
                #(#MenuItem
+                  #activeHelpKey: #colorMap1
                   #label: '1-Plane'
+                  #itemValue: #colorMapMode:
                   #translateLabel: true
-                  #value: #colorMapMode:
-                  #activeHelpKey: #colorMap1
                   #argument: '1-plane'
                   #choice: #colorMapMode
                   #choiceValue: '1-plane'
@@ -1553,37 +1772,37 @@
                   #label: '-'
                 )
                #(#MenuItem
+                  #activeHelpKey: #colorMap8M
                   #label: '8-Plane + Mask'
+                  #itemValue: #colorMapMode:
                   #translateLabel: true
-                  #value: #colorMapMode:
-                  #activeHelpKey: #colorMap8M
                   #argument: '8-plane + mask'
                   #choice: #colorMapMode
                   #choiceValue: '8-plane + mask'
                 )
                #(#MenuItem
+                  #activeHelpKey: #colorMap4M
                   #label: '4-Plane + Mask'
+                  #itemValue: #colorMapMode:
                   #translateLabel: true
-                  #value: #colorMapMode:
-                  #activeHelpKey: #colorMap4M
                   #argument: '4-plane + mask'
                   #choice: #colorMapMode
                   #choiceValue: '4-plane + mask'
                 )
                #(#MenuItem
+                  #activeHelpKey: #colorMap2M
                   #label: '2-Plane + Mask'
+                  #itemValue: #colorMapMode:
                   #translateLabel: true
-                  #value: #colorMapMode:
-                  #activeHelpKey: #colorMap2M
                   #argument: '2-plane + mask'
                   #choice: #colorMapMode
                   #choiceValue: '2-plane + mask'
                 )
                #(#MenuItem
+                  #activeHelpKey: #colorMap1M
                   #label: '1-Plane + Mask'
+                  #itemValue: #colorMapMode:
                   #translateLabel: true
-                  #value: #colorMapMode:
-                  #activeHelpKey: #colorMap1M
                   #argument: '1-plane + mask'
                   #choice: #colorMapMode
                   #choiceValue: '1-plane + mask'
@@ -1592,67 +1811,67 @@
                   #label: '-'
                 )
                #(#MenuItem
-                  #label: 'Compress Colormap'
-                  #translateLabel: true
-                  #value: #compressColorMap
                   #activeHelpKey: #compressColormap
                   #enabled: #hasColormap
+                  #label: 'Compress Colormap'
+                  #itemValue: #compressColorMap
+                  #translateLabel: true
                 )
                #(#MenuItem
+                  #enabled: #hasColormap
                   #label: 'Sort Colormap'
+                  #itemValue: #sortColorMap
                   #translateLabel: true
-                  #value: #sortColorMap
-                  #enabled: #hasColormap
                 )
                #(#MenuItem
                   #label: 'Reduce Number of Colors...'
+                  #itemValue: #reduceNumberOfColors
                   #translateLabel: true
-                  #value: #reduceNumberOfColors
                 )
                #(#MenuItem
                   #label: '-'
                 )
                #(#MenuItem
                   #label: 'Make GrayScale'
+                  #itemValue: #makeGrayScale
                   #translateLabel: true
-                  #value: #makeGrayScale
                 )
                #(#MenuItem
                   #label: 'Make Brighter'
+                  #itemValue: #makeBrighter
                   #translateLabel: true
-                  #value: #makeBrighter
                 )
                #(#MenuItem
                   #label: 'Make Darker'
+                  #itemValue: #makeDarker
                   #translateLabel: true
-                  #value: #makeDarker
                 )
                #(#MenuItem
                   #label: 'Make Inverse'
+                  #itemValue: #makeInverse
                   #translateLabel: true
-                  #value: #makeInverse
                 )
                #(#MenuItem
                   #label: '-'
                 )
                #(#MenuItem
-                  #label: 'Copy Mask'
-                  #translateLabel: true
-                  #value: #copyMask
                   #activeHelpKey: #copyMask
                   #enabled: #hasMask
+                  #label: 'Copy Mask'
+                  #itemValue: #copyMask
+                  #translateLabel: true
                 )
                #(#MenuItem
-                  #label: 'Paste Mask'
-                  #translateLabel: true
-                  #value: #pasteMask
                   #activeHelpKey: #pasteMask
                   #enabled: #hasMask
+                  #label: 'Paste Mask'
+                  #itemValue: #pasteMask
+                  #translateLabel: true
                 )
                #(#MenuItem
                   #label: 'Clear Masked Pixels'
+                  #itemValue: #clearMaskedPixels
                   #translateLabel: true
-                  #value: #clearMaskedPixels
                 )
                )
               nil
@@ -1666,10 +1885,10 @@
            #(#Menu
               #(
                #(#MenuItem
+                  #activeHelpKey: #settingsGridMagnification
                   #label: 'Grid Magnification Limit...'
+                  #itemValue: #doChangeGridMagnification
                   #translateLabel: true
-                  #value: #doChangeGridMagnification
-                  #activeHelpKey: #settingsGridMagnification
                 )
                )
               nil
@@ -1677,16 +1896,16 @@
             )
           )
          #(#MenuItem
+            #activeHelpKey: #history
             #label: 'History'
             #translateLabel: true
-            #activeHelpKey: #history
             #submenuChannel: #menuHistory
           )
          #(#MenuItem
+            #activeHelpKey: #help
             #label: 'Help'
             #translateLabel: true
             #startGroup: #right
-            #activeHelpKey: #help
             #submenuChannel: #menuHelp
           )
          )
@@ -1755,25 +1974,28 @@
      #(#Menu
         #(
          #(#MenuItem
+            #activeHelpKey: #fileNewImage
             #label: 'newImage'
+            #itemValue: #doNewImage
+            #translateLabel: true
             #isButton: true
-            #value: #doNewImage
-            #activeHelpKey: #fileNewImage
             #labelImage: #(#ResourceRetriever #Icon #newIcon)
           )
          #(#MenuItem
+            #activeHelpKey: #fileLoadFromClass
             #label: 'loadFromClass'
+            #itemValue: #doLoadFromClass
+            #translateLabel: true
             #isButton: true
-            #value: #doLoadFromClass
-            #activeHelpKey: #fileLoadFromClass
             #labelImage: #(#ResourceRetriever #Icon #loadIcon)
           )
          #(#MenuItem
-            #label: 'saveMethod'
-            #isButton: true
-            #value: #doSaveMethod
             #activeHelpKey: #fileSaveMethod
             #enabled: #imageIsLoaded
+            #label: 'saveMethod'
+            #itemValue: #doSaveMethod
+            #translateLabel: true
+            #isButton: true
             #labelImage: #(#ResourceRetriever #Icon #saveIcon)
           )
          #(#MenuItem
@@ -1783,71 +2005,106 @@
             #label: ''
           )
          #(#MenuItem
-            #label: ''
+            #activeHelpKey: #editUndo
+            #enabled: #valueOfCanUndo
+            #label: 'Undo'
+            #itemValue: #doUndo
+            #translateLabel: true
+            #isButton: true
+            #labelImage: #(#ResourceRetriever #ToolbarIconLibrary #undo16x16Icon2)
           )
+         )
+        nil
+        nil
+      )
+!
+
+modeMenu
+    "This resource specification was automatically generated
+     by the MenuEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the MenuEditor may not be able to read the specification."
+
+    "
+     MenuEditor new openOnClass:ImageEditor andSelector:#modeMenu
+     (Menu new fromLiteralArrayEncoding:(ImageEditor modeMenu)) startUp
+    "
+
+    <resource: #menu>
+
+    ^ 
+     #(#Menu
+        #(
          #(#MenuItem
-            #label: ''
-          )
-         #(#MenuItem
-            #label: 'Point'
             #activeHelpKey: #drawModePoint
             #enabled: #imageIsLoaded
+            #label: 'Point'
+            #translateLabel: true
             #choice: #editMode
             #choiceValue: #point
           )
          #(#MenuItem
-            #label: 'Rect'
             #activeHelpKey: #drawModeBox
             #enabled: #imageIsLoaded
+            #label: 'Rect'
+            #translateLabel: true
             #choice: #editMode
             #choiceValue: #box
           )
          #(#MenuItem
-            #label: 'FillRect'
             #activeHelpKey: #drawModeFilledBox
             #enabled: #imageIsLoaded
+            #label: 'FillRect'
+            #translateLabel: true
             #choice: #editMode
             #choiceValue: #filledBox
           )
          #(#MenuItem
-            #label: 'Fill'
             #activeHelpKey: #drawModeFill
             #enabled: #imageIsLoaded
+            #label: 'Fill'
+            #translateLabel: true
             #choice: #editMode
             #choiceValue: #fill
           )
          #(#MenuItem
-            #label: 'Copy'
             #activeHelpKey: #drawModeCopy
             #enabled: #imageIsLoaded
+            #label: 'Copy'
+            #translateLabel: true
             #choice: #editMode
             #choiceValue: #copy
           )
          #(#MenuItem
-            #label: 'Paste'
             #activeHelpKey: #drawModePaste
             #enabled: #imageIsLoaded
+            #label: 'Paste'
+            #translateLabel: true
             #choice: #editMode
             #choiceValue: #paste
           )
          #(#MenuItem
-            #label: 'Paste Under'
             #activeHelpKey: #drawModePasteUnder
             #enabled: #imageIsLoaded
+            #label: 'Paste Under'
+            #translateLabel: true
             #choice: #editMode
             #choiceValue: #pasteUnder
           )
          #(#MenuItem
-            #label: 'Paste With Mask'
             #activeHelpKey: #drawModePasteWithMask
             #enabled: #imageIsLoaded
+            #label: 'Paste With Mask'
+            #translateLabel: true
             #choice: #editMode
             #choiceValue: #pasteWithMask
           )
          #(#MenuItem
-            #label: 'Special'
             #activeHelpKey: #drawModeSpecial
             #enabled: #imageIsLoaded
+            #label: 'Special'
+            #translateLabel: true
             #choice: #editMode
             #choiceValue: #specialOperation
           )
@@ -1883,6 +2140,119 @@
         nil
         nil
       )
+!
+
+toolsMenuToolbar
+    "This resource specification was automatically generated
+     by the MenuEditor of ST/X."
+
+    "Do not manually edit this!! If it is corrupted,
+     the MenuEditor may not be able to read the specification."
+
+    "
+     MenuEditor new openOnClass:ImageEditor andSelector:#toolsMenuToolbar
+     (Menu new fromLiteralArrayEncoding:(ImageEditor toolsMenuToolbar)) startUp
+    "
+
+    <resource: #menu>
+
+    ^ 
+     #(#Menu
+        #(
+         #(#MenuItem
+            #activeHelpKey: #drawModePoint
+            #enabled: #imageIsLoaded
+            #label: 'Point'
+            #translateLabel: true
+            #isButton: true
+            #labelImage: #(#ResourceRetriever #ImageEditor #pointIcon)
+            #choice: #editMode
+            #choiceValue: #point
+          )
+         #(#MenuItem
+            #activeHelpKey: #drawModeBox
+            #enabled: #imageIsLoaded
+            #label: 'Rect'
+            #translateLabel: true
+            #isButton: true
+            #labelImage: #(#ResourceRetriever #ImageEditor #rectIcon)
+            #choice: #editMode
+            #choiceValue: #box
+          )
+         #(#MenuItem
+            #activeHelpKey: #drawModeFilledBox
+            #enabled: #imageIsLoaded
+            #label: 'FillRect'
+            #translateLabel: true
+            #isButton: true
+            #labelImage: #(#ResourceRetriever #ImageEditor #fillRectIcon)
+            #choice: #editMode
+            #choiceValue: #filledBox
+          )
+         #(#MenuItem
+            #activeHelpKey: #drawModeFill
+            #enabled: #imageIsLoaded
+            #label: 'Fill'
+            #translateLabel: true
+            #isButton: true
+            #labelImage: #(#ResourceRetriever #ImageEditor #fillIcon)
+            #choice: #editMode
+            #choiceValue: #fill
+          )
+         #(#MenuItem
+            #activeHelpKey: #drawModeCopy
+            #enabled: #imageIsLoaded
+            #label: 'Copy'
+            #translateLabel: true
+            #isButton: true
+            #labelImage: #(#ResourceRetriever #ImageEditor #copyIcon)
+            #choice: #editMode
+            #choiceValue: #copy
+          )
+         #(#MenuItem
+            #activeHelpKey: #drawModePaste
+            #enabled: #imageIsLoaded
+            #label: 'Paste'
+            #translateLabel: true
+            #isButton: true
+            #labelImage: #(#ResourceRetriever #ImageEditor #pasteIcon)
+            #choice: #editMode
+            #choiceValue: #paste
+          )
+         #(#MenuItem
+            #activeHelpKey: #drawModePasteUnder
+            #enabled: #imageIsLoaded
+            #label: 'Paste Under'
+            #translateLabel: true
+            #isButton: true
+            #labelImage: #(#ResourceRetriever #ImageEditor #pasteUnderIcon)
+            #choice: #editMode
+            #choiceValue: #pasteUnder
+          )
+         #(#MenuItem
+            #activeHelpKey: #drawModePasteWithMask
+            #enabled: #imageIsLoaded
+            #label: 'Paste With Mask'
+            #translateLabel: true
+            #isButton: true
+            #labelImage: #(#ResourceRetriever #ImageEditor #pasteWithMaskIcon)
+            #choice: #editMode
+            #choiceValue: #pasteWithMask
+          )
+         #(#MenuItem
+            #activeHelpKey: #drawModeSpecial
+            #enabled: #imageIsLoaded
+            #label: 'Special'
+            #translateLabel: true
+            #isButton: true
+            #labelImage: #(#ResourceRetriever #ImageEditor #specialIcon)
+            #choice: #editMode
+            #choiceValue: #specialOperation
+          )
+         )
+        nil
+        nil
+      )
 ! !
 
 !ImageEditor methodsFor:'accessing'!
@@ -3714,14 +4084,13 @@
 doNewImage
     "opens a dialog with choices of size and color map for creating a new image"
 
-    |aspects width height cMap imageClass image szString|
-
+    |aspects width height cMapString cMap imageClass image szString|
 
     aspects  := IdentityDictionary new
         at:#listOfSizes         put: self class listOfDefaultSizes asValue;
         at:#listOfColorMaps     put: self class listOfColorMaps keys asSortedCollection asValue;
-        at:#selectionOfSize     put: self class listOfDefaultSizes first copy asValue;
-        at:#selectionOfColorMap put: self class listOfColorMaps keys asSortedCollection first asValue;
+        at:#selectionOfSize     put: (LastSizeString ? self class listOfDefaultSizes first copy) asValue;
+        at:#selectionOfColorMap put: (LastColormapMode ? self class listOfColorMaps keys asSortedCollection first) asValue;
         yourself.
 
     (self openDialogInterface:#dialogSpecForNewImage withBindings:aspects)
@@ -3730,10 +4099,14 @@
         width  := 128 min: (Integer readFromString: (szString upTo: $x) onError:[24]).
         height := 128 min: (Integer readFromString: (szString copy reverse upTo: $x) reverse onError:[24]).
 
+        cMapString := (aspects at:#selectionOfColorMap) value.
         cMap       := (self class listOfColorMaps at: (colorMapMode value: (aspects at:#selectionOfColorMap) value) value).
         imageClass := Image implementorForDepth: ((cMap size log: 2) asInteger).
         image      := imageClass width: width height: height fromArray: (ByteArray new: width*height).
 
+        LastSizeString := szString.
+        LastColormapMode := cMapString.
+
         (colorMapMode value endsWith: 'mask')
         ifTrue:
         [