From 0030194fbcae758068ddbcb8cebfdd5beb76cf4d Mon Sep 17 00:00:00 2001 From: Syndamia Date: Mon, 30 May 2022 18:17:42 +0300 Subject: Autocommit at 30.05.2022 @ 18:17 --- src/UserInterface/UserInterface.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/UserInterface/UserInterface.cpp') diff --git a/src/UserInterface/UserInterface.cpp b/src/UserInterface/UserInterface.cpp index 4036840..6adc4be 100644 --- a/src/UserInterface/UserInterface.cpp +++ b/src/UserInterface/UserInterface.cpp @@ -8,6 +8,16 @@ Table* UserInterface::table = nullptr; +void UserInterface::com_help(const char* params) { + std::cout << "The following commands are supported:" << std::endl + << "open opens " << std::endl + << "close closes currently opened file" << std::endl + << "save saves the currently open file" << std::endl + << "saveas saves the currently open file in " << std::endl + << "help prints this information" << std::endl + << "exit exists the program" << std::endl; +} + void UserInterface::com_print(const char* params) { List cells = table->getAllCells(); printTable(cells, table->get_cols()); @@ -30,6 +40,7 @@ UserInterface::UserInterface(Table* inTable) : menu() { if (table == nullptr) table = inTable; + menu.addCommand(Command("help", com_help)); menu.addCommand(Command("print", com_print)); menu.addCommand(Command("edit", com_edit)); } -- cgit v1.3.1-23-gd82d