MCPcopy Create free account
hub / github.com/a-n-t-h-o-n-y/TermOx

github.com/a-n-t-h-o-n-y/TermOx @v2.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v2.0.0 ↗ · + Follow
306 symbols 531 edges 41 files 41 documented · 13% updated 10mo ago★ 86413 open issues

Browse by type

Functions 231 Types & classes 75
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

TermOx II 🐂🐂

TermOx is a C++20 library for creating Widget based Terminal User Interfaces.


#include <ox/ox.hpp>
using namespace ox;

int main()
{
    auto head = Label{{
                    .text  = "C++20 Terminal UI Framework",
                    .align = Align::Center,
                    .brush = {.foreground = XColor::Blue, .traits = Trait::Bold},
                }} | Border::round("TermOx II");

    return Application{head}.run();
}

See the examples directory for more sample code.

Use scratch.cpp and the TermOx.examples.scratch build target to try out the library.

Features

  • Colors - RGB, HSL, XTerm 256 Color Indices
  • Traits - Bold, Italic, Underline, etc...
  • Layouts and Size Policies
  • Events
    • Mouse Input - Mouse Move, Wheel, etc...
    • Keyboard Input
    • Focus In / Out
    • Timer
  • Signals
  • Widget Library

Build Instructions

TermOx uses CMake and depends on the Signals Light, zzz and Escape libraries, which are all fetched by cmake automatically.

git clone https://github.com/a-n-t-h-o-n-y/TermOx.git
mkdir TermOx/build && cd TermOx/build
cmake ..
make TermOx                                 # Build library

Note on Version 2

Version 2 is a complete rewrite of the library. It focuses on providing a simpler set of base widgets and a light-weight core implementation of events processing and rendering. As such, the API has little in common with the previous version.

Gallery

Core symbols most depended-on inside this repo

Shape

Method 184
Class 69
Function 47
Enum 6

Languages

C++100%

Modules by API surface

include/ox/widget.hpp27 symbols
src/application.cpp22 symbols
include/ox/put.hpp20 symbols
examples/pong.cpp19 symbols
include/ox/core/terminal.hpp18 symbols
src/core/terminal.cpp16 symbols
src/textbox.cpp14 symbols
src/button.cpp14 symbols
include/ox/bordered.hpp13 symbols
examples/snake.cpp12 symbols
examples/pinbox.cpp12 symbols
src/checkbox.cpp11 symbols

For agents

$ claude mcp add TermOx \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page