Summary Files Commits Branches @commit @diff @stats
path: root / Year 1 / Object-oriented Programming / Project 2 / src / UserInterface / UserInterface.h
diff options
context:
space:
mode:
Commitc5431e4d321dbf0152e6826841c1ef5c1291ba5b (patch)
Author
 Syndamia <kamen@syndamia.com>
2022-06-14 15:38:50 +0300
Committer
 Syndamia <kamen@syndamia.com>
2022-06-14 15:38:50 +0300
Filesbe7dbd4b6188924bb3a1a9398169526f236b09b9 /Year 1/Object-oriented Programming/Project 2/src/UserInterface/UserInterface.h
uni-projects-c5431e4d321dbf0152e6826841c1ef5c1291ba5b.tar
uni-projects-c5431e4d321dbf0152e6826841c1ef5c1291ba5b.tar.gz
uni-projects-c5431e4d321dbf0152e6826841c1ef5c1291ba5b.zip
Parentccedf6f5d89f375580ff6af40296aab953f9cd09 (diff)
Added files from project 2 (mirror)
1 files changed, 45 insertions, 0 deletions
-rw-r--r--Year 1/Object-oriented Programming/Project 2/src/UserInterface/UserInterface.h45
diff --git a/Year 1/Object-oriented Programming/Project 2/src/UserInterface/UserInterface.h b/Year 1/Object-oriented Programming/Project 2/src/UserInterface/UserInterface.h
new file mode 100644
index 0000000..3557da8
--- /dev/null
+++ b/Year 1/Object-oriented Programming/Project 2/src/UserInterface/UserInterface.h
@@ -0,0 +1,45 @@
+#ifndef HEADER_USERINTERFACE
+#define HEADER_USERINTERFACE
+
+/*! \file UserInterface.h
+ * \brief Stores the declaration of class UserInterface
+ */
+
+#include "../Generic/ConsoleInterface/Menu.h"
+#include "../Generic/String/String.h"
+#include "../Models/Table.h"
+
+/*! \brief The class that contains and via which the user controls the application's user interface
+ */
+class UserInterface {
+ Menu menu;
+
+ static Table* table;
+ static String fileName;
+ static bool saved;
+
+ //! Opens a file
+ static void com_open(const char* params);
+ //! Closes a file
+ static void com_close(const char* params);
+ //! Saves a file to the location it was opened from
+ static void com_save(const char* params);
+ //! Saves a file to a given location
+ static void com_saveas(const char* params);
+ //! Prints the help message
+ static void com_help(const char* params);
+ //! Exists the appliction
+ static void com_exit(const char* params);
+
+ //! Prints the currently opened table
+ static void com_print(const char* params);
+ //! Edits a cell of the currently opened table
+ static void com_edit(const char* params);
+
+public:
+ UserInterface();
+ //! Starts the user interface
+ void run();
+};
+
+#endif