ftp.nice.ch/peanuts/GeneralData/Documents/adobe/DPS.Purple.ImportInt.tar.gz#/NX_ImportInt/DrawingView.h

This is DrawingView.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.
 */

/*
 *	DrawingView.h
 *
 *	This view represents the page that the image is drawn onto.
 *
 *	Version:	2.0
 *	Author:	Ken Fromm
 *	History:
 *			03-17-91		Added this comment, fixed the preview exporting
 *						section.
 */

#import "ImportApp.h"
#import "epsfstruct.h"

#import <appkit/View.h>
#import <appkit/tiff.h>
#import <appkit/timer.h>

#define  FONTSIZE			5
#define  SCROLL_MARGIN		8
#define  HITSETTING			4

/*
*	A very system dependent define. It defines the amount of time
*	that the mouse must be held down before it is considered a move.
*	This hopefully prevents accidentally moving an object when
*	just trying to select it or another.
*/
#define  MOVE_INTERVAL	12

/* Flags that control the drawing operations of the graphic objects. */
#define  NOFLAGS			0x0
#define  REDRAWFLAG		0x1
#define  MOVEFLAG			0x2
#define  CLEARFLAG			0x4
#define  REFRESHFLAG		0x8
		
@interface DrawingView:View
{
	id		imageId,			/* id of the image for the preview */
			bufferId,			/* id of the offscreen buffer (content view) */
			graphicId;		/* id of imported file waiting to be placed */

	int		timermask;		/* the mask for modal loop timing */
}

+newFrame:(const NXRect *) frm;

- free;

- buffer;
- image;
- (float) controlPointSize;

- resetCursorRects;

- writePSToStream:(NXStream *) stream;

- delete:sender;

- constrainPoint:(NXPoint *)aPt  withOffset:(const NXSize*)llOffset  :(const NXSize*)urOffset;
- constrainRect:(NXRect *)aRect;

- redrawObject:(int) pt_num;
- moveObject:(NXEvent *)event;

- checkControl:(const NXPoint *) p :(int *) pt_num;
- checkObject:(const NXPoint *) p;
- selectObject;
- deselectObject;
- testObject:(NXEvent *)event;

- importFile:(const char *) file;
- placeObjectAt:(NXPoint *) p;
- importObject:(NXEvent *)event;

/* Event handling methods. */
- mouseDown:(NXEvent *)event;
- keyDown:(NXEvent *) event;

/* Drawing methods */
- drawObject:object  forRect:(NXRect *)r  withFlags:(int) flags;
- drawControl:object  forRect:(NXRect *)r  withFlags:(int) flags;
- drawSelf:(NXRect *)r :(int) count;
- display:(NXRect *)r  :(int) count  :(BOOL)flag;

- (BOOL)acceptsFirstResponder;

/* Printing/copying methods overridden from the view class. */
- addResources:(Resource *) resourceDoc;
- beginResourceComments:(const NXRect *) bbox;

- beginPrologueBBox:(const NXRect *)boundingBox 
	creationDate:(const char *)dateCreated 
	createdBy:(const char *)anApplication 
	fonts:(const char *)fontNames 
	forWhom:(const char *)user 
	pages:(int)numPages 
	title:(const char *)aTitle;
- endHeaderComments;
- endPrologue;
- beginSetup;
- endSetup;
- beginTrailer;
- endTrailer;

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.