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

Cursor GUI element. More...

#include <hV_GUI.h>

Inheritance diagram for Cursor:
Collaboration diagram for Cursor:

Public Member Functions

 Cursor (GUI *gui)
 Constructor.
 
void dDefine (uint16_t x0, uint16_t y0, uint16_t dx, uint16_t dy, int32_t minValue, int32_t maxValue)
 Define cursor, vector coordinates.
 
void setOption (bool option=true)
 Set orientation of the cursor.
 
void draw (fsmGUI_e fsm=fsmReleased)
 Draw the cursor.
 
bool check (uint8_t mode=0)
 Check cursor is pressed.
 
void setValue (int32_t value)
 Set current value of the cursor.
 
int32_t getValue ()
 Return current 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

Cursor GUI element.

Cursor is an area with a cursor

Constructor & Destructor Documentation

◆ Cursor()

Cursor::Cursor ( GUI * gui)

Constructor.

Parameters
gui&gui to which the element belongs

Member Function Documentation

◆ check()

bool Cursor::check ( uint8_t mode = 0)

Check cursor is pressed.

With cursor animation

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

◆ dDefine()

void Cursor::dDefine ( uint16_t x0,
uint16_t y0,
uint16_t dx,
uint16_t dy,
int32_t minValue,
int32_t maxValue )

Define cursor, 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 Cursor::draw ( fsmGUI_e fsm = fsmReleased)

Draw the cursor.

Parameters
fsmdefault = fsmReleased
Note
4 states
* if cursor enabled,
fsm = fsmReleased, fsmTouched, fsmConfirmed
* if cursor disabled,
flag = true: statement cursor, flag = false: unavailable cursor

◆ getValue()

int32_t Cursor::getValue ( )

Return current value.

Returns
current value between minValue and maxValue

◆ setOption()

void Cursor::setOption ( bool option = true)

Set orientation of the cursor.

The cursor is initialised with false = horizontal. Use setOption to change the orientation.

Parameters
optiondefault = optionVertical = vertical, optionHorizontal = horizontal

◆ setValue()

void Cursor::setValue ( int32_t value)

Set current value of the cursor.

Parameters
valuevalue between minValue and maxValue

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