|
Home > Archive > Unix Programming > March 2005 > GTK Interface (with C++)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
GTK Interface (with C++)
|
|
| pmatos 2005-03-17, 5:55 pm |
| Hi all,
I'd like some oppinions based on your experience. I'm using C++ to
build a gtk based interface. I though about using glade. The question
is: is glade a good choice? Is it easy to extend the interface later
on? Or is it better to learn gtk-- and build the interface manually?
Cheers,
Paulo Matos
| |
| Roger Leigh 2005-03-17, 5:55 pm |
| -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
"pmatos" <pocm@sat.inesc-id.pt> writes:
> I'd like some oppinions based on your experience. I'm using C++ to
> build a gtk based interface. I though about using glade. The question
> is: is glade a good choice? Is it easy to extend the interface later
> on? Or is it better to learn gtk-- and build the interface manually?
Do both. Use Glade to design the interface, then load the interface
at runtime using libglademm. You can do this quite simply with
Gtkmm.
Glade will never be a substitute for writing code: you still need to
know the GTK+ C or C++ API in order to make it do something useful.
The Glade code generation also gives no structure to your code, since
it's just a bunch of callbacks. If you use C/GObject or C++, you can
derive from all the GTK+ objects and do a proper job.
There's a simple example here:
http://people.debian.org/~rleigh/gtk/ogcalc/
Regards,
Roger
- --
Roger Leigh
Printing on GNU/Linux? http://gimp-print.sourceforge.net/
Debian GNU/Linux http://www.debian.org/
GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iD8DBQFCOfJvVcFcaSW/ uEgRAozXAKDZ6+988qjbjmmFi5npApdoRbebywCe
KDFD
5ugCgC4ERVDwfDZP7bsdmYI=
=dlAV
-----END PGP SIGNATURE-----
| |
| pmatos 2005-03-18, 7:51 am |
| Great, seems a very good solution. I'll do that. Didn't know about
libglademm . Now, I can work the interface in glade and I don't need
to fiddle with automated code created by glade.
Thanks a lot,
Paulo Matos
|
|
|
|
|