All Projects → hjaremko → cxxcurses

hjaremko / cxxcurses

Licence: MIT license
Header only ncurses wrapper

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to cxxcurses

croatoan
Common Lisp bindings for the ncurses terminal library.
Stars: ✭ 111 (+362.5%)
Mutual labels:  tui, ncurses, curses
Dte
A small, configurable console text editor (moved to https://gitlab.com/craigbarnes/dte)
Stars: ✭ 98 (+308.33%)
Mutual labels:  tui, ncurses, curses
Termox
C++17 Terminal User Interface(TUI) Library.
Stars: ✭ 306 (+1175%)
Mutual labels:  tui, ncurses, curses
Tuicss
Text-based user interface CSS library
Stars: ✭ 167 (+595.83%)
Mutual labels:  tui, ncurses, curses
Pacmixer
an alsamixer alike for PulseAudio.
Stars: ✭ 78 (+225%)
Mutual labels:  tui, ncurses, curses
Neix
neix - a RSS/Atom feed reader for your terminal.
Stars: ✭ 128 (+433.33%)
Mutual labels:  tui, ncurses
Mandown
man-page inspired Markdown viewer
Stars: ✭ 173 (+620.83%)
Mutual labels:  tui, ncurses
Goaccess
GoAccess is a real-time web log analyzer and interactive viewer that runs in a terminal in *nix systems or through your browser.
Stars: ✭ 14,096 (+58633.33%)
Mutual labels:  tui, ncurses
Asciimatics
A cross platform package to do curses-like operations, plus higher level APIs and widgets to create text UIs and ASCII art animations
Stars: ✭ 2,869 (+11854.17%)
Mutual labels:  tui, curses
Zui
⬢ Zsh User Interface library – CGI+DHTML-like rapid application development with Zsh
Stars: ✭ 95 (+295.83%)
Mutual labels:  tui, curses
Cursive
A Text User Interface library for the Rust programming language
Stars: ✭ 2,613 (+10787.5%)
Mutual labels:  tui, ncurses
Fui
Add CLI & form interface to your program. Docs: https://docs.rs/fui
Stars: ✭ 244 (+916.67%)
Mutual labels:  tui, ncurses
Pspg
Unix pager (with very rich functionality) designed for work with tables. Designed for PostgreSQL, but MySQL is supported too. Works well with pgcli too. Can be used as CSV or TSV viewer too. It supports searching, selecting rows, columns, or block and export selected area to clipboard.
Stars: ✭ 1,749 (+7187.5%)
Mutual labels:  tui, ncurses
Tig
Text-mode interface for git
Stars: ✭ 10,497 (+43637.5%)
Mutual labels:  tui, ncurses
NCURSES-Programming-HOWTO-examples
CMake examples for code in http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/index.html
Stars: ✭ 114 (+375%)
Mutual labels:  tui, ncurses
Cuishark
A protocol analyzer like a wireshark on CUI. cuishark is using libwireshark to analyze packets. https://cuishark.slankdev.net
Stars: ✭ 208 (+766.67%)
Mutual labels:  tui, ncurses
git-tui
Collection of human friendly terminal interface for git.
Stars: ✭ 95 (+295.83%)
Mutual labels:  tui, curses
todo list rust
Simple Ncurses Todo List ☑
Stars: ✭ 19 (-20.83%)
Mutual labels:  tui, ncurses
ncurses
Ncurses bindings for Crystal
Stars: ✭ 20 (-16.67%)
Mutual labels:  ncurses, curses
Turbo
An experimental text editor based on Scintilla and Turbo Vision.
Stars: ✭ 78 (+225%)
Mutual labels:  tui, ncurses

cxxcurses

Example

Header-only C++ wrapper aiming to provide more friendly interface to the most used (at least by me) functions of ncurses instead of not so fun to use C interface.

#include <cxxcurses/cxxcurses.hpp>

#include <ostream>
#include <string>

class custom_type
{
public:
    friend auto operator<<( std::ostream& os, const custom_type& type )
        -> std::ostream&
    {
        return os << "str: " << type.str_ << " pi: " << type.pi_;
    }

private:
    const std::string str_ { "user defined" };
    const double pi_ { 3.14 };
};

auto main() -> int
{
    namespace cc = cxxcurses;
    const auto& main_win = cc::terminal::main_win;
    cc::terminal init;

    const auto hello_string { std::string { "Hello, world" } };

    main_win << cc::format( 4 )( "C++ curses centered example" );
    main_win << cc::format( 5, 6 )(
        "Here comes {rR} {gB} {bB}!!!", "multi", "colored", hello_string );
    main_win << cc::format( 6, 6 )( "Supports {R} types!", custom_type {} );

    auto some_window { cc::widget::window { { 10, 5, 5, 30 },
                                            cc::terminal::main_win } };

    some_window << cc::format( 2, 2 )( "Hello from sub-window!" );
    some_window.get_char();

    return 0;
}

Building with cxxcurses

You need to have ncurses installed on your system (in case of Windows pdcurses) and link it to your project as usual.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].