create_item


Description:

public virtual CanvasItem create_item (CanvasItemModel model)

This function is only intended to be used when implementing new canvas items, typically container items such as CanvasGroup.

It creates a new canvas item for the given item model, and recursively creates items for any children.

It uses the create_item virtual method if it has been set. Subclasses of Canvas can define this method if they want to use custom views for items.

It emits the item_created signal after creating the view, so application code can connect signal handlers to the new view if desired.

Parameters:

this

a Canvas.

model

the item model to create a canvas item for.

Returns:

a new canvas item.