home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-Developer.iso / NextLibrary / Frameworks / AppKit.framework / Versions / B / Headers / NSMenu.h < prev    next >
Text File  |  1996-10-17  |  2KB  |  63 lines

  1. /*
  2.         NSMenu.h
  3.         Application Kit
  4.         Copyright (c) 1995-1996, NeXT Software, Inc.
  5.         All rights reserved.
  6. */
  7.  
  8. #import <Foundation/Foundation.h>
  9. #import <AppKit/NSMenuItem.h>
  10.  
  11. @class NSEvent;
  12.  
  13. @interface NSMenu : NSObject <NSCoding> {
  14.     @private
  15.     unsigned char _pad[156];
  16. }
  17.  
  18. + (void)setMenuZone:(NSZone *)aZone;
  19. + (NSZone *)menuZone;
  20.  
  21.  
  22. - (id)initWithTitle:(NSString *)aTitle;
  23.  
  24. - (NSString *)title;
  25. - (void)setTitle:(NSString *)aString;
  26.  
  27. - (id <NSMenuItem>)insertItemWithTitle:(NSString *)aString action:(SEL)aSelector keyEquivalent:(NSString *)charCode atIndex:(unsigned int)index;
  28. - (id <NSMenuItem>)addItemWithTitle:(NSString *)aString action:(SEL)aSelector keyEquivalent:(NSString *)charCode;
  29. - (void)removeItem:(id <NSMenuItem>)item;
  30. - (void)setSubmenu:(NSMenu *)aMenu forItem:(id <NSMenuItem>)anItem;
  31. - (NSMenu *)supermenu;
  32. - (NSMenu *)attachedMenu;
  33. - (BOOL)isAttached;
  34. - (BOOL)isTornOff;
  35. - (void)sizeToFit;
  36. - (void)setAutoenablesItems:(BOOL)flag;
  37. - (BOOL)autoenablesItems;
  38. - (id <NSMenuItem>)itemWithTag:(int)aTag;
  39. - (id <NSMenuItem>)itemWithTitle:(NSString *)aTitle;
  40. - (NSArray *)itemArray;
  41. - (NSPoint)locationForSubmenu:(NSMenu *)aSubmenu;
  42.  
  43. - (BOOL)performKeyEquivalent:(NSEvent *)theEvent;
  44. - (void)update;
  45.  
  46. #ifndef STRICT_OPENSTEP
  47. - (void)setMenuChangedMessagesEnabled:(BOOL)flag;
  48. - (BOOL)menuChangedMessagesEnabled;
  49.  
  50. - (void)helpRequested:(NSEvent *)eventPtr;
  51. #endif
  52.  
  53. @end
  54.  
  55. @interface NSMenu(NSSubmenuAction)
  56. - (void)submenuAction:(id)sender;
  57. @end
  58.  
  59. @interface NSObject(NSMenuValidation)
  60. - (BOOL)validateMenuItem:(id <NSMenuItem>)menuItem;
  61. @end
  62.  
  63.