Public Member Functions | |
| (SEL) | - action [implementation] |
| (CPImage) | - alternateImage [implementation] |
| (void) | - encodeWithCoder: [implementation] |
| (CPFont) | - font [implementation] |
| (BOOL) | - hasSubmenu [implementation] |
| (CPImage) | - image [implementation] |
| (unsigned) | - indentationLevel [implementation] |
| (id) | - init [implementation] |
| (id) | - initWithCoder: [implementation] |
| (id) | - initWithTitle:action:keyEquivalent: [implementation] |
| (BOOL) | - isAlternate [implementation] |
| (BOOL) | - isEnabled [implementation] |
| (BOOL) | - isHidden [implementation] |
| (BOOL) | - isHiddenOrHasHiddenAncestor [implementation] |
| (BOOL) | - isHighlighted [implementation] |
| (BOOL) | - isSeparatorItem [implementation] |
| (CPString) | - keyEquivalent [implementation] |
| (unsigned) | - keyEquivalentModifierMask [implementation] |
| (CPString) | - keyEquivalentStringRepresentation [implementation] |
| (CPMenu) | - menu [implementation] |
| (CPImage) | - mixedStateImage [implementation] |
| (CPString) | - mnemonic [implementation] |
| (unsigned) | - mnemonicLocation [implementation] |
| (CPImage) | - offStateImage [implementation] |
| (CPImage) | - onStateImage [implementation] |
| (id) | - representedObject [implementation] |
| (void) | - setAction: [implementation] |
| (void) | - setAlternate: [implementation] |
| (void) | - setAlternateImage: [implementation] |
| (void) | - setEnabled: [implementation] |
| (void) | - setFont: [implementation] |
| (void) | - setHidden: [implementation] |
| (void) | - setImage: [implementation] |
| (void) | - setIndentationLevel: [implementation] |
| (void) | - setKeyEquivalent: [implementation] |
| (void) | - setKeyEquivalentModifierMask: [implementation] |
| (void) | - setMenu: [implementation] |
| (void) | - setMixedStateImage: [implementation] |
| (void) | - setMnemonicLocation: [implementation] |
| (void) | - setOffStateImage: [implementation] |
| (void) | - setOnStateImage: [implementation] |
| (void) | - setRepresentedObject: [implementation] |
| (void) | - setState: [implementation] |
| (void) | - setSubmenu: [implementation] |
| (void) | - setTag: [implementation] |
| (void) | - setTarget: [implementation] |
| (void) | - setTextColor: [implementation] |
| (void) | - setTitle: [implementation] |
| (void) | - setTitleWithMnemonicLocation: [implementation] |
| (void) | - setToolTip: [implementation] |
| (void) | - setView: [implementation] |
| (int) | - state [implementation] |
| (CPMenu) | - submenu [implementation] |
| (int) | - tag [implementation] |
| (id) | - target [implementation] |
| (CPString) | - title [implementation] |
| (CPString) | - toolTip [implementation] |
| (CPView) | - view [implementation] |
Static Public Member Functions | |
| (CPMenuItem) | + separatorItem [implementation] |
A CPMenuItem is added to a CPMenu. It has an action and a target for that action to be sent to whenever the item is 'activated'.
Definition at line 40 of file CPMenuItem.j.
| - (SEL) action | [implementation] |
Returns the item's action.
Definition at line 215 of file CPMenuItem.j.
| - (CPImage) alternateImage | [implementation] |
Returns the menu item's alternate image
Definition at line 377 of file CPMenuItem.j.
| - (void) encodeWithCoder: | (CPCoder) | aCoder | [implementation] |
Writes the menu item out to a coder.
| aCoder | the coder to write the menu item out to |
Definition at line 898 of file CPMenuItem.j.
| - (CPFont) font | [implementation] |
Returns the menu item's font
Definition at line 274 of file CPMenuItem.j.
| - (BOOL) hasSubmenu | [implementation] |
Returns YES if the menu item has a submenu.
Definition at line 494 of file CPMenuItem.j.
| - (CPImage) image | [implementation] |
Returns the menu item's image
Definition at line 360 of file CPMenuItem.j.
| - (unsigned) indentationLevel | [implementation] |
Returns the menu item's indentation level. This is a value between 0 and 15 (inclusive).
Definition at line 706 of file CPMenuItem.j.
| - (id) init | [implementation] |
Definition at line 82 of file CPMenuItem.j.
| - (id) initWithCoder: | (CPCoder) | aCoder | [implementation] |
Initializes the menu item from a coder.
| aCoder | the coder from which to initialize |
Definition at line 844 of file CPMenuItem.j.
| - (id) initWithTitle: | (CPString) | aTitle | ||
| action: | (SEL) | anAction | ||
| keyEquivalent: | (CPString) | aKeyEquivalent | ||
[implementation] |
Initializes the menu item with a title, action, and keyboard equivalent.
| aTitle | the menu item's title | |
| anAction | the action that gets triggered when the item is selected | |
| aKeyEquivalent | the keyboard shortcut for the item |
Definition at line 94 of file CPMenuItem.j.
| - (BOOL) isAlternate | [implementation] |
Returns YES if the menu item is an alternate for the previous item.
Definition at line 683 of file CPMenuItem.j.
| - (BOOL) isEnabled | [implementation] |
Returns YES if the item is enabled.
Definition at line 141 of file CPMenuItem.j.
| - (BOOL) isHidden | [implementation] |
Returns YES if the item is hidden.
Definition at line 164 of file CPMenuItem.j.
| - (BOOL) isHiddenOrHasHiddenAncestor | [implementation] |
Returns YES if the item is hidden or if one of it's supermenus is hidden.
Definition at line 172 of file CPMenuItem.j.
| - (BOOL) isHighlighted | [implementation] |
Returns YES if the menu item is highlighted.
Definition at line 779 of file CPMenuItem.j.
| - (BOOL) isSeparatorItem | [implementation] |
Returns YES if the menu item is a separator.
Definition at line 516 of file CPMenuItem.j.
| - (CPString) keyEquivalent | [implementation] |
Returns the keyboard shortcut for this menu item
Definition at line 553 of file CPMenuItem.j.
| - (unsigned) keyEquivalentModifierMask | [implementation] |
Returns the item's keyboard shortcut modifier mask. Can be a combination of:
CPShiftKeyMask CPAlternateKeyMask CPCommandKeyMask CPControlKeyMask
Definition at line 583 of file CPMenuItem.j.
| - (CPString) keyEquivalentStringRepresentation | [implementation] |
Definition at line 588 of file CPMenuItem.j.
| - (CPMenu) menu | [implementation] |
Returns the container menu of this item
Definition at line 534 of file CPMenuItem.j.
| - (CPImage) mixedStateImage | [implementation] |
Returns the image shown when the menu item is in the 'mixed' state.
Definition at line 442 of file CPMenuItem.j.
| - (CPString) mnemonic | [implementation] |
Returns the menu items mnemonic character
Definition at line 664 of file CPMenuItem.j.
| - (unsigned) mnemonicLocation | [implementation] |
Returns the index of the mnemonic character in the title.
Definition at line 639 of file CPMenuItem.j.
| - (CPImage) offStateImage | [implementation] |
Returns the image shown when the menu item is in the 'off' state.
Definition at line 420 of file CPMenuItem.j.
| - (CPImage) onStateImage | [implementation] |
Returns the image shown when the menu item is in the 'on' state.
Definition at line 399 of file CPMenuItem.j.
| - (id) representedObject | [implementation] |
Returns the item's represented object.
Definition at line 743 of file CPMenuItem.j.
| + (CPMenuItem) separatorItem | [implementation] |
Returns a new menu item separator.
Definition at line 504 of file CPMenuItem.j.
| - (void) setAction: | (SEL) | anAction | [implementation] |
Sets the action that gets sent to the item's target when triggered.
| anAction | the action to send |
Definition at line 207 of file CPMenuItem.j.
| - (void) setAlternate: | (BOOL) | isAlternate | [implementation] |
Sets whether this item is an alternate for the previous menu item.
| isAlternate | YES denotes that this menu item is an alternate |
Definition at line 675 of file CPMenuItem.j.
| - (void) setAlternateImage: | (CPImage) | anImage | [implementation] |
Sets the menu item's alternate image
| anImage | the menu item's alternate image |
Definition at line 369 of file CPMenuItem.j.
| - (void) setEnabled: | (BOOL) | isEnabled | [implementation] |
Sets whether the menu item is enabled or not
| isEnabled | YES enables the item. NO disables it. |
Definition at line 126 of file CPMenuItem.j.
| - (void) setFont: | (CPFont) | aFont | [implementation] |
Sets the font for the text of this menu item
| aFont | the font for the menu item |
Definition at line 259 of file CPMenuItem.j.
| - (void) setHidden: | (BOOL) | isHidden | [implementation] |
Sets whether the item should be hidden. A hidden item can not be triggered by keyboard shortcuts.
| isHidden | YES hides the item. NO reveals it. |
Definition at line 151 of file CPMenuItem.j.
| - (void) setImage: | (CPImage) | anImage | [implementation] |
Sets the menu item's image
| anImage | the menu item's image |
Definition at line 345 of file CPMenuItem.j.
| - (void) setIndentationLevel: | (unsigned) | aLevel | [implementation] |
Sets the indentation level of the menu item. Must be a value between 0 and 15 (inclusive).
| aLevel | the item's new indentation level |
| CPInvalidArgumentException | if aLevel is less than 0 |
Definition at line 695 of file CPMenuItem.j.
| - (void) setKeyEquivalent: | (CPString) | aString | [implementation] |
Sets the keyboard shortcut for this menu item
| aString | the keyboard shortcut |
Definition at line 545 of file CPMenuItem.j.
| - (void) setKeyEquivalentModifierMask: | (unsigned) | aMask | [implementation] |
Sets the modifier mask used for the item's keyboard shortcut. Can be a combination of:
CPShiftKeyMask CPAlternateKeyMask CPCommandKeyMask CPControlKeyMask
Definition at line 568 of file CPMenuItem.j.
| - (void) setMenu: | (CPMenu) | aMenu | [implementation] |
Set the container menu of this item.
| aMenu | the item's container menu |
Definition at line 526 of file CPMenuItem.j.
| - (void) setMixedStateImage: | (CPImage) | anImage | [implementation] |
Sets the image that is shown when the menu item is in the 'mixed' state.
| anImage | the image to show |
Definition at line 429 of file CPMenuItem.j.
| - (void) setMnemonicLocation: | (unsigned) | aLocation | [implementation] |
Sets the index of the mnemonic character in the title. The character will be underlined and is used as a shortcut for navigation.
| aLocation | the index of the character in the title |
Definition at line 631 of file CPMenuItem.j.
| - (void) setOffStateImage: | (CPImage) | anImage | [implementation] |
Sets the image that is shown when the menu item is in the 'off' state.
| anImage | the image to show |
Definition at line 408 of file CPMenuItem.j.
| - (void) setOnStateImage: | (CPImage) | anImage | [implementation] |
Sets the image that is shown when the menu item is in the 'on' state.
| anImage | the image to show |
Definition at line 387 of file CPMenuItem.j.
| - (void) setRepresentedObject: | (id) | anObject | [implementation] |
Sets the menu item's represented object. This is a kind of tag for the developer. Not a UI feature.
| anObject | the represented object |
Definition at line 735 of file CPMenuItem.j.
| - (void) setState: | (int) | aState | [implementation] |
Sets the state of the menu item. Possible states are:
CPMixedState CPOnState CPOffState
Definition at line 315 of file CPMenuItem.j.
| - (void) setSubmenu: | (CPMenu) | aMenu | [implementation] |
Sets the submenu for this item
| aMenu | the submenu |
Definition at line 452 of file CPMenuItem.j.
| - (void) setTag: | (int) | aTag | [implementation] |
Sets the menu item's tag
| aTag | the tag for the item |
Definition at line 294 of file CPMenuItem.j.
| - (void) setTarget: | (id) | aTarget | [implementation] |
Sets the menu item's action target.
| aTarget | the target for the action |
Definition at line 190 of file CPMenuItem.j.
| - (void) setTextColor: | (CPString) | aColor | [implementation] |
Set's the item's text color
Definition at line 250 of file CPMenuItem.j.
| - (void) setTitle: | (CPString) | aTitle | [implementation] |
Sets the item's title.
| aTitle | the item's new title |
Definition at line 225 of file CPMenuItem.j.
| - (void) setTitleWithMnemonicLocation: | (CPString) | aTitle | [implementation] |
Sets the title of the menu item and the mnemonic character. The mnemonic chracter should be preceded by an '&'.
| aTitle | the title string with a denoted mnemonic |
Definition at line 648 of file CPMenuItem.j.
| - (void) setToolTip: | (CPString) | aToolTip | [implementation] |
Sets the tooltip for the menu item.
| aToolTip | the tool tip for the item |
Definition at line 716 of file CPMenuItem.j.
| - (void) setView: | (CPView) | aView | [implementation] |
Sets the view for the menu item
| aView | the menu's item's view |
Definition at line 754 of file CPMenuItem.j.
| - (int) state | [implementation] |
Returns the menu item's current state. Possible states are:
CPMixedState CPOnState CPOffState
Definition at line 335 of file CPMenuItem.j.
| - (CPMenu) submenu | [implementation] |
Returns the submenu of the item. nil if there is no submenu.
Definition at line 486 of file CPMenuItem.j.
| - (int) tag | [implementation] |
Returns the item's tag
Definition at line 302 of file CPMenuItem.j.
| - (id) target | [implementation] |
Returns the item's action target
Definition at line 198 of file CPMenuItem.j.
| - (CPString) title | [implementation] |
Returns the menu item's title.
Definition at line 242 of file CPMenuItem.j.
| - (CPString) toolTip | [implementation] |
Returns the item's tooltip
Definition at line 724 of file CPMenuItem.j.
| - (CPView) view | [implementation] |
Returns the menu item's view
Definition at line 769 of file CPMenuItem.j.
1.6.1