00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __EDELIB_SEVENSEG_H__
00022 #define __EDELIB_SEVENSEG_H__
00023
00024 #include "edelib-global.h"
00025 #include <FL/Fl_Widget.H>
00026
00027 EDELIB_NS_BEGIN
00028
00042 class EDELIB_API SevenSeg : public Fl_Widget {
00043 private:
00044 int digit;
00045 int segwidth;
00046
00047 void draw_seg_a(int X, int Y, int W, int H);
00048 void draw_seg_b(int X, int Y, int W, int H);
00049 void draw_seg_c(int X, int Y, int W, int H);
00050 void draw_seg_d(int X, int Y, int W, int H);
00051 void draw_seg_e(int X, int Y, int W, int H);
00052 void draw_seg_f(int X, int Y, int W, int H);
00053 void draw_seg_g(int X, int Y, int W, int H);
00054
00055 public:
00059 SevenSeg(int X, int Y, int W, int H);
00060
00064 ~SevenSeg();
00065 #ifndef SKIP_DOCS
00066 virtual void draw(void);
00067 #endif
00068
00071 void value(int v);
00072
00076 void value(char c);
00077
00081 int value(void) { return digit; }
00082
00087 void bar_width(int w);
00088
00092 int bar_width(void) { return segwidth; }
00093 };
00094
00095 EDELIB_NS_END
00096 #endif