home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / OpenStepConversion / IntermediateFrameworks3 / AppKit.framework / Headers / NSPanel.h < prev    next >
Text File  |  1994-09-29  |  2KB  |  56 lines

  1. /*
  2.     Panel.h
  3.     Application Kit, Release 2.0
  4.     Copyright (c) 1988, 1989, 1990, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import "NSWindow.h"
  8.  
  9. /*
  10.  * In the following two functions, msg may be a printf-like message with
  11.  * the arguments tacked onto the end.  Thus, to get a '%' in your message,
  12.  * you must use '%%'
  13.  */
  14.  
  15. extern int NSRunAlertPanel(NSString *title, NSString *msg, NSString *defaultButton, NSString *alternateButton, NSString *otherButton, ...);
  16.  
  17. extern int NSRunLocalizedAlertPanel(NSString *table, NSString *title, NSString *msg, NSString *defaultButton, NSString *alternateButton, NSString *otherButton, ...);
  18.  
  19. extern id NSGetAlertPanel(NSString *title, NSString *msg, NSString *defaultButton, NSString *alternateButton, NSString *otherButton, ...);
  20.  
  21. extern void NSReleaseAlertPanel(id panel);
  22.  
  23. /*
  24.  * NXRunAlertPanel() return values (also returned by runModalSession: when
  25.  * the modal session is run with a panel returned by NXGetAlertPanel()).
  26.  */
  27.  
  28. #define NSAlertDefaultReturn        1
  29. #define NSAlertAlternateReturn    0
  30. #define NSAlertOtherReturn        -1
  31. #define NSAlertErrorReturn        -2
  32.  
  33. /* Tags for common controls in Panels */
  34.  
  35. #define NSOKButton    1
  36. #define NSCancelButton    0
  37.  
  38. @class NSEvent;
  39.  
  40. @interface NSPanel : NSWindow
  41. {
  42. }
  43.  
  44. - initContent:(NSRect)contentRect style:(int)aStyle backing:(int)bufferingType buttonMask:(int)mask defer:(BOOL)flag;
  45. - init;
  46. - (BOOL)performKeyEquivalent:(NSEvent *)theEvent;
  47. - keyDown:(NSEvent *)theEvent;
  48. - (BOOL)isFloatingPanel;
  49. - setFloatingPanel:(BOOL)flag;
  50. - (BOOL)doesBecomeKeyOnlyIfNeeded;
  51. - setBecomeKeyOnlyIfNeeded:(BOOL)flag;
  52. - (BOOL)worksWhenModal;
  53. - setWorksWhenModal:(BOOL)flag;
  54.  
  55. @end
  56.