add help text
authorca
Fri, 31 Oct 1997 11:22:40 +0100
changeset 371 7017eaabd9ed
parent 370 c90e57ac04a5
child 372 042713cfe1ed
add help text
MenuEditor.st
--- a/MenuEditor.st	Thu Oct 30 16:51:25 1997 +0100
+++ b/MenuEditor.st	Fri Oct 31 11:22:40 1997 +0100
@@ -108,6 +108,63 @@
     ^ 'accessing menu'
 ! !
 
+!MenuEditor class methodsFor:'help specs'!
+
+helpSpec
+    "return a dictionary filled with helpKey -> helptext associations.
+     These are used by the activeHelp tool."
+
+    "
+    UIHelpTool openOnClass:MenuEditor    
+    "
+
+  ^ super helpSpec addPairsFrom:#(
+
+#accessCharaterPos
+'the index of the access character position into the textual label (optional).'
+
+#argument
+'an argument passed to the value method, if the value selector is a one- or two-arg selector (i.e. ends with '':''). The argument is passed as a string.'
+
+#enbled
+'This enabled field specifies the name of the aspect (-method or binding) in your application, which returns a valueHolder holding a boolean, a block which evaluates to either true or false, a selector which returns either true or false or simply true or false.\ The value, true or false, specifies whether  the respective field can be selected, a value of true, or not, a value of false.'
+
+#icon
+'selector which returns the bitmap to be displayed.'
+
+#iconAndLabel
+'boolean flag to specify that both the bitmap and textual label shall be shown.'
+
+#indication
+'This indication field specifies the name of the aspect (-method or binding) in your application, a valueHolder holding a boolean, a block which evaluates to either true or false, a selector which returns either true or false or simply true or false.\ The value, true or false, specifies whether the shown indicator is switched on or off.'
+
+#label
+'the label of the item. If the ''retriever/icon'' is set, and returns a bitmap image, the bitmap is used as the displayed label. Dependent on the state of the ''Icon & Label'' flag, both the bitmap and the label are shown.'
+
+#menuSelector
+'the name of the selector under which the generated menu should be installed and is accessable.'
+
+#nameKey
+'a unique identifier of the item (optional)'
+
+#retriever
+'the name of the class, which implements the bitmap  selector. This selector is specified by ''icon''. If no class is given, the current application should implement the specified bitmap selector.'
+
+#seperatorList
+'the list of valid separators'
+
+#shortcutKey
+'the key to be pressed, to select the menu item from the keyboard (accelerator key).'
+
+#submenuChannel
+'a value holder, which provides the submenu (Menu) to be opened if the item is selected. Useful if the items submenu is to be changed dynamically.'
+
+#value
+'An action which can be either a block or a selector.\ Depending on the number of arguments to the action, the action will be called with the respective arguments. There can either zero, one or two arguments. The first argument to the action is  the argument derived from the argument field and the second argument the selected item.'
+
+)
+! !
+
 !MenuEditor class methodsFor:'icons'!
 
 iconCreateItem
@@ -829,11 +886,12 @@
           #'window:' 
            #(#WindowSpec
               #'name:' 'unnamed canvas'
-              #'layout:' #(#LayoutFrame 199 0 167 0 465 0 485 0)
+              #'layout:' #(#LayoutFrame 219 0 193 0 485 0 511 0)
               #'label:' 'unnamed canvas'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1160 870)
-              #'bounds:' #(#Rectangle 199 167 466 486)
+              #'bounds:' #(#Rectangle 219 193 486 512)
+              #'usePreferredExtent:' false
           )
           #'component:' 
            #(#SpecCollection
@@ -847,8 +905,9 @@
                     #'resizeForLabel:' true
                 )
                  #(#InputFieldSpec
-                    #'name:' 'itemNameKey'
+                    #'name:' 'nameKeyField'
                     #'layout:' #(#LayoutFrame 91 0 15 0 0 1.0 37 0)
+                    #'activeHelpKey:' #nameKey
                     #'tabable:' true
                     #'model:' #nameKey
                     #'type:' #symbolOrNil
@@ -861,8 +920,9 @@
                     #'resizeForLabel:' true
                 )
                  #(#InputFieldSpec
-                    #'name:' 'itemLabel'
+                    #'name:' 'labelField'
                     #'layout:' #(#LayoutFrame 91 0 42 0 0 1.0 64 0)
+                    #'activeHelpKey:' #label
                     #'tabable:' true
                     #'model:' #label
                 )
@@ -874,27 +934,14 @@
                     #'resizeForLabel:' true
                 )
                  #(#InputFieldSpec
-                    #'name:' 'itemValue'
+                    #'name:' 'valueField'
                     #'layout:' #(#LayoutFrame 91 0 83 0 0 1.0 105 0)
