1 /* 2 copyright 2003 Alexander Malmberg <alexander@malmberg.org> 3 */ 4 5 #ifndef Clock_h 6 #define Clock_h 7 8 #include <AppKit/NSControl.h> 9 10 @class NSColor; 11 12 @interface Clock : NSControl 13 { 14 NSColor *faceColor,*frameColor,*marksColor,*handsColor,*arcColor,*secHandColor,*dayColor; 15 16 NSImage *_cacheFrame; 17 NSImage *_cacheMark; 18 19 float faceTrans; 20 BOOL showsArc; 21 BOOL showAMPM; 22 BOOL shadow; 23 BOOL second; 24 25 NSFont *font; 26 27 NSCalendarDate *_date; 28 29 NSTimeZone *_timeZone; 30 NSTimeInterval _tzv; 31 32 BOOL alarming; 33 int numberType; 34 35 /* Calculated values used when drawing. */ 36 double handsTime,arcStartTime,arcEndTime; 37 double radius; 38 double base_width; 39 NSPoint center; 40 BOOL inView; 41 } 42 43 /* 44 TODO? 45 -(NSColor *) arcColor; 46 -(void) setArcColor: (NSColor *)c;*/ 47 48 - (void) setTimeZone:(NSTimeZone *)tz; 49 - (NSTimeZone *) timeZone; 50 - (void) setDate:(NSCalendarDate *)date; 51 - (NSCalendarDate *) date; 52 53 /* move a clock to CSClockView and put these theming method into subclass */ 54 55 -(NSColor *) marksColor; 56 -(NSColor *) faceColor; 57 -(NSColor *) frameColor; 58 -(NSColor *) handsColor; 59 -(NSColor *) secondHandColor; 60 -(BOOL) showAMPM; 61 -(BOOL) shadow; 62 -(float) faceTransparency; 63 -(NSFont *)font; 64 -(void) setFont:(NSFont *)newfont; 65 66 -(int) numberType; 67 -(void) setNumberType: (int)i; 68 -(void) setMarksColor: (NSColor *)c; 69 -(void) setFaceColor: (NSColor *)c; 70 -(void) setFaceTransparency:(float)v; 71 -(void) setFrameColor: (NSColor *)c; 72 -(void) setHandsColor: (NSColor *)c; 73 -(void) setSecondHandColor: (NSColor *)c; 74 -(void) setShowAMPM:(BOOL)ampm; 75 -(void) setShadow:(BOOL)sh; 76 -(void) setSecond:(BOOL)sh; 77 -(void) setDayColor: (NSColor *)c; 78 -(BOOL) second; 79 80 -(BOOL) showsArc; 81 -(void) setShowsArc: (BOOL)s; 82 83 -(double) handsTime; 84 -(void) setHandsTime: (double)time; 85 86 -(double) arcStartTime; 87 -(double) arcEndTime; 88 -(void) setArcStartTime: (double)time; 89 -(void) setArcEndTime: (double)time; 90 91 @end 92 93 #endif 94 95