"Fossies" - the Fresh Open Source Software Archive

Member "xosview-1.23/bitmeter.h" (11 Jul 2020, 871 Bytes) of package /linux/misc/xosview-1.23.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "bitmeter.h" see the Fossies "Dox" file reference documentation.

    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