3

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.

Christopher Moore
  • 15,626
  • 10
  • 42
  • 52
Ambiguities
  • 415
  • 6
  • 18

1 Answers1

2

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).

luser droog
  • 18,988
  • 3
  • 53
  • 105
  • I'm using SSH to connect to my schools Linux command line environment. I'm looking to make something simple and compact and learn the actual process of coding the functions for screen control (including automatic re-sizing), refreshing and manipulation of text. I was wondering if there was any help to do this from scratch. I appreciate the suggestions none the less. – Ambiguities Apr 09 '13 at 14:11
  • That sounds like a GUI, not a TUI. I think you're describing a text widget, or a text editor. – luser droog Apr 09 '13 at 16:55