00001 #ifndef __BYTSTPR_H_INCLUDED__
00002 #define __BYTSTPR_H_INCLUDED__
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040 class TEvent;
00041 class TRect;
00042 class WatcherList;
00043
00044 #define Uses_TInputLine
00045
00046 #include <watchble.h>
00047
00048 #include <tvision\tv.h>
00049
00050
00051 namespace Monitor {
00052 namespace Utility {
00053
00054
00055
00059 class ByteStepper : public Watchable, public TInputLine
00060 {
00061 public:
00065 ByteStepper(const TRect& newBounds,
00066 int newMaxLen,
00067 const char *newFormat,
00068 const float newDisplayScaler = 1.0);
00069
00073 virtual ~ByteStepper();
00074
00075
00079 void
00080 setState(ushort aState, Boolean enable);
00081
00085 virtual void
00086 handleEvent(TEvent& event);
00087
00093 void
00094 setScaler(const float newDisplayScaler);
00095
00101 void
00102 setMaxValue(const unsigned char newMaxValue);
00103
00109 void
00110 setMinValue(const unsigned char newMinValue);
00111
00115 void
00116 displayValue();
00117
00123 virtual void
00124 getData(void *rec);
00125
00131 virtual void
00132 setData(void *rec);
00133
00134
00135 private:
00139 unsigned char value;
00143 unsigned char maxValue;
00147 unsigned char minValue;
00151 const char *format;
00155 float displayScaler;
00156
00160 unsigned char
00161 getValue() {return value;}
00162
00170 int
00171 setValue(int newValue);
00172
00179 void
00180 changeValue(int newValue);
00181
00186 void
00187 readValue();
00188 };
00189
00190 };
00191 };
00192
00193 #endif // __BYTSTPR_H_INCLUDED__