| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
C++ header-only terminal user interface library.
termui-cpp is currently available for Windows with partial support for Unix (through Ncurses).
#include <tui/tui.hpp>
int main() {
// Construct window with default dimensions
tui::Window window;
window.set_title("Hello, World!");
tui::Paragraph p;
p.text = "Hello, World!";
p.set_dimensions(0, 0, 25, 5);
bool quit = false;
tui::Event event;
// Add paragraph widget to the window
window.add(p);
while(!quit) {
if(window.poll_event(event)) {
if(event.type == tui::KEYDOWN) {
quit = true;
}
}
window.render();
}
window.close();
return 0;
}Examples in /examples are cross-platform; however, some features may be limited on unix.
Build all the examples with make build-examples.
Testing requires Catch2.
Test with make test. Compile the tests with make test-compile.
The test output is written to the file /test/test_output.txt.
| Back | FazBrowse Home | New Git URL |