--- a/MenuItem.st Tue Feb 01 14:54:41 2000 +0100
+++ b/MenuItem.st Wed Feb 02 15:45:09 2000 +0100
@@ -13,7 +13,7 @@
Object subclass:#MenuItem
instanceVariableNames:'activeHelpKey enabled label value nameKey adornment
- translateLabel isButton startGroup isVisible'
+ translateLabel isButton startGroup isVisible hideMenuOnActivated'
classVariableNames:''
poolDictionaries:''
category:'Views-Support'
@@ -167,6 +167,20 @@
self adornment auxValue:something
!
+hideMenuOnActivated
+ "hide the menu when the item was activated; the default is true
+ "
+ ^ hideMenuOnActivated ? true
+
+!
+
+hideMenuOnActivated:aBool
+ "hide the menu when the item was activated; the default is true
+ "
+ hideMenuOnActivated := aBool ? true
+
+!
+
isVisible
^ isVisible ? true
!
@@ -500,10 +514,13 @@
coll add:#label: ; add:(label literalArrayEncoding)
].
self translateLabel ifTrue:[
- coll add:#translateLabel: ; add:(translateLabel literalArrayEncoding)
+ coll add:#translateLabel: ; add:true
].
self isButton ifTrue:[
- coll add:#isButton:; add:(isButton literalArrayEncoding)
+ coll add:#isButton:; add:true
+ ].
+ hideMenuOnActivated == false ifTrue:[
+ coll add:#hideMenuOnActivated: ; add:false
].
nameKey notNil ifTrue:[
coll add:#nameKey: ; add:(nameKey literalArrayEncoding)
@@ -513,7 +530,6 @@
coll add:#isVisible: ; add:(isVisible literalArrayEncoding)
]
].
-
startGroup notNil ifTrue:[
coll add:#startGroup: ; add:(startGroup literalArrayEncoding)
].
@@ -858,5 +874,5 @@
!MenuItem class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.32 2000-01-17 11:17:35 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.33 2000-02-02 14:45:09 ca Exp $'
! !