--- a/MenuItem.st Fri Feb 17 13:06:37 2006 +0100
+++ b/MenuItem.st Thu Feb 23 22:03:19 2006 +0100
@@ -121,14 +121,14 @@
!MenuItem methodsFor:'accessing'!
accessCharacterPosition
- "get the index of the access character in the label text or string, or nil if none
- "
+ "get the index of the access character in the label text or string, or nil if none"
+
^ accessCharacterPosition
!
-accessCharacterPosition:index
- "set the index of the access character in the label text or string, or nil if none
- "
+accessCharacterPosition:index
+ "set the index of the access character in the label text or string, or nil if none"
+
accessCharacterPosition := index
!
@@ -141,24 +141,23 @@
!
argument
- "get argument given to the value (selector)
- "
+ "get argument given to the value (selector)"
+
^ argument
!
-argument:something
- "set argument given to the value (selector)
- "
+argument:something
+ "set argument given to the value (selector)"
+
|arg|
(arg := something) notNil ifTrue:[
arg isString ifTrue:[
- (arg size == 0 or:[(arg indexOfNonSeparatorStartingAt:1) == 0]) ifTrue:[
+ (arg size == 0 or:[ (arg indexOfNonSeparatorStartingAt:1) == 0 ]) ifTrue:[
arg := nil
]
]
].
-
argument := arg
!
@@ -168,9 +167,9 @@
^ auxValue
!
-auxValue:something
- "set the auxValue - an arbitrary user value
- "
+auxValue:something
+ "set the auxValue - an arbitrary user value"
+
auxValue := something
!
@@ -199,70 +198,70 @@
!
font
- "get the specific font for an item or nil
- "
+ "get the specific font for an item or nil"
+
^ font
!
-font:aFont
- "set a specific font for an item
- "
+font:aFont
+ "set a specific font for an item"
+
font := aFont.
!
horizontalLayout
"by default, submenus have a vertical layout;
- if true, the submenu has a horizontal layout.
- "
+ if true, the submenu has a horizontal layout."
+
^ horizontalLayout ? false
!
-horizontalLayout:aBoolean
+horizontalLayout:aBoolean
"by default, submenus have a vertical layout;
- if true, the submenu has a horizontal layout.
- "
+ if true, the submenu has a horizontal layout."
+
horizontalLayout := aBoolean.
!
ignoreMnemonicKeys
"if true, mnemonic (access character) in the submenus under the item are ignored;
- the default is set to false
- "
+ the default is set to false"
+
^ ignoreMnemonicKeys ? false
!
-ignoreMnemonicKeys:aBoolean
+ignoreMnemonicKeys:aBoolean
"if true, mnemonic (access character) in the submenus under the item are ignored;
- the default is set to false
- "
+ the default is set to false"
+
ignoreMnemonicKeys := aBoolean.
!
ignoreShortcutKeys
"if true, shortcutKeys (accelerators) in the submenus under the item are ignored;
- the default is set to false
- "
+ the default is set to false"
+
^ ignoreShortcutKeys ? false
!
-ignoreShortcutKeys:aBoolean
+ignoreShortcutKeys:aBoolean
"if true, shortcutKeys (accelerators) in the submenus under the item are ignored;
- the default is set to false
- "
+ the default is set to false"
+
ignoreShortcutKeys := aBoolean.
!
indication
- "test whether the menu item has an on/off indicator (CheckToggle)
- "
+ "test whether the menu item has an on/off indicator (CheckToggle)"
+
^ indication
"Created: 25.2.1997 / 20:59:28 / cg"
!
-indication:something
- "test whether the menu item has an on/off indicator (CheckToggle)
- "
+indication:something
+ "test whether the menu item has an on/off indicator (CheckToggle)"
+
indication := something.
"Created: 25.2.1997 / 20:59:28 / cg"
@@ -355,28 +354,28 @@
!
shortcutKey
- "get the key to press to select the menu item from the keyboard
- "
+ "get the key to press to select the menu item from the keyboard"
+
^ shortcutKey
!
-shortcutKey:something
- "set the key to press to select the menu item from the keyboard
- "
+shortcutKey:something
+ "set the key to press to select the menu item from the keyboard"
+
shortcutKey := something.
!
shortcutKeyCharacter
"Backward compatibility; same as #shortcutKey.
- get the key to press to select the menu item from the keyboard
- "
+ get the key to press to select the menu item from the keyboard"
+
^ self shortcutKey
!
-shortcutKeyCharacter:something
+shortcutKeyCharacter:something
"Backward compatibility; same as #shortcutKey:.
- set the key to press to select the menu item from the keyboard
- "
+ set the key to press to select the menu item from the keyboard"
+
self shortcutKey:something.
!
@@ -397,18 +396,18 @@
!
submenu
- "get the submenu or nil
- "
+ "get the submenu or nil"
+
^ submenu value
"Created: / 25.2.1997 / 20:59:28 / cg"
"Modified: / 19.6.1998 / 00:33:58 / cg"
!
-submenu:something
- "set the submenu or nil
- "
- (something isValueModel or:[something isBlock]) ifTrue:[
+submenu:something
+ "set the submenu or nil"
+
+ (something isValueModel or:[ something isBlock ]) ifTrue:[
submenuChannel notNil ifTrue:[
"/ programmers error ?
"/ how can I decide which one to use if there is both
@@ -425,14 +424,14 @@
!
submenuChannel
- "get the submenuChannel or nil
- "
+ "get the submenuChannel or nil"
+
^ submenuChannel
!
-submenuChannel:something
- "set the submenuChannel or nil
- "
+submenuChannel:something
+ "set the submenuChannel or nil"
+
submenuChannel := something.
! !
@@ -875,5 +874,5 @@
!MenuItem class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.74 2006-01-11 14:48:14 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview2/MenuItem.st,v 1.75 2006-02-23 21:03:19 cg Exp $'
! !