Post by Elf M. SternbergIs there any particular advantage/disadvantage to using Glade to build
your main UI? Most of the projects I use as examples-- Gthumb,
Bluefish, Anjuta-- use glade as an "add-on," but the main UI page seems
to be hand-built. Is there a reason to go one way or the other?
Plain GTK: total control over the interface, but very tedious
interface construction, since you need to create and pack every widget
manually. It's also hard to maintain.
GTK and Glade: Constructing the interface is simpler, and it's easier
to tweak. In your code, you just pull out the widgets you need to
manipulate from the Glade XML object and use them like normal (using
libglade, rather than C code generation, which is deprecated).
You won't get away from doing things "by hand" with Glade, since
otherwise you wouldn't be able to do anything! You do significantly
reduce the code size, though.
When looking into this, I wrote a small test program using GTK+, GTK+
and Glade, and Gtkmm and Glade. You can find a tutorial and
comparison of the three methods at:
<URL:http://www.whinlatter.uklinux.net/gtk/ogcalc-1.0.0.tar.bz2>.
[may be 1.0.1 now.] FWIW, I use Gtkmm and Glade.
--
Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.