-
public void foreach (TreeModelForeachFunc func)
Calls func on each node in model in a depth-first fashion. If func returns true
, then the tree ceases to be walked, and foreach returns.
-
public void get (TreeIter iter, ...)
Gets the value of one or more cells in the row referenced by iter. The variable
argument list should contain integer column numbers, each column number followed by a place to store the value being retrieved.
The list is terminated by a -1. For example, to get a value from column 0 with type
typeof (BusName), you would
write: gtk_tree_model_get (model, iter, 0, &place_string_here, -1), where place_string_here is a
gchar* to be filled with the string.
-
public abstract Type get_column_type (int index_)
Returns the type of the column.
-
public abstract TreeModelFlags get_flags ()
Returns a set of flags supported by this interface. The flags are a bitwise combination of
TreeModelFlags. The flags supported should not change during the lifecycle of
the tree_model.
-
public abstract bool get_iter (out TreeIter iter, TreePath path)
Sets iter to a valid iterator pointing to path.
-
public bool get_iter_first (out TreeIter iter)
Initializes iter with the first iterator in the tree (the one at the path "0") and
returns true. Returns false if the tree is empty.
-
public bool get_iter_from_string (out TreeIter iter, string path_string)
Sets iter to a valid iterator pointing to path_string, if it exists.
Otherwise, iter is left invalid and false is returned.
-
public abstract int get_n_columns ()
Returns the number of columns supported by tree_model.
-
public abstract TreePath? get_path (TreeIter iter)
Returns a newly-created TreePath referenced by
iter. This path should be freed with gtk_tree_path_free.
-
public string get_string_from_iter (TreeIter iter)
Generates a string representation of the iter. This string is a ':' separated list of numbers. For
example, "4:10:0:3" would be an acceptable return value for this string.
-
public void get_valist (TreeIter iter, void* var_args)
See get, this version takes a
va_list for language bindings to use.
-
public abstract void get_value (TreeIter iter, int column, out Value value)
Initializes and sets value to that at column. When done with value
, unset needs to be called to free any allocated memory.
-
public abstract bool iter_children (out TreeIter iter, TreeIter? parent)
Sets iter to point to the first child of parent. If parent
has no children, false is returned and iter is set to be invalid. parent will remain a
valid node after this function has been called.
-
public abstract bool iter_has_child (TreeIter iter)
Returns true if iter has children, false otherwise.
-
public abstract int iter_n_children (TreeIter? iter)
Returns the number of children that iter has. As a special case, if iter
is null, then the number of toplevel nodes is returned.
-
public abstract bool iter_next (ref TreeIter iter)
Sets iter to point to the node following it at the current level. If there is no next
iter, false is returned and iter is set to be invalid.
-
public abstract bool iter_nth_child (out TreeIter iter, TreeIter? parent, int n)
Sets iter to be the child of parent, using the given index. The first
index is 0. If n is too big, or parent has no children, iter is set to an invalid iterator
and false is returned. parent will remain a valid node after this function has been called. As a special
case, if parent is null, then the nth root node is set.
-
public abstract bool iter_parent (out TreeIter iter, TreeIter child)
Sets iter to be the parent of child. If child is at the
toplevel, and doesn't have a parent, then iter is set to an invalid iterator and false is returned.
child will remain a valid node after this function has been called.
-
public virtual void ref_node (TreeIter iter)
Lets the tree ref the node. This is an optional method for models to implement. To be more specific,
models may ignore this call as it exists primarily for performance reasons.
-
public virtual void unref_node (TreeIter iter)
Lets the tree unref the node. This is an optional method for models to implement. To be more
specific, models may ignore this call as it exists primarily for performance reasons.