Up

NSMenuItem

Authors

Ovidiu Predescu (ovidiu@net-community.com)
David Lazaro Saz (khelekir@encomix.es)
The menu cell class.

Copyright: (C) 1996 Free Software Foundation, Inc.


Contents -

  1. Software documentation for the NSMenuItem class
  2. Software documentation for the NSMenuItem(GNUstepExtra) category
  3. Software documentation for the NSMenuItem protocol

Software documentation for the NSMenuItem class

NSMenuItem : NSObject

Declared in:
AppKit/NSMenuItem.h
Conforms to:
NSMenuItem
Availability: Not in OpenStep/MacOS-X

Description forthcoming.


Instance Variables



Instance Variables for NSMenuItem Class

_action

@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.


_changesState

@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.


_enabled

@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.


_image

@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.


_keyEquivalent

@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.


_keyEquivalentModifierMask

@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.


_menu

@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.


_mixedStateImage

@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.


_mnemonicLocation

@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.


_offStateImage

@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.


_onStateImage

@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.


_representedObject

@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.


_state

@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.


_submenu

@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.


_tag

@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.


_target

@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.


_title

@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.





Software documentation for the NSMenuItem(GNUstepExtra) category

NSMenuItem(GNUstepExtra)

Declared in:
AppKit/NSMenuItem.h
Availability: Gui 0.0

Description forthcoming.

Method summary

changesState 

- (BOOL) changesState;
Availability: Gui 0.0

Description forthcoming.


setChangesState: 

- (void) setChangesState: (BOOL)flag;
Availability: Gui 0.0

Description forthcoming.


Software documentation for the NSMenuItem protocol

NSMenuItem

Declared in:
AppKit/NSMenuItem.h
Conforms to:
NSCopying
NSCoding
NSObject
Availability: Not in OpenStep/MacOS-X

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

separatorItem 

+ (id<NSMenuItem>) separatorItem;
Availability: Not in OpenStep/MacOS-X

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


setUsesUserKeyEquivalents: 

+ (void) setUsesUserKeyEquivalents: (BOOL)flag;
Availability: Not in OpenStep/MacOS-X

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


usesUserKeyEquivalents 

+ (BOOL) usesUserKeyEquivalents;
Availability: Not in OpenStep/MacOS-X

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


action 

- (SEL) action;
Availability: Not in OpenStep/MacOS-X

Returns the action of the receiver.


hasSubmenu 

- (BOOL) hasSubmenu;
Availability: Not in OpenStep/MacOS-X

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


image 

- (NSImage*) image;
Availability: Not in OpenStep/MacOS-X

Returns the image to be displayed in the receiver.


initWithTitle: action: keyEquivalent: 

- (id) initWithTitle: (NSString*)aString action: (SEL)aSelector keyEquivalent: (NSString*)charCode;
Availability: Not in OpenStep/MacOS-X

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.


isEnabled 

- (BOOL) isEnabled;
Availability: Not in OpenStep/MacOS-X

Returns YES if the receiver is enabled.


isSeparatorItem 

- (BOOL) isSeparatorItem;
Availability: Not in OpenStep/MacOS-X

Returns a boolean indicating if the receiver is a separator.


keyEquivalent 

- (NSString*) keyEquivalent;
Availability: Not in OpenStep/MacOS-X

Returns the key equivalent of the receiver.


keyEquivalentModifierMask 

- (unsigned int) keyEquivalentModifierMask;
Availability: Not in OpenStep/MacOS-X

Returns the key equivalent mask.


menu 

- (NSMenu*) menu;
Availability: Not in OpenStep/MacOS-X

Returns the menu to which this menu item is connected.


mixedStateImage 

- (NSImage*) mixedStateImage;
Availability: Not in OpenStep/MacOS-X

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


mnemonic 

- (NSString*) mnemonic;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.


mnemonicLocation 

- (unsigned) mnemonicLocation;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.


