c - ncurses window resizing patterns -


i have seen other questions on dealing window resizing, e.g., ncurses - resizing glitch

the code in question has loop redraw contents of window after resize.

my question is: possible, rather reprinting window after call clear() , before call refresh(), have curses use text that's in output buffer?

i.e., "reflow" text, rather clear/ reprint?

i have rather complicated ncurses application multiple windows being updated multiple threads , can't see clean way this.

to directly answer question, no there no way "reflow" or have ncurses handle adjustment of text.

however use panels library (which part of ncurses) handle windows. panels can attach arbitrary user data via set_panel_userptr. use store callback function each panel can resize content.

your resize handler can loop through of panels calling resize callback.

as side note, ncurses not thread safe. make sure threads using ncurses safely.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -