skinnable, portable widgets?
t.evans at paradise.net.nz
Mon Jan 27 11:57:16 CET 2003
"Brandon Van Every" <vanevery at 3DProgrammer.com> writes:
> I'm looking for a GUI widget toolkit that:
You could use GTK (http://www.gtk.org/). Here is how it rates
according to your requirements:
> - has a python binding
Yes (http://www.daa.com.au/~james/pygtk/). You probably want to go
with GTK v2.0 and PyGTK 1.99.14, even though the python bindings aren't
> - is skinnable
Yes. GTK uses 'engines' and 'themes' that can completely change the
rendering of widgets. This is normally set by the user for all GTK
applications, but can also be application-specific. For a game, look
into the 'pixbuf' engine, which allows you to specify a theme using
images for every part of the widgets, and supports full alpha channels
on those images. For some examples of GTK themes, including
screenshots, see http://themes.freshmeat.net/browse/958/?topic_id=958
> - is portable/ported to at least Win32 and Linux
Originally developed on Linux, so that's where it runs best. Win32
version quite good and getting better.
> - does not try to own the application's event pump
GTK does have its own event loop code, but you don't have to use it,
just tell it to update every so often to get your events.
> - is amenable to displaying my own 3D code in a window
Yes, look for gtkgl. The python interface for which is part of pygtk.
> - is mature, ready for prime time
On Linux, definitely. On Windows, probably close enough.
> - is open source
Yes. GTK is LGPL.
> - whose implementation is not overly complicated, so that as things bitrot
> over the next 10 years, I can maintain it and port it to new platforms
You probably wouldn't want to maintain GTK all by yourself, but the
chance of it disappearing within 10 years is zero.
> The primary application is for games. I must be able to control the look
> and feel of the widgets, so skinnability is a hard requirement. Any
Try GTK, and see what you think.
More information about the Python-list