I’ve been doing some research for the past couple of months on how to go about making a GUI in Fortran and during that time I’ve experimented with DISLIN, GTK+ (through gtk-fortran), and Intel’s QuickWin framework.
QuickWin seems to be a quick and dirty way to get code outputting into a non-command prompt window, and while it works well for that, its not good for more complicated GUI development.
DISLIN is an excellent and fast way to put together a GUI using procedure calls, however the licensing of it cannot be used in an open source manner. Its free for individual research use, but it cannot be distributed. Aside from that – and the arcane function naming scheme – its an excellent and time-tested framework.
gtk-fortran and its port of GTK+ is more new. It isn’t as simple as DISLIN to throw together a GUI, but it *is* open source. Because of this, I decided to use it as a GUI framework.
Overall, after a few days of frustration, I was able to figure out how to use gtk-fortran and also its high-level API. I realized that I could easily package a lot of the functions into a simple set of procedure calls that hopefully even novice Fortran developers could use without much trouble.
And so, I began to do just that.
Along the way, however, I realized that with this framework the program that would finally be developed would be entirely event-based – a typical GUI program. That may be perfectly fine for most developers, but in my case I needed a process to run on its own in the background regardless of the GUI’s involvement.
After a good amount of time learning how to incorporate OpenMP into a program, I added aspects of it into my framework to allow the GUI to run on its own thread while background procedures run on other threads. If no background processes are necessary, the framework will run perfectly fine without them. A developer can easily create an event-based Fortran program just by putting together the GUI through the very high-level procedure calls and then creating event handlers, just as in most other languages with RAD tools (for the most part).
This is just the first alpha release of it. I don’t have all the instructions in there, and I don’t have all the GUI procedures done. I’m even only halfway through putting the main window creation onto an object-oriented path (it still works just fine, though).
Future plans include some form of OpenCL. While OpenACC is eventually going to be merged into OpenMP, I figure that for now a little OpenCL wouldn’t hurt anyone.
I welcome all criticism. Constructive and non-constructive.