|
In a GUI environment, objects send messages to each other, that is, if you resize your web browser, the object displaying the text get a message from the browser frame "Hey I have changed, rebuild the text you are displaying".
If you resize Konsole, the GUI objects will get messages, but not your CLI application. Try it: do a directory listing, resize the window until a part of the text is covered and then enlarge the window again. The text is not redisplayed.
In ncurses you are able to retrieve the screen dimensions. In your program, you should continously monitor these figures, and take appropriate action when they change, that is redraw your application using these new dimensions. This require that you don't have any modal dialogs in your application, or you have to accept that no resize is being performed during display of such a dialog.
jlinkels
|