Up
Authors
- Ovidiu Predescu (
ovidiu@net-community.com
)
-
- David Lazaro Saz (
khelekir@encomix.es
)
-
The menu cell class.
Copyright: (C) 1996 Free Software Foundation, Inc.
- Declared in:
- AppKit/NSMenuItem.h
- Conforms to:
- NSMenuItem
Availability: OpenStep
Description forthcoming.
Instance Variables
Instance Variables for NSMenuItem Class
@protected SEL _action;
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.
@protected BOOL _changesState;
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.
@protected BOOL _enabled;
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.
@protected NSImage* _image;
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.
@protected NSString* _keyEquivalent;
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.
@protected unsigned int _keyEquivalentModifierMask;
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.
@protected NSMenu* _menu;
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.
@protected NSImage* _mixedStateImage;
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.
@protected unsigned int _mnemonicLocation;
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.
@protected NSImage* _offStateImage;
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.
@protected NSImage* _onStateImage;
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.
@protected id _representedObject;
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.
@protected int _state;
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.
@protected NSMenu* _submenu;
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.
@protected int _tag;
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.
@protected id _target;
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.
@protected NSString* _title;
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.
- Declared in:
- AppKit/NSMenuItem.h
Availability: Gui 0.0.0
Description forthcoming.
Method summary
- (BOOL)
changesState;
Availability: Gui 0.0.0
Description forthcoming.
- (void)
setChangesState: (BOOL)flag;
Availability: Gui 0.0.0
Description forthcoming.
- Declared in:
- AppKit/NSMenuItem.h
- Conforms to:
- NSCopying
- NSCoding
- NSObject
Availability: OpenStep
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.
Method summary
+ (id<
NSMenuItem>)
separatorItem;
Availability: OpenStep
Returns a seperator. This is just a blank menu item which serves to divide the menu into seperate parts.
+ (void)
setUsesUserKeyEquivalents: (BOOL)flag;
Availability: OpenStep
Sets a flag that, when set to YES
, objects of this class will use user defined key equivalents.
+ (BOOL)
usesUserKeyEquivalents;
Availability: OpenStep
Returns a flag which indicates if the receiver will use user defined key equivalents.
- (SEL)
action;
Availability: OpenStep
Returns the action of the receiver.
- (BOOL)
hasSubmenu;
Availability: OpenStep
Returns a boolean indicating if the receiver has a sub menu.
- (
NSImage*)
image;
Availability: OpenStep
Returns the image to be displayed in the receiver.
- (id)
initWithTitle: (NSString*)aString
action: (SEL)aSelector
keyEquivalent: (NSString*)charCode;
Availability: OpenStep
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.
- (BOOL)
isEnabled;
Availability: OpenStep
Returns YES
if the receiver is enabled.
- (BOOL)
isSeparatorItem;
Availability: OpenStep
Returns a boolean indicating if the receiver is a separator.
- (NSString*)
keyEquivalent;
Availability: OpenStep
Returns the key equivalent of the receiver.
- (unsigned int)
keyEquivalentModifierMask;
Availability: OpenStep
Returns the key equivalent mask.
- (
NSMenu*)
menu;
Availability: OpenStep
Returns the menu to which this menu item is connected.
- (
NSImage*)
mixedStateImage;
Availability: OpenStep
Returns the image to be displayed when the receiver is in the "Mixed" state.
- (NSString*)
mnemonic;
Availability: OpenStep
Description forthcoming.
- (unsigned)
mnemonicLocation;
Availability: OpenStep
Description forthcoming.
- (
NSImage*)
offStateImage;
Availability: OpenStep
Returns the image to be displayed when the receiver is in the "Off" state.
- (
NSImage*)
onStateImage;
Availability: OpenStep
Returns the image to be displayed when the receiver is in the "On" state.
- (id)
representedObject;
Availability: OpenStep
Returns the object represented by the reciever.
- (void)
setAction: (SEL)aSelector;
Availability: OpenStep
Sets the action as aSelector on the receiver.
- (void)
setEnabled: (BOOL)flag;
Availability: OpenStep
Set the receiver to be enabled.
- (void)
setImage: (
NSImage*)menuImage;
Availability: OpenStep
Sets the image to be displayed in the receiver.
- (void)
setKeyEquivalent: (NSString*)aKeyEquivalent;
Availability: OpenStep
Sets the key equivalent of the receiver.
- (void)
setKeyEquivalentModifierMask: (unsigned int)mask;
Availability: OpenStep
Sets the modfier for the key equivalent. These masks indicate if the key equivalent requires ALT, Control or other key modifiers.
- (void)
setMenu: (
NSMenu*)menu;
Availability: OpenStep
Sets the menu which this item belongs to. This method does not retain the object represented by menu.
- (void)
setMixedStateImage: (
NSImage*)image;
Availability: OpenStep
Sets the image to be displayed when the receiver is in the "Mixed" state.
- (void)
setMnemonicLocation: (unsigned)location;
Availability: OpenStep
Description forthcoming.
- (void)
setOffStateImage: (
NSImage*)image;
Availability: OpenStep
Sets the image to be displayed when the receiver is in the "Off" state.
- (void)
setOnStateImage: (
NSImage*)image;
Availability: OpenStep
Sets the image to be displayed when the receiver is in the "On" state.
- (void)
setRepresentedObject: (id)anObject;
Availability: OpenStep
Sets the object represented by the reciever to anObject.
- (void)
setState: (int)state;
Availability: OpenStep
Sets the state of the the receiver.
- (void)
setSubmenu: (
NSMenu*)submenu;
Availability: OpenStep
Sets the submenu of the receiver. This method does retain the submenu object.
- (void)
setTag: (int)anInt;
Availability: OpenStep
Sets the tag of the reciever as anInt.
- (void)
setTarget: (id)anObject;
Availability: OpenStep
Sets the target as anObject on the receiver.
- (void)
setTitle: (NSString*)aString;
Availability: OpenStep
Sets the title of the menu, represented by aString.
- (void)
setTitleWithMnemonic: (NSString*)stringWithAmpersand;
Availability: OpenStep
Description forthcoming.
- (int)
state;
Availability: OpenStep
Returns the state of the receiver.
- (
NSMenu*)
submenu;
Availability: OpenStep
Returns the attached submenu.
- (int)
tag;
Availability: OpenStep
Returns the tag of the receiver.
- (id)
target;
Availability: OpenStep
Returns the target of the receiver.
- (NSString*)
title;
Availability: OpenStep
Returns the menu's title.
- (NSString*)
userKeyEquivalent;
Availability: OpenStep
Returns the key equivalent defined by the users defaults.
- (unsigned int)
userKeyEquivalentModifierMask;
Availability: OpenStep
Returns the user defined key equivalent modifier.
Up