diff options
Autocommit at 29.05.2022 @ 07:48
1 files changed, 18 insertions, 0 deletions
| -rw-r--r-- | src/UserInterface/UserInterface.cpp | 18 |
diff --git a/src/UserInterface/UserInterface.cpp b/src/UserInterface/UserInterface.cpp index 9b8e727..f9d7d87 100644 --- a/src/UserInterface/UserInterface.cpp +++ b/src/UserInterface/UserInterface.cpp @@ -1,7 +1,25 @@ #include "UserInterface.h" +#include "../Generic/List/List.hpp" +#include "../Generic/String/String.h" +#include <stdexcept> + +/* Private (static) */ + +void UserInterface::com_print(const char* params) { + List<String> cells = this->table.getAllCells(); +} + +/* Public */ UserInterface::UserInterface(Table& table) : menu() { + if (this->table.getCellCount() > 0) + throw new std::logic_error("Singleton instance!"); + this->table = table; menu.addCommand(Command("print", com_print)); menu.addCommand(Command("edit", com_edit)); } + +void UserInterface::run() { + menu.navigate(); +} |
