diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-02-01 18:45:59 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-02-01 18:45:59 (GMT) |
| commit | 038da72c61ea6a251d805e2de3662f240da52b02 (patch) | |
| tree | 05170050b16f9d663ec44ae451211e686ba196ac /src/console/ConsoleModel.h | |
| parent | 857b0cc1fc58f066acd59404d16ee5e566e20f00 (diff) | |
| download | powder-038da72c61ea6a251d805e2de3662f240da52b02.zip powder-038da72c61ea6a251d805e2de3662f240da52b02.tar.gz | |
Console UI, open in browser button, tab and enter shortcut for Login UI, various
Diffstat (limited to 'src/console/ConsoleModel.h')
| -rw-r--r-- | src/console/ConsoleModel.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/console/ConsoleModel.h b/src/console/ConsoleModel.h new file mode 100644 index 0000000..b340ea8 --- /dev/null +++ b/src/console/ConsoleModel.h @@ -0,0 +1,35 @@ +/* + * ConsoleModel.h + * + * Created on: Feb 1, 2012 + * Author: Simon + */ + +#ifndef CONSOLEMODEL_H_ +#define CONSOLEMODEL_H_ + +#include <vector> +#include <deque> +#include "ConsoleView.h" +#include "ConsoleCommand.h" + +class ConsoleView; +class ConsoleModel { + int currentCommandIndex; + std::vector<ConsoleView*> observers; + std::deque<ConsoleCommand> previousCommands; + void notifyPreviousCommandsChanged(); + void notifyCurrentCommandChanged(); +public: + int GetCurrentCommandIndex(); + void SetCurrentCommandIndex(int index); + ConsoleCommand GetCurrentCommand(); + + std::deque<ConsoleCommand> GetPreviousCommands(); + ConsoleModel(); + void AddObserver(ConsoleView * observer); + void AddLastCommand(ConsoleCommand command); + virtual ~ConsoleModel(); +}; + +#endif /* CONSOLEMODEL_H_ */ |
