NSMenuItem

From GNUstepWiki
Revision as of 02:32, 19 July 2012 by Awiebe (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Menu items belong to menus, sub meus, main menus and contextual menus, which are all the NSMenu class behaving differently.

XIB Fields

Key Type Value
NSMenu reference The cached parent of this menu item, could be derived by the object declaration is under it in the XML tree– Don't argue with apple.
NSTitle NSString The title of this menu item.
NSKeyEquiv NSString The character that is the keyboard equivalent to this menu item. s="s" S="[shift]+s" .
NSKeyEquivModMask enum NSEventModifierFlags : NSUInt See Modifier flag, note: shift is not a modifier, it is enterpreted based on the case of the input character.
NSMnemonicLoc int Purpose unclear.
NSOnImage reference A reference to an NSImage in the object graph, for when the menu item is active in the "on" state.
NSOffImage reference A reference to an NSImage in the object graph, for when the menu item is in the "off" state.
NSMixedImage reference A reference to an NSImage in the object graph, for when the menu item is in the "mixed"(not on or off) state e.g. multiple fonts selected, font dropdown.
NSSubmenu NSMenu The menu this menu item contains, if applicable.
NSIsDisabled bool (Optional)
NSIsSeparator bool Cause the menu item to become a separator. If yes then recomended NSisDisabled, to prevent selection.