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
PlusMinus Class Reference

Plus-minus button GUI element. More...

#include <hV_GUI.h>

Inheritance diagram for PlusMinus:
Collaboration diagram for PlusMinus:

Public Member Functions

void dDefine (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, const char *minus="-", const char *plus="+")
 Define plus-minus button, vector coordinates.
 
void setOption (bool option=true)
 Set orientation of the plus-minus button.
 
void draw (int8_t value=0)
 Draw the button.
 
bool check (uint8_t mode=0)
 Check plus-minus button is pressed.
 
int8_t getValue ()
 Return current value of the plus-minus button.
 
- 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

Plus-minus button GUI element.

PlusMinus displays a combined plus-minus button

Member Function Documentation

◆ check()

bool PlusMinus::check ( uint8_t mode = 0)

Check plus-minus button is pressed.

With button animation

Parameters
modedefault = checkNormal = area waits for release, checkInstant = element is activated by press only
Returns
true if button pressed

◆ dDefine()

void PlusMinus::dDefine ( uint16_t x0,
uint16_t y0,
uint16_t dx,
uint16_t dy,
const char * minus = "-",
const char * plus = "+" )

Define plus-minus button, vector coordinates.

Parameters
x0point coordinate, x-axis
y0point coordinate, y-axis
dxlength, x-axis
dyheight, y-axis
minusbottom or left label, default = "-"
plustop or right label, default = "+"

◆ draw()

void PlusMinus::draw ( int8_t value = 0)

Draw the button.

Parameters
valuedefault = 0 = no overriding, -1 = minus, 1 = plus

◆ getValue()

int8_t PlusMinus::getValue ( )

Return current value of the plus-minus button.

Returns
current value minus = -1, nil = 0, plus = +1

◆ setOption()

void PlusMinus::setOption ( bool option = true)

Set orientation of the plus-minus button.

Parameters
flagdefault = optionVertical = vertical, optionHorizontal = horizontal

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