LCDGFX LCD display driver  1.1.5
This library is developed to control SSD1306/SSD1325/SSD1327/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays

#include <button.h>

Public Member Functions

 LcdGfxButton (const char *text, const NanoRect &rect)
 
template<typename D >
void show (D &d)
 
void setFocus (bool focus)
 
bool isActive ()
 
void setRect (const NanoRect &rect)
 
const NanoPoint getSize ()
 
const NanoRectgetRect () const
 
template<typename D >
void updateSize (D &d)
 

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

◆ getRect()

const NanoRect& LcdGfxButton::getRect ( ) const
inline

Recturns rectangle area of the button

Definition at line 111 of file button.h.

◆ getSize()

const NanoPoint LcdGfxButton::getSize ( )

Returns size of button in pixels

◆ isActive()

bool LcdGfxButton::isActive ( )

returns true if button in focus

◆ 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.

◆ updateSize()

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

Auto updates buttons size if it is not set

Definition at line 119 of file button.h.


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