Skip to content

a-n-t-h-o-n-y/TermOx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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