00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef Fl_Timer_H
00023 #define Fl_Timer_H
00024
00025 #ifndef Fl_Widget_H
00026 #include "Fl_Widget.H"
00027 #endif
00028
00029
00030 #define FL_NORMAL_TIMER 0
00031 #define FL_VALUE_TIMER 1
00032 #define FL_HIDDEN_TIMER 2
00033
00041 class FL_EXPORT Fl_Timer : public Fl_Widget {
00042 static void stepcb(void *);
00043 void step();
00044 char on, direction_;
00045 double delay, total;
00046 long lastsec,lastusec;
00047 protected:
00048 void draw();
00049 public:
00050 int handle(int);
00051 Fl_Timer(uchar t,int x,int y,int w,int h, const char *l);
00052 ~Fl_Timer();
00053 void value(double);
00055 double value() const {return delay>0.0?delay:0.0;}
00061 char direction() const {return direction_;}
00067 void direction(char d) {direction_ = d;}
00069 char suspended() const {return !on;}
00070 void suspended(char d);
00071 };
00072
00073 #endif
00074
00075
00076
00077
00078