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

  1. /*
  2.     NSPopUpButton.h
  3.     Application Kit
  4.     Copyright (c) 1994-1996, NeXT Software, Inc.
  5.     All rights reserved.
  6. */
  7.  
  8. #import <Foundation/Foundation.h>
  9. #import <AppKit/NSButton.h>
  10. #import <AppKit/NSMenuItem.h>
  11. #import <AppKit/AppKitDefines.h>
  12.  
  13. @class NSString;
  14. @class NSFont;
  15. @class NSMatrix;
  16.  
  17. @interface NSPopUpButton : NSButton
  18. {
  19.     id            _target;     
  20.     SEL            _action;
  21.     struct __popUpButtonFlags {
  22.         unsigned int    pullsDown:1;
  23.         unsigned int    usingColorizedImages:1;
  24.     unsigned int    shouldReleasePopUpList:1;
  25.         unsigned int    reservedPopUpButton:29;
  26.     } _pbFlags;
  27. }
  28.  
  29. - (id)initWithFrame:(NSRect)buttonFrame pullsDown:(BOOL)flag;
  30.  
  31. - (void)setPullsDown:(BOOL)flag;
  32. - (BOOL)pullsDown;
  33.  
  34. - (NSArray *)itemArray;
  35.  
  36. - (int)numberOfItems;
  37. - (void)addItemWithTitle:(NSString *)title;
  38. - (void)addItemsWithTitles:(NSArray *)itemTitles;
  39. - (void)insertItemWithTitle:(NSString *)title atIndex:(int)index;
  40. - (void)removeItemWithTitle:(NSString *)title;
  41. - (void)removeItemAtIndex:(int)index;
  42. - (void)removeAllItems;
  43. - (void)synchronizeTitleAndSelectedItem;
  44. - (void)selectItemWithTitle:(NSString *)title;
  45. - (void)selectItemAtIndex:(int)index;
  46. - (id <NSMenuItem>)itemAtIndex:(int)index;
  47. - (id <NSMenuItem>)itemWithTitle:(NSString *)title;
  48. - (id <NSMenuItem>)selectedItem;
  49. - (id <NSMenuItem>)lastItem;
  50. - (NSString *)itemTitleAtIndex:(int)index;
  51. - (NSString *)titleOfSelectedItem;
  52. - (int)indexOfSelectedItem;
  53. - (int)indexOfItemWithTitle:(NSString *)title;
  54. - (NSArray *)itemTitles;
  55. - (void)setFont:(NSFont *)fontObject;
  56.  
  57.     /* This is a no-op in NSControl, but it is here because we override */
  58.     /* it to return the titleOfSelectedItem. This is useful if there is */
  59.     /* a TextField or something that is supposed to reflect the most */
  60.     /* recent PopUp selection. */
  61. - (NSString *)stringValue;
  62.     /* Adds semantic to NSButton's method that if there is no item in */
  63.     /* popup matching title, then an item of that name is added. */
  64. - (void)setTitle:(NSString *)aString;
  65. - (id)target;
  66. - (void)setTarget:(id)anObject;
  67. - (SEL)action;
  68. - (void)setAction:(SEL)aSelector;
  69. - (void)setAutoenablesItems:(BOOL)flag;
  70. - (BOOL)autoenablesItems;
  71.  
  72. @end
  73.  
  74.  
  75. #ifndef STRICT_OPENSTEP
  76.  
  77. /* Notifications */
  78. APPKIT_EXTERN NSString *NSPopUpButtonWillPopUpNotification;
  79.  
  80. #endif
  81.  
  82.