#include <menu.h>
Class implements menu objects for lcdgfx library
Definition at line 54 of file menu.h.
◆ 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
-
items | array of null-termintated strings (located in SRAM) |
count | count of menu items in the array |
rect | screen area to use for menu |
◆ 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
-
rect | rect 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
-
Definition at line 166 of file menu.h.
◆ size()
uint8_t LcdGfxMenu::size |
( |
| ) |
|
Returns total count of menu items in menu.
◆ 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: