File:  [NeXTSTEP 3.3 examples] / Examples / AppKit / BusyBox / GaugeView.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:48:28 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3


#import <appkit/View.h>

@interface GaugeView : View
{
	char title[10];		/* Title of gauge */
	id cacheWindow;		/* Offscreen cache window for gauge face */
	float radius;		/* Radius of gauge face */
	NXPoint center;		/* Center of gauge face */
	float startAngle;	/* Angle in degrees which arm starts from */
	float angleRange;	/* Range in degrees which arm spans */
	float value;		/* Current value displayed on gauge */
	float maxValue;		/* Maximum value of gauge */	
	float minValue;		/* Minimum value of gauge */	
	float degreesPerUnit;	/* Ratio of degrees to value units */ 
	int tickInterval;	/* Interval of tick marks */
	id font;		/* Font used to draw labels */
	id valueSlider;		/* IB controls */
	id valueFormCell;
	BOOL needRedraw; 	/* boolean flag to indicate redraw is needed */
}


/* INIT/FREE METHODS */

- initFrame:(NXRect *)frameRect;
- initFrame:(NXRect *)frameRect min:(float)min max:(float)max 
	startAngle:(float)start range:(float)stop tickInterval:(int)interval;
- free;

/* SET PARAMETERS */

- setTitle:(char *)str;
- setFont:(char *)fName size:(float)fSize; 
- setMin:(float)newValue; 
- setMax:(float)newValue; 
- setStartAngle:(float)newValue; 
- setAngleRange:(float)newValue; 
- setTickInterval:(int)newValue; 

/* TARGET/ACTION METHODS  */

- changeValue:sender; 	/* connect to something with float value */

/* TEXT DELEGATE METHODS */
- (BOOL)textWillEnd:textObject;

/* PRIVATE METHODS */

- drawHand; 
- drawFace; 
- drawSelf:(NXRect *)drawRects :(int )rectCount; 

@end

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.