|
|
Sample Programs from NeXSTEP 3.3
#import <appkit/View.h>
#import <dpsclient/dpsclient.h>
#import <objc/typedstream.h>
@interface ClockView:View
{
DPSTimedEntry teNum; /* The clock timed entry */
id face; /* NXImage for clock face */
float radius; /* Radius of clock face */
NXPoint center; /* Center of clock face */
BOOL showSeconds; /* Show seconds hand on clock */
BOOL showDate; /* Show date on clock */
int clockType; /* Type of clock (analog, digital, sundial) */
id littleFont,mediumFont, bigFont; /* fonts used */
id sTable; /* string table for clock strings */
}
/* INIT/FREE METHODS */
- initFrame:(const NXRect *)frameRect;
- free;
- setSTable:anObject;
/* SET/GET CLOCK PARAMETERS */
- setShowSeconds:(BOOL)newValue;
- setShowDate:(BOOL)newValue;
- setClockType:(int)newValue;
- (BOOL)showSeconds;
- (BOOL)showDate;
- (int)clockType;
/* TARGET/ACTION METHODS */
- changeShowDate:sender; /* connect to toggle (2-state) control */
- changeShowSeconds:sender; /* connect to toggle (2-state) control */
- changeClockType:sender; /* connect to int value (3 value) control */
/* PRIVATE METHODS */
- drawAnalog:(struct tm *)time;
- drawDigital:(struct tm *)time;
- drawSundial:(struct tm *)time;
- drawFace:image;
- drawSelf:(NXRect *)rects :(int)rectCount;
- startTimedEntry:(BOOL)fireASAP;
- stopTimedEntry;
- sizeTo:(NXCoord)w :(NXCoord)h;
@end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.