#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Thu, 09 Aug 2018 17:10:26 +0200
changeset 3587 438cc8200c87
parent 3586 87081b50bb22
child 3588 03430e45c0d6
#FEATURE by cg class: MenuEditor changed: #doMakeLinkedMenu class: MenuEditor class removed: #localHelpSpecStrings changed: #aspects #helpSpec class: MenuEditor::Item added: #hasMenuIndicator: class: MenuEditor::RegularMenuItem class changed: #basicsEditSpec
MenuEditor.st
--- a/MenuEditor.st	Thu Aug 09 16:04:50 2018 +0200
+++ b/MenuEditor.st	Thu Aug 09 17:10:26 2018 +0200
@@ -204,35 +204,38 @@
     "get the aspects for the attributes of the menu components"
 
     ^#(
-	rawLabel
-	accessCharacterPosition
-	showBusyCursorWhilePerforming
-	horizontalLayout
-	triggerOnDown
-	font
-	argument
-	submenuChannel
-	keepLinkedMenu
-	enabled
-	itemValue
-	nameKey
-	indication
-	choice
-	choiceValue
-	translateLabel
-	isButton
-	shortcutKeyCharacter
-	startGroup
-	isVisible
-	hideMenuOnActivated
-	auxValue
-	activeHelpKey
-	resourceRetriever
-	sendToOriginator
-	ignoreMnemonicKeys
-	ignoreShortcutKeys
-	isMenuSlice
+        rawLabel
+        accessCharacterPosition
+        showBusyCursorWhilePerforming
+        horizontalLayout
+        triggerOnDown
+        font
+        argument
+        submenuChannel
+        keepLinkedMenu
+        enabled
+        itemValue
+        nameKey
+        indication
+        choice
+        choiceValue
+        translateLabel
+        isButton
+        shortcutKeyCharacter
+        startGroup
+        isVisible
+        hideMenuOnActivated
+        auxValue
+        activeHelpKey
+        resourceRetriever
+        sendToOriginator
+        ignoreMnemonicKeys
+        ignoreShortcutKeys
+        isMenuSlice
+        hasMenuIndicator
      )
+
+    "Modified: / 09-08-2018 / 17:03:56 / Claus Gittinger"
 ! !
 
 !MenuEditor class methodsFor:'defaults'!
@@ -246,23 +249,7 @@
 !MenuEditor class methodsFor:'help specs'!
 
 helpSpec
-    ^super helpSpec addPairsFrom:(self localHelpSpecStrings)
-!
-
-localHelpSpecStrings
-    "This resource specification was automatically generated
-     by the UIHelpTool of ST/X."
-
-    "Do not manually edit this!! If it is corrupted,
-     the UIHelpTool may not be able to read the specification."
-
-    "
-     UIHelpTool openOnClass:MenuEditor
-    "
-
-    <resource: #help>
-
-    ^ #(
+    ^super helpSpec addPairsFrom: #(
 
 #editCut
 'Cut Item'
@@ -393,6 +380,9 @@
 #fileShowMenuSpec
 'Opens a Workspace showing the current menu spec.'
 
+#forceMenuIndicator
+'Always show a menu indicator in horizontal menu (little down-arrow).'
+
 #generateAspectMethods
 'Generates aspect methods for defined aspect selectors of the menu.'
 
@@ -439,7 +429,7 @@
 'In the list below, only matching selectors are shown'
 )
 
-    "Modified: / 03-08-2011 / 10:17:05 / cg"
+    "Modified: / 09-08-2018 / 17:09:02 / Claus Gittinger"
 ! !
 
 !MenuEditor class methodsFor:'image specs'!
@@ -3151,11 +3141,14 @@
     newLinkedMenuItem menuItem label:oldMenuItem menuItem label.
     newLinkedMenuItem menuItem rawLabel:oldMenuItem menuItem rawLabel.
     newLinkedMenuItem menuItem translateLabel:(oldMenuItem menuItem translateLabel).
+    newLinkedMenuItem menuItem hasMenuIndicator:(oldMenuItem menuItem hasMenuIndicator).
 
     index := oldMenuItem parent identityIndexOf:oldMenuItem.
     oldMenuItem parent at:index put:newLinkedMenuItem.
 
     self selectedItem:newLinkedMenuItem.
+
+    "Modified: / 09-08-2018 / 17:09:40 / Claus Gittinger"
 !
 
 doMoveDown
