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
- NSValidatedUserInterfaceItem
Availability: OpenStep
Description forthcoming.
Instance Variables
Instance Variables for NSMenuItem Class
@protected SEL _action;
Availability: OpenStep
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;
Availability: OpenStep
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;
Availability: OpenStep
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;
Availability: OpenStep
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 char _indentation;
Availability: OpenStep
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 _isAlternate;
Availability: OpenStep
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;
Availability: OpenStep
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 NSUInteger _keyEquivalentModifierMask;
Availability: OpenStep
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;
Availability: OpenStep
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;
Availability: OpenStep
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 NSUInteger _mnemonicLocation;
Availability: OpenStep
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;
Availability: OpenStep
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;
Availability: OpenStep
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;
Availability: OpenStep
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 NSInteger _state;
Availability: OpenStep
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;
Availability: OpenStep
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 NSInteger _tag;
Availability: OpenStep
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;
Availability: OpenStep
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;
Availability: OpenStep
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* _toolTip;
Availability: OpenStep
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: Not in OpenStep/MacOS-X
Description forthcoming.
Method summary
- (BOOL)
changesState;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
- (void)
setChangesState: (BOOL)flag;
Availability: Not in OpenStep/MacOS-X
Description forthcoming.
- Declared in:
- AppKit/NSMenuItem.h
- Conforms to:
- NSValidatedUserInterfaceItem
- 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.
- (
NSAttributedString*)
attributedTitle;
Availability: MacOS-X 10.3.0
Returns the menu item's title as an attributed
string.
- (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.
- (
NSInteger)
indentationLevel;
Availability: MacOS-X 10.3.0
Returns the indentation level, a number between 0
and 15.
- (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)
isAlternate;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (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.
- (
NSUInteger)
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.
- (
NSUInteger)
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)
setAlternate: (BOOL)isAlternate;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (void)
setAttributedTitle: (
NSAttributedString*)title;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (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)
setIndentationLevel: (
NSInteger)level;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (void)
setKeyEquivalent: (
NSString*)aKeyEquivalent;
Availability: OpenStep
Sets the key equivalent of the receiver.
- (void)
setKeyEquivalentModifierMask: (
NSUInteger)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: (
NSUInteger)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: (
NSInteger)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: (
NSInteger)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.
- (void)
setToolTip: (
NSString*)toolTip;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (
NSInteger)
state;
Availability: OpenStep
Returns the state of the receiver.
- (
NSMenu*)
submenu;
Availability: OpenStep
Returns the attached submenu.
- (
NSInteger)
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*)
toolTip;
Availability: MacOS-X 10.3.0
Description forthcoming.
- (
NSString*)
userKeyEquivalent;
Availability: OpenStep
Returns the key equivalent defined by the users
defaults.
- (
NSUInteger)
userKeyEquivalentModifierMask;
Availability: OpenStep
Returns the user defined key equivalent modifier.
Up