floatpump-firmware/Middlewares/floatpump/Inc/Menu_Entry.h

39 lines
720 B
C++

//
// Created by robtor on 04.01.23.
//
#ifndef FLOATPUMP_MENU_ENTRY_H
#define FLOATPUMP_MENU_ENTRY_H
#include <Menu_Entry_Type_Delegate.h>
namespace floatpump::menu {
class Menu_Entry {
public:
Menu_Entry(Menu_Entry_Type_Delegate *type, std::string name) : m_type(type), m_name(name) {};
//Retreive string for putting on display
std::string printLine();
void action_press();
void action_increase();
void action_decrease();
//Check if currently entered
bool isEntered();
private:
std::string m_name;
menu::Menu_Entry_Type_Delegate *m_type; //Saves type of this menu entry
};
}
#endif //FLOATPUMP_MENU_ENTRY_H