Pervasive Displays Library Suite - Reference Manual 9.0.3
Library for Pervasive Displays e-paper screens, extension boards and development kits
|
Bar-graph GUI element. More...
#include <hV_GUI.h>
Public Member Functions | |
BarGraph (GUI *gui) | |
Constructor. | |
void | dDefine (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, int32_t minValue, int32_t maxValue) |
Define bar-graph, vector coordinates. | |
void | setOption (bool option=true) |
Set orientation of the bar-graph. | |
void | draw (int32_t value) |
Update the bargraph with value. | |
Public Member Functions inherited from Area | |
Area (GUI *gui) | |
Constructor. | |
void | dDefine (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, uint16_t index=0x0000) |
Define area, vector coordinates. | |
bool | getState () |
Return state of the area. | |
void | setState (bool state=true) |
Define state of the area. | |
void | setOption (bool option=true) |
Set option of the area. | |
void | setStyle (uint8_t style=0) |
Define the default style. | |
bool | check (uint8_t mode=0) |
Check if area is pressed. | |
uint16_t | getIndex () |
Return index. | |
Bar-graph GUI element.
BarGraph::BarGraph | ( | GUI * | gui | ) |
Constructor.
gui | &gui to which the element belongs |
void BarGraph::dDefine | ( | uint16_t | x0, |
uint16_t | y0, | ||
uint16_t | dx, | ||
uint16_t | dy, | ||
int32_t | minValue, | ||
int32_t | maxValue ) |
Define bar-graph, vector coordinates.
x0 | point coordinate, x-axis |
y0 | point coordinate, y-axis |
dx | length, x-axis |
dy | height, y-axis |
minValue | minimum value, int32 |
maxValue | maximum value, int32 |
More: Coordinates, Colours
void BarGraph::draw | ( | int32_t | value | ) |
Update the bargraph with value.
value | value to display |
void BarGraph::setOption | ( | bool | option = true | ) |
Set orientation of the bar-graph.
The bar-graph is initialised with false = horizontal. Use setOption to change the orientation.
option | default = optionVertical = vertical, optionHorizontal = horizontal |