00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #ifndef Fl_Clock_H
00032 #define Fl_Clock_H
00033
00034 #ifndef Fl_Widget_H
00035 #include "Fl_Widget.H"
00036 #endif
00037
00038
00039 #define FL_SQUARE_CLOCK 0
00040 #define FL_ROUND_CLOCK 1
00041 #define FL_ANALOG_CLOCK FL_SQUARE_CLOCK
00042 #define FL_DIGITAL_CLOCK FL_SQUARE_CLOCK
00044 // fabien: Please keep the horizontal formatting of both images in class desc,
00045
00046
00063 class FL_EXPORT Fl_Clock_Output : public Fl_Widget {
00064 int hour_, minute_, second_;
00065 ulong value_;
00066 void drawhands(Fl_Color,Fl_Color);
00067 protected:
00068 void draw();
00069 void draw(int X, int Y, int W, int H);
00070 public:
00071
00072 Fl_Clock_Output(int X, int Y, int W, int H, const char *L = 0);
00073
00074 void value(ulong v);
00075
00076 void value(int H, int m, int s);
00077
00083 ulong value() const {return value_;}
00084
00089 int hour() const {return hour_;}
00090
00095 int minute() const {return minute_;}
00096
00101 int second() const {return second_;}
00102 };
00103
00104
00105
00122 class FL_EXPORT Fl_Clock : public Fl_Clock_Output {
00123 public:
00124 int handle(int);
00125
00126 Fl_Clock(int X, int Y, int W, int H, const char *L = 0);
00127
00128 Fl_Clock(uchar t, int X, int Y, int W, int H, const char *L);
00129
00130 ~Fl_Clock();
00131 };
00132
00133 #endif
00134
00135
00136
00137