home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEV / DEV.Z / NSSavePanel.h < prev    next >
Text File  |  1996-09-09  |  3KB  |  114 lines

  1. /*
  2.     NSSavePanel.h
  3.     Application Kit
  4.     Copyright (c) 1994-1996, NeXT Software, Inc.
  5.     All rights reserved.
  6. */
  7.  
  8. #import <AppKit/NSPanel.h>
  9.  
  10. /* Tags of views in the SavePanel */
  11.  
  12. enum {
  13.     NSFileHandlingPanelImageButton    = 150,
  14.     NSFileHandlingPanelTitleField    = 151,
  15.     NSFileHandlingPanelBrowser        = 152,
  16.     NSFileHandlingPanelCancelButton    = NSCancelButton,
  17.     NSFileHandlingPanelOKButton        = NSOKButton,
  18.     NSFileHandlingPanelForm        = 155,
  19.     NSFileHandlingPanelHomeButton    = 156,
  20.     NSFileHandlingPanelDiskButton    = 157,
  21.     NSFileHandlingPanelDiskEjectButton    = 158
  22. };        
  23.  
  24. @class NSBrowser;
  25.  
  26. #ifndef WIN32
  27. @interface NSSavePanel : NSPanel
  28. {
  29.     NSBrowser        *_browser;
  30.     id                  _form;
  31.     id                  _homeButton;
  32.     id                  _okButton;
  33.     id            _removableDeviceButton;
  34.     id                  _separator;
  35.     id                  _accessoryView;
  36.     NSString        *_filename;
  37.     NSString        *_directory;
  38.     NSArray        *_filenames;
  39.     NSString        *_requiredType;
  40.     void        *_columns;
  41.     NSSet        *_typeTable;
  42.     int                 _cdcolumn;
  43.     id                  _scroller;
  44.     BOOL        _recyclable;
  45.     struct __spFlags {
  46.         unsigned int        opening:1;
  47.         unsigned int        exitOk:1;
  48.         unsigned int        allowMultiple:1;
  49.         unsigned int        dirty:1;
  50.         unsigned int        invalidateMatrices:1;
  51.         unsigned int        filtered:1;
  52.         unsigned int        canChooseFolders:1;
  53.         unsigned int        treatsFilePackagesAsDirectories:1;
  54.         unsigned int        largeFS:1;
  55.         unsigned int        delegateValidatesNew:1;
  56.         unsigned int        canChooseFiles:1;
  57.         unsigned int        checkCase:1;
  58.         unsigned int        cancd:1;
  59.         unsigned int        UnixExpert:1;
  60.         unsigned int        reserved:2;
  61.         unsigned int        delegateCompares:1;
  62.         unsigned int        delegateFilters:1;
  63.         unsigned int        RESERVED:14;
  64.     }                   _spFlags;
  65.     void        *_reserved;
  66. }
  67. #else
  68. @interface NSSavePanel : NSObject
  69. {
  70.     NSString *_filename;
  71.     NSString *_directory;
  72.     NSArray  *_filenames;
  73.     NSString *_requiredType;
  74.     NSString *_title;
  75.     NSView   *_accessoryView;
  76.     struct __spFlags {
  77.         unsigned int        stripLastPathComponent:1;
  78.         unsigned int        allowMultiple:1;
  79.         unsigned int        RESERVED:30;
  80.     }         _spFlags;
  81. }
  82. #endif WIN32
  83.  
  84. + (NSSavePanel *)savePanel;
  85.  
  86. - (void)ok:(id)sender;
  87. - (void)cancel:(id)sender;
  88. - (int)runModalForDirectory:(NSString *)path file:(NSString *)name;
  89. - (int)runModal;
  90. - (NSString *)filename;
  91. - (void)setDirectory:(NSString *)path;
  92. - (NSString *)directory;
  93. - (void)setPrompt:(NSString *)prompt;
  94. - (NSString *)prompt;
  95. - (void)setTitle:(NSString *)title;
  96. - (NSString *)title;
  97. - (void)setRequiredFileType:(NSString *)type;
  98. - (NSString *)requiredFileType;
  99. - (void)setTreatsFilePackagesAsDirectories:(BOOL)flag;
  100. - (BOOL)treatsFilePackagesAsDirectories;
  101. - (void)setAccessoryView:(NSView *)aView;
  102. - (NSView *)accessoryView;
  103. - (void)setDelegate:(id)anObject;
  104. - (void)validateVisibleColumns;
  105. - (void)selectText:(id)sender;
  106.  
  107. @end
  108.  
  109. @interface NSObject(NSSavePanelDelegate)
  110. - (BOOL)panel:(id)sender isValidFilename:(NSString *)filename;
  111. - (BOOL)panel:(id)sender shouldShowFilename:(NSString *)filename;
  112. - (NSComparisonResult)panel:(id)sender compareFilename:(NSString *)file1 with:(NSString *)file2 caseSensitive:(BOOL)caseSensitive;
  113. @end
  114.