GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Categories
  • Newsletter
  • Submit
  • Login
  • Awesome C++
  • CLI

This view

  • Original page
  • New address

GeezerVison is showing cpp.libhunt.com — termbox Alternatives - C++ CLI | LibHunt

  • Subscribe
  • Submit
  • Categories
  • About
  • Login

termbox

Library for writing text-based user interfaces

nsf logo
code.google.com    Source Code    Changelog
Suggest Changes
Take the C++ Developer Survey - About 6 minutes on the tools, libraries and AI you use with C++. You get the results by email. Take the survey »
Popularity
6.4
Stable
Activity
0.0
Stable
Stars 2,004
Watchers 73
Forks 186
Last Commit over 6 years ago

Code Quality Rank: L4
Programming language: C
License: MIT License
Tags: CLI    
Latest version: v1.1.2

termbox alternatives and similar libraries

Based on the "CLI" category.
Alternatively, view termbox alternatives based on common mentions on social networks and blogs.

  • Vcpkg

    9.7 10.0 termbox VS Vcpkg
    C++ Library Manager for Windows, Linux, and MacOS
    microsoft logo
  • conan

    8.8 9.6 termbox VS conan
    Conan - The open-source C and C++ package manager
    conan-io logo
  • SaaSHub - Software Alternatives and Reviews

    SaaSHub helps you find the best software and product alternatives
    Promo www.saashub.com
    SaaSHub Logo
  • jarro2783/cxxopts

    7.9 6.6 termbox VS jarro2783/cxxopts
    Lightweight C++ command line option parser
    jarro2783 logo
  • CLI11

    7.8 8.8 termbox VS CLI11
    CLI11 is a command line parser for C++11 and beyond that provides a rich feature set with a simple and intuitive interface.
    CLIUtils logo
  • gflags

    7.6 5.8 L2 termbox VS gflags
    The gflags package contains a C++ library that implements commandline flags processing. It includes built-in support for standard types such as string and the ability to define flags in the source file in which they are used. Online documentation available at:
    gflags logo
  • indicators

    7.3 5.2 termbox VS indicators
    Activity Indicators for Modern C++
    p-ranav logo
  • Taywee/args

    6.1 8.5 L1 termbox VS Taywee/args
    A header-only C++ argument parser library. Supposed to be flexible and powerful, and attempts to be compatible with the functionality of the Python standard argparse library (though not necessarily the API).
    Taywee logo
  • args

    6.1 8.5 L1 termbox VS args
    A header-only C++ argument parser library. Supposed to be flexible and powerful, and attempts to be compatible with the functionality of the Python standard argparse library (though not necessarily the API).
    Taywee logo
  • rang

    6.0 6.2 L4 termbox VS rang
    A Minimal, Header only Modern c++ library for terminal goodies 💄✨
    agauniyal logo
  • clipp

    5.7 0.0 termbox VS clipp
    easy to use, powerful & expressive command line argument parsing for modern C++ / single header / usage & doc generation
    muellan logo
  • Argh!

    5.6 2.4 termbox VS Argh!
    Argh! A minimalist argument handler.
    adishavit logo
  • docopt.cpp

    5.4 0.0 L3 termbox VS docopt.cpp
    C++11 port of docopt
    docopt logo
  • Ncurses

    4.5 1.2 termbox VS Ncurses
    ncurses Git mirror
    mirror logo
  • Boost.Program_options

    3.4 3.8 L3 termbox VS Boost.Program_options
    Boost.org program_options module
    boostorg logo
  • cifuzz

    3.3 6.8 termbox VS cifuzz
    DISCONTINUED. cifuzz makes fuzz tests as easy as unit tests
    CodeIntelligenceTesting logo
  • GuiarStr

    1.2 8.2 termbox VS GuiarStr
    A lightweight, dependency-free C library for UTF-8-safe and advanced string manipulation: trim, split, reverse, contains, count, and more.
    okba14 logo
  • TCLAP

    - termbox VS TCLAP
    A mature, stable and feature-rich library for defining and accessing command line arguments in ANSI C++. [MIT]

* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.

Do you think we are missing an alternative of termbox or a related project?

Add another 'CLI' Library

Popular Comparisons

  • termbox
    vs
    Ncurses
  • termbox
    vs
    args
  • termbox
    vs
    docopt.cpp
  • termbox
    vs
    gflags
  • termbox
    vs
    Boost.Program_options

README

IMPORTANT

This library is no longer maintained. It's pretty small if you have a big project that relies on it, just maintain it yourself. Or look for forks. Or look for alternatives. Or better - avoid using terminals for UI. Never the less, thanks to all who ever contributed.

Termbox

Termbox is a library that provides minimalistic API which allows the programmer to write text-based user interfaces.

It is based on a very simple abstraction. The main idea is viewing terminals as a table of fixed-size cells and input being a stream of structured messages. Would be fair to say that the model is inspired by windows console API. The abstraction itself is not perfect and it may create problems in certain areas. The most sensitive ones are copy & pasting and wide characters (mostly Chinese, Japanese, Korean (CJK) characters). When it comes to copy & pasting, the notion of cells is not really compatible with the idea of text. And CJK runes often require more than one cell to display them nicely. Despite the mentioned flaws, using such a simple model brings benefits in a form of simplicity. And KISS principle is important.

