root/foundation-apps/grosview-maxx/bitmeter.h

Revision 2, 1.0 KB (checked in by emasson, 3 years ago)

initial import for the community edition

Line 
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// $Id: bitmeter.h,v 1.1.1.1 2008/05/04 15:53:48 emasson Exp $
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
16class XOSView;
17
18class BitMeter : public Meter {
19public:
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 );
33protected:
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 );
42private:
43};
44
45#endif
Note: See TracBrowser for help on using the browser.