Virtual Testbed
Ship dynamics simulator for extreme conditions
src
vtestbed
gui
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
:
14
using
buffer_type
=
vtb::gui::CircularLineBuffer
;
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
vtb::gui::ConsoleWindow
Definition:
ConsoleWindow.hh:11
vtb::gui::CircularLineBuffer
Definition:
CircularLineBuffer.hh:88
vtb
Main namespace.
Definition:
convert.hh:9
std::vector< std::string >
vtb::gui::Window
Definition:
Window.hh:12
Generated by
1.8.15