# HG changeset patch # User tz # Date 886441500 -3600 # Node ID 93fea26562c89d0b6a1f0e715a6fe8c430fbe1be # Parent 930b3df19305db9a35c98c5b901dc42956c65aa8 help texts added diff -r 930b3df19305 -r 93fea26562c8 MenuEditor.st --- a/MenuEditor.st Mon Feb 02 17:16:37 1998 +0100 +++ b/MenuEditor.st Mon Feb 02 18:45:00 1998 +0100 @@ -120,49 +120,70 @@ ^ super helpSpec addPairsFrom:#( #accessCharaterPos -'The index of the access character position into the textual label (optional).' +'Index of the access character position into the textual label (optional).' + +#addMenuItem +'Adds a new menu item.' + +#addMenuSeparator +'Adds a new menu separator.' + +#addSubMenu +'Adds a new submenu.' + +#addSubMenuLink +'Adds a new linked submenu.' #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.' +'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 value holder 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.' +'This enabled field specifies the name of the aspect (-method or binding) in your application, which returns a value holder 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.' + +#fileLoad +'Opens a dialog for selecting a menu spec.' + +#fileNew +'Creates a new menu spec.' + +#fileSave +'Saves current menu spec and if modified the help spec.' #icon 'Selector which returns an image to be displayed.' #iconAndLabel -'Boolean flag to specify that both image and textual label shall be shown.' +'Specifies that both image and textual label shall be shown.' #indication -'This indication field specifies the name of the aspect (-method or binding) in your application, a value holder 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.' +'Indication field specifying the name of the aspect (-method or binding) in your application, a value holder 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.' #isVisible -'' +'A value holder providing visibility of the menu item.' #label -'The label of the item. If the ''retriever/selector'' is set, and returns an image, the image is used as the displayed label. Dependent on the state of the ''Image & Label'' flag, both the image and the label are shown.' +'Label of the item. If the ''retriever/selector'' is set, and returns an image, the image is used as the displayed label. Dependent on the state of the ''Image & Label'' flag, both the image and the label are shown.' #menuSelector -'The name of the selector under which the generated menu should be installed and is accessable.' +'Name of the selector under which the generated menu should be installed and is accessable.' #nameKey -'An unique identifier of the item (optional)' +'Unique identifier of the item (optional).' #retriever -'The name of the class, which implements the image selector. This selector is specified by ''selector''. If no class is given, the current application should implement the specified image selector.' +'Name of the class implementing the image selector. This selector is specified by ''selector''. If no class is given, the current application should implement the specified image selector.' #seperatorList -'The list of valid separators' +'List of valid separators.' #shortcutKey -'The key to be pressed, to select the menu item from the keyboard (accelerator key).' +'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.' +'A value holder providing the submenu to be opened if item is selected.' #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.' +'An action being 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.' ) ! ! @@ -980,6 +1001,7 @@ #(#MenuItem #'label:' 'New' #'value:' #doNew + #'activeHelpKey:' #fileNew ) #(#MenuItem #'label:' '-' @@ -988,6 +1010,7 @@ #'label:' 'Load...' #'translateLabel:' true #'value:' #doFromClass + #'activeHelpKey:' #fileLoad #'enabled:' #isStandAlone ) #(#MenuItem @@ -996,6 +1019,7 @@ #(#MenuItem #'label:' 'Save' #'value:' #doInstallSpec + #'activeHelpKey:' #fileSave ) #(#MenuItem #'label:' '-' @@ -1021,6 +1045,7 @@ #'label:' 'Exit' #'translateLabel:' true #'value:' #closeRequest + #'activeHelpKey:' #fileExit ) ) nil nil @@ -1071,14 +1096,16 @@ #( #(#MenuItem - #'label:' 'Item' + #'label:' 'Menu Item' #'value:' #doCreateItem - #'labelImage:' #(#ResourceRetriever #MenuEditor #menuItemImage 'Item') + #'activeHelpKey:' #addMenuItem + #'labelImage:' #(#ResourceRetriever #MenuEditor #menuItemImage 'Menu Item') ) #(#MenuItem - #'label:' 'Separator' + #'label:' 'Menu Separator' #'value:' #doCreateSep - #'labelImage:' #(#ResourceRetriever #MenuEditor #menuSeparatorImage 'Separator') + #'activeHelpKey:' #addMenuSeparator + #'labelImage:' #(#ResourceRetriever #MenuEditor #menuSeparatorImage 'Menu Separator') ) #(#MenuItem #'label:' '-' @@ -1086,6 +1113,7 @@ #(#MenuItem #'label:' 'Submenu' #'value:' #doCreateMenu + #'activeHelpKey:' #addSubMenuLink #'labelImage:' #(#ResourceRetriever #MenuEditor #submenuImage 'Submenu') ) #(#MenuItem @@ -1145,18 +1173,21 @@ #(#MenuItem #'label:' 'Cut' #'value:' #doCut + #'activeHelpKey:' #editCut #'enabled:' #hasValidSelection #'shortcutKeyCharacter:' #Cut ) #(#MenuItem #'label:' 'Copy' #'value:' #doCopy + #'activeHelpKey:' #editCopy #'enabled:' #hasValidSelection #'shortcutKeyCharacter:' #Copy ) #(#MenuItem #'label:' 'Paste' #'value:' #doPaste + #'activeHelpKey:' #editPaste #'enabled:' #hasAnySingleSelection #'shortcutKeyCharacter:' #Paste ) @@ -1166,24 +1197,28 @@ #(#MenuItem #'label:' 'Move Up' #'value:' #doStepUp + #'activeHelpKey:' #editMoveUp #'enabled:' #enabledStepOver #'labelImage:' #(#ResourceRetriever #MenuEditor #upIcon 'Move Up') ) #(#MenuItem #'label:' 'Move Down' #'value:' #doStepDown + #'activeHelpKey:' #editMoveDown #'enabled:' #enabledStepOver #'labelImage:' #(#ResourceRetriever #MenuEditor #downIcon 'Move Down') ) #(#MenuItem #'label:' 'Move In' #'value:' #doStepIn + #'activeHelpKey:' #editMoveIn #'enabled:' #enabledStepIn #'labelImage:' #(#ResourceRetriever #MenuEditor #downRightIcon 'Move In') ) #(#MenuItem #'label:' 'Move Out' #'value:' #doStepOut + #'activeHelpKey:' #editMoveOut #'enabled:' #enabledStepOut #'labelImage:' #(#ResourceRetriever #MenuEditor #leftDownIcon 'Move Out') ) @@ -1214,34 +1249,39 @@ #'label:' 'New' #'isButton:' true #'value:' #doNew + #'activeHelpKey:' #fileNew #'labelImage:' #(#ResourceRetriever nil #newIcon) ) #(#MenuItem #'label:' 'Load' #'isButton:' true #'value:' #doFromClass + #'activeHelpKey:' #fileLoad #'labelImage:' #(#ResourceRetriever nil #loadIcon) ) #(#MenuItem #'label:' 'Save' #'isButton:' true #'value:' #doInstallSpec + #'activeHelpKey:' #fileSave #'labelImage:' #(#ResourceRetriever nil #saveIcon) ) #(#MenuItem #'label:' '' ) #(#MenuItem - #'label:' 'Create Item' + #'label:' 'Add Item' #'isButton:' true #'value:' #doCreateItem + #'activeHelpKey:' #addMenuItem #'enabled:' #hasAnySingleSelection #'labelImage:' #(#ResourceRetriever nil #menuItemImage) ) #(#MenuItem - #'label:' 'Create Separator' + #'label:' 'Add Separator' #'isButton:' true #'value:' #doCreateSep + #'activeHelpKey:' #addMenuSeparator #'enabled:' #hasAnySingleSelection #'labelImage:' #(#ResourceRetriever nil #menuSeparatorImage) ) @@ -1249,16 +1289,18 @@ #'label:' '' ) #(#MenuItem - #'label:' 'Create Menu' + #'label:' 'Add Submenu' #'isButton:' true #'value:' #doCreateMenu + #'activeHelpKey:' #addSubMenu #'enabled:' #hasAnySingleSelection #'labelImage:' #(#ResourceRetriever nil #submenuImage) ) #(#MenuItem - #'label:' 'Create Link' + #'label:' 'Add Linked Submenu' #'isButton:' true #'value:' #doCreateLink + #'activeHelpKey:' #addSubMenuLink #'enabled:' #hasAnySingleSelection #'labelImage:' #(#ResourceRetriever nil #linkSubmenuImage) ) @@ -1269,6 +1311,7 @@ #'label:' 'Move Up' #'isButton:' true #'value:' #doStepUp + #'activeHelpKey:' #editMoveUp #'enabled:' #enabledStepOver #'labelImage:' #(#ResourceRetriever nil #upIcon) ) @@ -1276,6 +1319,7 @@ #'label:' 'Move Down' #'isButton:' true #'value:' #doStepDown + #'activeHelpKey:' #editMoveDown #'enabled:' #enabledStepOver #'labelImage:' #(#ResourceRetriever nil #downIcon) ) @@ -1283,6 +1327,7 @@ #'label:' 'Move In' #'isButton:' true #'value:' #doStepIn + #'activeHelpKey:' #editMoveIn #'enabled:' #enabledStepIn #'labelImage:' #(#ResourceRetriever nil #downRightIcon) ) @@ -1290,6 +1335,7 @@ #'label:' 'Move Out' #'isButton:' true #'value:' #doStepOut + #'activeHelpKey:' #editMoveOut #'enabled:' #enabledStepOut #'labelImage:' #(#ResourceRetriever nil #leftDownIcon) ) @@ -2010,7 +2056,13 @@ doFromClass - self loadFromInClassesOf: #Object + self loadFromMessage: + (ResourceSelectionBrowser + request: 'Load Menu From Class' + onSuperclass: nil + andClass: specClass + andSelector: self treeView selectorName + withResourceTypes: #(menu)) ! doInstallSpec @@ -2130,17 +2182,6 @@ self treeView selectedNodeChangeSequenceOrder:-1. isModified := true. -! - -loadFromInClassesOf: aSuperclassOrSymbol - - self loadFromMessage: - (ResourceSelectionBrowser - request: 'Load Menu From Class' - onSuperclass: aSuperclassOrSymbol - andClass: specClass - andSelector: self treeView selectorName - withResourceTypes: #(menu)) ! ! !MenuEditor::Item class methodsFor:'constants'!