|
|
1.1 root 1:
2: #import <appkit/View.h>
3: #import <dpsclient/dpsclient.h>
4: #import <objc/typedstream.h>
5:
6: @interface ClockView:View
7: {
8: DPSTimedEntry teNum; /* The clock timed entry */
9: id face; /* NXImage for clock face */
10: float radius; /* Radius of clock face */
11: NXPoint center; /* Center of clock face */
12: BOOL showSeconds; /* Show seconds hand on clock */
13: BOOL showDate; /* Show date on clock */
14: int clockType; /* Type of clock (analog, digital, sundial) */
15: id littleFont,mediumFont, bigFont; /* fonts used */
16: id sTable; /* string table for clock strings */
17: }
18:
19: /* INIT/FREE METHODS */
20: - initFrame:(const NXRect *)frameRect;
21: - free;
22: - setSTable:anObject;
23:
24: /* SET/GET CLOCK PARAMETERS */
25:
26: - setShowSeconds:(BOOL)newValue;
27: - setShowDate:(BOOL)newValue;
28: - setClockType:(int)newValue;
29:
30: - (BOOL)showSeconds;
31: - (BOOL)showDate;
32: - (int)clockType;
33:
34: /* TARGET/ACTION METHODS */
35:
36: - changeShowDate:sender; /* connect to toggle (2-state) control */
37: - changeShowSeconds:sender; /* connect to toggle (2-state) control */
38: - changeClockType:sender; /* connect to int value (3 value) control */
39:
40: /* PRIVATE METHODS */
41:
42: - drawAnalog:(struct tm *)time;
43: - drawDigital:(struct tm *)time;
44: - drawSundial:(struct tm *)time;
45: - drawFace:image;
46: - drawSelf:(NXRect *)rects :(int)rectCount;
47:
48: - startTimedEntry:(BOOL)fireASAP;
49: - stopTimedEntry;
50: - sizeTo:(NXCoord)w :(NXCoord)h;
51:
52: @end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.