Where are all the GUI's?

656 views
Skip to first unread message

Express

unread,
Feb 6, 2011, 3:50:26 AM2/6/11
to pyglet-users
I am wondering where all the good Pyglet GUI's are? I have tried a few
and can never find any with features I have found in other GUI's from
other libraries. I figure most of these features should be pretty
common enough to be included in a lot, but can never find any:
- Draggable Windows.
- Use of icons and images in Buttons.
- Toggle Visibility, Enable
- Scrollable Containers
- Themes
- Fast

All of the posts talking about new GUI's seem to be from 3 years ago
with no updates AKA dead. Anyone have word on any new GUI's being made
or still being developed? This is really the only thing holding me
back from switching to Pyglet from Pygame. Thanks for any information.

Tom One

unread,
Feb 6, 2011, 6:39:16 AM2/6/11
to pyglet-users
Have you tried kytten? It has themes and scrollable containers, but I
am not sure about other features.

Express

unread,
Feb 6, 2011, 6:46:53 AM2/6/11
to pyglet-users
Yeah I did try Kytten, and I was impressed with its features. However
it doesn't allow custom widget images and it seems to have rather
large framerate hits. Opening 1 form cuts the frame rate from 20-50%.

Lynx

unread,
Feb 6, 2011, 11:15:43 AM2/6/11
to pyglet-users
On Feb 6, 3:46 am, Express <vhxonl...@gmail.com> wrote:
> Yeah I did try Kytten, and I was impressed with its features. However
> it doesn't allow custom widget images and it seems to have rather
> large framerate hits. Opening 1 form cuts the frame rate from 20-50%.

I'm not currently maintaining Kytten, but I did write it.

Kytten has a notion of themes where you can replace or insert new
graphics in a subdirectory, then edit the theme.json file inside the
theme directory to refer to those graphics. Graphics are 9-boxes: you
can specify the width and height of the corners and side bars, and
stretch them around the center box, as it were, so you can resize a
given source widget graphic as you need.

As for frame loss, one approach that might work - I don't have the
time to implement it, which is why I haven't done anything with Kytten
in a while - is to write the GUI into a texture, then only update the
texture 10 or 20 times a second, rather than trying to update
everything every frame. Please feel free to take the kytten code and
modify it if you wish, it IS open source.

Some other GUIs I've seen talk of:

Greg Ewing's PyGUI:
http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
Not pyglet-specific, it seems to be based on PyOpenGL. It doesn't
seem to have themes, and it wraps windows rather than appearing as
discrete elements within a window.

Tristram MacDonald's simplui
http://swiftcoder.wordpress.com/2009/08/17/simplui-1-0-4-released/
Like Kytten, supports themes and 9-box graphics. It may run faster,
or not.

Sadly I don't think anyone has yet developed the one GUI that offers
all the features desired yet. It turns out to be one of those things
that seems simple, yet requires masterful coding to accomplish.

Tristam MacDonald

unread,
Feb 6, 2011, 11:20:24 AM2/6/11
to pyglet...@googlegroups.com
On Sun, Feb 6, 2011 at 11:15 AM, Lynx <cw....@gmail.com> wrote:
>
> Tristram MacDonald's simplui
> http://swiftcoder.wordpress.com/2009/08/17/simplui-1-0-4-released/
> Like Kytten, supports themes and 9-box graphics.  It may run faster,
> or not.
>
> Sadly I don't think anyone has yet developed the one GUI that offers
> all the features desired yet.  It turns out to be one of those things
> that seems simple, yet requires masterful coding to accomplish.

The reason that simplui is (generally) faster, is that it imposes a
number of restrictions. Primarily the lack of custom images on
buttons.

My overall impression is that you can pick one of performance or
flexibility, but delivering both would require a significant amount of
effort.

--
Tristam MacDonald
System Administrator, Suffolk University Math & CS Department
http://swiftcoder.wordpress.com/

Greg Ewing

unread,
Feb 6, 2011, 5:15:49 PM2/6/11
to pyglet...@googlegroups.com
Lynx wrote:

> Greg Ewing's PyGUI:
> http://www.cosc.canterbury.ac.nz/greg.ewing/python_gui/
> Not pyglet-specific, it seems to be based on PyOpenGL.

No, it's not based on OpenGL. It has an OpenGL view widget,
but the GUI itself is a traditional one based on the
native library for each platform.

> Sadly I don't think anyone has yet developed the one GUI that offers
> all the features desired yet. It turns out to be one of those things
> that seems simple, yet requires masterful coding to accomplish.

It's not all that complicated once you understand the
principles involved, but it takes a tremendous amount of
work to do well, and there don't seem to be many people
around with the necessary level of dedication.

Someone who's inclined might like to look into the idea
of porting Albow to pyglet. While Albow is currently based
on pygame, most of the code is fairly generic and should
provide a good starting point.

http://www.cosc.canterbury.ac.nz/greg.ewing/python/Albow/

--
Greg

Express

unread,
Feb 6, 2011, 5:52:59 PM2/6/11
to pyglet-users
Lynx, you did a good job on Kytten, but I don't think it's useable for
what I need. What I meant by custom image buttons was to have icons
for buttons, to allow my own images for things, such as items in an
inventory for example. Also after closer inspection it just wouldn't
work out, since I also need something that allows me to add things by
x,y to specifically place things.

I looked into SimpleUI and I did like it, but again it had similar
restrictions as Kytten.

I don't really think pyGUI isn't something I could use at the moment.

I think the features I would need would take extensive modification of
these GUI's to get it to where I want it. I think at this point there
just isn't a solution to what I need. I think I will stick to pygame +
rabbyt until something similar to what I'm looking for comes a long,
or until I decide to make my own.

I appreciate everyone's input. Thanks. :)

On Feb 6, 10:20 am, Tristam MacDonald <swiftco...@gmail.com> wrote:

Lynx

unread,
Feb 6, 2011, 6:30:24 PM2/6/11
to pyglet-users
Kytten does have a FreeLayout for x/y placement, but yes, you'd have
to make your own ImageButton kinda widget, possibly by subclassing
Button. It's hard to say what exact behavior someone would want from
their widgets, animation etc., hence one reason why trying to make an
all-encompassing GUI sucks - you're trying to read the mind of a wide
set of potential users!

devon

unread,
Feb 7, 2011, 11:43:03 AM2/7/11
to pyglet-users
It isn't that hard to make a simple ImageButton in kytten. It sounds
like you've made up your mind, but if it's any help I implemented a
few custom kytten widgets for my tilemap editor. Palette is basically
a grid of PaletteOptions (they take a pyglet image in their
constructor, so similar to an image button except only being able to
select one image in the palette at a time, used for my toolbox and
tile palette) .

http://code.google.com/p/devdev-python/source/browse/cocograph/trunk/cocograph/tile_widgets.py

Florian Bösch

unread,
Feb 7, 2011, 3:14:37 PM2/7/11
to pyglet-users
Building GUI toolkits that are flexible, stylable, versataile, fully-
fledged and fast is damn hard. I've built a bunch of GUI toolkits, and
every rewrite they inch more towards that idea. Alas my attempts like
so many others are in the realm of half-finished/works for me. (I used
it for http://lithosphere.codeflow.org/ )
Reply all
Reply to author
Forward
0 new messages