Gtk2::TreeStore(3) User Contributed Perl Documentation Gtk2::TreeStore(3) NAME Gtk2::TreeStore - wrapper for GtkTreeStore HIERARCHY Glib::Object +----Gtk2::TreeStore INTERFACES Gtk2::TreeModel Gtk2::TreeDragSource Gtk2::TreeDragDest Gtk2::TreeSortable Gtk2::Buildable METHODS treestore = Gtk2::TreeStore->new (...) o ... (list) of strings, package names treeiter = $tree_store->append ($parent) o $parent (Gtk2::TreeIter or undef) $tree_store->clear $tree_store->set_column_types (...) o ... (list) of strings, package names $tree_store->set ($iter, $col1, $val1, ...) o $iter (Gtk2::TreeIter) o $col1 (integer) the first column number o $val1 (scalar) the first value o ... (list) pairs of columns and values treeiter = $tree_store->insert ($parent, $position) o $parent (Gtk2::TreeIter or undef) o $position (integer) treeiter = $tree_store->insert_after ($parent, $sibling) o $parent (Gtk2::TreeIter or undef) o $sibling (Gtk2::TreeIter or undef) treeiter = $tree_store->insert_before ($parent, $sibling) o $parent (Gtk2::TreeIter or undef) o $sibling (Gtk2::TreeIter or undef) treeiter = $tree_store->insert_with_values ($parent, $position, ...) o $parent (Gtk2::TreeIter or undef) o $position (integer) position to insert the new row o ... (list) pairs of column numbers and values Like doing insert followed by set, except that insert_with_values emits only the row-inserted signal, rather than row-inserted, row-changed, and, if the store is sorted, rows-reordered as in the multiple- operation case. Since emitting the rows-reordered signal repeatedly can affect the performance of the program, insert_with_values should generally be preferred when inserting rows in a sorted tree store. Since: gtk+ 2.10 boolean = $tree_store->is_ancestor ($iter, $descendant) o $iter (Gtk2::TreeIter) o $descendant (Gtk2::TreeIter) integer = $tree_store->iter_depth ($iter) o $iter (Gtk2::TreeIter) boolean = $tree_store->iter_is_valid ($iter) o $iter (Gtk2::TreeIter) Since: gtk+ 2.2 $tree_store->move_after ($iter, $position) o $iter (Gtk2::TreeIter) o $position (Gtk2::TreeIter or undef) Since: gtk+ 2.2 $tree_store->move_before ($iter, $position) o $iter (Gtk2::TreeIter) o $position (Gtk2::TreeIter or undef) Since: gtk+ 2.2 treeiter = $tree_store->prepend ($parent) o $parent (Gtk2::TreeIter or undef) boolean = $tree_store->remove ($iter) o $iter (Gtk2::TreeIter) The return is always a boolean in the style of Gtk 2.2.x and up, even when running on Gtk 2.0.x. $tree_store->reorder ($parent, ...) o $parent (Gtk2::TreeIter or undef) o ... (list) of integer's, the new_order Since: gtk+ 2.2 $tree_store->swap ($a, $b) o $a (Gtk2::TreeIter) o $b (Gtk2::TreeIter) Since: gtk+ 2.2 $tree_store->set_value ($iter, $col1, $val1, ...) o $iter (Gtk2::TreeIter) o $col1 (integer) the first column number o $val1 (scalar) the first value o ... (list) pairs of columns and values Alias for Gtk2::TreeStore::set(). SEE ALSO Gtk2, Glib::Object COPYRIGHT Copyright (C) 2003-2011 by the gtk2-perl team. This software is licensed under the LGPL. See Gtk2 for a full notice. perl v5.38.0 2023-07-25 Gtk2::TreeStore(3)