46 lines
777 B
C++
46 lines
777 B
C++
/**
|
|
* @file menu.h
|
|
* @author Alexander Klein (alex@kleiax.de)
|
|
* @brief
|
|
* @version 0.1
|
|
* @date 2022-01-12
|
|
*
|
|
* @copyright Copyright (c) 2022
|
|
*
|
|
*/
|
|
#ifndef MENU_H
|
|
#define MENU_H
|
|
|
|
#include <list>
|
|
|
|
// Only for print in consol
|
|
// have to be deleted after display installation
|
|
#include <Arduino.h>
|
|
|
|
#include "menuAction.h"
|
|
#include "menuControl.h"
|
|
|
|
class MenuAction;
|
|
class Menu : public MenuControl {
|
|
public:
|
|
Menu();
|
|
|
|
void addEntry(MenuAction* entry);
|
|
void printMenu();
|
|
|
|
void down();
|
|
void up();
|
|
void right();
|
|
void left();
|
|
void yes();
|
|
void no();
|
|
|
|
private:
|
|
bool inSubmenu = false;
|
|
|
|
std::list<MenuAction*> entrys;
|
|
std::list<MenuAction*>::iterator it;
|
|
|
|
};
|
|
|
|
#endif // MENU_H
|