Public Member Functions | |
(id) | - initWithTitle:action:keyEquivalent: [implementation] |
(void) | - setEnabled: [implementation] |
(BOOL) | - isEnabled [implementation] |
(void) | - setHidden: [implementation] |
(BOOL) | - isHidden [implementation] |
(BOOL) | - isHiddenOrHasHiddenAncestor [implementation] |
(void) | - setTarget: [implementation] |
(id) | - target [implementation] |
(void) | - setAction: [implementation] |
(SEL) | - action [implementation] |
(void) | - setTitle: [implementation] |
(CPString) | - title [implementation] |
(void) | - setTextColor: [implementation] |
(void) | - setFont: [implementation] |
(CPFont) | - font [implementation] |
(void) | - setTag: [implementation] |
(int) | - tag [implementation] |
(void) | - setState: [implementation] |
(int) | - state [implementation] |
(void) | - setImage: [implementation] |
(CPImage) | - image [implementation] |
(void) | - setAlternateImage: [implementation] |
(CPImage) | - alternateImage [implementation] |
(void) | - setOnStateImage: [implementation] |
(CPImage) | - onStateImage [implementation] |
(void) | - setOffStateImage: [implementation] |
(CPImage) | - offStateImage [implementation] |
(void) | - setMixedStateImage: [implementation] |
(CPImage) | - mixedStateImage [implementation] |
(void) | - setSubmenu: [implementation] |
(CPMenu) | - submenu [implementation] |
(BOOL) | - hasSubmenu [implementation] |
(BOOL) | - isSeparatorItem [implementation] |
(void) | - setMenu: [implementation] |
(CPMenu) | - menu [implementation] |
(void) | - setKeyEquivalent: [implementation] |
(CPString) | - keyEquivalent [implementation] |
(void) | - setKeyEquivalentModifierMask: [implementation] |
(unsigned) | - keyEquivalentModifierMask [implementation] |
(void) | - setMnemonicLocation: [implementation] |
(unsigned) | - mnemonicLocation [implementation] |
(void) | - setTitleWithMnemonicLocation: [implementation] |
(CPString) | - mnemonic [implementation] |
(void) | - setAlternate: [implementation] |
(BOOL) | - isAlternate [implementation] |
(void) | - setIndentationLevel: [implementation] |
(unsigned) | - indentationLevel [implementation] |
(void) | - setToolTip: [implementation] |
(CPString) | - toolTip [implementation] |
(void) | - setRepresentedObject: [implementation] |
(id) | - representedObject [implementation] |
(void) | - setView: [implementation] |
(CPView) | - view [implementation] |
(BOOL) | - isHighlighted [implementation] |
(id) | - initWithCoder: [implementation] |
(void) | - encodeWithCoder: [implementation] |
Static Public Member Functions | |
(CPMenuItem) | + separatorItem [implementation] |
Definition at line 39 of file CPMenuItem.j.
- (SEL) action | [implementation] |
Returns the item's action.
Definition at line 203 of file CPMenuItem.j.
- (CPImage) alternateImage | [implementation] |
Returns the menu item's alternate image
Definition at line 365 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 833 of file CPMenuItem.j.
- (CPFont) font | [implementation] |
Returns the menu item's font
Definition at line 262 of file CPMenuItem.j.
- (BOOL) hasSubmenu | [implementation] |
Returns YES
if the menu item has a submenu.
Definition at line 470 of file CPMenuItem.j.
- (CPImage) image | [implementation] |
Returns the menu item's image
Definition at line 348 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 641 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 784 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 86 of file CPMenuItem.j.
- (BOOL) isAlternate | [implementation] |
Returns YES
if the menu item is an alternate for the previous item.
Definition at line 618 of file CPMenuItem.j.
- (BOOL) isEnabled | [implementation] |
Returns YES
if the item is enabled.
Definition at line 129 of file CPMenuItem.j.
- (BOOL) isHidden | [implementation] |
Returns YES
if the item is hidden.
Definition at line 152 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 160 of file CPMenuItem.j.
- (BOOL) isHighlighted | [implementation] |
Returns YES
if the menu item is highlighted.
Definition at line 714 of file CPMenuItem.j.
- (BOOL) isSeparatorItem | [implementation] |
Returns YES
if the menu item is a separator.
Definition at line 488 of file CPMenuItem.j.
- (CPString) keyEquivalent | [implementation] |
Returns the keyboard shortcut for this menu item
Definition at line 525 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 555 of file CPMenuItem.j.
- (CPMenu) menu | [implementation] |
Returns the container menu of this item
Definition at line 506 of file CPMenuItem.j.
- (CPImage) mixedStateImage | [implementation] |
Returns the image shown when the menu item is in the 'mixed' state.
Definition at line 430 of file CPMenuItem.j.
- (CPString) mnemonic | [implementation] |
Returns the menu items mnemonic character
Definition at line 599 of file CPMenuItem.j.
- (unsigned) mnemonicLocation | [implementation] |
Returns the index of the mnemonic character in the title.
Definition at line 574 of file CPMenuItem.j.
- (CPImage) offStateImage | [implementation] |
Returns the image shown when the menu item is in the 'off' state.
Definition at line 408 of file CPMenuItem.j.
- (CPImage) onStateImage | [implementation] |
Returns the image shown when the menu item is in the 'on' state.
Definition at line 387 of file CPMenuItem.j.
- (id) representedObject | [implementation] |
Returns the item's represented object.
Definition at line 678 of file CPMenuItem.j.
+ (CPMenuItem) separatorItem | [implementation] |
Returns a new menu item separator.
Definition at line 480 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 195 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 610 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 357 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 114 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 247 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 139 of file CPMenuItem.j.
- (void) setImage: | (CPImage) | anImage | [implementation] |
Sets the menu item's image
anImage | the menu item's image |
Definition at line 333 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 630 of file CPMenuItem.j.
- (void) setKeyEquivalent: | (CPString) | aString | [implementation] |
Sets the keyboard shortcut for this menu item
aString | the keyboard shortcut |
Definition at line 517 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 540 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 498 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 417 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 566 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 396 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 375 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 670 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 303 of file CPMenuItem.j.
- (void) setSubmenu: | (CPMenu) | aMenu | [implementation] |
Sets the submenu for this item
aMenu | the submenu |
Definition at line 440 of file CPMenuItem.j.
- (void) setTag: | (int) | aTag | [implementation] |
Sets the menu item's tag
aTag | the tag for the item |
Definition at line 282 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 178 of file CPMenuItem.j.
- (void) setTextColor: | (CPString) | aColor | [implementation] |
Set's the item's text color
Definition at line 238 of file CPMenuItem.j.
- (void) setTitle: | (CPString) | aTitle | [implementation] |
Sets the item's title.
aTitle | the item's new title |
Definition at line 213 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 583 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 651 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 689 of file CPMenuItem.j.
- (int) state | [implementation] |
Returns the menu item's current state. Possible states are:
CPMixedState CPOnState CPOffState
Definition at line 323 of file CPMenuItem.j.
- (CPMenu) submenu | [implementation] |
Returns the submenu of the item. nil
if there is no submenu.
Definition at line 462 of file CPMenuItem.j.
- (int) tag | [implementation] |
Returns the item's tag
Definition at line 290 of file CPMenuItem.j.
- (id) target | [implementation] |
Returns the item's action target
Definition at line 186 of file CPMenuItem.j.
- (CPString) title | [implementation] |
Returns the menu item's title.
Definition at line 230 of file CPMenuItem.j.
- (CPString) toolTip | [implementation] |
Returns the item's tooltip
Definition at line 659 of file CPMenuItem.j.
- (CPView) view | [implementation] |
Returns the menu item's view
Definition at line 704 of file CPMenuItem.j.