add new feature:
authorca
Fri, 30 Jan 1998 12:48:43 +0100
changeset 794 432935e754e0
parent 793 cb8c90e2ecf5
child 795 f79766570dd7
add new feature: startGroup
MenuItem.st
--- a/MenuItem.st	Fri Jan 30 00:19:05 1998 +0100
+++ b/MenuItem.st	Fri Jan 30 12:48:43 1998 +0100
@@ -1,6 +1,6 @@
 Object subclass:#MenuItem
 	instanceVariableNames:'activeHelpKey enabled label value nameKey adornment
-		translateLabel isButton'
+		translateLabel isButton startGroup'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Views-Support'
@@ -172,6 +172,24 @@
     ]
 !
 
+startGroup
+    "start group #left #right #center ... or nil
+     at the moment only #right is implemented
+    "
+    ^ startGroup 
+!
+
+startGroup:aSymbol
+    "start group #left #right #center ...
+     at the moment only #right is implemented
+    "
+    (startGroup isNil or:[startGroup == #right]) ifTrue:[
+        startGroup := aSymbol
+    ] ifFalse:[
+        self warn:('not supported group: ', aSymbol printString ).
+    ]
+!
+
 submenu
     adornment notNil ifTrue:[
         ^ adornment submenu
@@ -361,6 +379,11 @@
     nameKey notNil ifTrue:[
         coll add:#nameKey: ; add:(nameKey literalArrayEncoding)
     ].
+
+    startGroup notNil ifTrue:[
+        coll add:#startGroup: ; add:(startGroup literalArrayEncoding)
+    ].
+
     value notNil ifTrue:[
         coll add:#value: ; add:(value literalArrayEncoding).
     ].
@@ -585,5 +608,5 @@
 !MenuItem class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.18 1998-01-09 15:50:18 tz Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.19 1998-01-30 11:48:43 ca Exp $'
 ! !