offStateImage 

- (NSImage*) offStateImage;
Availability: Not in OpenStep/MacOS-X

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


onStateImage 

- (NSImage*) onStateImage;
Availability: Not in OpenStep/MacOS-X

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


representedObject 

- (id) representedObject;
Availability: Not in OpenStep/MacOS-X

Returns the object represented by the reciever.


setAction: 

- (void) setAction: (SEL)aSelector;
Availability: Not in OpenStep/MacOS-X

Sets the action as aSelector on the receiver.


setEnabled: 

- (void) setEnabled: (BOOL)flag;
Availability: Not in OpenStep/MacOS-X

Set the receiver to be enabled.


setImage: 

- (void) setImage: (NSImage*)menuImage;
Availability: Not in OpenStep/MacOS-X

Sets the image to be displayed in the receiver.


setKeyEquivalent: 

- (void) setKeyEquivalent: (NSString*)aKeyEquivalent;
Availability: Not in OpenStep/MacOS-X

Sets the key equivalent of the receiver.


setKeyEquivalentModifierMask: 

- (void) setKeyEquivalentModifierMask: (unsigned int)mask;
Availability: Not in OpenStep/MacOS-X

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


setMenu: 

- (void) setMenu: (NSMenu*)menu;
Availability: Not in OpenStep/MacOS-X

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


setMixedStateImage: 

- (void) setMixedStateImage: (NSImage*)image;
Availability: Not in OpenStep/MacOS-X

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


setMnemonicLocation: 

- (void) setMnemonicLocation: (unsigned)location;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.


setOffStateImage: 

- (void) setOffStateImage: (NSImage*)image;
Availability: Not in OpenStep/MacOS-X

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


setOnStateImage: 

- (void) setOnStateImage: (NSImage*)image;
Availability: Not in OpenStep/MacOS-X

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


setRepresentedObject: 

- (void) setRepresentedObject: (id)anObject;
Availability: Not in OpenStep/MacOS-X

Sets the object represented by the reciever to anObject.


setState: 

- (void) setState: (int)state;
Availability: Not in OpenStep/MacOS-X

Sets the state of the the receiver.


setSubmenu: 

- (void) setSubmenu: (NSMenu*)submenu;
Availability: Not in OpenStep/MacOS-X

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


setTag: 

- (void) setTag: (int)anInt;
Availability: Not in OpenStep/MacOS-X

Sets the tag of the reciever as anInt.


setTarget: 

- (void) setTarget: (id)anObject;
Availability: Not in OpenStep/MacOS-X

Sets the target as anObject on the receiver.


setTitle: 

- (void) setTitle: (NSString*)aString;
Availability: Not in OpenStep/MacOS-X

Sets the title of the menu, represented by aString.


setTitleWithMnemonic: 

- (void) setTitleWithMnemonic: (NSString*)stringWithAmpersand;
Availability: Not in OpenStep/MacOS-X

Description forthcoming.


state 

- (int) state;
Availability: Not in OpenStep/MacOS-X

Returns the state of the receiver.


submenu 

- (NSMenu*) submenu;
Availability: Not in OpenStep/MacOS-X

Returns the attached submenu.


tag 

- (int) tag;
Availability: Not in OpenStep/MacOS-X

Returns the tag of the receiver.


target 

- (id) target;
Availability: Not in OpenStep/MacOS-X

Returns the target of the receiver.


title 

- (NSString*) title;
Availability: Not in OpenStep/MacOS-X

Returns the menu's title.


userKeyEquivalent 

- (NSString*) userKeyEquivalent;
Availability: Not in OpenStep/MacOS-X

Returns the key equivalent defined by the users defaults.


userKeyEquivalentModifierMask 

- (unsigned int) userKeyEquivalentModifierMask;
Availability: Not in OpenStep/MacOS-X

Returns the user defined key equivalent modifier.



Up