This is Document.h in view mode; [Download] [Up]
/* * (a) (C) 1990 by Adobe Systems Incorporated. All rights reserved. * * (b) If this Sample Code is distributed as part of the Display PostScript * System Software Development Kit from Adobe Systems Incorporated, * then this copy is designated as Development Software and its use is * subject to the terms of the License Agreement attached to such Kit. * * (c) If this Sample Code is distributed independently, then the following * terms apply: * * (d) This file may be freely copied and redistributed as long as: * 1) Parts (a), (d), (e) and (f) continue to be included in the file, * 2) If the file has been modified in any way, a notice of such * modification is conspicuously indicated. * * (e) PostScript, Display PostScript, and Adobe are registered trademarks of * Adobe Systems Incorporated. * * (f) THE INFORMATION BELOW IS FURNISHED AS IS, IS SUBJECT TO * CHANGE WITHOUT NOTICE, AND SHOULD NOT BE CONSTRUED * AS A COMMITMENT BY ADOBE SYSTEMS INCORPORATED. * ADOBE SYSTEMS INCORPORATED ASSUMES NO RESPONSIBILITY * OR LIABILITY FOR ANY ERRORS OR INACCURACIES, MAKES NO * WARRANTY OF ANY KIND (EXPRESS, IMPLIED OR STATUTORY) * WITH RESPECT TO THIS INFORMATION, AND EXPRESSLY * DISCLAIMS ANY AND ALL WARRANTIES OF MERCHANTABILITY, * FITNESS FOR PARTICULAR PURPOSES AND NONINFRINGEMENT * OF THIRD PARTY RIGHTS. */ /* * Document.h * * The Document class serves to keep track of the global information * concerning a particular file. It sets up the window and the views * (ScrollView, DocView and DrawingView) . It manages the name * of the file as well as save and print info information. * * Version: 2.0 * Author: Ken Fromm * History: * 03-17-91 Added this comment and fixed the Save To section. */ #import <appkit/Responder.h> #import <appkit/graphics.h> #define MIN_WINDOW_WIDTH 50.0 #define MIN_WINDOW_HEIGHT 75.0 #define SCROLLVIEW_BORDER NX_NOBORDER #define NOPREFIX 0 #define LOADPREFIX 1 #define SAVEPREFIX 2 @interface Document : Responder { id listenerId, /* the icon-dragging listener */ printinfoId, /* the print info object */ drawingviewId, /* the drawing view */ docviewId, /* contains the drawing view, allows zooming*/ windowId; /* the window the views above are in */ char *name; /* the name of the document */ char *directory; /* the directory it is in */ char *iconPathList; /* list of files last dragged over document */ BOOL saved; /* whether document has associated disk file */ } /* Factory methods */ + new; + newFromFile:(const char *)file; - readFromStream:(NXStream *)stream; - setDocument; - free; - createWindow; - window; - drawingView; - docView; - printInfo; /* Target/Action methods */ - changeLayout:sender; - print:sender; - revertToSaved:sender; - import:sender; - saveFile:(const char *) file; - save:sender; - saveAs:sender; - saveTo:sender; /* Document name and file handling methods */ - (const char *)filename; - (const char *)directory; - (const char *)name; - setName:(const char *)name; - setName:(const char *)name andDirectory:(const char *)directory; /* Window delegate methods */ - windowDidBecomeMain:sender; - windowWillResize:sender toSize:(NXSize *)size; - windowDidResize:sender; - windowWillClose:sender; /* Workspace Manager icon-dragging methods */ - registerWindow; - unregisterWindow; - (int)iconEntered:(int)windowNum at:(double)x :(double)y iconWindow:(int)iconWindowNum iconX:(double)iconX iconY:(double)iconY iconWidth:(double)iconWidth iconHeight:(double)iconHeight pathList:(char *)pathList; - (int)iconReleasedAt:(double)x :(double)y ok:(int *)flag; /* Menu command validation method */ - (BOOL)validateCommand:menuCell; /* Responder setting */ - resetResponder; @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.