Re: Weighting gnome canvas item?



Linus Larsson <linus mediasvar se> writes:

> Hello, I'm sitting here with a gnome canvas and putting lots of lots of 
> canvasitems in it, several thousands.

This question would be better suited to the gnome-devel list, since
some people here seem to cringe at the though of using GNOME libraries
in their GTK+ programs.  But never mind.

> My problem is that I only found gnome_canvas_item_raise_to_top() and the 
> other functions to set which item to  be on top, bottom, raise, lower.
> 
> This just put the items lower or higher in a linked list right? What would 
> be much easier for my application is if there where
> some way to "weight" the items and then insert then based on the weight. 
> Can this be done with standard gnome functions?

You can create a group with many child subgroups

	group
	    weight0
	    weight1
	    weight2
	    ...

and then insert your children in the group for the appropriate weight.

  Federico




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