Website Summary Files Commits Branches @commit @diff @stats
path: root / src / UserInterface / UserInterface.h
blob: 3557da8380ba5c41107603e09eabe081b4bb3ddf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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