Thank you for this new Fortran reference site !
gtk-fortran 20.04 released
gtk-fortran 20.04 is based on GTK 3.24.18 and GLib 2.64.2.
The main objective of this release was to prepare the future GTK 4 migration. A lot of clean-up has been made: scripts, build tools, examples (a lot of deprecated functions were removed)…
Toward GTK 4
A gtk4 development branch has been created. The core of the library is ready for GTK 4 (3.98.3, available for example in Fedora 32). Some examples are already running. The big work will be to upgrade each example and the HL library and its examples.
It seems the release badge shows only the latest “true release”, not the “tagged releases” (I don’t know if it is the official term). For example, for gtk-fortran 20.04 I have just made a tagged release. I don’t know if it is possible to change that.
Or perhaps it’s me who should make a full release…
From this page it looks v20.04 is a tag but somehow not a release. Perhaps it’s still a release draft that needs to be published. I’m confused about how GitHub treats releases vs. git tags. If you (as the repo owner) click on your v20.04 tag page, is there a button there that says “Publish this release” or similar?
Thanks for your help @milancurcic and @certik
I am happy to see I am not the only one confused with that !
You are right, although the tagged versions appear in the “Releases” page, they are not releases… But with the button “Draft a new release” on the right, I was able to transform my tagged version into a true release.
And it was immediately detected on the page https://fortran-lang.org/packages/graphics
Thanks again !
My gtk-fortran presentation is on Friday 13:30 - 13:55 (UTC+2 - CEST) in the Session D Interfacing. I will use a PDF presentation but also will share my screen to show you how to build the project and to run some cool examples, and show some code if I have time.
I agree it’s good to have ways to create a GUI, very common for scientific applications. I recently learned how to use Qt (from C++, and then I link in Fortran code) and it’s great to be able to design a GUI.
My understanding is that GTK itself is LGPL, so you might be able to license your wrappers as LGPL also (instead of the current GPL license) which might get you more users.
Yes, I will reopen the “License Issue”. I think there would no problem for changing the license of the Fortran interfaces, because they are automatically generated by a script. Is it possible to distribute a project with a license for a part of the code and another license for the other part ?
Concerning the code written by human beings, I guess every developer should agree to change the license.
Note also that our license includes the following exception:
! Under Section 7 of GPL version 3, you are granted additional
! permissions described in the GCC Runtime Library Exception, version
! 3.1, as published by the Free Software Foundation.
Interesting. If I understand you write the GUI in C++ ? How do you link C++ and Fortran ?
Ten years ago I had the choice of trying to work with Qt, WxWidgets, both written in C++, and GTK written in C. I choose GTK because of the ISO_C_BINDING.
Qt is quite complicated (it has a UI Designer, which generates some xml files which then generates some C++ code; also it has custom C++ extension for “slots” which must be handled appropriately), and cmake has great support for it. Since CMake supports Fortran, I just compile everything together. The main application is in C++, but I use Fortran for all the computational parts.
I have never worked with Qt but GTK is probably as complicated as Qt. The two are general purpose GUI frameworks, and that can not be simple…
In GTK you can also use an UI Designer, called Glade, which generates an XML file. And you can use that file with the gtkf-sketcher.f90 tool in gtk-fortran to generate Fortran code which handles that XML file. It can be useful for complicated GUIs. Note that it’s the only tool that we have yet to port to GTK 4.
But for a simple GUI (<=a few tens of widgets), you can also program it using directly the GTK functions.
The “advantage” (perhaps not an advantage for everyone) of gtk-fortran is that your program is 100% Fortran.
That’s great, thank you for maintaining the wrappers.
I used to do GUIs all the time using Delphi in the 1990s. It was so simple and natural. Then I haven’t done any GUI until about a year ago using Qt. What do you recommend for plotting for GTK? For Qt I am using this library:
In the 90’s I practiced Visual Basic, also great for GUIs!
In the 80’s, I remember how easy it was to draw pixels in Basic or Turbo Pascal.
After 1995, I used a lot Visual Fortran (Digital then Compaq). I was happy with it on Windows and I even now and then still use it under Linux thanks to the Wine library! (it works quite fine, not perfectly, the debugger does not work, and there is some speed loss).
Thanks for making a proper tutorial for this tool.
To me, a poor fortran programmer, GTK looks daunting without having much experience with C, and it doesn’t help much that I haven’t been able to find any book about the later 3 version. So far I have just learned how to configure my enviroment with MSYS2 and CodeblocksFortran on Windows 10 to compile the 1st sample program in GTK’s documentation… with proper window icons.
Anyway, I fully expect to dive into gtk-fortran sometime!