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 <menu.h>

Public Member Functions

 LcdGfxMenu (const char **items, uint8_t count, const NanoRect &rect={})
 
void down ()
 
void up ()
 
uint8_t selection ()
 
void setSelection (uint8_t s)
 
void setRect (const NanoRect &rect={})
 
uint8_t size ()
 
template<typename D >
void updateSize (D &d)
 
template<typename D >
void show (D &d)
 

Detailed Description

Class implements menu objects for lcdgfx library

Definition at line 54 of file menu.h.

Constructor & Destructor Documentation

◆ LcdGfxMenu()

LcdGfxMenu::LcdGfxMenu ( const char **  items,
uint8_t  count,
const NanoRect rect = {} 
)

Creates menu object with the provided list of menu items. List of menu items (strings) must exist all until menu object is no longer needed. Selection is set to the first item by default.

Parameters
itemsarray of null-termintated strings (located in SRAM)
countcount of menu items in the array
rectscreen area to use for menu

Member Function Documentation

◆ down()

void LcdGfxMenu::down ( )

Moves selection pointer down by 1 item. If there are no items below, it will set selection pointer to the first item. Use show() to refresh menu state on the display.

◆ selection()

uint8_t LcdGfxMenu::selection ( )

Returns currently selected menu item. First item has zero-index.

◆ setRect()

void LcdGfxMenu::setRect ( const NanoRect rect = {})

Sets rect area for the menu.

Parameters
rectrect area to use for menu

◆ show()

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

Shows menu items on the display. If menu items cannot fit the display, the function provides scrolling.

Parameters
ddisplay object

Definition at line 166 of file menu.h.

◆ size()

uint8_t LcdGfxMenu::size ( )

Returns total count of menu items in menu.

◆ up()

void LcdGfxMenu::up ( )

Moves selection pointer up by 1 item. If selected item is the first one, then selection pointer will set to the last item in menu list. Use show() to refresh menu state on the display.

◆ updateSize()

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

Updates size of the object, if it was not set previously

Definition at line 113 of file menu.h.


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