Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Generic / ConsoleInterface / Menu.h
diff options
context:
space:
mode:
Commitd01238def9403291528436aae7f0be9bcc8a921c (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-05-28 20:10:00 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-05-28 20:10:00 +0300
Files3bfc27361a0abef06498a0ca52da2911b23a36bc /src/Generic/ConsoleInterface/Menu.h
FMI-OOP-P2_Tables-d01238def9403291528436aae7f0be9bcc8a921c.tar
FMI-OOP-P2_Tables-d01238def9403291528436aae7f0be9bcc8a921c.tar.gz
FMI-OOP-P2_Tables-d01238def9403291528436aae7f0be9bcc8a921c.zip
Parent7ea8801641356bcc6d564b96e27ebb06527a479b (diff)
Autocommit at 28.05.2022 @ 20:10
1 files changed, 2 insertions, 18 deletions
-rw-r--r--src/Generic/ConsoleInterface/Menu.h20
diff --git a/src/Generic/ConsoleInterface/Menu.h b/src/Generic/ConsoleInterface/Menu.h
index e0ea685..68037df 100644
--- a/src/Generic/ConsoleInterface/Menu.h
+++ b/src/Generic/ConsoleInterface/Menu.h
@@ -15,29 +15,13 @@
* and calls the chosen command's run() function.
*/
class Menu {
- char title[256];
List<Command> menuOptions;
- bool backExistsApp;
- bool isSubMenu;
-
public:
//! Sets name as "Menu", leaves all flags to false and creates an empty Command list
Menu();
- //! Copies title, saves flags and creates and empty Command list
- Menu(const char* title, bool backExistsApp, bool isSubMenu);
- //! Copies title, saves flags and copies commands
- Menu(const char* title, bool backExistsApp, bool isSubMenu, const Command* commands, unsigned commandCount);
-
- //! Adds a command to the internal Command list
- void addCommand(const Command& command);
-
- //! Tell Menu to show an error message next time it prints
- void registerError(const char* message) const;
- //! Tell Menu to show a warning message next time it prints
- void registerWarning(const char* message) const;
- //! Tell Menu to show a success message next time it prints
- void registerSuccess(const char* message) const;
+ //! Copies commands
+ Menu(const Command* commands, unsigned commandCount);
//! Lists commands and after user input executes an appropriate command run() function
void navigate() const;