CPGen
C++ project generator
Loading...
Searching...
No Matches
View.hpp
Go to the documentation of this file.
1#pragma once
2
24#include <memory>
25#include <vector>
26
40class View {
41public:
50 void addSection(std::unique_ptr<Component> section);
51
64 void run();
65
66private:
70 void redraw() const;
71
80 void moveFocus(int dir);
81
82 std::vector<std::unique_ptr<Component>>
83 m_sections;
84 size_t m_focused_index =
85 0;
86 bool m_running =
87 false;
88};
Abstract base class for all TUI components.
Root TUI manager: renders sections, routes input, and runs the event loop.
Definition View.hpp:40
void addSection(std::unique_ptr< Component > section)
Append a top-level section to the view.
Definition View.cpp:12
void run()
Start the blocking TUI event loop.
Definition View.cpp:38