Re: A batch of newbie questions.
- From: Havoc Pennington <hp redhat com>
- To: "' '" <tint14 hotmail com>
- Cc: gtk-list gnome org
- Subject: Re: A batch of newbie questions.
- Date: Fri, 3 Jan 2003 14:21:33 -0500
On Thu, Jan 02, 2003 at 06:27:58AM +0000, ' ' wrote:
> I really like glade from what I've seen so far, but does it generate gtk+
> 2.0/2.2 code? A couple answers to unrelated questions in the glade FAQ
> (http://glade.gnome.org/FAQ) hint that it only generates gtk+ 1.0/1.2 code,
> but there isn't a definitive answer as far as I can tell. If it doesn't, is
> there a similar tool out there that does?
You want to use "glade-2"
I don't know if it generates code but you don't want to do that
anyhow. The best approach is to use Glade simply as an editor for
.glade files; not as an IDE. Don't generate code, don't create
makefiles, etc.
You then load the .glade file at runtime using libglade. This way you
can easily change the UI later, without having to regenerate code, or
worry about manual changes to the code messing things up.
Much of GNOME is done this way, if you are looking for examples.
> I tried out the Anjuta IDE and at first glance it seems adequate for my
> purposes. It has presets for gtk+ projects so that's a plus. However, when I
> start a new project, it generates makefiles, configure scripts, and other
> things that I'm not yet familiar enough with GNU auto* to identify. Glade
> does this as well. Does that mean they won't play nicely together (e.g.
> overwrite each other's files)?
Probably, but you don't want to use Glade as an IDE anyhow. Just turn
off all the makefile-generation stuff in Glade.
> Anjuta has presets for gtk+ projects. It also has presets for gnome 2.0
> projects and "libglade 2.0" projects. What is the difference between a gtk+
> project, a gnome 2.0 project, and a "libglade 2.0" project? Are they
> mutually exclusive?
Presumably gnome project links to libgnomeui (which implies gtk and
libglade), libglade links only to gtk and libglade, and gtk project is
gtk only. I would go with a libglade project, perhaps adding some
small stuff from libgnome later. (simple things like gnome_help_show()
are useful from the gnome libs)
> Why is it called a _lib_ glade project? I was under the impression that
> glade was a tool for generating skeleton UI code for gtk+ applications that
> would then link against gtk+ libraries. Do apps designed with glade have to
> link against libglade as well as gtk+? If so, what does libglade
> provide?
Libglade loads the XML file created by glade, and instantiates the
widgets there. So you create a dialog by loading its XML description,
rather than by calling a lot of GTK functions.
> Just from playing around with glade, it seems that writing a "gnome" app
> means writing a gtk+ app that uses any number of gnome-specific components.
> Is this correct?
Yes, it's a GTK app that uses libgnome/libgnomeui in addition for some
extra features.
>
> Do any of my software choices (Anjuta, glade, GNU auto*) or library
> dependencies (gtk+ 2.0, gnome2 [?], libglade [?]) limit my ability to write
> a portable/localizable program?
The stuff above the GTK level mostly hasn't been ported to Windows,
but everything there will work fine on any UNIX and will support
i18n.
> I've downloaded and read the GNOME Human Interface Guidelines. Is there
> anything else along that line that I should read before getting started? Is
> there anything else I should read in general?
If you're interested in user interfaces, I would read "User Interface
Design for Programmers" by Joel Spolsky and "The Inmates are Running
the Asylum" by Alan Cooper for two good ones that are fast reads. I
think the GNOME HIG has pointers to some other stuff, those are just
two I like.
For programming, just the GTK reference manual (and perhaps tutorial),
plus the source code for "gtk-demo" and "testgtk" are good places to
look.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]