Virtual Testbed
Ship dynamics simulator for extreme conditions
ConsoleWindow.hh
1 #ifndef VTESTBED_GUI_CONSOLEWINDOW_HH
2 #define VTESTBED_GUI_CONSOLEWINDOW_HH
3 
4 #include <vtestbed/gui/CircularLineBuffer.hh>
5 #include <vtestbed/gui/Window.hh>
6 
7 namespace vtb {
8 
9  namespace gui {
10 
11  class ConsoleWindow: public Window {
12 
13  private:
15 
16  private:
17  char _filterString[256] = {};
18  char _command[4096] = {};
19  buffer_type& _buffer;
20  std::vector<std::string> _history;
21  size_t _historyIndex = 0;
22 
23  public:
24 
25  explicit ConsoleWindow(buffer_type& buf);
26 
27  void draw();
28 
29  private:
30 
31  inline bool
32  hasFilterString() const {
33  return this->_filterString[0] != 0;
34  }
35 
36  void evaluate();
37 
38  };
39 
40  }
41 
42 }
43 
44 #endif // vim:filetype=cpp
Main namespace.
Definition: convert.hh:9