get_item


Description:

public unowned CanvasItem get_item (CanvasItemModel model)

Gets the canvas item associated with the given CanvasItemModel.

This is only useful when set_root_item_model has been used to set a model for the canvas.

For simple applications you can use get_item to set up signal handlers for your items, e.g.

<informalexample><programlisting> item = goo_canvas_get_item (GOO_CANVAS (canvas), my_item); g_signal_connect (item, "button_press_event", (GtkSignalFunc) on_my_item_button_press, NULL); </programlisting></informalexample>

More complex applications may want to use the item_created signal to hook up their signal handlers.

Parameters:

this

a Canvas.

model

a CanvasItemModel.

Returns:

the canvas item corresponding to the given CanvasItemModel, or null if no canvas item has been created for it yet.