+                    #'activeHelpKey:' #value
                     #'tabable:' true
                     #'model:' #value
                     #'type:' #symbolOrNil
                 )
                  #(#LabelSpec
-                    #'name:' 'indicationLabel'
-                    #'layout:' #(#AlignmentOrigin 87 0 160 0 1 0.5)
-                    #'label:' 'Indication:'
-                    #'adjust:' #right
-                    #'resizeForLabel:' true
-                )
-                 #(#InputFieldSpec
-                    #'name:' 'indicationValue'
-                    #'layout:' #(#LayoutFrame 91 0 149 0 0 1.0 171 0)
-                    #'tabable:' true
-                    #'model:' #indication
-                    #'type:' #symbolOrNil
-                )
-                 #(#LabelSpec
                     #'name:' 'argumentLabel'
                     #'layout:' #(#AlignmentOrigin 87 0 120 0 1 0.5)
                     #'label:' 'Argument:'
@@ -902,12 +949,28 @@
                     #'resizeForLabel:' true
                 )
                  #(#InputFieldSpec
-                    #'name:' 'inputField1'
+                    #'name:' 'argumentField'
                     #'layout:' #(#LayoutFrame 91 0 109 0 0 1.0 131 0)
+                    #'activeHelpKey:' #argument
                     #'tabable:' true
                     #'model:' #argument
                     #'type:' #string
                 )
+                 #(#LabelSpec
+                    #'name:' 'indicationLabel'
+                    #'layout:' #(#AlignmentOrigin 87 0 160 0 1 0.5)
+                    #'label:' 'Indication:'
+                    #'adjust:' #right
+                    #'resizeForLabel:' true
+                )
+                 #(#InputFieldSpec
+                    #'name:' 'indicationField'
+                    #'layout:' #(#LayoutFrame 91 0 149 0 0 1.0 171 0)
+                    #'activeHelpKey:' #indication
+                    #'tabable:' true
+                    #'model:' #indication
+                    #'type:' #symbolOrNil
+                )
               )
           )
       )
@@ -931,10 +994,13 @@
        #(#FullSpec
           #'window:' 
            #(#WindowSpec
-              #'name:' 'BasicsLinkSpec'
-              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
+              #'name:' 'unnamed canvas'
+              #'layout:' #(#LayoutFrame 219 0 193 0 485 0 511 0)
               #'label:' 'unnamed canvas'
-              #'bounds:' #(#Rectangle 0 0 267 319)
+              #'min:' #(#Point 10 10)
+              #'max:' #(#Point 1280 1024)
+              #'bounds:' #(#Rectangle 219 193 486 512)
+              #'usePreferredExtent:' false
           )
           #'component:' 
            #(#SpecCollection
@@ -943,13 +1009,15 @@
                  #(#LabelSpec
                     #'name:' 'nameKeyLabel'
                     #'layout:' #(#AlignmentOrigin 87 0 26 0 1 0.5)
+                    #'activeHelpKey:' #nameKey
                     #'label:' 'NameKey:'
                     #'adjust:' #right
                     #'resizeForLabel:' true
                 )
                  #(#InputFieldSpec
-                    #'name:' 'itemNameKey'
+                    #'name:' 'nameKeyField'
                     #'layout:' #(#LayoutFrame 91 0 15 0 0 1.0 37 0)
+                    #'activeHelpKey:' #nameKey
                     #'tabable:' true
                     #'model:' #nameKey
                     #'type:' #symbolOrNil
@@ -961,14 +1029,16 @@
                     #'resizeForLabel:' true
                 )
                  #(#InputFieldSpec
-                    #'name:' 'itemLabel'
+                    #'name:' 'labelField'
                     #'layout:' #(#LayoutFrame 91 0 42 0 0 1.0 64 0)
+                    #'activeHelpKey:' #label
                     #'tabable:' true
                     #'model:' #label
                 )
                  #(#InputFieldSpec
-                    #'name:' 'submenuChannel'
+                    #'name:' 'menuField'
                     #'layout:' #(#LayoutFrame 91 0 69 0 0 1.0 91 0)
+                    #'activeHelpKey:' #submenuChannel
                     #'tabable:' true
                     #'model:' #submenuChannel
                     #'type:' #symbolOrNil
@@ -982,8 +1052,6 @@
               )
           )
       )
-
-    "Modified: 28.7.1997 / 15:38:29 / cg"
 !
 
 basicsMenuSpec
@@ -1004,10 +1072,13 @@
        #(#FullSpec
           #'window:' 
            #(#WindowSpec
-              #'name:' 'BasicsMenuSpec'
-              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
+              #'name:' 'unnamed canvas'
+              #'layout:' #(#LayoutFrame 219 0 193 0 485 0 511 0)
               #'label:' 'unnamed canvas'
