LCDGFX LCD display driver  1.2.0
Lightweight graphics library for SSD1306, SSD1325, SSD1327, SSD1331, SSD1351, SH1106, SH1107, IL9163, ST7735, ST7789, ILI9341, PCD8544 displays over I2C/SPI

Class implements button object for lcdgfx library. More...

#include <button.h>

Public Member Functions

 LcdGfxButton (const char *text, const NanoRect &rect)
 Creates button object with the provided text. More...
 
template<typename D >
void show (D &d)
 Shows button on the display. More...
 
void setFocus (bool focus)
 Sets or removes focus on button. More...
 
bool isActive ()
 returns true if button in focus
 
void setRect (const NanoRect &rect)
 Sets new area for the button. More...
 
const NanoPoint getSize ()
 Returns size of button in pixels.
 
const NanoRectgetRect () const
 Recturns rectangle area of the button.
 
template<typename D >
void updateSize (D &d)
 Auto updates buttons size if it is not set.
 

Detailed Description

Class implements button object for lcdgfx library.

Definition at line 44 of file button.h.

Constructor & Destructor Documentation

◆ LcdGfxButton()

LcdGfxButton::LcdGfxButton ( const char *  text,
const NanoRect rect 
)

Creates button object with the provided text.

Parameters
textbutton text
rectscreen area to use for button

Member Function Documentation

◆ setFocus()

void LcdGfxButton::setFocus ( bool  focus)

Sets or removes focus on button.

After this method call show() to update button state on the display.

Parameters
focusfocus state for the button

◆ setRect()

void LcdGfxButton::setRect ( const NanoRect rect)

Sets new area for the button.

Use show() method to update button state on the display.

Parameters
rectnew button area

◆ show()

template<typename D >
void LcdGfxButton::show ( D &  d)
inline

Shows button on the display.

Parameters
ddisplay object

Definition at line 60 of file button.h.


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