GUI package for a "real-time" control application

Yes Gtk.jl works quite well for real-time control applications. We give a JuliaCon talk on a massively distributed system with various synchrone and asynchrone sensors: Real-Time, I/O, and Multitasking: Julia for Medical Imaging | JuliaCon 2022
A Gtk UI is the interface to everything but this talk focusses on the backend part. In last years talk I showed the Gtk UI that we created with Gtk.jl: Tomographic Image Reconstruction with Julia | Tobias Knopp | JuliaCon2021 - YouTube

Having said that Gtk.jl has a maintainership issue. So one certainly needs to be prepared for smaller issues that are not fixed directly or one needs to fix issues oneself. On the other hand Gtk.jl is used by various applications such as ImageView.jl and ProgressMeter.jl (+ Lab software like shown above) and this ensures that it always will be fixed when Julia moves forward.

7 Likes

Is this true? I didn’t see any note on the github page.

I was expecting for Makie integration and new docking features from imgui. However, the main developer of CImGui.jl suggested me to embed julia in other GUI programs. He gave up on CImGui.jl because there were only a couple of people using it.

Is it possible to upgrade Makie to a higher level – a generalized GUI package?

I am aware of your talk this year (but not the 2021 talk). Actually I have started last week setting up the RedPitayaDAQServer and modifying the FPGA bitstream for our application (laser interferometry). This a great project and very well written. Thanks a lot for that package!

I will have a look at your Gtk based UI but as you said it is not a very “future-proof” package both due to maintainership status and the fact that Gtk3 is superseded by Gtk4. But compared to QML, CImGui it seems to be the best package in terms of maintenance and support at the moment…

Actually if Makie would have some more GUI features (Tabs or other container widgets) one could build a GUI directly using Makie…

Ok, this now is pretty funny. Then you might even want to use parts of MPIMeasurements (or look at its architecture) since it provides all the device management, real-time measurements, … architecture. Some parts are MPI specific but about 50% is not. I could imagine that this is very useful in optics applications. Large part of MPIMeasurements is about handling various RS232 devices (magnetic field sensors, temperature sensors, arduinos, 3-axis robots, …)

Back to topic: One can actually embed Makie in Gtk.jl. So you can get the best of both worlds. I currently use Winston instead, since it has lower precompile times.

Regarding Gtk4 there is ongoing work which eventually will replace Gtk.jl GitHub - JuliaGtk/Gtk4.jl: Julia package for Gtk4, using GObject introspection I actually already ported the application that could be seen in my Juliacon talk to Gtk4 and it worked (more or less). Gtk4.jl will be likely be much more “feature complete” since it uses GObject introspection and therefore should cover most of Gtk4s API. But right now Gtk.jl should be used of course.

3 Likes

Here is a gist that shows howto integrate Gtk.jl with Makie:

Full credit on this code goes to Julius Krumbiegel who created that example for me.

4 Likes

FWIW, I was recently able to get GLMakie to draw into Gtk4’s GtkGLArea. It’s pretty rough (and doesn’t currently scale the drawing to the widget size):

This uses Gtk4.jl but as far as I can tell the same approach should work for Gtk.jl because GtkGLArea is pretty much the same in libgtk 3 and 4.

Event handling is the other big piece that needs to be worked out.

6 Likes

Unfortunately, GtkGLArea does not work on Mac… At least that was the situation for Gtk3, not sure how the situation is with Gtk4.

GtkGLArea also never worked on windows with Gtk3…
I just tried Gtk4.jl, and it finally seems to work with OpenGL > v3.3 - seems also like the lagging on windows is finally gone!! That’s really great news!
And really cool that @jwahlstrand already got GLMakie to run! :slight_smile: Just wanted to try that out next this week.

2 Likes

Gtk4.jl seems to get momentum :slight_smile:

1 Like