34 static const float _sector_angle_rad;
44 Gauge(
int left,
int top,
int width,
int height)
45 :
Window(F(
"gauge"),left,top,width,height),
50 _fillColor(
Color::Black),
51 _drawOnlyPointer(false)
77 _value=max(_minValue,value);
78 _value=min(_maxValue,_value);
80 _drawOnlyPointer=
true;
88 _drawOnlyPointer=
false;
91 const float Gauge::_sector_angle_rad = 3.14 / 2 * 0.8;
Base class for all window objects. Provides basic window functionality.
Definition: Window.h:34
float SetValue(float value)
Sets display value.
Definition: Gauge.h:75
Implements definition and operations with color.
Definition: Color.h:27
static Environment * Get()
Returns singltone instance of environment.
Definition: Environment.h:44
Color _fillColor
Gauge fill color.
Definition: Gauge.h:27
void PrepareDC(DC *dc)
Setups window coordinate system. This function called by window manager right before window has to be...
Definition: Window.h:249
Gauge window class, that allows visualisaion of data in form of bar or radial pointer.
Definition: Gauge.h:24
Device context. Abstraction layer to the device specific drawing code. Coordinates in drawing functio...
Definition: DC.h:29
float _value
Current gauge value.
Definition: Gauge.h:28
float _minValue
Gauge min limit.
Definition: Gauge.h:30
bool _drawOnlyPointer
Defines whether only pointer (not scale has to be drawn)
Definition: Gauge.h:32
float _maxValue
Gauge max limit.
Definition: Gauge.h:31
virtual void OnDraw(DC *dc)
If derived class needs to draw something in window client area, this function has to be ovverriden...
Definition: Window.h:263
bool IsVisible()
Returns true if window visible and false is hidden.
Definition: Window.h:211
float _oldValue
Previos gauge value.
Definition: Gauge.h:29
virtual void SetDecorators(DecoratorList *decorators)
Sets window decorators list.
Definition: Window.h:76
void SetMinMax(float minVal, float maxVal)
Sets values range.
Definition: Gauge.h:65
void SetFillColor(Color fillColor)
Sets fill color.
Definition: Gauge.h:56
Gauge(int left, int top, int width, int height)
Constructor.
Definition: Gauge.h:44