TreeStore
Object Hierarchy:
Gtk.TreeStore
Gtk.TreeStore
Gtk.TreeStore
GLib.Object
GLib.Object
GLib.Object->Gtk.TreeStore
Gtk.Buildable
Gtk.Buildable
Gtk.Buildable->Gtk.TreeStore
Gtk.TreeDragDest
Gtk.TreeDragDest
Gtk.TreeDragDest->Gtk.TreeStore
Gtk.TreeDragSource
Gtk.TreeDragSource
Gtk.TreeDragSource->Gtk.TreeStore
Gtk.TreeModel
Gtk.TreeModel
Gtk.TreeModel->Gtk.TreeStore
Gtk.TreeSortable
Gtk.TreeSortable
Gtk.TreeSortable->Gtk.TreeStore
Description:
[
CCode ( type_id =
"gtk_tree_store_get_type ()" ) ]
public class TreeStore :
Object ,
Buildable ,
TreeDragDest ,
TreeDragSource ,
TreeModel ,
TreeSortable
The TreeStore object is a list model for use with a TreeView
widget.
It implements the TreeModel interface, and consequentially, can use all of the
methods available there. It also implements the TreeSortable interface so it can be
sorted by the view. Finally, it also implements the tree drag and drop interfaces.
GtkTreeStore as GtkBuildable
The GtkTreeStore implementation of the 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>
Content:
Creation methods:
Methods:
public void @set (TreeIter iter, ...)
Sets the value of one or more cells in the row referenced by
iter
.
public void append (out TreeIter iter, TreeIter ? parent)
Appends a new row to this .
public void clear ()
Removes all rows from this
public void insert (out TreeIter iter, TreeIter ? parent, int position)
Creates a new row at position
.
public void insert_after (out TreeIter iter, TreeIter ? parent, TreeIter ? sibling)
Inserts a new row after sibling
.
public void insert_before (out TreeIter iter, TreeIter ? parent, TreeIter ? sibling)
Inserts a new row before sibling
.
public void insert_with_values (out TreeIter iter, TreeIter ? parent, int position, ...)
Creates a new row at position
.
public void insert_with_valuesv (out TreeIter iter, TreeIter ? parent, int position, int [] columns, Value [] values)
A variant of
insert_with_values which takes the columns and values as two
arrays, instead of varargs.
public bool is_ancestor (TreeIter iter, TreeIter descendant)
Returns true if iter
is
an ancestor of descendant
.
public int iter_depth (TreeIter iter)
Returns the depth of iter
.
public bool iter_is_valid (TreeIter iter)
WARNING: This function is slow.
public void move_after (ref TreeIter iter, TreeIter ? position)
Moves iter
in this to
the position after position
.
public void move_before (ref TreeIter iter, TreeIter ? position)
Moves iter
in this to
the position before position
.
public void prepend (out TreeIter iter, TreeIter ? parent)
Prepends a new row to this .
public bool remove (ref TreeIter iter)
Removes iter
from this .
public void reorder (TreeIter ? parent, int [] new_order)
Reorders the children of parent
in
this to follow the order indicated by new_order
.
public void set_column_types (Type [] types)
This function is meant primarily for Object
s that inherit from TreeStore , and should only be used when constructing a new
TreeStore .
public void set_valist (TreeIter iter, va_list var_args)
See @set ; this
version takes a va_list for use by language bindings.
public void set_value (TreeIter iter, int column, Value value)
Sets the data in the cell specified by iter
and
column
.
public void set_valuesv (TreeIter iter, int [] columns, Value [] values)
A variant of
set_valist which takes the columns and values as two arrays, instead of varargs.
public void swap (TreeIter a, TreeIter b)
Swaps a
and b
in the same level of
this .
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref
All known members inherited from interface Gtk.Buildable
All known members inherited from interface Gtk.TreeDragDest
All known members inherited from interface Gtk.TreeDragSource
All known members inherited from interface Gtk.TreeModel
All known members inherited from interface Gtk.TreeSortable