Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Right-click on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Damon Chaplin <damon@ka...> - 2006-10-11 23:20:01
|
On Wed, 2006-10-11 at 21:47 +0100, Gustavo J. A. M. Carneiro wrote: > On Qua, 2006-10-11 at 20:23 +0200, GIan Mario Tagliaretti wrote: > > On Wed, 11 Oct 2006 13:28:41 +0100 > > "Gustavo J. A. M. Carneiro" <gjc@...> wrote: > > > > > On Qua, 2006-10-11 at 11:22 +0100, Gustavo J. A. M. Carneiro wrote: > > > > I guess I'd rather keep the python API as it is; it is simpler and > > > > requires only the generic GObject constructor... > > > > > > Although, on second thought, I think a 'parent' property would be > > > most welcome nonetheless, as it would allow us to write just this: > > > > > > item = goocanvas.Rect(parent=root, > > > x=100, y=100, width=400, height=400, > > > line_width=10.0, > > > radius_x=20.0, > > > radius_y=10.0, > > > stroke_color="yellow", > > > fill_color="red") > > > > > > I was going to propose the same, it will avoid plenty of: > > > > root.add_child(item) > > > > shall the "parent" property be implemented into goocanvasitemsimple? > > Yes, I think it makes sense. Putting it in the GooCanvasItem > interface would not make sense as this property is not fundamental, only > a convenience, while putting it in GooCanvasItemSimple would let it be > implemented only once and available on all items. We'd also need to put it in GooCanvasGroup/Model as well. To be honest we might as well put it in GooCanvasItem/Model as it is trivial to implement, and then it should be available in all items (not just those that subclass from GooCanvasItemSimple). This reminds me that Havoc mentioned having cascading styles for items, but GooCanvasGroup doesn't support styles at present. Maybe I should make it a subclass of GooCanvasItemSimple, and have a think about supporting cascading styles. Damon |