-              #'bounds:' #(#Rectangle 0 0 267 319)
+              #'min:' #(#Point 10 10)
+              #'max:' #(#Point 1280 1024)
+              #'bounds:' #(#Rectangle 219 193 486 512)
+              #'usePreferredExtent:' false
           )
           #'component:' 
            #(#SpecCollection
@@ -1021,8 +1092,9 @@
                     #'resizeForLabel:' true
                 )
                  #(#InputFieldSpec
-                    #'name:' 'itemNameKey'
+                    #'name:' 'nameKeyField'
                     #'layout:' #(#LayoutFrame 91 0 15 0 0 1.0 37 0)
+                    #'activeHelpKey:' #nameKey
                     #'tabable:' true
                     #'model:' #nameKey
                     #'type:' #symbolOrNil
@@ -1035,16 +1107,15 @@
                     #'resizeForLabel:' true
                 )
                  #(#InputFieldSpec
-                    #'name:' 'itemLabel'
+                    #'name:' 'labelField'
                     #'layout:' #(#LayoutFrame 91 0 42 0 0 1.0 64 0)
+                    #'activeHelpKey:' #label
                     #'tabable:' true
                     #'model:' #label
                 )
               )
           )
       )
-
-    "Modified: 28.7.1997 / 15:38:59 / cg"
 !
 
 basicsRootSpec
@@ -1065,10 +1136,13 @@
        #(#FullSpec
           #'window:' 
            #(#WindowSpec
-              #'name:' 'BasicsRootSpec'
-              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
+              #'name:' 'unnamed canvas'
+              #'layout:' #(#LayoutFrame 219 0 193 0 485 0 511 0)
               #'label:' 'unnamed canvas'
-              #'bounds:' #(#Rectangle 0 0 267 319)
+              #'min:' #(#Point 10 10)
+              #'max:' #(#Point 1280 1024)
+              #'bounds:' #(#Rectangle 219 193 486 512)
+              #'usePreferredExtent:' false
           )
           #'component:' 
            #(#SpecCollection
@@ -1082,16 +1156,15 @@
                     #'resizeForLabel:' true
                 )
                  #(#InputFieldSpec
-                    #'name:' 'selector'
+                    #'name:' 'selectorField'
                     #'layout:' #(#LayoutFrame 82 0 42 0 0 1.0 64 0)
+                    #'activeHelpKey:' #menuSelector
                     #'tabable:' true
                     #'model:' #label
                 )
               )
           )
       )
-
-    "Modified: 28.7.1997 / 15:39:17 / cg"
 !
 
 basicsSeparatorSpec
@@ -1113,11 +1186,12 @@
           #'window:' 
            #(#WindowSpec
               #'name:' 'unnamed canvas'
-              #'layout:' #(#LayoutFrame 634 0 529 0 900 0 847 0)
+              #'layout:' #(#LayoutFrame 219 0 193 0 485 0 511 0)
               #'label:' 'unnamed canvas'
               #'min:' #(#Point 10 10)
               #'max:' #(#Point 1160 870)
-              #'bounds:' #(#Rectangle 634 529 901 848)
+              #'bounds:' #(#Rectangle 219 193 486 512)
+              #'usePreferredExtent:' false
           )
           #'component:' 
            #(#SpecCollection
@@ -1133,6 +1207,7 @@
                  #(#ComboListSpec
                     #'name:' 'seperatorList'
                     #'layout:' #(#LayoutFrame 132 0 11 0 0 1.0 33 0)
+                    #'activeHelpKey:' #seperatorList
                     #'model:' #seperatorSelection
                     #'useIndex:' true
                 )
@@ -1159,16 +1234,34 @@
        #(#FullSpec
           #'window:' 
            #(#WindowSpec
-              #'name:' 'DetailsEditSpec'
-              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
+              #'name:' 'unnamed canvas'
+              #'layout:' #(#LayoutFrame 219 0 193 0 477 0 480 0)
               #'label:' 'unnamed canvas'
-              #'bounds:' #(#Rectangle 0 0 259 288)
+              #'min:' #(#Point 10 10)
+              #'max:' #(#Point 1280 1024)
+              #'bounds:' #(#Rectangle 219 193 478 481)
+              #'usePreferredExtent:' false
           )
           #'component:' 
            #(#SpecCollection
               #'collection:' 
                #(
                  #(#LabelSpec
+                    #'name:' 'shortcutKeyLabel'
+                    #'layout:' #(#AlignmentOrigin 87 0 33 0 1 0.5)
+                    #'label:' 'Accelerator:'
+                    #'adjust:' #right
+                    #'resizeForLabel:' true
+                )
+                 #(#InputFieldSpec
+                    #'name:' 'shortcutKeyField'
+                    #'layout:' #(#LayoutFrame 91 0 22 0 0 1.0 44 0)
+                    #'activeHelpKey:' #shortcutKey
+                    #'tabable:' true
+                    #'model:' #shortcutKey
+                    #'type:' #symbolOrNil
+                )
+                 #(#LabelSpec
                     #'name:' 'enabledLabel'
                     #'layout:' #(#AlignmentOrigin 87 0 59 0 1 0.5)
                     #'label:' 'Enabled:'
