Always displayed lines/rows

Nov 19, 2010 at 8:38pm
Is it possible to keep the first two-three lines always displayed (with information that is able to change), while the next typed lines scroll behind those first lines.
For example, I want the stats of a character to be always visible while the text scrolls behind the displayed info.
Nov 19, 2010 at 8:53pm
Without an API you would need to use a system call to clear the screen and redraw the text over and over which is not recommended. The scrolling effect would also be a problem. The console just isn't made for that.
Nov 20, 2010 at 12:27pm
Would it be possible if I used ncurses?
Nov 20, 2010 at 1:02pm
Ive tried using curses^2 and it didn't really do that for me. lol
Nov 20, 2010 at 11:57pm
It is easily possible in both system APIs and using NCurses.

In NCurses there are "windows" -- specific sections of the screen you can treat as a screen itself. Read stuff about manipulating windows here:
http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/

There are also special routines to do information lines. Google "man 3xc ripoffline" and "man curs_slk".

Good luck!
Nov 21, 2010 at 1:29am
Also... you're asking the wrong question.

Obligatory link: http://cplusplus.com/forum/articles/28558/
Nov 23, 2010 at 11:31pm
@Duoas: Thanks for the link.

@Disch: Very interesting topic. Thanks a lot.
Topic archived. No new replies allowed.