Question

I have been looking through previous questions regarding this topic and so far none of them answer my question. I am looking for a way (without libraries) to build my own TUI from the ground up. I want to start off with a simple program that reads a directory and displays the contents with the ability to use arrow keys to move up and down highlighting one item. As simple as this may seem this would be all the help I need to get started on the rest of my project.

All I need is for someone to point me in the right direction for clearing and printing to the screen and not using a print statement or external library. Any help would be greatly appreciated.

Was it helpful?

Solution

Well, to be honest, you can. But as others will tell you, curses is the right tool for the job.

That said, this isn't the 80s anymore. <overgeneralization>Everybody uses Xterm.</overgeneralization> Xterm uses ANSI VT100 control codes, mimicking the classic DEC VT-100. If you target this, you should be reasonably ok and portable.

But curses is really nice. It does a lot of the hard work for you (and there's plenty of hard work left to keep you busy).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top