00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef Fl_Counter_H
00025 #define Fl_Counter_H
00026
00027 #ifndef Fl_Valuator_H
00028 #include "Fl_Valuator.H"
00029 #endif
00030
00031
00032 #define FL_NORMAL_COUNTER 0
00033 #define FL_SIMPLE_COUNTER 1
00048 class FL_EXPORT Fl_Counter : public Fl_Valuator {
00049
00050 Fl_Font textfont_;
00051 Fl_Fontsize textsize_;
00052 Fl_Color textcolor_;
00053 double lstep_;
00054 uchar mouseobj;
00055 static void repeat_callback(void *);
00056 int calc_mouseobj();
00057 void increment_cb();
00058
00059 protected:
00060
00061 void draw();
00062
00063 public:
00064
00065 int handle(int);
00066
00067 Fl_Counter(int X, int Y, int W, int H, const char* L = 0);
00068 ~Fl_Counter();
00069
00075 void lstep(double a) {lstep_ = a;}
00076
00081 void step(double a,double b) {Fl_Valuator::step(a); lstep_ = b;}
00082
00087 void step(double a) {Fl_Valuator::step(a);}
00088
00092 double step() const {return Fl_Valuator::step();}
00093
00095 Fl_Font textfont() const {return textfont_;}
00097 void textfont(Fl_Font s) {textfont_ = s;}
00098
00100 Fl_Fontsize textsize() const {return textsize_;}
00102 void textsize(Fl_Fontsize s) {textsize_ = s;}
00103
00105 Fl_Color textcolor() const {return textcolor_;}
00107 void textcolor(Fl_Color s) {textcolor_ = s;}
00108
00109 };
00110
00111 #endif
00112
00113
00114
00115