ftp.nice.ch/peanuts/GeneralData/Documents/adobe/Dial.tar.gz#/DialView.h

This is DialView.h in view mode; [Download] [Up]

/*
 * (C) 1990 by Adobe Systems Incorporated. All rights reserved.
 *
 * This file may be freely copied and redistributed as long as:
 *   1) This entire notice continues to be included in the file, 
 *   2) If the file has been modified in any way, a notice of such
 *      modification is conspicuously indicated.
 *
 * PostScript, Display PostScript, and Adobe are registered trademarks of
 * Adobe Systems Incorporated.
 * 
 * ************************************************************************
 * 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 NONINFINGEMENT OF THIRD PARTY RIGHTS.
 * ************************************************************************
 */


/*
 * DialView.h
 *
 * This class, a subclass of view, contains the methods to draw an object in
 * several ways: using the PostScript operator rotate, using rotate and 
 * uappend, calculating the trig on the client side and calculating the 
 * trig into a large user path. Times are available for comparison 
 * between methods. 
 *
 */

#import <appkit/View.h>

#define RADIANS			((2 * 3.1415)/360)
#define CLRVIEW			NX_LTGRAY
#define CLRCIRC			NX_DKGRAY
#define WIDCIRCBRD		5.0	
#define CLRCIRCBRD		NX_BLACK	
#define CIRCFF			5

#define WID1				0.5	
#define CLR1				NX_LTGRAY	
#define LEN1				(10.0/11.0)	
#define DEG1				1.0	

#define WID10			1.5	
#define CLR10			NX_LTGRAY	
#define LEN10			(6.0/7.0)	
#define DEG10			10.0	

#define WID45			2.5	
#define CLR45			NX_BLACK	
#define LEN45			(0.75)	
#define DEG45			45.0	

#define WID90			3.5	
#define CLR90			NX_BLACK	
#define LEN90			(0.7)	
#define DEG90			90.0	

#define MAX_PTS			1500
#define MAX_OPS			750

#define DRAWALL			0xfc				/* Draw with all methods */ 

/*
 * The id's are for the buttons and text fields. The pts and ops variables 
 * are for the arrays to hold the user path points and operators.
 */

@interface DialView:View
{	
	id		matrixDegreeTypes, matrixDisplayTimes;
	
	float		maxdim;
	
	float		*pts;
	
	char		*ops;
	
	NXPoint	viewcenter;

	union {
		struct {
			unsigned char rotate:1;
			unsigned char uappend:1;
			unsigned char trig:1;
			unsigned char userpaths:1;
			unsigned char server:1;
			unsigned char dpsuserpath:1;
			unsigned char PADDING:2;
		} 	flags;
		unsigned char		field;
	} drawFlags;
}

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

- setMatrixDegreeTypes:anObject;
- setMatrixDisplayTimes:anObject;

- setupUserPaths;

- eraseTimes:sender;
- drawViewOne:sender;
- drawViewAll:sender;

- drawRotate:(int) cell;
- drawRotateUserPaths:(int) cell;
- drawTrig:(int) cell;
- drawTrigUserPaths:(int) cell;
- drawTrigUserPathsServer:(int) cell;
- drawDPSUserPaths:(int) cell;

- drawSelf:(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.