edelib 2.1.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List

SevenSeg.h
1 /*
2 * $Id: SevenSeg.h 2839 2009-09-28 11:36:20Z karijes $
3 *
4 * s7 segment number widget
5 * Copyright (c) 2005-2007 edelib authors
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with this library. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #ifndef __EDELIB_SEVENSEG_H__
22 #define __EDELIB_SEVENSEG_H__
23
24 #include "edelib-global.h"
25 #include <FL/Fl_Widget.H>
26
27 EDELIB_NS_BEGIN
28
42 class EDELIB_API SevenSeg : public Fl_Widget {
43 private:
44 int digit;
45 int segwidth;
46
47 void draw_seg_a(int X, int Y, int W, int H);
48 void draw_seg_b(int X, int Y, int W, int H);
49 void draw_seg_c(int X, int Y, int W, int H);
50 void draw_seg_d(int X, int Y, int W, int H);
51 void draw_seg_e(int X, int Y, int W, int H);
52 void draw_seg_f(int X, int Y, int W, int H);
53 void draw_seg_g(int X, int Y, int W, int H);
54
55 public:
59 SevenSeg(int X, int Y, int W, int H);
60
64 ~SevenSeg();
65 #ifndef SKIP_DOCS
66 virtual void draw(void);
67 #endif
68
71 void value(int v);
72
76 void value(char c);
77
81 int value(void) { return digit; }
82
87 void bar_width(int w);
88
92 int bar_width(void) { return segwidth; }
93 };
94
95 EDELIB_NS_END
96 #endif
edelib::SevenSeg::value
int value(void)
Definition: SevenSeg.h:81
edelib::SevenSeg
Digital number widget.
Definition: SevenSeg.h:42
edelib::SevenSeg::bar_width
int bar_width(void)
Definition: SevenSeg.h:92