Re: Retrieving the stacking order of Gnome Canvas Items.



Le mar 08/06/2004 à 21:07, Dale Wiles a écrit :
>   I have a GTK app that places a bunch of Canvas Items on to a Gnome
> Canvas.  The user can then click on the Items and move them around.
> When the Item is clicked on it also raises to the top.
> 
>   My problem arises when saving the results of the clickage.  I can
> get the X and Y of the Items, but I can't figure out how to get the Z
> (stacking order).
> 
>   Does anyone know of a way to get the Z of an Item, or get a list
> of Items sorted by stacking order?
> 
> 				      Thanks,
> 					Dale

GnomeCanvasGroup has pointers to the list of its children:

struct _GnomeCanvasGroup {
	GnomeCanvasItem item;

	/* Children of the group */
	GList *item_list;
	GList *item_list_end;
};

the two GList* point to the same list, item_list->data is the bottom
item and item_list_end the top item.
If one of the children is a group, it has its own children of course.

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=



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