mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +00:00
Added new MacOSX methods.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@15105 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2a7aa0a29b
commit
12f532ae25
5 changed files with 105 additions and 50 deletions
|
@ -1,3 +1,11 @@
|
|||
2002-11-24 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/gnustep/gui/NSSavePanel.h
|
||||
* Headers/gnustep/gui/NSOpenPanel.h
|
||||
* Source/NSSavePanel.m
|
||||
* Source/NSOpenPanel.m
|
||||
Added new MacOSX methods.
|
||||
|
||||
2002-11-24 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSBezierPath.m
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
|
||||
@class NSString;
|
||||
@class NSArray;
|
||||
@class NSMutableArray;
|
||||
|
||||
@interface NSOpenPanel : NSSavePanel <NSCoding>
|
||||
{
|
||||
|
@ -49,40 +48,46 @@
|
|||
BOOL _canChooseFiles;
|
||||
}
|
||||
// Accessing the NSOpenPanel shared instance
|
||||
+ (NSOpenPanel *)openPanel;
|
||||
|
||||
// Filtering Files
|
||||
- (BOOL)allowsMultipleSelection;
|
||||
- (BOOL)canChooseDirectories;
|
||||
- (BOOL)canChooseFiles;
|
||||
- (void)setAllowsMultipleSelection:(BOOL)flag;
|
||||
- (void)setCanChooseDirectories:(BOOL)flag;
|
||||
- (void)setCanChooseFiles:(BOOL)flag;
|
||||
|
||||
- (NSArray *)filenames;
|
||||
+ (NSOpenPanel *) openPanel;
|
||||
|
||||
// Running an NSOpenPanel
|
||||
- (int)runModalForTypes:(NSArray *)fileTypes;
|
||||
- (int)runModalForDirectory:(NSString *)path
|
||||
file:(NSString *)name
|
||||
types:(NSArray *)fileTypes;
|
||||
- (int) runModalForTypes: (NSArray *)fileTypes;
|
||||
- (int) runModalForDirectory: (NSString *)path
|
||||
file: (NSString *)name
|
||||
types: (NSArray *)fileTypes;
|
||||
|
||||
#ifndef STRICT_OPENSTEP
|
||||
- (int)runModalForDirectory:(NSString *)path
|
||||
file:(NSString *)name
|
||||
types:(NSArray *)fileTypes
|
||||
relativeToWindow:(NSWindow*)window;
|
||||
- (void)beginSheetForDirectory:(NSString *)path
|
||||
file:(NSString *)name
|
||||
types:(NSArray *)fileTypes
|
||||
modalForWindow:(NSWindow *)docWindow
|
||||
modalDelegate:(id)delegate
|
||||
didEndSelector:(SEL)didEndSelector
|
||||
contextInfo:(void *)contextInfo;
|
||||
|
||||
- (NSArray *)URLs;
|
||||
- (int) runModalForDirectory: (NSString *)path
|
||||
file: (NSString *)name
|
||||
types: (NSArray *)fileTypes
|
||||
relativeToWindow: (NSWindow*)window;
|
||||
- (void) beginSheetForDirectory: (NSString *)path
|
||||
file: (NSString *)name
|
||||
types: (NSArray *)fileTypes
|
||||
modalForWindow: (NSWindow *)docWindow
|
||||
modalDelegate: (id)delegate
|
||||
didEndSelector: (SEL)didEndSelector
|
||||
contextInfo: (void *)contextInfo;
|
||||
#endif
|
||||
|
||||
- (NSArray *) filenames;
|
||||
|
||||
#ifndef STRICT_OPENSTEP
|
||||
- (NSArray *) URLs;
|
||||
#endif
|
||||
|
||||
// Filtering Files
|
||||
- (BOOL) canChooseDirectories;
|
||||
- (BOOL) canChooseFiles;
|
||||
- (void) setCanChooseDirectories: (BOOL)flag;
|
||||
- (void) setCanChooseFiles: (BOOL)flag;
|
||||
#ifndef STRICT_OPENSTEP
|
||||
- (void) setResolvesAliases: (BOOL)flag;
|
||||
- (BOOL) resolvesAliases;
|
||||
#endif
|
||||
|
||||
- (BOOL) allowsMultipleSelection;
|
||||
- (void) setAllowsMultipleSelection: (BOOL)flag;
|
||||
@end
|
||||
|
||||
#endif // _GNUstep_H_NSOpenPanel
|
||||
|
|
|
@ -33,32 +33,29 @@
|
|||
#ifndef _GNUstep_H_NSSavePanel
|
||||
#define _GNUstep_H_NSSavePanel
|
||||
|
||||
#include <Foundation/NSCoder.h>
|
||||
#include <Foundation/NSSet.h>
|
||||
|
||||
#include <AppKit/NSBrowser.h>
|
||||
#include <AppKit/NSButton.h>
|
||||
#include <AppKit/NSForm.h>
|
||||
#include <AppKit/NSFormCell.h>
|
||||
#include <AppKit/NSPanel.h>
|
||||
#include <AppKit/NSTextField.h>
|
||||
|
||||
@class NSString;
|
||||
@class NSURL;
|
||||
@class NSBrowser;
|
||||
@class NSButton;
|
||||
@class NSForm;
|
||||
@class NSTextField;
|
||||
@class NSView;
|
||||
|
||||
enum {
|
||||
NSFileHandlingPanelCancelButton = NSCancelButton,
|
||||
NSFileHandlingPanelOKButton = NSOKButton,
|
||||
NSFileHandlingPanelImageButton,
|
||||
NSFileHandlingPanelTitleField,
|
||||
NSFileHandlingPanelBrowser,
|
||||
NSFileHandlingPanelCancelButton,
|
||||
NSFileHandlingPanelOKButton,
|
||||
NSFileHandlingPanelForm,
|
||||
NSFileHandlingPanelHomeButton,
|
||||
NSFileHandlingPanelDiskButton,
|
||||
NSFileHandlingPanelDiskEjectButton
|
||||
};
|
||||
|
||||
@interface NSSavePanel : NSPanel <NSCoding>
|
||||
@interface NSSavePanel : NSPanel
|
||||
{
|
||||
NSView *_accessoryView;
|
||||
NSView *_bottomView;
|
||||
|
@ -100,6 +97,15 @@ enum {
|
|||
- (void) setPrompt: (NSString *)prompt;
|
||||
- (NSString *) prompt;
|
||||
|
||||
#ifndef STRICT_OPENSTEP
|
||||
/*
|
||||
* Hidding extensions
|
||||
*/
|
||||
- (void) setCanSelectHiddenExtension: (BOOL) flag;
|
||||
- (BOOL) isExtensionHidden;
|
||||
- (void) setExtensionHidden: (BOOL) flag;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Setting Directory and File Type
|
||||
*/
|
||||
|
@ -128,8 +134,6 @@ enum {
|
|||
modalDelegate: (id)delegate
|
||||
didEndSelector: (SEL)didEndSelector
|
||||
contextInfo: (void *)contextInfo;
|
||||
|
||||
- (NSURL *) URL;
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -137,6 +141,10 @@ enum {
|
|||
*/
|
||||
- (NSString *) directory;
|
||||
- (NSString *) filename;
|
||||
#ifndef STRICT_OPENSTEP
|
||||
- (NSURL *) URL;
|
||||
- (BOOL) isExpanded;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Target and Action Methods
|
||||
|
|
|
@ -46,6 +46,8 @@
|
|||
#include <AppKit/NSApplication.h>
|
||||
#include <AppKit/NSBrowser.h>
|
||||
#include <AppKit/NSBrowserCell.h>
|
||||
#include <AppKit/NSButton.h>
|
||||
#include <AppKit/NSForm.h>
|
||||
#include <AppKit/NSMatrix.h>
|
||||
#include <AppKit/NSOpenPanel.h>
|
||||
|
||||
|
@ -537,6 +539,17 @@ static NSOpenPanel *_gs_gui_open_panel = nil;
|
|||
[self close];
|
||||
}
|
||||
|
||||
- (BOOL) resolvesAliases
|
||||
{
|
||||
// FIXME
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void) setResolvesAliases: (BOOL) flag
|
||||
{
|
||||
// FIXME
|
||||
}
|
||||
|
||||
/*
|
||||
* NSCoding protocol
|
||||
*/
|
||||
|
|
|
@ -31,6 +31,13 @@
|
|||
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
#include <Foundation/NSAutoreleasePool.h>
|
||||
#include <Foundation/NSException.h>
|
||||
#include <Foundation/NSFileManager.h>
|
||||
#include <Foundation/NSNotification.h>
|
||||
#include <Foundation/NSPathUtilities.h>
|
||||
#include <Foundation/NSUserDefaults.h>
|
||||
#include <Foundation/NSURL.h>
|
||||
#include <AppKit/NSApplication.h>
|
||||
#include <AppKit/NSBox.h>
|
||||
#include <AppKit/NSBrowser.h>
|
||||
|
@ -42,16 +49,8 @@
|
|||
#include <AppKit/NSImageView.h>
|
||||
#include <AppKit/NSMatrix.h>
|
||||
#include <AppKit/NSSavePanel.h>
|
||||
#include <AppKit/NSOpenPanel.h>
|
||||
#include <AppKit/NSTextField.h>
|
||||
#include <AppKit/NSWorkspace.h>
|
||||
#include <Foundation/NSException.h>
|
||||
#include <Foundation/NSFileManager.h>
|
||||
#include <Foundation/NSUserDefaults.h>
|
||||
#include <Foundation/NSURL.h>
|
||||
#include <Foundation/NSAutoreleasePool.h>
|
||||
#include <Foundation/NSNotification.h>
|
||||
#include <Foundation/NSPathUtilities.h>
|
||||
|
||||
#define _SAVE_PANEL_X_PAD 5
|
||||
#define _SAVE_PANEL_Y_PAD 4
|
||||
|
@ -1018,6 +1017,28 @@ selectCellWithString: (NSString*)title
|
|||
[super setDelegate: aDelegate];
|
||||
}
|
||||
|
||||
- (void) setCanSelectHiddenExtension: (BOOL) flag
|
||||
{
|
||||
// FIXME
|
||||
}
|
||||
|
||||
- (BOOL) isExtensionHidden
|
||||
{
|
||||
// FIXME
|
||||
return NO;
|
||||
}
|
||||
|
||||
- (void) setExtensionHidden: (BOOL) flag
|
||||
{
|
||||
// FIXME
|
||||
}
|
||||
|
||||
- (BOOL) isExpanded
|
||||
{
|
||||
// FIXME
|
||||
return NO;
|
||||
}
|
||||
|
||||
//
|
||||
// NSCoding protocol
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue