1 /* Document.h Subclass of NSDocument for GScheme application 2 3 Copyright (C) 2000 Free Software Foundation, Inc. 4 5 Author: Fred Kiefer <fredkiefer@gmx.de> 6 Date: 2000. 7 8 Adapted by: Marko Riedel <mriedel@neuearbeit.de>. 9 Date: 2002. 10 11 This file is part of GNUstep. 12 13 This program is free software; you can redistribute it and/or modify 14 it under the terms of the GNU General Public License as published by 15 the Free Software Foundation; either version 2 of the License, or 16 (at your option) any later version. 17 18 This program is distributed in the hope that it will be useful, 19 but WITHOUT ANY WARRANTY; without even the implied warranty of 20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 GNU General Public License for more details. 22 23 You should have received a copy of the GNU General Public License 24 along with this program; if not, write to the Free Software 25 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 26 */ 27 #import <Foundation/NSData.h> 28 #import <Foundation/NSAttributedString.h> 29 #import <AppKit/NSDocument.h> 30 31 #import "SCMTextView.h" 32 33 @interface Document : NSDocument 34 { 35 NSScrollView *sview; 36 SCMTextView *tview; 37 38 NSString *progstr; 39 BOOL readOnly; 40 } 41 42 - init; 43 44 - (void)textDidChange:(NSNotification *)textObject; 45 - (void)makeWindowControllers; 46 47 - evaluate:(id)sender; 48 49 - (NSData *)dataRepresentationOfType:(NSString *)aType; 50 - (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)aType; 51 52 - (BOOL)readFromFile:(NSString *)fileName ofType:(NSString *)docType; 53 - (BOOL)writeToFile:(NSString *)fullDocumentPath ofType:(NSString *)docType 54 originalFile:(NSString *)fullOriginalDocumentPath 55 saveOperation:(NSSaveOperationType)saveOperationType; 56 57 @end 58