TextUserInterfaces.jl: The road so far

Hi!

As some of you know, I am (trying) to develop an interface between Julia and NCurses in the package TextUserInterfaces.jl. Today, I think I hit a major milestone!

I have rewritten everything so that we can work with widgets more or less like we do in Qt and GTK. It is now somewhat more easy to develop things like labels, inputs, progress bars, push buttons, radio buttons, etc. I also created a new positioning system, based on anchors. Thus, you can add widgets with position and size based on other widgets or windows. There is also a focus manager so that you just add widgets and let the manager take care which one is in focus at each time.

I could also create a (bad) translator between ANSI color sequences and NCurses color system (if anyone has a good alternative that do this, please, let me know!). This allowed me to use Julia functions that prints with colors and add them to NCurses like this:

The last thing was the auto-resizing algorithm when the terminal is resized. This is still needs improvements, but we have an initial working version:

Well, that’s it for now :slight_smile: I hope I can reach a usable milestone soon to call this package beta.

45 Likes

As a guy that mostly dwells mostly in terminals, I can say this is pretty awesome. Great work and thanks :wink:

3 Likes

Me too! And for some simple actions, it is way easier to create a TUI than to use something like Qt or GTK. In my case, I have a satellite simulator that runs on a workstation accessible via SSH. This has a lot (1000’s) of configuration parameters. I would like to have a simple TUI that I can see the current configuration, make some modifications if necessary, and then run the simulation.

4 Likes

Makes total sense, especially if one wants to connect safely to severs without X forwarding which is a pain (traffic as well as security wise).

2 Likes