Re: gtk2 or glade?
- From: muppet <scott asofyet org>
- To: David Alcobero <anguila gmail com>
- Cc: gtk-perl-list gnome org
- Subject: Re: gtk2 or glade?
- Date: Sat, 25 Sep 2004 10:49:47 -0400
On Sep 25, 2004, at 8:56 AM, David Alcobero wrote:
But, in glade you can put the signals, the position of the widgets,
the positions of the windows, the widgets and all. And you only
should put the code that you want to do the signal of the widgets, and
this isn't glade, is (in this case) perl code, not gtk2 code. So it's
worth learning gtk2 if glade generate all code for you? This is the
question that i should said.
even if glade builds the whole gui for you and connects a bunch of
callbacks, you still have to understand the gtk+ API in order to know
what to do in those callbacks. for example, if you want to ask the
user for confirmation before letting a window manager close a window,
you have to understand that the window manager sends the
"delete-event", that the default handler for "delete-event" calls
gtk_widget_destroy(), and that the way to inhibit that is to connect a
handler that returns true to stop propagation. glade can't do *all* of
that for you, and doesn't tell you why.
glade also doesn't set up GtkTreeView or GtkTextView widgets for you,
so you'll still have to understand how to use callbacks and signals and
all of that.
http://scentric.net/tutorial/sec-misc-glade.html
if you want to use custom widgets, you also have a fair amount of work
to do, and glade doesn't make that much easier.
also, to reiterate, you don't want to use glade to generate code; you
want to use libglade (via Gtk2::GladeXML) to load the glade-generated
xml file at runtime and build the gui for you. code generation is not
a good idea. (the tutorial link above includes a link to a mailing
list message which explains further.)
so, my answer stands, yes, you still need to learn gtk+/Gtk2 in order
to get the most out of glade.
--
The door is locked. I tried to open it, but the lock is harder to pick
than a broken nose.
-- Sensei, on 'I, Ninja'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]