This is ImportApp.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. */ /* * ImportApp.h * * This class performs some of the global functions necessary to * manage the application. * * Version: 2.0 * Author: Ken Fromm * History: * 03-17-91 Added this comment. */ #import <appkit/Application.h> #import <appkit/View.h> #define PTS_BUFFER 1400 #define OPS_BUFFER 1400 #define PTS_HITPOINT 12 #define OPS_HITPOINT 6 /* The defines for placing successive windows on the screen. */ #define WINDOWSTARTX 300 #define WINDOWSTARTY 770 #define NUMPERCOL 5 #define NUMCOLUMNS 2 #define OFFSETX 22 #define OFFSETY 22 #define OFFSETLEFT -44 /* Operations - The first three correspond to the tags in the tool panel. */ #define OP_SELECT 0 #define OP_ZOOMUP 1 #define OP_ROTATE1 2 #define OP_ZOOMDOWN 3 #define OP_ROTATE2 4 #define OP_IMPORT 5 #define OP_PLACE 6 #define OP_FIRST OP_SELECT #define OP_LAST OP_PLACE #define Notify(title, msg) NXRunAlertPanel(title, msg, "OK", NULL, NULL) typedef struct _UPath { float * pts; int num_pts; char *ops; int num_ops; } UPath; @interface ImportApp : Application { id cursorIds[OP_LAST+1]; /* the ids for the cursors */ id resourcePanel, /* the id of the resourcePanel */ toolpanelId, /* the panel of tools */ toolmatrixId; /* the matrix of tools */ BOOL contextFlag, /* use a separate context for eps files */ showEpsfFlag, /* show the epsf buffering windows */ showBufferFlag, /* show the alpha buffer or not */ tracingFlag, /* determines whether tracing should be turned on */ imagingFlag; /* determines whether to image the files */ /* or just display a gray box. */ int operation, /* the current operation of the document */ numWindows; /* the number of windows created */ float hitSetting; /* the current setting for hit detection sensitivity */ UPath hitPoint, /* a global user path structure for the hit detection pt. */ upathBuffer; /* a buffer for holding data for the server */ } + new; + initialize; - free; - setToolPanel:anObject; - setToolMatrix:anObject; - setSaveAccessory:anObject; - setImportAccessory:anObject; - getPosition:(NXPoint *)location forSize:(NXSize *)winSize; /* Teaching aids */ - setContextFlag:sender; - (BOOL) contextFlag; - setShowEpsfFlag:sender; - (BOOL) showEpsfFlag; - setShowBufferFlag:sender; - (BOOL) showBufferFlag; - setTracingFlag:sender; - (BOOL) tracingFlag; - setImagingFlag:sender; - (BOOL) imagingFlag; - setHitSetting:sender; - (float) hitSetting; - (UPath *) hitPoint; - (UPath *) upathBuffer; - currentDocument; - (const char *)currentDirectory; - new:sender; - open:sender; - terminate:sender; - setTool:sender; - resourcePanel; /* Cursor and current operation methods */ - getCursor:(int) index; - cursor; - (int) operation; - setOperation:(int) newOperation; - clearOperation; - appDidInit:sender; - (int)appOpenFile:(const char *)path type:(const char *)type; - (BOOL)appAcceptsAnotherFile:sender; /* Menu updating methods */ - (BOOL)menuItemUpdate:menuCell; @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.