Added header, replaced import with include

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@6653 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2000-06-10 16:17:13 +00:00
parent 8aeb8af007
commit db0f58f235
3 changed files with 267 additions and 169 deletions

View file

@ -1,11 +1,41 @@
/*
NSDocument.h
The abstract document class
Copyright (C) 1999 Free Software Foundation, Inc.
Author: Carl Lindberg <Carl.Lindberg@hbo.com>
Date: 1999
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _GNUstep_H_NSDocument
#define _GNUstep_H_NSDocument
#include <Foundation/Foundation.h>
#include <AppKit/NSNibDeclarations.h>
#import <Foundation/Foundation.h>
#import <AppKit/NSNibDeclarations.h>
@class NSArray, NSMutableArray, NSData;
@class NSURL, NSUndoManager;
@class NSWindow, NSView, NSSavePanel, NSMenuItem, NSPrintInfo, NSPopUpButton, NSFileWrapper;
@class NSWindow, NSView, NSSavePanel, NSMenuItem;
@class NSPrintInfo, NSPopUpButton, NSFileWrapper;
@class NSDocumentController, NSWindowController;
@ -132,3 +162,4 @@ typedef enum _NSSaveOperationType {
@end
#endif // _GNUstep_H_NSDocument

View file

@ -1,6 +1,35 @@
/*
NSDocumentController.h
#import <Foundation/Foundation.h>
#import <AppKit/NSNibDeclarations.h>
The document controller class
Copyright (C) 1999 Free Software Foundation, Inc.
Author: Carl Lindberg <Carl.Lindberg@hbo.com>
Date: 1999
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _GNUstep_H_NSDocumentController
#define _GNUstep_H_NSDocumentController
#include <Foundation/Foundation.h>
#include <AppKit/NSNibDeclarations.h>
@class NSArray, NSMutableArray;
@class NSURL;
@ -11,6 +40,7 @@
{
@private
NSMutableArray *_documents;
NSMutableArray *_recentDocuments;
struct __controllerFlags {
unsigned int shouldCreateUI:1;
unsigned int RESERVED:31;
@ -30,10 +60,8 @@
- (id)openUntitledDocumentOfType:(NSString*)type display:(BOOL)display;
- (id)openDocumentWithContentsOfFile:(NSString *)fileName display:(BOOL)display;
#if NS_URL
//- (id)makeDocumentWithContentsOfURL:(NSURL *)url ofType:(NSString *)type;
//- (id)openDocumentWithContentsOfURL:(NSURL *)url display:(BOOL)display;
#endif
- (id)makeDocumentWithContentsOfURL:(NSURL *)url ofType:(NSString *)type;
- (id)openDocumentWithContentsOfURL:(NSURL *)url display:(BOOL)display;
/*" With or without UI "*/
- (BOOL)shouldCreateUI;
@ -43,15 +71,20 @@
- (IBAction)saveAllDocuments:(id)sender;
- (IBAction)openDocument:(id)sender;
- (IBAction)newDocument:(id)sender;
- (IBAction)clearRecentDocuments:(id)sender;
/*" Recent Documents "*/
- (void)noteNewRecentDocumentURL:(NSURL *)anURL;
- (NSArray *)recentDocumentURLs;
/*" Open panel "*/
#if NS_URL
//- (NSArray *)URLsFromRunningOpenPanel;
#endif
- (NSArray *)URLsFromRunningOpenPanel;
- (NSArray *)fileNamesFromRunningOpenPanel;
- (int)runModalOpenPanel:(NSOpenPanel *)openPanel forTypes:(NSArray *)openableFileExtensions;
/*" Document management "*/
- (void)addDocument:(NSDocument *)document;
- (void)removeDocument:(NSDocument *)document;
- (BOOL)closeAllDocuments;
- (BOOL)reviewUnsavedDocumentsWithAlertTitle:(NSString *)title cancellable:(BOOL)cancellable;
- (NSArray *)documents;
@ -61,6 +94,7 @@
- (id)documentForWindow:(NSWindow *)window;
- (id)documentForFileName:(NSString *)fileName;
/*" Menu validation "*/
- (BOOL)validateMenuItem:(NSMenuItem *)anItem;
@ -72,3 +106,5 @@
@end
#endif // _GNUstep_H_NSDocumentController

View file

@ -1,5 +1,34 @@
/*
NSDocumentFramworkPrivate.h
#import "NSDocumentController.h"
The private methods of all the classes of the document framework
Copyright (C) 1999 Free Software Foundation, Inc.
Author: Carl Lindberg <Carl.Lindberg@hbo.com>
Date: 1999
This file is part of the GNUstep GUI Library.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef _GNUstep_H_NSDocumentFramworkPrivate
#define _GNUstep_H_NSDocumentFramworkPrivate
#include "NSDocumentController.h"
@interface NSDocumentController (Private)
- (NSArray *)_editorAndViewerTypesForClass:(Class)documentClass;
@ -9,7 +38,7 @@
@end
#import "NSDocument.h"
#include "NSDocument.h"
@interface NSDocument (Private)
- (void)_removeWindowController:(NSWindowController *)controller;
@ -17,10 +46,12 @@
@end
#import "NSWindowController.h"
#include "NSWindowController.h"
@interface NSWindowController (Private)
- (void)_windowDidLoad;
- (void)_synchronizeWindowTitleWithDocumentName;
- (void)setWindow:(NSWindow *)window;
@end
#endif // _GNUstep_H_NSDocumentFramworkPrivate