|
Revision 2, 1.0 KB
(checked in by emasson, 3 years ago)
|
|
initial import for the community edition
|
| Line | |
|---|
| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | #ifndef _BITMETER_H_ |
|---|
| 10 | #define _BITMETER_H_ |
|---|
| 11 | |
|---|
| 12 | #define BITMETER_H_CVSID "$Id: bitmeter.h,v 1.1.1.1 2008/05/04 15:53:48 emasson Exp $" |
|---|
| 13 | |
|---|
| 14 | #include "meter.h" |
|---|
| 15 | |
|---|
| 16 | class XOSView; |
|---|
| 17 | |
|---|
| 18 | class BitMeter : public Meter { |
|---|
| 19 | public: |
|---|
| 20 | BitMeter( XOSView *parent, |
|---|
| 21 | const char *title = "", const char *legend ="", |
|---|
| 22 | int numBits = 1, int docaptions = 0, int dolegends = 0, int dousedlegends = 0 ); |
|---|
| 23 | virtual ~BitMeter( void ); |
|---|
| 24 | |
|---|
| 25 | void checkevent( void ); |
|---|
| 26 | void draw( void ); |
|---|
| 27 | void disableMeter ( void ); |
|---|
| 28 | |
|---|
| 29 | int numBits(void) const { return numbits_; } |
|---|
| 30 | void setNumBits(int n); |
|---|
| 31 | |
|---|
| 32 | void checkResources( void ); |
|---|
| 33 | protected: |
|---|
| 34 | unsigned long onColor_, offColor_; |
|---|
| 35 | char *bits_, *lastbits_; |
|---|
| 36 | int numbits_; |
|---|
| 37 | bool disabled_; |
|---|
| 38 | |
|---|
| 39 | void setBits(int startbit, unsigned char values); |
|---|
| 40 | |
|---|
| 41 | void drawBits( int manditory = 0 ); |
|---|
| 42 | private: |
|---|
| 43 | }; |
|---|
| 44 | |
|---|
| 45 | #endif |
|---|