GtkTreeStore

A tree-like data structure that can be used with the gtk.tree_view.TreeView.

The gtk.tree_store.TreeStore object is a list model for use with a gtk.tree_view.TreeView widget. It implements the gtk.tree_model.TreeModel interface, and consequently, can use all of the methods available there. It also implements the gtk.tree_sortable.TreeSortable interface so it can be sorted by the view. Finally, it also implements the tree draggtk.tree_drag_source.TreeDragSource and dropgtk.tree_drag_dest.TreeDragDest interfaces.

gtk.tree_store.TreeStore is deprecated since GTK 4.10, and should not be used in newly written code. You should use gtk.tree_list_model.TreeListModel for a tree-like model object.

GtkTreeStore as GtkBuildable

The GtkTreeStore implementation of the gtk.buildable.Buildable interface allows to specify the model columns with a <columns> element that may contain multiple <column> elements, each specifying one model column. The “type” attribute specifies the data type for the column.

An example of a UI Definition fragment for a tree store:

<object class="GtkTreeStore">
  <columns>
    <column type="gchararray"/>
    <column type="gchararray"/>
    <column type="gint"/>
  </columns>
</object>
More...

Members

Variables

parent
ObjectC parent;
priv
GtkTreeStorePrivate* priv;

Detailed Description

Deprecated: Use gtk.tree_list_model.TreeListModel instead