toolbar icons & help texts
authorClaus Gittinger <cg@exept.de>
Mon, 29 Mar 2004 15:47:38 +0200
changeset 1820 3d834d5e5bb4
parent 1819 cbf2079fd723
child 1821 8676bf0d2b6c
toolbar icons & help texts
ImageEditor.st
MenuEditor.st
UIPainter.st
--- a/ImageEditor.st	Fri Mar 26 12:08:53 2004 +0100
+++ b/ImageEditor.st	Mon Mar 29 15:47:38 2004 +0200
@@ -1319,211 +1319,211 @@
     <resource: #canvas>
 
     ^ 
-     #(#FullSpec
-        #name: #windowSpec
-        #window: 
-       #(#WindowSpec
-          #label: 'Image Editor'
-          #name: 'Image Editor'
-          #min: #(#Point 400 320)
-          #bounds: #(#Rectangle 16 46 466 396)
-          #menu: #menu
+     #(FullSpec
+        name: windowSpec
+        window: 
+       (WindowSpec
+          label: 'Image Editor'
+          name: 'Image Editor'
+          min: (Point 400 320)
+          bounds: (Rectangle 0 0 450 350)
+          menu: menu
         )
-        #component: 
-       #(#SpecCollection
-          #collection: #(
-           #(#MenuPanelSpec
-              #name: 'menuToolbarView'
-              #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 32 0)
-              #menu: #menuToolbar
-              #style: #(#FontDescription #helvetica #medium #roman 10)
-              #showSeparatingLines: true
+        component: 
+       (SpecCollection
+          collection: (
+           (MenuPanelSpec
+              name: 'menuToolbarView'
+              layout: (LayoutFrame 0 0.0 0 0 0 1.0 32 0)
+              style: (FontDescription helvetica medium roman 10)
+              menu: menuToolbar
+              showSeparatingLines: true
             )
-           #(#VariableHorizontalPanelSpec
-              #name: 'horizontalPanel'
-              #layout: #(#LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0)
-              #snapMode: #both
-              #barLevel: 1
-              #component: 
-             #(#SpecCollection
-                #collection: #(
-                 #(#ViewSpec
-                    #name: 'leftView'
-                    #level: 1
-                    #component: 
-                   #(#SpecCollection
-                      #collection: #(
-                       #(#VariableVerticalPanelSpec
-                          #name: 'verticalPanel'
-                          #layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
-                          #level: 0
-                          #snapMode: #both
-                          #component: 
-                         #(#SpecCollection
-                            #collection: #(
-                             #(#ViewSpec
-                                #name: 'View1'
-                                #component: 
-                               #(#SpecCollection
-                                  #collection: #(
-                                   #(#MenuPanelSpec
-                                      #name: 'MouseButtonColorToolBar'
-                                      #layout: #(#LayoutFrame 0 0.0 0 0 0 1.0 24 0)
-                                      #level: 0
-                                      #menu: #menuMouseButtonColors
+           (VariableHorizontalPanelSpec
+              name: 'horizontalPanel'
+              layout: (LayoutFrame 0 0.0 34 0.0 0 1.0 -26 1.0)
+              snapMode: both
+              barLevel: 1
+              component: 
+             (SpecCollection
+                collection: (
+                 (ViewSpec
+                    name: 'leftView'
+                    level: 1
+                    component: 
+                   (SpecCollection
+                      collection: (
+                       (VariableVerticalPanelSpec
+                          name: 'verticalPanel'
+                          layout: (LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
+                          level: 0
+                          snapMode: both
+                          component: 
+                         (SpecCollection
+                            collection: (
+                             (ViewSpec
+                                name: 'View1'
+                                component: 
+                               (SpecCollection
+                                  collection: (
+                                   (MenuPanelSpec
+                                      name: 'MouseButtonColorToolBar'
+                                      layout: (LayoutFrame 0 0.0 0 0 0 1.0 24 0)
+                                      level: 0
+                                      menu: menuMouseButtonColors
                                     )
-                                   #(#DataSetSpec
-                                      #name: 'colorDataSetView'
-                                      #layout: #(#LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0)
-                                      #activeHelpKey: #colorMapTable
-                                      #model: #selectionOfColor
-                                      #menu: #colorMapMenu
-                                      #style: #(#FontDescription #helvetica #medium #roman 10)
-                                      #hasHorizontalScrollBar: true
-                                      #hasVerticalScrollBar: true
-                                      #miniScrollerHorizontal: true
-                                      #miniScrollerVertical: true
-                                      #dataList: #listOfColors
-                                      #has3Dsepartors: true
-                                      #has3Dseparators: true
-                                      #verticalSpacing: 1
-                                      #columns: 
-                                     #(#OrderedCollection
+                                   (DataSetSpec
+                                      name: 'colorDataSetView'
+                                      layout: (LayoutFrame 0 0.0 26 0.0 0 1.0 0 1.0)
+                                      activeHelpKey: colorMapTable
+                                      style: (FontDescription helvetica medium roman 10)
+                                      model: selectionOfColor
+                                      menu: colorMapMenu
+                                      hasHorizontalScrollBar: true
+                                      hasVerticalScrollBar: true
+                                      miniScrollerHorizontal: true
+                                      miniScrollerVertical: true
+                                      dataList: listOfColors
+                                      has3Dsepartors: true
+                                      has3Dseparators: true
+                                      verticalSpacing: 1
+                                      columns: 
+                                     (OrderedCollection
                                         
-                                       #(#DataSetColumnSpec
-                                          #labelButtonType: #Button
-                                          #rendererType: #rowSelector
-                                          #backgroundSelector: #theColorItSelf:
+                                       (DataSetColumnSpec
+                                          labelButtonType: Button
+                                          rendererType: rowSelector
+                                          backgroundSelector: theColorItSelf:
                                         ) 
-                                       #(#DataSetColumnSpec
-                                          #label: 'R'
-                                          #labelAlignment: #left
-                                          #labelButtonType: #Button
-                                          #columnAlignment: #right
-                                          #editorType: #InputField
-                                          #type: #number
-                                          #model: #redFromColor:
-                                          #writeSelector: #redAtColor:put:
-                                          #selectSelector: #canSelectRedInColor:
+                                       (DataSetColumnSpec
+                                          label: 'R'
+                                          labelAlignment: left
+                                          labelButtonType: Button
+                                          columnAlignment: right
+                                          editorType: InputField
+                                          type: number
+                                          model: redFromColor:
+                                          writeSelector: redAtColor:put:
+                                          selectSelector: canSelectRedInColor:
                                         )
                                         
-                                       #(#DataSetColumnSpec
-                                          #label: 'G'
-                                          #labelAlignment: #left
-                                          #labelButtonType: #Button
-                                          #columnAlignment: #right
-                                          #editorType: #InputField
-                                          #type: #number
-                                          #model: #greenFromColor:
-                                          #writeSelector: #greenAtColor:put:
-                                          #selectSelector: #canSelectGreenInColor:
+                                       (DataSetColumnSpec
+                                          label: 'G'
+                                          labelAlignment: left
+                                          labelButtonType: Button
+                                          columnAlignment: right
+                                          editorType: InputField
+                                          type: number
+                                          model: greenFromColor:
+                                          writeSelector: greenAtColor:put:
+                                          selectSelector: canSelectGreenInColor:
                                         ) 
-                                       #(#DataSetColumnSpec
-                                          #label: 'B'
-                                          #labelAlignment: #left
-                                          #labelButtonType: #Button
-                                          #columnAlignment: #right
-                                          #editorType: #InputField
-                                          #type: #number
-                                          #model: #blueFromColor:
-                                          #writeSelector: #blueAtColor:put:
-                                          #selectSelector: #canSelectBlueInColor:
+                                       (DataSetColumnSpec
+                                          label: 'B'
+                                          labelAlignment: left
+                                          labelButtonType: Button
+                                          columnAlignment: right
+                                          editorType: InputField
+                                          type: number
+                                          model: blueFromColor:
+                                          writeSelector: blueAtColor:put:
+                                          selectSelector: canSelectBlueInColor:
                                         )
                                       )
-                                      #columnAdaptor: #colorColumnAdaptor
+                                      columnAdaptor: colorColumnAdaptor
                                     )
                                    )
                                  
                                 )
                               )
-                             #(#ArbitraryComponentSpec
-                                #name: 'imagePreView'
-                                #activeHelpKey: #previewView
-                                #menu: #previewMenu
-                                #hasHorizontalScrollBar: true
-                                #hasVerticalScrollBar: true
-                                #miniScrollerHorizontal: true
-                                #miniScrollerVertical: true
-                                #hasBorder: false
-                                #component: #ImageView
+                             (ArbitraryComponentSpec
+                                name: 'imagePreView'
+                                activeHelpKey: previewView
+                                menu: previewMenu
+                                hasHorizontalScrollBar: true
+                                hasVerticalScrollBar: true
+                                miniScrollerHorizontal: true
+                                miniScrollerVertical: true
+                                hasBorder: false
+                                component: ImageView
                               )
                              )
                            
                           )
-                          #handles: #(#Any 0.5 1.0)
+                          handles: (Any 0.5 1.0)
                         )
                        )
                      
                     )
                   )
-                 #(#ViewSpec
-                    #name: 'rightView'
-                    #component: 
-                   #(#SpecCollection
-                      #collection: #(
-                       #(#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
+                 (ViewSpec
+                    name: 'rightView'
+                    component: 
+                   (SpecCollection
+                      collection: (
+                       (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
                         )
-                       #(#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
+                       (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
+                             (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: '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
+                             (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
+                             (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
                               )
                              )
                            
@@ -1536,13 +1536,13 @@
                  )
                
               )
-              #handles: #(#Any 0.3 1.0)
+              handles: (Any 0.3 1.0)
             )
-           #(#UISubSpecification
-              #name: 'infoBarSubSpec'
-              #layout: #(#LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
-              #majorKey: #ToolApplicationModel
-              #minorKey: #windowSpecForInfoBar
+           (UISubSpecification
+              name: 'infoBarSubSpec'
+              layout: (LayoutFrame 0 0.0 -24 1 0 1.0 0 1.0)
+              majorKey: ToolApplicationModel
+              minorKey: windowSpecForInfoBar
             )
            )
          
@@ -2201,57 +2201,69 @@
     <resource: #menu>
 
     ^ 
-     #(#Menu
-        #(
-         #(#MenuItem
-            #activeHelpKey: #fileNewImage
-            #label: 'newImage'
-            #itemValue: #doNewImage
-            #translateLabel: true
-            #isButton: true
-            #labelImage: #(#ResourceRetriever #ToolbarIconLibrary #newImage24x24Icon)
+     #(Menu
+        (
+         (MenuItem
+            activeHelpKey: fileNewImage
+            label: 'newImage'
+            itemValue: doNewImage
+            translateLabel: true
+            isButton: true
+            labelImage: (ResourceRetriever ToolbarIconLibrary newImage24x24Icon)
           )
-         #(#MenuItem
-            #activeHelpKey: #fileLoadFromClass
-            #label: 'loadFromClass'
-            #itemValue: #doLoadFromClass
-            #translateLabel: true
-            #isButton: true
-            #labelImage: #(#ResourceRetriever #ToolbarIconLibrary #load22x22Icon)
+         (MenuItem
+            activeHelpKey: fileLoadFromFile
+            label: 'loadFromFile'
+            itemValue: doLoadFromFile
+            translateLabel: true
+            isButton: true
+            labelImage: (ResourceRetriever ToolbarIconLibrary load22x22Icon)
+          )
+         (MenuItem
+            activeHelpKey: fileSaveAs
+            enabled: imageIsLoaded
+            label: 'saveAsFile'
+            itemValue: doSaveImageFileAs
+            translateLabel: true
+            isButton: true
+            labelImage: (ResourceRetriever ToolbarIconLibrary save22x22Icon)
+          )
+         (MenuItem
+            label: ''
           )
-         #(#MenuItem
-            #activeHelpKey: #fileSaveMethodAs
-            #enabled: #imageIsLoaded
-            #label: 'saveAsMethod'
-            #itemValue: #doSaveMethodAs
-            #translateLabel: true
-            #isButton: true
-            #labelImage: #(#ResourceRetriever #ToolbarIconLibrary #saveAsMethod22x22Icon)
+         (MenuItem
+            activeHelpKey: fileLoadFromClass
+            label: 'loadFromClass'
+            itemValue: doLoadFromClass
+            translateLabel: true
+            isButton: true
+            submenuChannel: menuHistory
+            labelImage: (ResourceRetriever ToolbarIconLibrary loadFromMethod22x22Icon)
+            keepLinkedMenu: true
           )
-         #(#MenuItem
-            #activeHelpKey: #fileSaveAs
-            #enabled: #imageIsLoaded
-            #label: 'saveAsFile'
-            #itemValue: #doSaveImageFileAs
-            #translateLabel: true
-            #isButton: true
-            #labelImage: #(#ResourceRetriever #ToolbarIconLibrary #save22x22Icon)
+         (MenuItem
+            activeHelpKey: fileSaveMethodAs
+            enabled: imageIsLoaded
+            label: 'saveAsMethod'
+            itemValue: doSaveMethodAs
+            translateLabel: true
+            isButton: true
+            labelImage: (ResourceRetriever ToolbarIconLibrary saveAsMethod22x22Icon)
+          )
+         (MenuItem
+            label: ''
           )
-
-         #(#MenuItem
-            #label: ''
-          )
-         #(#MenuItem
-            #label: ''
+         (MenuItem
+            label: ''
           )
-         #(#MenuItem
-            #activeHelpKey: #editUndo
-            #enabled: #valueOfCanUndo
-            #label: 'Undo'
-            #itemValue: #doUndo
-            #translateLabel: true
-            #isButton: true
-            #labelImage: #(#ResourceRetriever #ToolbarIconLibrary #undo16x16Icon2)
+         (MenuItem
+            activeHelpKey: editUndo
+            enabled: valueOfCanUndo
+            label: 'Undo'
+            itemValue: doUndo
+            translateLabel: true
+            isButton: true
+            labelImage: (ResourceRetriever ToolbarIconLibrary undo16x16Icon2)
           )
          )
         nil
--- a/MenuEditor.st	Fri Mar 26 12:08:53 2004 +0100
+++ b/MenuEditor.st	Mon Mar 29 15:47:38 2004 +0200
@@ -418,11 +418,20 @@
 
     ^ #(
 
+#editCut
+'Cut Item'
+
+#editCopy
+'Copy Item'
+
+#editPaste
+'Paste Item'
+
 #fileLoad
-'Load Spec from Class'
+'Load Spec from Method'
 
 #fileSave
-'Save Spec'
+'Save Spec As Method'
 
 #fileSaveAs
 'Save Spec As'
@@ -1118,7 +1127,9 @@
             translateLabel: true
             isButton: true
             submenuChannel: menuHistory
-            labelImage: (ResourceRetriever ToolbarIconLibrary load22x22Icon)
+            labelImage: (ResourceRetriever ToolbarIconLibrary loadFromMethod22x22Icon)
+            keepLinkedMenu: true
+            horizontalLayout: true
           )
          (MenuItem
             activeHelpKey: fileSave
@@ -1138,7 +1149,7 @@
             itemValue: doCut
             translateLabel: true
             isButton: true
-            labelImage: (ResourceRetriever ToolbarIconLibrary cut22x22Icon)
+            labelImage: (ResourceRetriever ToolbarIconLibrary cutMenuItem22x22Icon)
           )
          (MenuItem
             activeHelpKey: editCopy
@@ -1147,7 +1158,7 @@
             itemValue: doCopy
             translateLabel: true
             isButton: true
-            labelImage: (ResourceRetriever ToolbarIconLibrary copy22x22Icon)
+            labelImage: (ResourceRetriever ToolbarIconLibrary copyMenuItem22x22Icon)
           )
          (MenuItem
             activeHelpKey: editPaste
@@ -1156,7 +1167,7 @@
             itemValue: doPaste
             translateLabel: true
             isButton: true
-            labelImage: (ResourceRetriever ToolbarIconLibrary paste22x22Icon)
+            labelImage: (ResourceRetriever ToolbarIconLibrary pasteMenuItem22x22Icon)
           )
          (MenuItem
             label: ''
@@ -1188,6 +1199,8 @@
             isButton: true
             submenuChannel: standardMenus
             labelImage: (ResourceRetriever #'MenuEditor::Item' iconMenu)
+            keepLinkedMenu: true
+            horizontalLayout: true
           )
          (MenuItem
             activeHelpKey: addSubMenuLink
--- a/UIPainter.st	Fri Mar 26 12:08:53 2004 +0100
+++ b/UIPainter.st	Mon Mar 29 15:47:38 2004 +0200
@@ -146,6 +146,19 @@
 #changePositionUp
 'Move Towards Top'
 
+#editCopy
+'Copy Widget'
+
+#editCut
+'Cut Widget'
+
+#editPaste
+'Paste Widget'
+
+#editDelete
+'Delete Widget'
+
+
 #editDimensionCopyExtent
 'Copy Extent'
 
@@ -183,7 +196,7 @@
 'Browse Applications Aspect Methods'
 
 #fileLoad
-'Load Spec'
+'Load Spec from Method'
 
 #fileLoadSubspec
 'Load SubSpec'
@@ -195,10 +208,10 @@
 'Pick Spec'
 
 #fileSave
-'Save Spec'
+'Save Spec as Method'
 
 #fileSaveAs
-'Save Spec'
+'Save Spec as'
 
 #fileShowWindowSpec
 'View Spec'
@@ -1742,7 +1755,7 @@
             itemValue: doLoad
             translateLabel: true
             isButton: true
-            labelImage: (ResourceRetriever ToolbarIconLibrary load22x22Icon)
+            labelImage: (ResourceRetriever ToolbarIconLibrary loadFromMethod22x22Icon)
           )
          (MenuItem
             activeHelpKey: fileSave
@@ -1789,6 +1802,7 @@
             itemValue: deleteTotalSelection
             translateLabel: true
             isButton: true
+            isVisible: false
             labelImage: (ResourceRetriever ToolbarIconLibrary delete22x22Icon)
           )
          (MenuItem
@@ -1832,6 +1846,7 @@
           )
          (MenuItem
             label: ''
+            startGroup: right
           )
          (MenuItem
             activeHelpKey: settingsCanvas