Re: Clear canvas



>  How can I clear gnomecanvas. removing all items ?

Right now there is no "clean" way to do it.  You should do something
like this:

	void
	clear_canvas (GnomeCanvas *canvas)
	{
		GList *a, *b;

		a = gnome_canvas_root (canvas)->item_list;
		while (a) {
			b = a->next;
			gtk_object_destroy (GTK_OBJECT (a->data));
			a = b;
		}
	}

I will add a gnome_canvas_group_foreach() function for the next
release of gnome-libs.

  Federico



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