--- a/MenuItem.st Mon Oct 16 13:02:50 2006 +0200
+++ b/MenuItem.st Mon Oct 16 13:11:20 2006 +0200
@@ -92,6 +92,27 @@
^ self label:'-'
! !
+!MenuItem class methodsFor:'constants'!
+
+supportedStartGroupValues
+ "start group #left #right #conditionalRight ...
+ At the moment only #left/nil, #right/#conditionalRight are implemented.
+
+ The meanings are:
+ nil - default under control of the menu
+ #left - left align
+ #right - place at the right far end
+ #conditionalRight - controlled by a styleSheet variable;
+ like #right under all non-win32 systems,
+ ignored on win32.
+ Use with help-menu, which should be at the far right on some
+ viewStyles, but not under win32."
+
+ ^ #(nil #left #right #conditionalRight)
+
+ "Created: / 16-10-2006 / 13:09:27 / cg"
+! !
+
!MenuItem methodsFor:'Compatibility-ST80'!
isEnabled:aBoolean
@@ -563,24 +584,36 @@
!
startGroup
- "start group #left #right #center ... or nil
- at the moment only #right is implemented
- "
+ "start group #left #right #conditionalRight ... or nil
+ at the moment only #right and #conditionalRight are implemented"
+
^ startGroup ? #left
+
+ "Modified: / 16-10-2006 / 13:05:52 / cg"
!
startGroup:aSymbol
- "start group #left #right #center ...
- at the moment only #right is implemented
+ "start group #left #right #conditionalRight ...
+ at the moment only #right and #conditionalRight are implemented.
+ The meanings are:
+ nil - default under control of the menu
+ #left - left align
+ #right - place at the right far end
+ #conditionalRight - controlled by a styleSheet variable;
+ like #right under all non-win32 systems,
+ ignored on win32.
+ Use with help-menu, which should be at the far right on some
+ viewStyles, but not under win32.
"
- (#(nil #left #right #conditionalRight) includes:aSymbol) ifTrue:[
+
+ (self class supportedStartGroupValues includes:aSymbol) ifTrue:[
startGroup := aSymbol
] ifFalse:[
self warn:('unsupported group: ', aSymbol printString ).
startGroup := #left
]
- "Modified: / 16-10-2006 / 13:01:39 / cg"
+ "Modified: / 16-10-2006 / 13:09:45 / cg"
! !
!MenuItem methodsFor:'accessing-resource'!
@@ -874,5 +907,5 @@
!MenuItem class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.78 2006-10-16 11:02:50 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.79 2006-10-16 11:11:20 cg Exp $'
! !