linux - ncurses good practices: clear screen with windows -


ncurses app checks if terminal has been resized. if size less 80x25, blank screen , show error message.

if app has n windows, should of them removed delwin(), or calling clear() enough? on other hand, can existing windows later reused after clear() - refresh , display contents if terminal size became satisfactory - or should recreated?

clearing windows sounds application's behavior rather ncurses such. ncurses library (see resizeterm) clear areas if windows increase in size.

the best policy when resizing depends on have inside windows. ncurses making reasonably safe changes, since has no information intention in making things close on screen, , others separated, can attempt resize windows contents preserved. application can still clear them , start on again — moving windows around on screen.

it's decision whether simpler recreate windows or reuse them.

as long of rebuilding done before next repainting of screen (e.g., wrefresh), ncurses make updates little activity can.


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -