How does one discover and/or keep track of the stacking order of
GnomeCanvasItems? Based upon the methods I've discovered so far
(raise_/lower & raise_to_top/lower_to_bottom), there's no way to do either
of the following:
* figure out the stacking order
* raise or lower a group of items while maintaining their same relative
relationship
Here's an example. Suppose I have a canvas widget that contains a mix of
ellipse, polygon and rect items. I want to raise or lower all of one type
of item as a group and maintain the relative stacking order of all items of
the same group. Let's suppose the stacking order is (bottom to top):
r1, r2, e1, p1, r3, p2
After I raise the polygons one level, I have
r1, r2, e1, r3, p1, p2
Now, if I raise the polygons again, I will either have
r1, r2, e1, r3, p1, p2
(if p1 was raised first) or
r1, r2, e1, r3, p2, p1
(if p2 was raised first)
To prevent the second case from happening, I have to know the stacking order
so I can first raise p1, then raise p2.
I might be able to create a new group, reparent the items, raise the group,
then reparent the items back to whatever group they were in before, but that
seems both error-prone and somewhat ill-defined (will the reparenting
operations affect the stacking relationship of individual items?).
I hope the answer is as simple as, "hey dummy, you missed the GnomeCanvas
SpamNEggs method".
Thanks,
--
Skip Montanaro ([EMAIL PROTECTED])
(847)971-7098
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk