42 {2,
"CTRL-c",
"Exit log viewer"},
43 {3,
"CTRL-h",
"Show/hide this help screen"},
44 {5,
"F1",
"Show/hide debug level"},
45 {6,
"F2",
"Show/hide info level"},
46 {7,
"F3",
"Show/hide warning level"},
47 {8,
"F4",
"Show/hide error level"},
48 {9,
"F5",
"Show/hide fatal level"},
49 {10,
"F7",
"Enable/disable node filter"},
50 {11,
"CTRL-a",
"Select all"},
51 {12,
"CTRL-i",
"Invert node selection"},
52 {13,
"CTRL-n",
"Show/hide node selection"},
53 {14,
"CTRL-s",
"Search for matching string"},
54 {15,
"CTRL-x",
"Clear search"},
55 {16,
"Backspace",
"Prev match"},
56 {17,
"Enter",
"Next match"},
57 {18,
"CTRL-e",
"Enable/disable text exclude filter"},
58 {19,
"CTRL-f",
"Enable/disable text include filter"}})
60 for (
const auto& key:
keys_) {
64 for (
const auto& key: keys_) {
72 for (
const auto& key:
keys_) {
91 if (key ==
ctrl(
'h')) {
94 else if (key == KEY_RESIZE || key ==
ctrl(
'q') || key ==
ctrl(
'c')) {
106 if (desc.size() > max_size) {
107 desc.resize(max_size);
111 int line_start = help_text.
key.length() + 4;
115 mvwhline(
window_, help_text.
line, line_start, 0, line_end - line_start);
virtual int width() const
virtual void resize(int height, int width, int y, int x)
virtual void resize(int height, int width, int y, int x)
virtual bool hidden() const
virtual void hide(bool enable)
void printKeybinding(const HelpText &text)
std::vector< HelpText > keys_
virtual bool visible() const
virtual bool handleKey(int key)
HelpPanel(int height, int width, int y, int x)
virtual int height() const