@@ -3814,6 +3807,12 @@
     ^ children
 !
 
+hasMenuIndicator:aBoolean
+    menuItem hasMenuIndicator:aBoolean
+
+    "Created: / 09-08-2018 / 17:03:06 / Claus Gittinger"
+!
+
 menuItem
      "returns self as a MenuItem
     "
@@ -5788,106 +5787,140 @@
 
     <resource: #canvas>
 
-    ^
-     #(FullSpec
-	name: basicsEditSpec
-	window:
-       (WindowSpec
-	  label: 'basicsEditSpec'
-	  name: 'basicsEditSpec'
-	  min: (Point 10 10)
-	  bounds: (Rectangle 0 0 340 340)
-	)
-	component:
-       (SpecCollection
-	  collection: (
-	   (LabelSpec
-	      label: 'Name Key:'
-	      name: 'nameKeyLabel'
-	      layout: (AlignmentOrigin 107 0 25 0 1 0.5)
-	      activeHelpKey: basicsKey
-	      visibilityChannel: notDelayedMenu
-	      translateLabel: true
-	      resizeForLabel: true
-	      adjust: right
-	    )
-	   (InputFieldSpec
-	      name: 'nameKeyField'
-	      layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0)
-	      activeHelpKey: basicsKey
-	      visibilityChannel: notDelayedMenu
-	      tabable: true
-	      model: nameKey
-	      group: inputGroup
-	      type: symbolOrNil
-	      immediateAccept: false
-	      acceptOnLeave: false
-	      acceptOnReturn: true
-	      acceptOnTab: true
-	      acceptOnLostFocus: false
-	      acceptChannel: acceptChannel
-	      modifiedChannel: modifiedChannel
-	      acceptOnPointerLeave: false
-	    )
-	   (LabelSpec
-	      label: 'Label:'
-	      name: 'labelLabel'
-	      layout: (AlignmentOrigin 107 0 51 0 1 0.5)
-	      activeHelpKey: basicsLabel
-	      visibilityChannel: notDelayedMenu
-	      translateLabel: true
-	      resizeForLabel: true
-	      adjust: right
-	    )
-	   (InputFieldSpec
-	      name: 'labelField'
-	      layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0)
-	      activeHelpKey: basicsLabel
-	      visibilityChannel: notDelayedMenu
-	      tabable: true
-	      model: rawLabel
-	      group: inputGroup
-	      immediateAccept: false
-	      acceptOnReturn: true
-	      acceptOnTab: true
-	      acceptOnLostFocus: false
-	      acceptChannel: acceptChannel
-	      modifiedChannel: modifiedChannel
-	      acceptOnPointerLeave: false
-	    )
-	   (CheckBoxSpec
-	      label: 'Translate Label'
-	      name: 'translateLabelCheckBox'
-	      layout: (Point 20 213)
-	      activeHelpKey: basicsTranslateLabel
-	      visibilityChannel: notDelayedMenu
-	      tabable: true
-	      model: translateLabel
-	      translateLabel: true
-	    )
-	   (CheckBoxSpec
-	      label: 'Is Button'
-	      name: 'isButtonCheckBox'
-	      layout: (Point 20 238)
-	      activeHelpKey: basicsIsButton
-	      visibilityChannel: notDelayedMenu
-	      tabable: true
-	      model: isButton
-	      translateLabel: true
-	    )
-	   (CheckBoxSpec
-	      label: 'Horizontal Layout'
-	      name: 'horizontalLayout'
-	      layout: (Point 20 263)
-	      activeHelpKey: horizontalLayout
-	      tabable: true
-	      model: horizontalLayout
-	      translateLabel: true
-	    )
-	   )
-
-	)
-      )
+    ^ 
+    #(FullSpec
+       name: basicsEditSpec
+       uuid: 'd6768576-9be5-11e8-8c6e-b8f6b1108e05'
+       window: 
+      (WindowSpec
+         label: 'basicsEditSpec'
+         name: 'basicsEditSpec'
+         uuid: 'd6768940-9be5-11e8-8c6e-b8f6b1108e05'
+         min: (Point 10 10)
+         bounds: (Rectangle 0 0 340 340)
+       )
+       component: 
+      (SpecCollection
+         collection: (
+          (LabelSpec
+             label: 'Name Key:'
+             name: 'nameKeyLabel'
+             layout: (AlignmentOrigin 107 0 25 0 1 0.5)
+             activeHelpKey: basicsKey
+             uuid: 'd676e930-9be5-11e8-8c6e-b8f6b1108e05'
+             visibilityChannel: notDelayedMenu
+             translateLabel: true
+             resizeForLabel: true
+             adjust: right
+           )
+          (InputFieldSpec
+             name: 'nameKeyField'
+             layout: (LayoutFrame 110 0 15 0 -5 1.0 37 0)
+             activeHelpKey: basicsKey
+             uuid: 'd676ec64-9be5-11e8-8c6e-b8f6b1108e05'
+             visibilityChannel: notDelayedMenu
+             tabable: true
+             model: nameKey
+             group: inputGroup
+             type: symbolOrNil
+             immediateAccept: false
+             acceptOnLeave: false
+             acceptOnReturn: true
+             acceptOnTab: true
+             acceptOnLostFocus: false
+             acceptChannel: acceptChannel
+             modifiedChannel: modifiedChannel
+             acceptOnPointerLeave: false
+           )
+          (LabelSpec
+             label: 'Label:'
+             name: 'labelLabel'
+             layout: (AlignmentOrigin 107 0 51 0 1 0.5)
+             activeHelpKey: basicsLabel
+             uuid: 'd676effc-9be5-11e8-8c6e-b8f6b1108e05'
+             visibilityChannel: notDelayedMenu
+             translateLabel: true
+             resizeForLabel: true
+             adjust: right
+           )
+          (InputFieldSpec
+             name: 'labelField'
+             layout: (LayoutFrame 110 0 40 0 -5 1.0 62 0)
+             activeHelpKey: basicsLabel
+             uuid: 'd676f150-9be5-11e8-8c6e-b8f6b1108e05'
+             visibilityChannel: notDelayedMenu
+             tabable: true
+             model: rawLabel
+             group: inputGroup
+             immediateAccept: false
+             acceptOnReturn: true
+             acceptOnTab: true
+             acceptOnLostFocus: false
+             acceptChannel: acceptChannel
+             modifiedChannel: modifiedChannel
+             acceptOnPointerLeave: false
+           )
+          (VerticalPanelViewSpec
+             name: 'VerticalPanel1'
+             layout: (LayoutFrame 6 0 188 0 340 0 323 0)
+             uuid: 'd676f326-9be5-11e8-8c6e-b8f6b1108e05'
+             horizontalLayout: left
+             verticalLayout: top
+             horizontalSpace: 3
+             verticalSpace: 3
+             component: 
+            (SpecCollection
+               collection: (
+                (CheckBoxSpec
+                   label: 'Translate Label'
+                   name: 'translateLabelCheckBox'
+                   activeHelpKey: basicsTranslateLabel
+                   uuid: 'd676f54c-9be5-11e8-8c6e-b8f6b1108e05'
+                   visibilityChannel: notDelayedMenu
+                   tabable: true
+                   model: translateLabel
+                   translateLabel: true
+                   extent: (Point 149 30)
+                 )
+                (CheckBoxSpec
+                   label: 'Is Button'
+                   name: 'isButtonCheckBox'
+                   activeHelpKey: basicsIsButton
+                   uuid: 'd676f786-9be5-11e8-8c6e-b8f6b1108e05'
+                   visibilityChannel: notDelayedMenu
+                   tabable: true
+                   model: isButton
+                   translateLabel: true
+                   extent: (Point 100 30)
+                 )
+                (CheckBoxSpec
+                   label: 'Horizontal Layout'
+                   name: 'horizontalLayout'
+                   activeHelpKey: horizontalLayout
+                   uuid: 'd676f8d0-9be5-11e8-8c6e-b8f6b1108e05'
+                   tabable: true
+                   model: horizontalLayout
+                   translateLabel: true
+                   extent: (Point 163 30)
+                 )
+                (CheckBoxSpec
+                   label: 'Force Menu Indicator'
+                   name: 'CheckBox1'
+                   activeHelpKey: forceMenuIndicator
+                   uuid: 'd676fa06-9be5-11e8-8c6e-b8f6b1108e05'
+                   tabable: true
+                   model: hasMenuIndicator
+                   translateLabel: true
+                   extent: (Point 163 30)
+                 )
+                )
+              
+             )
+           )
+          )
+        
+       )
+     )
 ! !
 
 !MenuEditor::RegularMenuItem methodsFor:'accessing'!