@@ -1176,36 +1269,24 @@
                     #'resizeForLabel:' true
                 )
                  #(#InputFieldSpec
-                    #'name:' 'enabled'
+                    #'name:' 'enabledField'
                     #'layout:' #(#LayoutFrame 91 0 48 0 0 1.0 70 0)
+                    #'activeHelpKey:' #enbled
                     #'tabable:' true
                     #'model:' #enabled
                     #'type:' #symbolOrNil
                 )
                  #(#LabelSpec
-                    #'name:' 'shortcutKeyLabel'
-                    #'layout:' #(#AlignmentOrigin 87 0 33 0 1 0.5)
-                    #'label:' 'Accelerator:'
-                    #'adjust:' #right
-                    #'resizeForLabel:' true
-                )
-                 #(#InputFieldSpec
-                    #'name:' 'accelerator'
-                    #'layout:' #(#LayoutFrame 91 0 22 0 0 1.0 44 0)
-                    #'tabable:' true
-                    #'model:' #shortcutKey
-                    #'type:' #symbolOrNil
-                )
-                 #(#LabelSpec
-                    #'name:' 'accessCharPosLabel'
+                    #'name:' 'accessCharLabel'
                     #'layout:' #(#AlignmentOrigin 211 0 127 0 1 0.5)
                     #'label:' 'Access Character Position:'
                     #'adjust:' #right
                     #'resizeForLabel:' true
                 )
                  #(#InputFieldSpec
-                    #'name:' 'accessCharaterPos'
+                    #'name:' 'accessCharField'
                     #'layout:' #(#LayoutFrame 215 0 116 0 0 1.0 138 0)
+                    #'activeHelpKey:' #accessCharaterPos
                     #'tabable:' true
                     #'model:' #accessCharaterPos
                     #'type:' #numberOrNil
@@ -1213,8 +1294,6 @@
               )
           )
       )
-
-    "Modified: 28.7.1997 / 15:43:19 / cg"
 !
 
 miscEditSpec
@@ -1235,10 +1314,13 @@
        #(#FullSpec
           #'window:' 
            #(#WindowSpec
-              #'name:' 'MiscEditSpec'
-              #'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
+              #'name:' 'unnamed canvas'
+              #'layout:' #(#LayoutFrame 219 0 193 0 463 0 334 0)
               #'label:' 'unnamed canvas'
-              #'bounds:' #(#Rectangle 0 0 245 142)
+              #'min:' #(#Point 10 10)
+              #'max:' #(#Point 1280 1024)
+              #'bounds:' #(#Rectangle 219 193 464 335)
+              #'usePreferredExtent:' false
           )
           #'component:' 
            #(#SpecCollection
@@ -1252,8 +1334,9 @@
                     #'resizeForLabel:' true
                 )
                  #(#InputFieldSpec
-                    #'name:' 'retriever'
+                    #'name:' 'retrieverField'
                     #'layout:' #(#LayoutFrame 81 0 15 0 0 1.0 37 0)
+                    #'activeHelpKey:' #retriever
                     #'tabable:' true
                     #'model:' #retriever
                     #'type:' #symbolOrNil
@@ -1266,8 +1349,9 @@
                     #'resizeForLabel:' true
                 )
                  #(#InputFieldSpec
-                    #'name:' 'icon'
+                    #'name:' 'iconField'
                     #'layout:' #(#LayoutFrame 81 0 39 0 0 1.0 61 0)
+                    #'activeHelpKey:' #icon
                     #'tabable:' true
                     #'model:' #icon
                     #'type:' #symbolOrNil
@@ -1275,6 +1359,7 @@
                  #(#CheckBoxSpec
                     #'name:' 'iconAndLabel'
                     #'layout:' #(#LayoutOrigin 15 0 85 0)
+                    #'activeHelpKey:' #iconAndLabel
                     #'tabable:' true
                     #'model:' #iconAndLabel
                     #'label:' 'Icon & Label'
@@ -1282,8 +1367,6 @@
               )
           )
       )
-
-    "Modified: 28.7.1997 / 15:44:12 / cg"
 ! !
 
 !MenuEditor class methodsFor:'startup'!
@@ -2193,6 +2276,8 @@
 images
     "returns an IdentityDictionary containing a list of images and keys used
     "
+    <resource: #fileImage>
+
     |image|
 
     Images notNil ifTrue:[