home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.0
/
NeXTSTEP3.0.iso
/
NextDeveloper
/
Examples
/
AppKit
/
BusyBox
/
GaugeView.h
< prev
next >
Wrap
Text File
|
1990-10-26
|
2KB
|
55 lines
#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 control(G
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