Pervasive Displays Library Suite - Reference Manual 9.0.3
Library for Pervasive Displays e-paper screens, extension boards and development kits
Loading...
Searching...
No Matches
BarGraph Class Reference

Bar-graph GUI element. More...

#include <hV_GUI.h>

Inheritance diagram for BarGraph:
Collaboration diagram for BarGraph:

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.
 

Detailed Description

Bar-graph GUI element.

Constructor & Destructor Documentation

◆ BarGraph()

BarGraph::BarGraph ( GUI * gui)

Constructor.

Parameters
gui&gui to which the element belongs

Member Function Documentation

◆ dDefine()

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.

Parameters
x0point coordinate, x-axis
y0point coordinate, y-axis
dxlength, x-axis
dyheight, y-axis
minValueminimum value, int32
maxValuemaximum value, int32


More: Coordinates, Colours

◆ draw()

void BarGraph::draw ( int32_t value)

Update the bargraph with value.

Parameters
valuevalue to display

◆ setOption()

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.

Parameters
optiondefault = optionVertical = vertical, optionHorizontal = horizontal

The documentation for this class was generated from the following file: