Re: [pygtk] widget containers for free placement

2008-07-09 Thread Dave Aitel
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 For what it's worth we do a similar sort of thing for these: http://www.immunityinc.com/downloads/NodeView.png (You can click on the nodes and they pop up a menu) http://www.immunityinc.com/documentation/mappingbeta.html (flash movie of a map with litt

Re: [pygtk] widget containers for free placement

2007-10-27 Thread Greg Ewing
Here's a version that will let you drag the RedBox around. (I don't have Cairo installed, so I changed it to use the normal gtk drawing methods.) -- Greg import gtk import math class Thing(gtk.DrawingArea): def __init__(self): super(Thing, self).__init__()

Re: [pygtk] widget containers for free placement

2007-10-27 Thread Greg Ewing
If I understand correctly, firstly you're trying to create a kind of graphical GUI-building environment, but using your own unique kinds of widgets rather than the standard ones. It's hard to say what would be the best way to go about it. Basing each of your pseudo-widgets on an actual gtk widget

Re: [pygtk] widget containers for free placement

2007-10-27 Thread Donn
Greg, thanks for the feedback. This is a little long, so I hope you get the time to read it. I'll understand if you back quickly away from it and saunter off whistling :) I'm shooting for something seemingly impossible on Linux, and yet there are some tantalizing projects that approach it. > U

Re: [pygtk] widget containers for free placement

2007-10-27 Thread Greg Ewing
Donn wrote: #How to put them at x,y? And later, drag them? Use the move() method of the Layout widget to position them. Dragging them is going to be tricky. Before trying to do that, I would be asking myself whether they really *need* to be widgets, or just something that you draw yourself

Re: [pygtk] widget containers for free placement

2007-10-26 Thread Donn
> You want a gtk.Layout. It lets you place widgets at explicit > positions in a 32-bit coordinate system and can be scrolled. > Thanks for the tip. I'm not getting closer. If you have a moment, could you look at this code? \d #!/usr/bin/env python import gtk import math class Thing(gtk.Drawing

Re: [pygtk] widget containers for free placement

2007-10-26 Thread Greg Ewing
Donn wrote: I want to put custom widgets (drawn by cairo calls) onto a vast, endless, plane at arbitrary x,y positions. You want a gtk.Layout. It lets you place widgets at explicit positions in a 32-bit coordinate system and can be scrolled. -- Greg ___

[pygtk] widget containers for free placement

2007-10-26 Thread Donn
Hello, I am *really* new to GTK and company and I am snowed-under by the bewildering array of classes. For example, I really can't figure out how to look for the classes I need, they all sort of look the same! I am reading the main tutorial, but the way I work is to aim for something: I want to