nsf / termbox

Library for writing text-based user interfaces
http://code.google.com/p/termbox
MIT License
1.96k stars 185 forks source link

Allow reading the front buffer? #130

Open josharenson opened 4 years ago

josharenson commented 4 years ago

Feature request/idea: reading the front buffer

A function like tb_cell_buffer for the front buffer would be nice to have. I realize it comes with some amount of risk. If there is interest, I'd be happy to prototype something.

My use case is below, but I think this could be helpful in a more generic sense:

I've made a mini termbox based window manager of sorts and would like to implement some type of modal functionality. I'd like to be able to push the contents of the front buffer on a stack, show a modal, and then display the previous front buffer again after the modal is closed.

Since each section of my terminal is managed by an arbitrary number of window objects, it is impractical and inefficient to track their states manually.