Skip to the content.

Core Concepts

App

The App class is the entry point of your application. It initializes the terminal, handles input events, and manages the main event loop.

#include "cpptui.hpp"
using namespace cpptui;

int main() {
    App app;
    auto root = std::make_shared<Vertical>();
    // ... add widgets to root ...
    app.run(root);
    return 0;
}

Widget

Every visual element in cpp-tui inherits from the Widget class. Widgets have:

Theme

The Theme class manages the color palette of the application.

Events

Events are handled by the App and propagated to widgets.

Clipboard & History

Global default keybindings are available for text editing widgets (Input, TextArea, and selectable Label).