GithubHelp home page GithubHelp logo

nilsbore / streamflood Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 1.53 MB

Multi virtual terminal streams library for c++

License: BSD 3-Clause "New" or "Revised" License

CMake 13.42% C++ 86.58%
terminal terminal-graphics ncurses cout textview tabs wide-characters

streamflood's Introduction

streamflood

Multi virtual terminal streams library for c++

Dependencies

This library needs ncurses with wide-character support. On Ubuntu 16.04, install libncursesw using sudo apt-get install libncursesw5-dev.

Building

mkdir build && cd build && cmake .. && make -j4

Functionality

Streamflood allows you to have multiple panes within the terminal running your program. The panes can have a fixed size or be relative to the window size. Within your program, you choose to output text streams to any of these panes. The library takes care of layouting them in a way that the pane will fit on your screen.

In this example, there are four panes, of which three fits in one window:

Smaller pane 1

By pressing "0", you go the corresponding window, containing the last pane:

Smaller pane 0

By resizing the window to be bigger, it can display all panes at the same time:

Larger pane with all

Library usage

You can check out the example for info on how to use the code. Briefly, you instantiate a streamflood::Streams object, add a new stream by specifying its name and dimensions, streams.add_stream("stream0", 50, 200) and finally write to the stream streams["stream0"] << "Writing to stream0!".

streamflood's People

Contributors

bhousel avatar jfirebaugh avatar nilsbore avatar tmpsantos avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.