xosview  1.23
About: xosview is an X Windows based system monitor (cpu, memory, swap and network usage; interrupt and serial activities; load average).
  Fossies Dox: xosview-1.23.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

bitmeter.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 1994, 1995, 2006 by Mike Romberg ( mike.romberg@noaa.gov )
3 //
4 // This file may be distributed under terms of the GPL
5 //
6 
7 #ifndef _BITMETER_H_
8 #define _BITMETER_H_
9 
10 #include "meter.h"
11 #include "xosview.h"
12 
13 
14 class BitMeter : public Meter {
15 public:
16  BitMeter( XOSView *parent,
17  const char *title = "", const char *legend ="",
18  int numBits = 1, int docaptions = 0, int dolegends = 0, int dousedlegends = 0 );
19  virtual ~BitMeter( void );
20 
21  void checkevent( void );
22  void draw( void );
23  void disableMeter ( void );
24 
25  int numBits(void) const { return numbits_; }
26  void setNumBits(int n);
27 
28  void checkResources( void );
29 protected:
30  unsigned long onColor_, offColor_;
31  char *bits_, *lastbits_;
32  int numbits_;
33  bool disabled_;
34 
35  void setBits(int startbit, unsigned char values);
36 
37  void drawBits( int mandatory = 0 );
38 private:
39 };
40 
41 #endif
virtual ~BitMeter(void)
Definition: bitmeter.cc:18
bool disabled_
Definition: bitmeter.h:33
void drawBits(int mandatory=0)
Definition: bitmeter.cc:51
char * lastbits_
Definition: bitmeter.h:31
int numBits(void) const
Definition: bitmeter.h:25
unsigned long onColor_
Definition: bitmeter.h:30
void setNumBits(int n)
Definition: bitmeter.cc:23
unsigned long offColor_
Definition: bitmeter.h:30
char * bits_
Definition: bitmeter.h:31
void setBits(int startbit, unsigned char values)
Definition: bitmeter.cc:106
void checkResources(void)
Definition: bitmeter.cc:43
void disableMeter(void)
Definition: bitmeter.cc:35
BitMeter(XOSView *parent, const char *title="", const char *legend="", int numBits=1, int docaptions=0, int dolegends=0, int dousedlegends=0)
Definition: bitmeter.cc:10
void checkevent(void)
Definition: bitmeter.cc:47
void draw(void)
Definition: bitmeter.cc:79
int numbits_
Definition: bitmeter.h:32
Definition: meter.h:14
const char * title(void)
Definition: meter.h:25
void dolegends(int val)
Definition: meter.h:29
const char * legend(void)
Definition: meter.h:27
void docaptions(int val)
Definition: meter.h:28
void dousedlegends(int val)
Definition: meter.h:30