mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 20:31:56 +00:00
Removed ivars _oldContentFrame, _oldTopViewFrame.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5082 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
569eb08829
commit
4c528e57ce
1 changed files with 224 additions and 227 deletions
|
@ -1,227 +1,224 @@
|
||||||
/*
|
/*
|
||||||
NSSavePanel.h
|
NSSavePanel.h
|
||||||
|
|
||||||
Standard save panel for saving files
|
Standard save panel for saving files
|
||||||
|
|
||||||
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
Copyright (C) 1996, 1997 Free Software Foundation, Inc.
|
||||||
|
|
||||||
Author: Scott Christley <scottc@net-community.com>
|
Author: Scott Christley <scottc@net-community.com>
|
||||||
Date: 1996
|
Date: 1996
|
||||||
Author: Daniel B?hringer <boehring@biomed.ruhr-uni-bochum.de>
|
Author: Daniel B?hringer <boehring@biomed.ruhr-uni-bochum.de>
|
||||||
Date: August 1998
|
Date: August 1998
|
||||||
Source by Daniel B?hringer integrated into Scott Christley's preliminary
|
Source by Daniel B?hringer integrated into Scott Christley's preliminary
|
||||||
implementation by Felipe A. Rodriguez <far@ix.netcom.com>
|
implementation by Felipe A. Rodriguez <far@ix.netcom.com>
|
||||||
|
|
||||||
This file is part of the GNUstep GUI Library.
|
This file is part of the GNUstep GUI Library.
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or
|
This library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public
|
modify it under the terms of the GNU Library General Public
|
||||||
License as published by the Free Software Foundation; either
|
License as published by the Free Software Foundation; either
|
||||||
version 2 of the License, or (at your option) any later version.
|
version 2 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
This library is distributed in the hope that it will be useful,
|
This library is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
Library General Public License for more details.
|
Library General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU Library General Public
|
||||||
License along with this library; see the file COPYING.LIB.
|
License along with this library; see the file COPYING.LIB.
|
||||||
If not, write to the Free Software Foundation,
|
If not, write to the Free Software Foundation,
|
||||||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _GNUstep_H_NSSavePanel
|
#ifndef _GNUstep_H_NSSavePanel
|
||||||
#define _GNUstep_H_NSSavePanel
|
#define _GNUstep_H_NSSavePanel
|
||||||
|
|
||||||
#include <Foundation/NSCoder.h>
|
#include <Foundation/NSCoder.h>
|
||||||
#include <Foundation/NSSet.h>
|
#include <Foundation/NSSet.h>
|
||||||
|
|
||||||
#include <AppKit/NSPanel.h>
|
#include <AppKit/NSPanel.h>
|
||||||
#include <AppKit/NSBrowser.h>
|
#include <AppKit/NSBrowser.h>
|
||||||
|
|
||||||
@class NSString;
|
@class NSString;
|
||||||
@class NSView;
|
@class NSView;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
NSFileHandlingPanelImageButton,
|
NSFileHandlingPanelImageButton,
|
||||||
NSFileHandlingPanelTitleField,
|
NSFileHandlingPanelTitleField,
|
||||||
NSFileHandlingPanelBrowser,
|
NSFileHandlingPanelBrowser,
|
||||||
NSFileHandlingPanelCancelButton,
|
NSFileHandlingPanelCancelButton,
|
||||||
NSFileHandlingPanelOKButton,
|
NSFileHandlingPanelOKButton,
|
||||||
NSFileHandlingPanelForm,
|
NSFileHandlingPanelForm,
|
||||||
NSFileHandlingPanelHomeButton,
|
NSFileHandlingPanelHomeButton,
|
||||||
NSFileHandlingPanelDiskButton,
|
NSFileHandlingPanelDiskButton,
|
||||||
NSFileHandlingPanelDiskEjectButton
|
NSFileHandlingPanelDiskEjectButton
|
||||||
};
|
};
|
||||||
|
|
||||||
@interface NSSavePanel : NSPanel <NSCoding>
|
@interface NSSavePanel : NSPanel <NSCoding>
|
||||||
{
|
{
|
||||||
id _accessoryView;
|
id _accessoryView;
|
||||||
id _bottomView;
|
id _bottomView;
|
||||||
id _delegate;
|
id _delegate;
|
||||||
id _browser;
|
id _browser;
|
||||||
id _form;
|
id _form;
|
||||||
id _prompt;
|
id _prompt;
|
||||||
id _titleField;
|
id _titleField;
|
||||||
id _topView;
|
id _topView;
|
||||||
|
|
||||||
NSString *_requiredFileType;
|
NSString *_requiredFileType;
|
||||||
NSString *_lastValidPath;
|
NSString *_lastValidPath;
|
||||||
|
|
||||||
BOOL _treatsFilePackagesAsDirectories;
|
BOOL _treatsFilePackagesAsDirectories;
|
||||||
BOOL _delegateHasCompareFilter;
|
BOOL _delegateHasCompareFilter;
|
||||||
BOOL _delegateHasFilenameFilter;
|
BOOL _delegateHasFilenameFilter;
|
||||||
BOOL _delegateHasValidNameFilter;
|
BOOL _delegateHasValidNameFilter;
|
||||||
|
}
|
||||||
NSRect _oldContentFrame;
|
|
||||||
NSRect _oldTopViewFrame;
|
/*
|
||||||
}
|
* Creating an NSSavePanel
|
||||||
|
*/
|
||||||
/*
|
+ (NSSavePanel *) savePanel;
|
||||||
* Creating an NSSavePanel
|
|
||||||
*/
|
/*
|
||||||
+ (NSSavePanel *) savePanel;
|
* Customizing the NSSavePanel
|
||||||
|
*/
|
||||||
/*
|
- (void) setAccessoryView: (NSView *)aView;
|
||||||
* Customizing the NSSavePanel
|
- (NSView *) accessoryView;
|
||||||
*/
|
|
||||||
- (void) setAccessoryView: (NSView *)aView;
|
/*
|
||||||
- (NSView *) accessoryView;
|
* Sets the title of the NSSavePanel to title. By default,
|
||||||
|
* 'Save' is the title string. If you adapt the NSSavePanel
|
||||||
/*
|
* for other uses, its title should reflect the user action
|
||||||
* Sets the title of the NSSavePanel to title. By default,
|
* that brings it to the screen.
|
||||||
* 'Save' is the title string. If you adapt the NSSavePanel
|
*/
|
||||||
* for other uses, its title should reflect the user action
|
- (void) setTitle: (NSString *)title;
|
||||||
* that brings it to the screen.
|
- (NSString *) title;
|
||||||
*/
|
- (void) setPrompt: (NSString *)prompt;
|
||||||
- (void) setTitle: (NSString *)title;
|
|
||||||
- (NSString *) title;
|
/*
|
||||||
- (void) setPrompt: (NSString *)prompt;
|
* Returns the prompt of the Save panel field that holds
|
||||||
|
* the current pathname or file name. By default this
|
||||||
/*
|
* prompt is 'Name: '. *Note - currently no prompt is shown.
|
||||||
* Returns the prompt of the Save panel field that holds
|
*/
|
||||||
* the current pathname or file name. By default this
|
- (NSString *) prompt;
|
||||||
* prompt is 'Name: '. *Note - currently no prompt is shown.
|
|
||||||
*/
|
/*
|
||||||
- (NSString *) prompt;
|
* Setting Directory and File Type
|
||||||
|
*/
|
||||||
/*
|
- (NSString *) requiredFileType;
|
||||||
* Setting Directory and File Type
|
|
||||||
*/
|
/*
|
||||||
- (NSString *) requiredFileType;
|
* Sets the current path name in the Save panel's browser.
|
||||||
|
* The path argument must be an absolute path name.
|
||||||
/*
|
*/
|
||||||
* Sets the current path name in the Save panel's browser.
|
- (void) setDirectory: (NSString *)path;
|
||||||
* The path argument must be an absolute path name.
|
|
||||||
*/
|
/*
|
||||||
- (void) setDirectory: (NSString *)path;
|
* Specifies the type, a file name extension to be appended to
|
||||||
|
* any selected files that don't already have that extension;
|
||||||
/*
|
* The argument type should not include the period that begins
|
||||||
* Specifies the type, a file name extension to be appended to
|
* the extension. Invoke this method each time the Save panel
|
||||||
* any selected files that don't already have that extension;
|
* is used for another file type within the application.
|
||||||
* The argument type should not include the period that begins
|
*/
|
||||||
* the extension. Invoke this method each time the Save panel
|
- (void) setRequiredFileType: (NSString *)type;
|
||||||
* is used for another file type within the application.
|
|
||||||
*/
|
/*
|
||||||
- (void) setRequiredFileType: (NSString *)type;
|
* Sets the NSSavePanel's behavior for displaying file packages
|
||||||
|
* (for example, MyApp.app) to the user. If flag is YES, the
|
||||||
/*
|
* user is shown files and subdirectories within a file
|
||||||
* Sets the NSSavePanel's behavior for displaying file packages
|
* package. If NO, the NSSavePanel shows each file package as
|
||||||
* (for example, MyApp.app) to the user. If flag is YES, the
|
* a file, thereby giving no indication that it is a directory.
|
||||||
* user is shown files and subdirectories within a file
|
*/
|
||||||
* package. If NO, the NSSavePanel shows each file package as
|
- (void) setTreatsFilePackagesAsDirectories: (BOOL)flag;
|
||||||
* a file, thereby giving no indication that it is a directory.
|
- (BOOL) treatsFilePackagesAsDirectories;
|
||||||
*/
|
|
||||||
- (void) setTreatsFilePackagesAsDirectories: (BOOL)flag;
|
/*
|
||||||
- (BOOL) treatsFilePackagesAsDirectories;
|
* Validates and possibly reloads the browser columns visible
|
||||||
|
* in the Save panel by causing the delegate method
|
||||||
/*
|
* panel: shouldShowFilename: to be invoked. One situation in
|
||||||
* Validates and possibly reloads the browser columns visible
|
* which this method would find use is whey you want the
|
||||||
* in the Save panel by causing the delegate method
|
* browser show only files with certain extensions based on the
|
||||||
* panel: shouldShowFilename: to be invoked. One situation in
|
* selection made in an accessory-view pop-up list. When the
|
||||||
* which this method would find use is whey you want the
|
* user changes the selection, you would invoke this method to
|
||||||
* browser show only files with certain extensions based on the
|
* revalidate the visible columns.
|
||||||
* selection made in an accessory-view pop-up list. When the
|
*/
|
||||||
* user changes the selection, you would invoke this method to
|
- (void) validateVisibleColumns;
|
||||||
* revalidate the visible columns.
|
|
||||||
*/
|
/*
|
||||||
- (void) validateVisibleColumns;
|
* Running the NSSavePanel
|
||||||
|
*/
|
||||||
/*
|
|
||||||
* Running the NSSavePanel
|
/*
|
||||||
*/
|
* Initializes the panel to the directory specified by path
|
||||||
|
* and, optionally, the file specified by filename, then
|
||||||
/*
|
* displays it and begins its modal event loop; path and
|
||||||
* Initializes the panel to the directory specified by path
|
* filename can be empty strings, but cannot be nil. The
|
||||||
* and, optionally, the file specified by filename, then
|
* method invokes Application's runModalForWindow: method with
|
||||||
* displays it and begins its modal event loop; path and
|
* self as the argument. Returns NSOKButton (if the user
|
||||||
* filename can be empty strings, but cannot be nil. The
|
* clicks the OK button) or NSCancelButton (if the user clicks
|
||||||
* method invokes Application's runModalForWindow: method with
|
* the Cancel button). Do not invoke filename or directory
|
||||||
* self as the argument. Returns NSOKButton (if the user
|
* within a modal loop because the information that these
|
||||||
* clicks the OK button) or NSCancelButton (if the user clicks
|
* methods fetch is updated only upon return.
|
||||||
* the Cancel button). Do not invoke filename or directory
|
*/
|
||||||
* within a modal loop because the information that these
|
- (int) runModalForDirectory: (NSString *)path file: (NSString *)filename;
|
||||||
* methods fetch is updated only upon return.
|
- (int) runModal;
|
||||||
*/
|
|
||||||
- (int) runModalForDirectory: (NSString *)path file: (NSString *)filename;
|
/*
|
||||||
- (int) runModal;
|
* Reading Save Information
|
||||||
|
*/
|
||||||
/*
|
|
||||||
* Reading Save Information
|
/*
|
||||||
*/
|
* Returns the absolute pathname of the directory currently
|
||||||
|
* shown in the panel. Do not invoke this method within a
|
||||||
/*
|
* modal session (runModal or runModalForDirectory: file: )
|
||||||
* Returns the absolute pathname of the directory currently
|
* because the directory information is only updated just
|
||||||
* shown in the panel. Do not invoke this method within a
|
* before the modal session ends.
|
||||||
* modal session (runModal or runModalForDirectory: file: )
|
*/
|
||||||
* because the directory information is only updated just
|
- (NSString *) directory;
|
||||||
* before the modal session ends.
|
- (NSString *) filename;
|
||||||
*/
|
|
||||||
- (NSString *) directory;
|
/*
|
||||||
- (NSString *) filename;
|
* Target and Action Methods
|
||||||
|
*/
|
||||||
/*
|
- (void) ok: (id)sender; // target/action of panel's OK button.
|
||||||
* Target and Action Methods
|
- (void) cancel: (id)sender; // target/action of panel's cancel button
|
||||||
*/
|
|
||||||
- (void) ok: (id)sender; // target/action of panel's OK button.
|
/*
|
||||||
- (void) cancel: (id)sender; // target/action of panel's cancel button
|
* Responding to User Input
|
||||||
|
*/
|
||||||
/*
|
- (void) selectText: (id)sender;
|
||||||
* Responding to User Input
|
|
||||||
*/
|
/*
|
||||||
- (void) selectText: (id)sender;
|
* NSCoding protocol
|
||||||
|
*/
|
||||||
/*
|
- (void) encodeWithCoder: (id)aCoder;
|
||||||
* NSCoding protocol
|
- (id) initWithCoder: (id)aDecoder;
|
||||||
*/
|
|
||||||
- (void) encodeWithCoder: (id)aCoder;
|
@end
|
||||||
- (id) initWithCoder: (id)aDecoder;
|
|
||||||
|
/*
|
||||||
@end
|
* Methods Implemented by the Delegate
|
||||||
|
*/
|
||||||
/*
|
@interface NSObject (NSSavePanelDelegate)
|
||||||
* Methods Implemented by the Delegate
|
|
||||||
*/
|
/*
|
||||||
@interface NSObject (NSSavePanelDelegate)
|
* The NSSavePanel sends this message just before the end of a
|
||||||
|
* modal session for each file name displayed or selected
|
||||||
/*
|
* (including file names in multiple selections). The delegate
|
||||||
* The NSSavePanel sends this message just before the end of a
|
* determines whether it wants the file identified by filename;
|
||||||
* modal session for each file name displayed or selected
|
* it returns YES if the file name is valid, or NO if the
|
||||||
* (including file names in multiple selections). The delegate
|
* NSSavePanel should stay in its modal loop and wait for the
|
||||||
* determines whether it wants the file identified by filename;
|
* user to type in or select a different file name or names. If
|
||||||
* it returns YES if the file name is valid, or NO if the
|
* the delegate refuses a file name in a multiple selection,
|
||||||
* NSSavePanel should stay in its modal loop and wait for the
|
* none of the file names in the selection are accepted.
|
||||||
* user to type in or select a different file name or names. If
|
*/
|
||||||
* the delegate refuses a file name in a multiple selection,
|
- (BOOL) panel: (id)sender isValidFilename: (NSString*)filename;
|
||||||
* none of the file names in the selection are accepted.
|
- (NSComparisonResult) panel: (id)sender
|
||||||
*/
|
compareFilename: (NSString *)filename1
|
||||||
- (BOOL) panel: (id)sender isValidFilename: (NSString*)filename;
|
with: (NSString *)filename2
|
||||||
- (NSComparisonResult) panel: (id)sender
|
caseSensitive: (BOOL)caseSensitive;
|
||||||
compareFilename: (NSString *)filename1
|
- (BOOL) panel: (id)sender shouldShowFilename: (NSString *)filename;
|
||||||
with: (NSString *)filename2
|
|
||||||
caseSensitive: (BOOL)caseSensitive;
|
@end
|
||||||
- (BOOL) panel: (id)sender shouldShowFilename: (NSString *)filename;
|
|
||||||
|
#endif /* _GNUstep_H_NSSavePanel */
|
||||||
@end
|
|
||||||
|
|
||||||
#endif /* _GNUstep_H_NSSavePanel */
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue