PyWidget : A simple GUI with a set of widgets

864 views
Skip to first unread message

sanka

unread,
May 8, 2009, 5:54:27 AM5/8/09
to pyglet-users
Hello all,

We are currently working on a "simple to use" GUI using pyglet in
order to easily implements user interfaces.

Actually, the widgets available are :
_ Dialog : A dialog with a title, a close button and a
content
_ HBox : Used to split content into horizontal parts
_ VBox : Used to split content into vertical parts
_ Button : a basic button
_ Checkbox : a basic checkbox
_ Label : a basic label
_ Slider : a basic slider

With theses few widgets, there is already quite a lot of
possibilities.
preview : http://img25.imageshack.us/img25/2374/capturetestpy.png

The source and the documentation are available here :
http://code.google.com/p/pywidget/

Advices, review and modification of the source code are welcome :)
Thanks

Steve Johnson

unread,
May 8, 2009, 1:52:22 PM5/8/09
to pyglet-users
I haven't tried it, but it looks like your widgets will work
seamlessly with my Pyglui library with no changes. Pyglui is not a
widget library, but a way to organize widgets. I'll see if I can glue
them together later today.

http://www.github.com/irskep/pyglui/

Steve Johnson

unread,
May 10, 2009, 4:15:21 PM5/10/09
to pyglet-users
Okay, a few things:

* Yes, this library works with Pyglui, no changes necessary
* Checkboxes should have text!
* "from pyglet.gl import *" does TERRIBLE things to your
documentation, just look at the bottom of the Dialog doc page
* Speaking of documentation, how the heck do I use a Dialog? The docs
are very vague. Sample code necessary!
* It is not clear at all how to get a slider's value

Also, a design suggestion: instead of making the programmer manually
set a function for a widget to call in a separate line of code, why
not just let them pass it in the constructor? Pyglui's widget library
works this way, and it's very easy. This also takes away the need for
programmers to memorize all your specific function names like
"on_button_press". In addition, you should let sliders and checkboxes
have action functions as well, and have them pass their values into
those functions. More here:
http://github.com/irskep/pyglui/tree/master

On May 8, 5:54 am, sanka <Matthieu.K...@esial.uhp-nancy.fr> wrote:

Thomas Hansen

unread,
May 15, 2009, 12:05:40 AM5/15/09
to pyglet-users

If your interested in openGL widgets/UI's built ontop of pyglet we
also have a whole bunch implemented in pymt. Its mostly focused on
multi touch/cursor user interfaces, but it works just fine with a
single mouse too.

http://pymt.txzone.net/
http://vimeo.com/user1410649


--
Thomas

Tristam MacDonald

unread,
May 15, 2009, 7:18:20 AM5/15/09
to pyglet...@googlegroups.com
Very nice and simple. I just put the widgets to work in my planet simulation: http://picasaweb.google.com/lh/photo/MkTK5nX6d0jTnI6NUkMgOA?feat=directlink

I did have to add the ability to change the text of a label after creation (forward the text property of pyglet's HTMLLabel through from the label itself). Would you like a patch?
--
Tristam MacDonald
http://swiftcoder.wordpress.com/

sanka

unread,
May 16, 2009, 12:36:04 PM5/16/09
to pyglet-users
Thanks very much for all the reviews :)

We've been quite busy these past few days but we will soon improve the
code (add some widgets) and the documentation.

To Steve Johnson :
Thanks for your advices, we will make some modifications and maybe use
pyglui source code to improve PyWidget if you don't mind
naturally :).

To Thomas Hansen
I will check out pymt tonight :)

To Tristarn MacDonald
We're glad to see that our gui is usefull for you :)
And yes we're interested by your patch.

On 15 mai, 13:18, Tristam MacDonald <swiftco...@gmail.com> wrote:
> On Fri, May 8, 2009 at 5:54 AM, sanka <Matthieu.K...@esial.uhp-nancy.fr>wrote:
>
>
>
>
>
> > Hello all,
>
> > We are currently working on a "simple to use" GUI using pyglet in
> > order to easily implements user interfaces.
>
> > Actually, the widgets available are :
> >      _ Dialog         : A dialog with a title, a close button and a
> > content
> >      _ HBox           : Used to split content into horizontal parts
> >      _ VBox           : Used to split content into vertical parts
> >      _ Button         : a basic button
> >      _ Checkbox    : a basic checkbox
> >      _ Label           : a basic label
> >      _ Slider           : a basic slider
>
> > With theses few widgets, there is already quite a lot of
> > possibilities.
> > preview :http://img25.imageshack.us/img25/2374/capturetestpy.png
>
> > The source and the documentation are available here :
> >http://code.google.com/p/pywidget/
>
> > Advices, review and modification of the source code are welcome :)
> > Thanks
>
> Very nice and simple. I just put the widgets to work in my planet
> simulation:http://picasaweb.google.com/lh/photo/MkTK5nX6d0jTnI6NUkMgOA?feat=dire...
Message has been deleted

Steve Johnson

unread,
May 16, 2009, 1:17:57 PM5/16/09
to pyglet-users
> To Steve Johnson :
> Thanks for your advices, we will make some modifications and maybe use
> pyglui source code to improve PyWidget if you don't mind
> naturally :).

Go right ahead. In fact, I would be interested in closer
collaboration. When you get your next release out, I'll try to find
time to fork it and incorporate my existing widget library so that no
more work gets duplicated. At that point, I would want to start
packaging it with Pyglui, or perhaps the other way around. What do you
think?

My main issue with PyWidget right now is that you can't make a widget
in one line of code by just passing it an action function. I would
really like to be able to pass in a function that would be called from
the default event for a given widget. For almost all widgets, that
event would be mouse_release, but it might be different for some. The
programmer would always be able to override other event methods as
well.000
Reply all
Reply to author
Forward
0 new messages