[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] GUI



David Clark wrote:
> 
> Vince Platt writes:
>  > Well, this question is probably just more of the same then, but since
>  > we're on the topic:  What chance is there that PyGame will be able to act
>  > on a screen which is embedded on a Tk canvas?
> 
> >snip<
> 
> I guess there are two options for directly integrating pygame with an
> existing toolkit:
> 
> 1) As you suggest, render into a widget. This should actually be
> pretty easy; we can already use SDL in a GTK+ window (see
> http://www.libsdl.org/projects/gtk-demo/index.html).
> The disadvantage is as you say - it's only useful for windowed
> applications, and only for window decorations (although the menu
> functions would be pretty helpful).
> 
> 2) Go at the problem from the other direction - make SDL a backend for
> GTK or tk. Mark Baker mentioned some interest in this direction, but
> he seems to have disappeared. This would be nontrivial, but would
> allow us to use all the toolkit's resources in a pygame display. The
> more I think about this, the less I like it - a programmer would have
> to learn pygame, gtk and python/gtk just to display a simple command
> button.
> 
> I think the best way to go would be to integrate one of the existing
> SDL widget sets into pygame. There are already several to choose from,
> they are already cross-platform and compatible with SDL. I know Jan
> Eckholm was very keen on getting sdl_gui working with pySDL; working
> with pygame should be even easier, owing to its modularity.
> 
> Sorry to ramble on. I'm going to go read up on the Rect class - I
> think I have a crush on Rect.collidepoint :)

Actually, I'm just waiting for pygame to get stabilize (a little) so
that I can integrate my SDL_gui python wrapper into it. My desire is 
that it fit in as just another submodule.

I've also been talking (although it's stalled at the moment) of merging
SDL_gui with paragui. The issues mentioned on this list are exactly the
ones that have stalled it. SDL_gui was designed to be an add-on to an
existing app, whereas paragui is a framework that the app has to fit
into.

If things work out, we could have the best of both, and a slick python
binding to boot.

-Ray
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org