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 GListModel*
 

The GListModel to use as root.

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

TRUE to pass through items from the models.

autoexpand gboolean
 

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

create_func GtkTreeListModelCreateModelFunc
 

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

user_data gpointer
 

Data to pass to create_func.

user_destroy GDestroyNotify
 

Function to call to free user_data.

Return value

Returns: GtkTreeListModel
 

A newly created GtkTreeListModel.

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