From d06a884302f3f771ed9b595c76b460f692d71893 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 29 May 2022 07:48:42 +0300 Subject: Autocommit at 29.05.2022 @ 07:48 --- src/UserInterface/UserInterface.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/UserInterface/UserInterface.cpp') 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 + +/* Private (static) */ + +void UserInterface::com_print(const char* params) { + List 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(); +} -- cgit v1.3.1-23-gd82d