UI_Lib  a1366e08a59cc549a65fa26081e6409aa12f26d5
This is a user interface library for graphical LCDs. It offers many different controls and indicators that can be nested depending on the element types.
Loading...
Searching...
No Matches
BoolIndicator Class Reference

Class for a boolean indicator that is only showing a boolean variable value. More...

#include <BoolIndicator.h>

Inheritance diagram for BoolIndicator:
UIElement

Public Member Functions

 BoolIndicator (bool *valuePointer, BoolIndicatorStyles_t style=BOOLINDICATOR_STYLE_LED, uint16_t locX=0, uint16_t locY=0)
 Constructor of the BooleanIndicator.
 
virtual void Draw (bool redraw) override
 Method used for drawing of the BooleanIndicator.
 
virtual void RecalculateDimensions () override
 Recalculate the Height and Width of the UIElement.
 
- Public Member Functions inherited from UIElement
 UIElement (UIElementType type)
 Constructor of the UIElement.
 
 UIElement (uint16_t locX, uint16_t locY, UIElementType type)
 Constructor of the UIElement.
 
virtual bool KeyInput (Keys_t key)
 Process the given key.
 
virtual bool TouchInput (uint16_t x, uint16_t y, TouchTypes touchType)
 Process a touch input at the given point (x, y)
 
virtual void RecalculateLayout ()
 Recalculate the UIElement layout (containers update the X- and Y-Location of all their items, all other items can do other layout update stuff)
 
bool HitTest (uint16_t x, uint16_t y)
 Check if the given point (x, y) is inside this UIElement.
 

Protected Attributes

bool * _valuePointer
 Pointer to the boolean variable that is shown by this indicator.
 
bool _lastValueDraw
 Last drawn bool value.
 
BoolIndicatorStyles_t _style
 Style used by the boolean indicator.
 
- Protected Attributes inherited from UIElement
bool _lastDrawnVisible
 The Visible value that was last drawn.
 

Additional Inherited Members

- Public Attributes inherited from UIElement
UIElementType Type
 Element type (control, indicator, container)
 
uint16_t LocX
 X Location of the upper left corner of the UIElement.
 
uint16_t LocY
 Y Location of the upper left corner of the UIElement.
 
uint16_t Width
 Drawing width of the UIElement.
 
uint16_t Height
 Drawing height of the UIElement.
 
bool Visible
 The UIElement is only drawn if the visibility is set to true.
 
bool IsInEditMode
 Is the UIElement in edit mode?
 
UIElementParent
 Parent UIElement that this UIElement belongs to.
 
UIElementActiveChild
 Child element that is currently active (receiving all key inputs).
 

Detailed Description

Class for a boolean indicator that is only showing a boolean variable value.

Constructor & Destructor Documentation

◆ BoolIndicator()

BoolIndicator::BoolIndicator ( bool * valuePointer,
BoolIndicatorStyles_t style = BOOLINDICATOR_STYLE_LED,
uint16_t locX = 0,
uint16_t locY = 0 )

Constructor of the BooleanIndicator.

Parameters
valuePointerPointer to the boolean variable that is shown by this indicator.
styleStyle used by the boolean indicator.
locXX Location of the upper left corner of the BooleanIndicator
locYY Location of the upper left corner of the BooleanIndicator

Member Function Documentation

◆ Draw()

void BoolIndicator::Draw ( bool redraw)
overridevirtual

Method used for drawing of the BooleanIndicator.

Implements UIElement.

◆ RecalculateDimensions()

void BoolIndicator::RecalculateDimensions ( )
overridevirtual

Recalculate the Height and Width of the UIElement.

Implements UIElement.

Member Data Documentation

◆ _lastValueDraw

bool BoolIndicator::_lastValueDraw
protected

Last drawn bool value.

Only if the _valuePointer value differs from this value, the indicator is redrawn.


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