--- a/MenuItem.st Fri May 03 20:05:22 2002 +0200
+++ b/MenuItem.st Tue May 07 12:07:08 2002 +0200
@@ -25,7 +25,8 @@
Object subclass:#MenuItemAdornment
instanceVariableNames:'color indication submenu submenuChannel shortcutKey labelText
labelImage accessCharacterPosition argument choice choiceValue
- font auxValue showBusyCursorWhilePerforming keepLinkedMenu'
+ font auxValue showBusyCursorWhilePerforming keepLinkedMenu
+ horizontalLayout'
classVariableNames:''
poolDictionaries:''
privateIn:MenuItem
@@ -492,6 +493,25 @@
enabled := something
!
+horizontalLayout
+ "on default submenus has a vertical layout;
+ true, the submenu has a horizontal layout.
+ "
+ adornment notNil ifTrue:[
+ ^ adornment horizontalLayout
+ ].
+ ^ nil
+!
+
+horizontalLayout:aBoolean
+ "on default submenus has a vertical layout;
+ true, the submenu has a horizontal layout.
+ "
+ ((aBoolean == true) or:[adornment notNil]) ifTrue:[
+ self adornment horizontalLayout:aBoolean
+ ].
+!
+
indication
"return the menu items on/off indicator (CheckToggle)
"
@@ -663,6 +683,10 @@
coll add:#accessCharacterPosition: ; add:(something literalArrayEncoding)
].
+ (something := self horizontalLayout) == true ifTrue:[
+ coll add:#horizontalLayout: ; add:(something literalArrayEncoding)
+ ].
+
(something := self showBusyCursorWhilePerforming) == true ifTrue:[
coll add:#showBusyCursorWhilePerforming: ; add:(something literalArrayEncoding)
].
@@ -929,6 +953,20 @@
font := aFont.
!
+horizontalLayout
+ "on default submenus has a vertical layout;
+ true, the submenu has a horizontal layout.
+ "
+ ^ horizontalLayout
+!
+
+horizontalLayout:aBoolean
+ "on default submenus has a vertical layout;
+ true, the submenu has a horizontal layout.
+ "
+ horizontalLayout := aBoolean.
+!
+
indication
"test whether the menu item has an on/off indicator (CheckToggle)
"
@@ -1074,5 +1112,5 @@
!MenuItem class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.45 2001-07-28 14:28:13 martin Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.46 2002-05-07 10:07:08 ca Exp $'
! !