--- a/MenuEditor.st Wed Feb 02 11:02:03 2000 +0100
+++ b/MenuEditor.st Wed Feb 02 15:44:00 2000 +0100
@@ -24,7 +24,7 @@
instanceVariableNames:'activeHelpKey enabled label value nameKey indication shortcutKey
accessCharacterPos retriever icon iconAndLabel submenuChannel
startGroup argument translateLabel isButton isVisible choice
- choiceValue auxValue'
+ choiceValue auxValue hideMenuOnActivated'
classVariableNames:''
poolDictionaries:''
privateIn:MenuEditor
@@ -131,6 +131,7 @@
iconAndLabel
icon
isVisible
+ hideMenuOnActivated
auxValue
)
@@ -252,6 +253,9 @@
#fileSaveAs
'Opens a dialog to save the menu spec (and the help spec, if modified).'
+#hideMenuOnActivated
+'Switch on/off hide of the submenu after activation'
+
#imageImageAndLabel
'Toggles display of both image and textual label.'
@@ -365,7 +369,7 @@
#name: 'Basics Item'
#min: #(#Point 10 10)
#max: #(#Point 1160 870)
- #bounds: #(#Rectangle 273 266 540 585)
+ #bounds: #(#Rectangle 12 22 279 341)
)
#component:
#(#SpecCollection
@@ -379,6 +383,10 @@
#adjust: #right
)
#(#InputFieldSpec
+ #attributes:
+ #(#tabable
+ true
+ )
#name: 'nameKeyField'
#layout: #(#LayoutFrame 110 0 16 0 -5 1.0 38 0)
#activeHelpKey: #basicsKey
@@ -403,6 +411,10 @@
#adjust: #right
)
#(#InputFieldSpec
+ #attributes:
+ #(#tabable
+ true
+ )
#name: 'labelField'
#layout: #(#LayoutFrame 110 0 40 0 -5 1.0 62 0)
#activeHelpKey: #basicsLabel
@@ -425,6 +437,10 @@
#adjust: #right
)
#(#InputFieldSpec
+ #attributes:
+ #(#tabable
+ true
+ )
#name: 'valueField'
#layout: #(#LayoutFrame 110 0 79 0 -5 1.0 101 0)
#activeHelpKey: #basicsAction
@@ -448,6 +464,10 @@
#adjust: #right
)
#(#InputFieldSpec
+ #attributes:
+ #(#tabable
+ true
+ )
#name: 'argumentField'
#layout: #(#LayoutFrame 110 0 104 0 -5 1.0 126 0)
#activeHelpKey: #basicsArgument
@@ -471,6 +491,10 @@
#adjust: #right
)
#(#InputFieldSpec
+ #attributes:
+ #(#tabable
+ true
+ )
#name: 'indicationField'
#layout: #(#LayoutFrame 110 0 144 0 -5 1.0 166 0)
#activeHelpKey: #basicsIndication
@@ -497,6 +521,10 @@
#adjust: #right
)
#(#InputFieldSpec
+ #attributes:
+ #(#tabable
+ true
+ )
#name: 'choiceField'
#layout: #(#LayoutFrame 110 0 169 0 -5 1.0 191 0)
#activeHelpKey: #basicsChoice
@@ -523,6 +551,10 @@
#adjust: #right
)
#(#InputFieldSpec
+ #attributes:
+ #(#tabable
+ true
+ )
#name: 'choiceValueField'
#layout: #(#LayoutFrame 110 0 194 0 -5 1.0 216 0)
#activeHelpKey: #basicsChoiceValue
@@ -540,6 +572,10 @@
#acceptOnPointerLeave: false
)
#(#CheckBoxSpec
+ #attributes:
+ #(#tabable
+ true
+ )
#label: 'Translate Label'
#name: 'translateLabelCheckBox'
#layout: #(#Point 20 230)
@@ -548,13 +584,29 @@
#model: #translateLabel
)
#(#CheckBoxSpec
+ #attributes:
+ #(#tabable
+ true
+ )
#label: 'Is Button'
#name: 'isButtonCheckBox'
- #layout: #(#Point 20 259)
+ #layout: #(#Point 20 256)
#activeHelpKey: #basicsIsButton
#tabable: true
#model: #isButton
)
+ #(#CheckBoxSpec
+ #attributes:
+ #(#tabable
+ true
+ )
+ #label: 'Hide Menu after Activation'
+ #name: 'hideMenuOnActivated'
+ #layout: #(#Point 20 281)
+ #activeHelpKey: #hideMenuOnActivated
+ #tabable: true
+ #model: #hideMenuOnActivated
+ )
)
)
@@ -2802,6 +2854,7 @@
label := (self class separatorSlices at:name) last.
].
isVisible := (aspects at:#isVisible) value.
+ hideMenuOnActivated := (aspects at:#hideMenuOnActivated) value.
"Modified: / 14.8.1998 / 15:36:38 / cg"
!
@@ -2826,19 +2879,19 @@
(choice := anItem choice) isSymbol ifFalse:[
choice := nil
].
- choiceValue := anItem choiceValue.
-
- nameKey := anItem nameKey.
- shortcutKey := anItem shortcutKeyCharacter.
- startGroup := anItem startGroup.
- accessCharacterPos := anItem accessCharacterPosition.
- argument := anItem argument.
-
- submenuChannel := anItem submenuChannel.
- translateLabel := anItem translateLabel.
- isButton := anItem isButton.
- isVisible := anItem isVisible.
- auxValue := anItem auxValue.
+ choiceValue := anItem choiceValue.
+ nameKey := anItem nameKey.
+ shortcutKey := anItem shortcutKeyCharacter.
+ startGroup := anItem startGroup.
+ accessCharacterPos := anItem accessCharacterPosition.
+ argument := anItem argument.
+
+ submenuChannel := anItem submenuChannel.
+ translateLabel := anItem translateLabel.
+ isButton := anItem isButton.
+ isVisible := anItem isVisible.
+ hideMenuOnActivated := anItem hideMenuOnActivated.
+ auxValue := anItem auxValue.
(((rtv := anItem adornment) notNil)
and:[(rtv := rtv labelImage) isKindOf:ResourceRetriever])
@@ -2863,6 +2916,7 @@
item := MenuItem labeled:label.
item isVisible:isVisible.
+ item hideMenuOnActivated:hideMenuOnActivated.
self isSeparator ifFalse:[
item activeHelpKey:activeHelpKey.
@@ -2928,6 +2982,7 @@
ifFalse:[argument]).
].
(aspects at:#isVisible) value:isVisible.
+ (aspects at:#hideMenuOnActivated) value:hideMenuOnActivated.
"Modified: / 14.8.1998 / 15:37:29 / cg"
! !