00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef Fl_Clock_H
00023 #define Fl_Clock_H
00024
00025 #ifndef Fl_Widget_H
00026 #include "Fl_Widget.H"
00027 #endif
00028
00029
00030 #define FL_SQUARE_CLOCK 0
00031 #define FL_ROUND_CLOCK 1
00032 #define FL_ANALOG_CLOCK FL_SQUARE_CLOCK
00033 #define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK
00035 // fabien: Please keep the horizontal formatting of both images in class desc,
00036
00037
00054 class FL_EXPORT Fl_Clock_Output : public Fl_Widget {
00055 int hour_, minute_, second_;
00056 ulong value_;
00057 void drawhands(Fl_Color,Fl_Color);
00058 protected:
00059 void draw();
00060 void draw(int X, int Y, int W, int H);
00061 public:
00062
00063 Fl_Clock_Output(int X, int Y, int W, int H, const char *L = 0);
00064
00065 void value(ulong v);
00066
00067 void value(int H, int m, int s);
00068
00074 ulong value() const {return value_;}
00075
00080 int hour() const {return hour_;}
00081
00086 int minute() const {return minute_;}
00087
00092 int second() const {return second_;}
00093 };
00094
00095
00096
00113 class FL_EXPORT Fl_Clock : public Fl_Clock_Output {
00114 public:
00115 int handle(int);
00116
00117 Fl_Clock(int X, int Y, int W, int H, const char *L = 0);
00118
00119 Fl_Clock(uchar t, int X, int Y, int W, int H, const char *L);
00120
00121 ~Fl_Clock();
00122 };
00123
00124 #endif
00125
00126
00127
00128