# NSMenuItem

ovidiu@net-community.com
khelekir@encomix.es
Generated at 2026-06-27 19:09:52 +0000

The menu cell class.

1996 Free Software Foundation, Inc.
Software documentation for the NSMenuItem class
AppKit/NSMenuItem.h
NSMenuItem
NSValidatedUserInterfaceItem
Description forthcoming.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.
Software documentation for the NSMenuItem(GNUstepExtra) category
AppKit/NSMenuItem.h
Description forthcoming.
changesState
Description forthcoming.
setChangesState:
flag
Description forthcoming.
Software documentation for the NSMenuItem protocol
AppKit/NSMenuItem.h
NSValidatedUserInterfaceItem
NSCopying
NSCoding
NSObject
Specifies the methods that an object must implement if it is to be placed in a menu as a menu item. The NSMenuItem class provides a reference implementation suitable for most uses.
separatorItem

Returns a seperator. This is just a blank menu item which serves to divide the menu into seperate parts.

setUsesUserKeyEquivalents:
flag

Sets a flag that, when set to `YES`, objects of this class will use user defined key equivalents.

usesUserKeyEquivalents

Returns a flag which indicates if the receiver will use user defined key equivalents.

action

Returns the action of the receiver.

attributedTitle

Returns the menu item's title as an attributed string.

hasSubmenu

Returns a boolean indicating if the receiver has a sub menu.

image

Returns the image to be displayed in the receiver.

indentationLevel

Returns the indentation level, a number between 0 and 15.

initWithTitle:
aString
action:
aSelector
keyEquivalent:
charCode

Initializes the receiver with aString as the title. The method called with the menu is selected is represented by aSelector. The key equivalent which can be used to invoke this menu item is represented by charCode.

isAlternate
Description forthcoming.
isEnabled

Returns `YES` if the receiver is enabled.

isSeparatorItem

Returns a boolean indicating if the receiver is a separator.

keyEquivalent

Returns the key equivalent of the receiver.

keyEquivalentModifierMask

Returns the key equivalent mask.

menu

Returns the menu to which this menu item is connected.

mixedStateImage

Returns the image to be displayed when the receiver is in the "Mixed" state.

mnemonic
Description forthcoming.
mnemonicLocation
Description forthcoming.
offStateImage

Returns the image to be displayed when the receiver is in the "Off" state.

onStateImage

Returns the image to be displayed when the receiver is in the "On" state.

representedObject

Returns the object represented by the reciever.

setAction:
aSelector

Sets the action as aSelector on the receiver.

setAlternate:
isAlternate
Description forthcoming.
setAttributedTitle:
title
Description forthcoming.
setEnabled:
flag

Set the receiver to be enabled.

setImage:
menuImage

Sets the image to be displayed in the receiver.

setIndentationLevel:
level
Description forthcoming.
setKeyEquivalent:
aKeyEquivalent

Sets the key equivalent of the receiver.

setKeyEquivalentModifierMask:
mask

Sets the modfier for the key equivalent. These masks indicate if the key equivalent requires ALT, Control or other key modifiers.

setMenu:
menu

Sets the menu which this item belongs to. This method does not retain the object represented by menu.

setMixedStateImage:
image

Sets the image to be displayed when the receiver is in the "Mixed" state.

setMnemonicLocation:
location
Description forthcoming.
setOffStateImage:
image

Sets the image to be displayed when the receiver is in the "Off" state.

setOnStateImage:
image

Sets the image to be displayed when the receiver is in the "On" state.

setRepresentedObject:
anObject

Sets the object represented by the reciever to anObject.

setState:
state

Sets the state of the the receiver.

setSubmenu:
submenu

Sets the submenu of the receiver. This method does retain the submenu object.

setTag:
anInt

Sets the tag of the reciever as anInt.

setTarget:
anObject

Sets the target as anObject on the receiver.

setTitle:
aString

Sets the title of the menu, represented by aString.

setTitleWithMnemonic:
stringWithAmpersand
Description forthcoming.
setToolTip:
toolTip
Description forthcoming.
state

Returns the state of the receiver.

submenu

Returns the attached submenu.

tag

Returns the tag of the receiver.

target

Returns the target of the receiver.

title

Returns the menu's title.

toolTip
Description forthcoming.
userKeyEquivalent

Returns the key equivalent defined by the users defaults.

userKeyEquivalentModifierMask

Returns the user defined key equivalent modifier.