Finish documention until someone change something

This commit is contained in:
2022-02-15 20:12:50 +01:00
parent 3a2e51713b
commit c8e3344b27
50 changed files with 991 additions and 223 deletions
+37 -3
View File
@@ -1,7 +1,7 @@
/**
* @file menuControl.h
* @author Alexander Klein (alex@kleiax.de)
* @brief
* @brief Contains a abstract class for Menu
* @version 0.1
* @date 2022-01-19
*
@@ -15,25 +15,59 @@
#include <iostream>
#include <LiquidCrystal_I2C.h>
/**
* @brief Baseclass to build Menus
*
* This class must be inherited by other classes which want to be
* act as a menu, because the menu structure uses polymorphism.
*
*/
class MenuControl {
public:
// Ínputs from the Gamepad
/** @name UserInputs
* @brief This functions should be called be user actions.
*
* This functions have to be implement in every other menu
* class.
*/
///@{
virtual void down();
virtual void up();
virtual void right();
virtual void left();
virtual void yes();
virtual void no();
///@}
/**
* @brief can be called to update shown data
*/
virtual void update();
virtual void printMenu();
/**
* @brief Set the Parent Menu
*
* If the parentMenu is set it will be called automaticaly
* when the user left the child menu.
*
* @param menu
*/
void setParentMenu(MenuControl* menu) { this->parentMenu = menu; }
/**
* @brief Set the Lcd object
*
* If this is set the menu will be print on the display too.
*
* @param lcd
*/
void setLcd(LiquidCrystal_I2C* lcd) { this->lcd = lcd; }
protected:
MenuControl* parentMenu = nullptr;
LiquidCrystal_I2C* lcd = nullptr;
};
#endif // MENU_CONTROLL_H
#endif // MENU_CONTROLL_H