doxygen comments
This commit is contained in:
+75
-55
@@ -1,55 +1,75 @@
|
||||
/**
|
||||
* @file menu.h
|
||||
* @author Alexander Klein (alex@kleiax.de)
|
||||
* @brief Contains the Menu class
|
||||
* @version 0.1
|
||||
* @date 2022-01-12
|
||||
*
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*/
|
||||
#ifndef MENU_H
|
||||
#define MENU_H
|
||||
|
||||
#include <list>
|
||||
|
||||
#include "menuAction.h"
|
||||
#include "menuControl.h"
|
||||
|
||||
class MenuAction;
|
||||
|
||||
/**
|
||||
* @brief A class to build menu structers
|
||||
*/
|
||||
class Menu : public MenuControl {
|
||||
public:
|
||||
Menu();
|
||||
~Menu() override;
|
||||
|
||||
/**
|
||||
* @brief Add a menu action to the menu
|
||||
*
|
||||
* @param entry
|
||||
*/
|
||||
void addEntry(MenuAction* entry);
|
||||
bool isInSubmenu();
|
||||
|
||||
void printMenu() override;
|
||||
void update() override;
|
||||
|
||||
void down() override;
|
||||
void up() override;
|
||||
void right() override;
|
||||
void left() override;
|
||||
void yes() override;
|
||||
void no() override;
|
||||
|
||||
private:
|
||||
bool inSubmenu = false;
|
||||
|
||||
std::list<MenuAction*> entrys;
|
||||
std::list<MenuAction*>::iterator selectedEntry;
|
||||
|
||||
};
|
||||
|
||||
#endif // MENU_H
|
||||
/**
|
||||
* @file menu.h
|
||||
* @author Alexander Klein (alex@kleiax.de)
|
||||
* @brief Contains the Menu class
|
||||
* @version 0.1
|
||||
* @date 2022-01-12
|
||||
*
|
||||
* @copyright Copyright (c) 2022
|
||||
*
|
||||
*/
|
||||
#ifndef MENU_H
|
||||
#define MENU_H
|
||||
|
||||
#include <list>
|
||||
|
||||
#include "menuAction.h"
|
||||
#include "menuControl.h"
|
||||
|
||||
class MenuAction;
|
||||
|
||||
/**
|
||||
* @brief A class to build menu structures
|
||||
*/
|
||||
class Menu : public MenuControl
|
||||
{
|
||||
public:
|
||||
Menu();
|
||||
~Menu() override;
|
||||
|
||||
/**
|
||||
* @brief Add a MenuAction to the menu
|
||||
*
|
||||
* Every MenuAction is an Entry in the Menu
|
||||
*
|
||||
* @param entry
|
||||
*/
|
||||
void addEntry(MenuAction *entry);
|
||||
|
||||
/**
|
||||
* @brief get information about the active menu
|
||||
*
|
||||
* If this is not the active menu, will be passed to
|
||||
* active menu.
|
||||
*
|
||||
* @return true an other menu is active
|
||||
* @return false this menu is active
|
||||
*/
|
||||
bool isInSubmenu();
|
||||
|
||||
/**
|
||||
* @brief Print the actual screen
|
||||
*/
|
||||
void printMenu() override;
|
||||
|
||||
/**
|
||||
* @brief Print the screen from the active menu
|
||||
*/
|
||||
void update() override;
|
||||
|
||||
// User Inputs
|
||||
void down() override;
|
||||
void up() override;
|
||||
void right() override;
|
||||
void left() override;
|
||||
void yes() override;
|
||||
void no() override;
|
||||
|
||||
private:
|
||||
bool inSubmenu = false;
|
||||
|
||||
std::list<MenuAction *> entries;
|
||||
std::list<MenuAction *>::iterator selectedEntry;
|
||||
};
|
||||
|
||||
#endif // MENU_H
|
||||
|
||||
Reference in New Issue
Block a user