|
|
Class: MenuItem
Object
|
+--MenuItem
- Package:
- stx:libview2
- Category:
- Views-Support
- Version:
- rev:
1.89
date: 2009/12/04 13:34:12
- user: cg
- file: MenuItem.st directory: libview2
- module: stx stc-classLibrary: libview2
- Author:
- Claus Gittinger
not yet finished MenuItem class - this will eventually replace
most of the MenuView and PopUpMenu stuff.
(and hopefully be ST-80 compatible ...)
For now, only a subset of the full protocol is implemented.
MenuItem
PopUpMenu
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.
instance creation
-
label: aString
-
create and return a new menuItem, given a label string
-
label: labelString choice: choiceAspect choiceValue: selectorOrValue
-
create and return a new menuItem, given its label and choice/value.
This will create a Radio-Button-like item.
-
label: labelString value: selectorOrValue
-
create and return a new menuItem, given its label and value
-
labeled: aString
-
create and return a new menuItem, given a label string
-
separator
-
create and return a new menuItem for a separator
Compatibility-ST80
-
enablementSelector: aSymbol
-
dummy for now - for visualworks compatibility (specs)
-
helpText: aString
-
dummy for now - for visualworks compatibility (specs)
-
indicationSelector: aSymbol
-
dummy for now - for visualworks compatibility (specs)
-
isEnabled: aBoolean
-
-
shortcutModifiers: something
-
dummy for now - for visualworks compatibility (specs)
-
value
-
obsolete - please use #itemValue (value is bad: it prevents us from using a valueHolder)
-
value: something
-
obsolete - please use #itemValue: (value is bad: it prevents us from using a valueHolder)
accessing
-
accessCharacterPosition
-
get 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
-
activeHelpKey
-
-
activeHelpKey: aKey
-
-
argument
-
get argument given to the value (selector)
-
argument: something
-
set argument given to the value (selector)
-
auxValue
-
an additional, arbitrary value
-
auxValue: something
-
set the auxValue - an arbitrary user value
-
choice: something
-
-
choiceValue
-
-
choiceValue: something
-
-
font
-
get the specific font for an item or nil
-
font: aFont
-
set a specific font for an item
-
hierarchicalUUID
-
-
horizontalLayout
-
by default, submenus have a vertical layout;
if true, the submenu has a horizontal layout.
-
horizontalLayout: aBoolean
-
by default, submenus have a vertical layout;
if true, the submenu has a horizontal layout.
-
ignoreMnemonicKeys
-
if true, mnemonic (access character) in the submenus under the item are ignored;
the default is set to false
-
ignoreMnemonicKeys: aBoolean
-
if true, mnemonic (access character) in the submenus under the item are ignored;
the default is set to false
-
ignoreShortcutKeys
-
if true, shortcutKeys (accelerators) in the submenus under the item are ignored;
the default is set to false
-
ignoreShortcutKeys: aBoolean
-
if true, shortcutKeys (accelerators) in the submenus under the item are ignored;
the default is set to false
-
indication
-
value of the items on/off indicator (CheckToggle)
-
indication: something
-
value of the items on/off indicator (CheckToggle)
-
isMenuSlice: aBoolean
-
-
isVisible
-
-
isVisible: something
-
-
itemValue
-
-
itemValue: something
-
-
keepLinkedMenu
-
-
keepLinkedMenu: aBoolean
-
-
labelImage
-
-
labelImage: something
-
-
nameKey
-
-
nameKey: aNameKey
-
-
rawLabel
-
-
rawLabel: aString
-
-
resourceRetriever
-
-
resourceRetriever: aRetriever
-
-
shortcutKey
-
get 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
-
shortcutKeyCharacter
-
Backward compatibility; same as #shortcutKey.
get the key to press to select the menu item from the keyboard
-
shortcutKeyCharacter: something
-
Backward compatibility; same as #shortcutKey:.
set the key to press to select the menu item from the keyboard
-
submenu
-
get the submenu or nil
-
submenu: something
-
set the submenu or nil
-
submenuChannel
-
get the submenuChannel or nil
-
submenuChannel: something
-
set the submenuChannel or nil
-
uuid
-
-
uuid: aUUID
-
return my name component to be used for resource-access
accessing-behavior
-
beOff
-
set indication off
-
beOn
-
set indication on
-
choice
-
return the menu items choice indicator (RadioButton)
-
disable
-
-
enable
-
-
enabled
-
returns a boolean, valueHolder or block
-
enabled: something
-
a boolean, valueHolder or block
-
hideMenuOnActivated
-
hide the menu when the item was activated; the default is true
-
hideMenuOnActivated: aBool
-
hide the menu when the item was activated; the default is true
-
sendToOriginator
-
if true, the message is sent to the originating widget;
otherwise (the default), it it sent to the receiver/application.
-
sendToOriginator: anBoolean
-
if true, the message is sent to the originating widget;
otherwise (the default), it it sent to the receiver/application.
-
showBusyCursorWhilePerforming
-
get the flag which controls if a busy cursor is to be shown
while performing the menu action. Defaults to false.
-
showBusyCursorWhilePerforming: aBoolean
-
set/clear the flag which controls if a busy cursor is to be shown
while performing the menu action. Defaults to false.
-
translateLabel
-
returns true if the label is to be translated
-
translateLabel: aBoolean
-
sets whether label is translated
-
triggerOnDown
-
returns true if the action is triggered when pressed
-
triggerOnDown: aBool
-
controls if the action is triggered when pressed or released
accessing-look
-
icon: anImage
-
-
isButton
-
returns whether item looks like a Button
-
isButton: anBoolean
-
sets whether item looks like a Button
-
label
-
-
label: aString
-
-
label: aString icon: anImage
-
-
startGroup
-
start group #left #right #conditionalRight ... or nil
at the moment only #right and #conditionalRight are implemented
-
startGroup: aSymbol
-
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.
accessing-resource
-
findGuiResourcesIn: aResourceContainerOrApplication
-
setup a resource container
-
findGuiResourcesIn: aResourceContainerOrApplication rememberResourcesIn: aValueHolderOrNil
-
setup a resource container
-
receiver: aReceiver perform: aSelector with: anArgument ifNone: aBlock
-
send the one-arg-message aSelector to the application;
the result returned from the send or nil is returned
-
resolveSliceMenuItemsIn: aReceiver rememberResourcesIn: aValueHolderOrNil
-
converting
-
skippedInLiteralEncoding
-
encoding & decoding
-
fromLiteralArrayEncoding: aLiteralEncodedArray
-
read my contents from a aLiteralEncodedArray
printing & storing
-
printOn: aStream
-
private-accessing
-
filteredLabel
-
return the label without any &-chars
queries
-
hasChoice
-
test whether choice exists
-
hasIndication
-
test whether indication on/off exists
-
hasSubmenu
-
-
isEnabled
-
-
isHidden
-
not yet supported
-
isMenuItem
-
-
isMenuSlice
-
returns true if the menu is a slice buildin its items
into its container menu
-
isOff
-
test whether indication on/off exists and is off
-
isOn
-
test whether indication on/off exists and is on
-
isSeparatorItem
-
|