bind_model
Description:
[ Version ( since = "1.24" ) ]
public void bind_model (ListModel? model, owned ActorCreateChildFunc create_child_func)
public void bind_model (ListModel? model, owned ActorCreateChildFunc create_child_func)
If the Actor was already bound to a ListModel, the previous binding is destroyed.
The existing children of Actor are destroyed when setting a model, and new children
are created and added, representing the contents of the model. The Actor
is updated whenever the model changes. If model is null, the
Actor is left empty.
When a Actor is bound to a model, adding and removing children directly is undefined behaviour.
Parameters:
| this |
a Actor |
| model | |
| create_child_func |
a function that creates Actor instances from the contents of the |
| notify |
function called when unsetting the |
| user_data |
user data passed to |