Actually, the best way to generate cross-platform GUI applications with FreeBasic is to use the Gimp Tool Kit (GTK). This project 'GladeToBac' supports GTK usage by closing the gap between the graphical GUI designer (Glade3) and the FreeBasic compiler.
GladeToBac (= Glade To Basic) is a FreeBasic code sketcher. It generates FreeBasic source code from a GUI-XML-file, generated by Glade3. The generic source code afterwards gets extended by individual features before compiling with fbc. The FreeBasic source can be compiled for windows or LINUX OS.
GladeToBac reads a GUI-XML file, describing all GUI widgets. Then, GladeToBac generates a matching FreeBasic source code which contains all the needed bindings to the GUI (signal handlers and references). Individual features then gets added by the programmer.
In the actual Glade3 version (3.10) the GUI can be saved as .glade file (for libGlade) or as .ui file (for GtkBuilder). The later is the modern variant, supporting more features. GladeToBac generates code for both variants, depending on the suffix of the GUI-XML file.
The GtkBuilder features are not included in the GTK-bindings 'gtk/gtk.bi', which are shipped with original FreeBasic packages. Therefore the GladeToBac archive includes in the folder 'inc/TJF' a set of bindings for the current GTK-3 version. Multiple C-headers are translated into a few FreeBasic header files, one for each core library. The headers can easily be separated, if needed.
GladeToBac is the reviewed and enhanced follow-on project of GTK+tobac2.2.4. Itself it uses GtkBuilder in the source code. The source can be compiled against GTK-2 (>= 2.16) or GTK-3 (the image shows the new GtkAbout window). I18N is implemented by libintl.
GladeToBac has been inspired by Glade2Bas (haegartheroot) and by glade2fb (Galeon). But an alternative method is used to bind the signal handlers to the FreeBasic source, targeting a higher level of automation. GladeToBac supports the automatic generation of a first draft as well as further expansion of the GUI code. Therefore GladeToBac is recommended for big software projects.
Highlights:
- multi lingual user interface (org. English / German translations included)
- creates source code with I18N support
- includes libintl.bi header 'TJF/libintl.bi'
- automatically calls xgettext on all source code files
- automatically generates matching signal handlers (GTK-2 / GTK-3)
- generates source code for GtkBuilder (*.ui) or libglade (.glade)
- generates references for objects (Widgets)
- includes up to date GTK-3 bindings 'inc/TJF/gtk.bi'
- includes GTK-2 bindings for older installations 'inc/gtk/GTK-2.22.0_TJF.bi'
- can be used with older GTK versions as well
- automated operation with command line parameters
- separate folder for GUI files (tobac)
- integrates GUI-XML-file into binary
- generates ReadMe.txt and makefile
- generates project files for different IDEs
http://www.freebasic-portal.de/download ... c-190.html
Feel free to translate into your native language and send your .po and .mo files. I'll add them into the next release.