Constructor

GtkTreeListModelnew

Declaration [src]

GtkTreeListModel*
gtk_tree_list_model_new (
  GListModel* root,
  gboolean passthrough,
  gboolean autoexpand,
  GtkTreeListModelCreateModelFunc create_func,
  gpointer user_data,
  GDestroyNotify user_destroy
)

Description [src]

Creates a new empty GtkTreeListModel displaying root with all rows collapsed.

Parameters

root

Type: GObject

The GListModel to use as root.

The called function takes ownership of the data, and is responsible for freeing it.
passthrough

Type: gboolean

TRUE to pass through items from the models.

autoexpand

Type: gboolean

TRUE to set the autoexpand property and expand the root model.

create_func

Type: GtkTreeListModelCreateModelFunc

Function to call to create the GListModel for the children of an item.

user_data

Type: gpointer

Data to pass to create_func.

The argument can be NULL.
The data is owned by the caller of the function.
user_destroy

Type: GDestroyNotify

Function to call to free user_data.

Return value

Type: GtkTreeListModel

A newly created GtkTreeListModel.

The caller of the function takes ownership of the data, and is responsible for freeing it.