At this point one should realize, that CLI (command-line interfaces) aren't really a thing termbox is aimed at. But rather pseudo-graphical user interfaces.

Installation

Termbox comes with a waf-based build scripts. In order to configure, build and install it, do the following::

./waf configure --prefix=/usr                                (configure)
./waf                                                        (build)
./waf install --destdir=DESTDIR                              (install)

By default termbox will install the header file and both shared and static libraries. If you want to install a shared library or static library alone, use the following as an install command::

./waf install --targets=termbox_shared --destdir=PREFIX      (shared library)

or::

./waf install --targets=termbox_static --destdir=PREFIX      (static library)
Python

In order to install the python module, use the following command (as root or via sudo)::

python setup.py install

for Python 3::

python3 setup.py install

Getting started

Termbox's interface only consists of 12 functions::

tb_init() // initialization
tb_shutdown() // shutdown

tb_width() // width of the terminal screen
tb_height() // height of the terminal screen

tb_clear() // clear buffer
tb_present() // sync internal buffer with terminal

tb_put_cell()
tb_change_cell()
tb_blit() // drawing functions

tb_select_input_mode() // change input mode
tb_peek_event() // peek a keyboard event
tb_poll_event() // wait for a keyboard event

See src/termbox.h header file for full detail.

Links

If you want me to add your Termbox project here, send me a pull request or drop a note via email, you can find my email below.

Language bindings
  • https://github.com/nsf/termbox - Python
  • https://github.com/adsr/termbox-php - PHP
  • https://github.com/gchp/rustbox - Rust
  • https://github.com/fouric/cl-termbox - Common Lisp
  • https://github.com/zyedidia/termbox-d - D
  • https://github.com/dduan/Termbox - Swift
  • https://github.com/andrewsuzuki/termbox-crystal - Crystal
  • https://github.com/jgoldfar/Termbox.jl - Julia
  • https://github.com/mitchellwrosen/termbox - Haskell
  • https://github.com/dom96/nimbox - Nim
  • https://github.com/ndreynolds/ex_termbox - Elixir
  • https://github.com/bmsauer/termbox-ada - Ada
  • https://github.com/luxint/termbox - newLISP
Other implementations
  • https://github.com/nsf/termbox-go - Go pure Termbox implementation
Applications
  • https://github.com/adsr/mle - a small, flexible terminal-based text editor
  • https://github.com/colinta/Ashen - framework for building terminal applications based on the Elm architecture
  • https://github.com/afify/sfm - simple file manager for unix-like systems

Bugs & questions

Report bugs to the https://github.com/nsf/termbox issue tracker. Send rants and questions to me: [email protected].

Changes

v1.1.2:

  • Properly include changelog into the tagged version commit. I.e. I messed up by tagging v1.1.1 and describing it in changelog after tagged commit. This commit marked as v1.1.2 includes changelog for both v1.1.1 and v1.1.2. There are no code changes in this minor release.

v1.1.1:

  • Ncurses 6.1 compatibility fix. See https://github.com/nsf/termbox-go/issues/185.

v1.1.0:

  • API: tb_width() and tb_height() are guaranteed to be negative if the termbox wasn't initialized.
  • API: Output mode switching is now possible, adds 256-color and grayscale color modes.
  • API: Better tb_blit() function. Thanks, Gunnar Zötl [email protected].
  • API: New tb_cell_buffer() function for direct back buffer access.
  • API: Add new init function variants which allow using arbitrary file descriptor as a terminal.
  • Improvements in input handling code.
  • Calling tb_shutdown() twice is detected and results in abort() to discourage doing so.
  • Mouse event handling is ported from termbox-go.
  • Paint demo port from termbox-go to demonstrate mouse handling capabilities.
  • Bug fixes in code and documentation.

v1.0.0:

  • Remove the Go directory. People generally know about termbox-go and where to look for it.
  • Remove old terminfo-related python scripts and backport the new one from termbox-go.
  • Remove cmake/make-based build scripts, use waf.
  • Add a simple terminfo database parser. Now termbox prefers using the terminfo database if it can be found. Otherwise it still has a fallback built-in database for most popular terminals.
  • Some internal code cleanups and refactorings. The most important change is that termbox doesn't leak meaningless exported symbols like 'keys' and 'funcs' now. Only the ones that have 'tb_' as a prefix are being exported.
  • API: Remove unsigned ints, use plain ints instead.
  • API: Rename UTF-8 functions 'utf8_' -> 'tb_utf8_'.
  • API: TB_DEFAULT equals 0 now, it means you can use attributes alones assuming the default color.
  • API: Add TB_REVERSE.
  • API: Add TB_INPUT_CURRENT.
  • Move python module to its own directory and update it due to changes in the termbox library.

Do not miss the trending, libraries, news and articles with our weekly report.

Awesome C++ is part of the LibHunt network. Terms. Privacy Policy.

(CC)
BY-SA
Spin The Wheel Of Names for a cryptographically secure random name picker.
Schedule a when to meet poll.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.