ftp.nice.ch/peanuts/GeneralData/Documents/adobe/DPS.Purple.Text.tar.gz#/NX_Text/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. It is
 *	the doc view of the scroll view and can be scrolled.
 *
 *	Version:	2.0
 *	Author:	Ken Fromm
 *	History:
 *			03-07-91		Added this comment.
 */

#import "hdshowany.h"
#import <appkit/View.h>

#define  FONTSIZE		12
#define  ROTATION		30
#define  FONTMETRICS	(NX_FONTHEADER | NX_FONTCHARDATA | NX_FONTKERNING)

#define  TRACKVAL	2.0

#define  NUM_LINES		19		/* Number of lines in text.c */
#define  LINE_LENGTH		330		/* Length for calculating full justification */
#define  LINE_LENGTH_TR	462		/* Length for calculating full justification with tracking */
#define  MAX_XSHOW		128

#define  XSHOW		0
#define  RMSHOW		1
#define  VARSHOW	2

#define  KERN_TAG	0
#define  WIDTH_TAG	1

typedef struct _Timing {
	int		chars;
	int		reshows;
	int		kerns;
	int		time;
}  Timing;

@interface DrawingView:View
{
	BOOL		eraseFields,		/* If yes, erase the timing fields */
				trace,			/* If yes, turn on DPSTraceContext()  */

				justify,			/* If yes, justify the text */
				kern,			/* If yes, kern the text */
				track,			/* If yes, track the text */
				cache,			/* If no, set the byte limit of the cache real low */
								/* Previous fonts and size are still in the cache. */
								/* Only new fonts and sizes will not be cached. */
				outline,			/* If yes, use the outline font dictionary */
				screen,			/* If yes, use screen widths */

				compareKern,		/* If yes, show both kerning and no kerning */
				compareWidths;	/* If yes, show both printer and screen width */

	int			showtype,		/* The type of font showing technique to use */

				rotation,			/* The rotation of this view. */

				size,				/* Font cache parameters */
				lower,
				upper;

	float			fontsize;			/* The current font size */

	NXCoord		*charspace;

	ShowStruct	s;
				/* The structure for holding the information for */
								/* each line of text when displaying. */

	Timing		timing_info;		/* TIming information */
}

+newFrame:(NXRect *) frm;
- free;

- (int) rotation;

- justify:sender;
- kern:sender;
- track:sender;
- cache:sender;
- outline:sender;

- show:sender;

- compareKerns:sender;
- compareWidths:sender;

- rotate:sender;

- trace:sender;

- eraseFields:sender;
- resetFields:sender;
- displayFields:sender;

- reshow:sender;

- mouseDown:(NXEvent *)event;

- showText:(const NXRect *)r;
- drawSelf:(const NXRect *)r :(int) count;

@end

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