forked from hills/xosview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitmeter.h
41 lines (31 loc) · 871 Bytes
/
bitmeter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// Copyright (c) 1994, 1995, 2006 by Mike Romberg ( [email protected] )
//
// This file may be distributed under terms of the GPL
//
#ifndef _BITMETER_H_
#define _BITMETER_H_
#include "meter.h"
#include "xosview.h"
class BitMeter : public Meter {
public:
BitMeter( XOSView *parent,
const char *title = "", const char *legend ="",
int numBits = 1, int docaptions = 0, int dolegends = 0, int dousedlegends = 0 );
virtual ~BitMeter( void );
void checkevent( void );
void draw( void );
void disableMeter ( void );
int numBits(void) const { return numbits_; }
void setNumBits(int n);
void checkResources( void );
protected:
unsigned long onColor_, offColor_;
char *bits_, *lastbits_;
int numbits_;
bool disabled_;
void setBits(int startbit, unsigned char values);
void drawBits( int mandatory = 0 );
private:
};
#endif