SkillAgentSearch skills...

Finalcut

A Modern C++ Text-Based Widget Toolkit (TUI)

Install / Use

/learn @gansm/Finalcut

README

FINAL CUT

Library for creating terminal applications with text-based widgets

FINAL CUT is a powerful and lightweight C++ library for creating terminal-based applications (TUI) with numerous text-based widgets. FINAL CUT is designed for simplicity and does not require the functionality of external libraries (such as ncurses or termbox) but still offers full mouse support, Unicode compatibility, and versatile widget functions.

It provides UTF-8 character encoding, full-width character support, and the ability to display combined Unicode characters. The library allows developers to create user-friendly text console applications that manage multiple text windows on the screen using their own windowing system.

The design of FINAL CUT's C++ class structure was inspired by the Qt framework. It provides a variety of common controls, including dialog boxes, push buttons, check boxes, radio buttons, input lines, list boxes, and status bars.

Architecture of the sub-systems of a FINAL CUT application

Building and Code Analysis

| | Badge | |-------------------:|:------| | Latest release | Latest Release | | License | LGPL v3 | | Class Reference | documented | | ARM build | ARM build | | FreeBSD build | FreeBSD build | | NetBSD build | NetBSD build | | OpenBSD build | OpenBSD build | | macOS build | macOS build | | Cygwin build | Cygwin build | | Solaris build | Solaris build | | CodeQL analysis | CodeQL analysis | | Coverity Scan | Coverity Scan Status | | SonarCloud | Quality gate | | CodeFactor | CodeFactor | | SIGRID | sigrid-publish |

Installation

Before installing FINAL CUT, check if your computer meets the requirements. You can find these in the FAQ section under "What do I need to build this library?".

git clone https://github.com/gansm/finalcut.git
cd finalcut
autoreconf --install --force
./configure --prefix=/usr
make
su -c "make install"

[!NOTE] To simplify the build process, use the shell script build.sh located in the project root directory. Execute ./build.sh release to initiate configuration and building. For a list of available options, enter ./build.sh help.

Supported Platforms

FINAL CUT currently works on the following platforms:

  • Linux
  • FreeBSD
  • NetBSD
  • OpenBSD
  • macOS
  • Cygwin
  • GNU Hurd
  • Solaris

If your platform is not listed here, it may still be compatible with FINAL CUT. Contributions to extend the platform support are welcome!

Documentation

Read the documentation on the first steps in FINAL CUT to find out how to use the library.

Frequently Asked Questions

Check out the FINAL CUT FAQ for common questions and answers.

Screenshots

Explore FINAL CUT's text-ui with these examples:

FFileDialog <br />FFileDialog widget with incremental search<br /><br />

FProgressbar <br />FProgressbar widget<br /><br />

XPM Viewer <br />X PixMap (XPM) viewer example<br /><br />

FTextView <br />Scrollable text in an FTextView widget<br /><br />

Mandelbrot set <br />Mandelbrot set example<br /><br />

FINAL CUT newfont

This project contains NewFont, a graphical text font for X11 and the Linux console:

ui example in newfont mode <br />UI example in NewFont mode<br /><br />

drive symbols <br />Drive symbols<br /><br />

calculator <br />Calculator example in NewFont mode<br /><br />

Benchmark

Measure the terminal character output speed with the Rotozoomer example.

Virtual Terminal

FINAL CUT uses a virtual terminal to print character via an update method on the screen. It provides (as an overlying layer) virtual windows for the realization of window movements. The update methods only transfer differences to the virtual terminal or physical screen.

<pre style="line-height: 1 !important;"> print(...) printf(...) │ │ ╔════════════════════════[ vterm ]════════════════════════╗ │ ║createVTerm() ║ │ ║ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┐ ║ │ ║ ║ │ ║ │ restoreVTerm(box) │ ║ │ ┌───────╨────[ vwin ]────────────┐ ║ │ │createArea(size) │ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ ║ │ │ │ ║ │ │ │ ║ └──┼────────► putArea(pos,area) ────► ║ │ │ ║ │ ◄──── getArea(pos,area) ║ │ │ ║ │ │ ║ │ │ ║ │ resizeArea(size, area)│ ║ └───────╥────────────────────────┘ ║ ║ ║ ║ │ resizeVTerm(size)║ ╚═══════▼═════════════════════════════════════════════════╝ │ │ putVTerm() └──────────────────► updateTerminalLine(y) updateTerminal() │ ▼ ┌───────────────┐ │ output_buffer │ └───────────────┘ │ │ flush() │ ▼ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▌ ▐ ▌ screen ▐ ▌ ───────────── ▐ ▌ real terminal ▐ ▌ ▐ ▀▀▀▀▀▀▀███▀▀▀▀▀▀▀ ███ ▀▀▀▀▀▀▀▀▀ </pre>

Class Digramm

<pre style="line-height: 1 !important;"> ┌────────────┐1 │ FTermLinux ├------┐ └────────────┘ : ┌──────────────┐1 : │ FTermFreeBSD ├------┐ └──────────────┘ : ┌──────────────┐1 : │ FTermOpenBSD ├------┐ └──────────────┘ : ┌────────────────┐1 : │ FTermDetection ├------┐ └────────────────┘ : ┌────────────────┐1 : │ FTermcapQuirks ├------┐ └────────────────┘ : ┌───────────┐ ┌────────────────┐1 : ┌────┤ FKeyEvent │ │ FTermXTerminal ├------┐ │ └───────────┘ └────────────────┘ : │ ┌─────────────┐ ┌──────────┐1 : ├────┤
View on GitHub
GitHub Stars1.2k
CategoryDevelopment
Updated2d ago
Forks57

Languages

C++

Security Score

100/100

Audited on Mar 25, 2026

No findings