Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gtk2::liststore(3pm) [debian man page]

Gtk2::ListStore(3pm)					User Contributed Perl Documentation				      Gtk2::ListStore(3pm)

NAME
Gtk2::ListStore - wrapper for GtkListStore HIERARCHY
Glib::Object +----Gtk2::ListStore INTERFACES
Gtk2::TreeModel Gtk2::TreeDragSource Gtk2::TreeDragDest Gtk2::TreeSortable Gtk2::Buildable METHODS
liststore = Gtk2::ListStore->new (...) o ... (list) of strings treeiter = $list_store->append $list_store->clear $list_store->set_column_types (...) o ... (list) of strings $list_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 column numbers and values treeiter = $list_store->insert ($position) o $position (integer) treeiter = $list_store->insert_after ($sibling) o $sibling (Gtk2::TreeIter or undef) treeiter = $list_store->insert_before ($sibling) o $sibling (Gtk2::TreeIter or undef) treeiter = $list_store->insert_with_values ($position, ...) 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 list store. Since: gtk+ 2.6 boolean = $list_store->iter_is_valid ($iter) o $iter (Gtk2::TreeIter) Since: gtk+ 2.2 $store->move_after ($iter, $position) o $iter (Gtk2::TreeIter) o $position (Gtk2::TreeIter or undef) Since: gtk+ 2.2 $store->move_before ($iter, $position) o $iter (Gtk2::TreeIter) o $position (Gtk2::TreeIter or undef) Since: gtk+ 2.2 treeiter = $list_store->prepend boolean = $list_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. $store->reorder (...) o ... (list) of integers the reordered posistions Reorders store to follow the order indicated by new_order. Note that this function only works with unsorted stores. A list of position should be passed, one for each item in the list. Since: gtk+ 2.2 $store->swap ($a, $b) o $a (Gtk2::TreeIter) o $b (Gtk2::TreeIter) Since: gtk+ 2.2 $list_store->set_value ($iter, $col, $val) o $iter (Gtk2::TreeIter) o $val (scalar) o $col (integer) 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.14.2 2012-05-27 Gtk2::ListStore(3pm)

Check Out this Related Man Page

Gtk2::TreeSelection(3pm)				User Contributed Perl Documentation				  Gtk2::TreeSelection(3pm)

NAME
Gtk2::TreeSelection - wrapper for GtkTreeSelection HIERARCHY
Glib::Object +----Gtk2::TreeSelection METHODS
integer = $selection->count_selected_rows boolean = $selection->iter_is_selected ($iter) o $iter (Gtk2::TreeIter) selectionmode = $selection->get_mode $selection->set_mode ($type) o $type (Gtk2::SelectionMode) boolean = $selection->path_is_selected ($path) o $path (Gtk2::TreePath) $selection->select_all $selection->set_select_function ($func, $data=undef) o $func (scalar) o $data (scalar) $selection->select_iter ($iter) o $iter (Gtk2::TreeIter) $selection->select_path ($path) o $path (Gtk2::TreePath) $selection->select_range ($start_path, $end_path) o $start_path (Gtk2::TreePath) o $end_path (Gtk2::TreePath) $selection->selected_foreach ($func, $data=undef) o $func (subroutine) o $data (scalar) Call $func on every selected row in $selection's view. iter = $tree_selection->get_selected (model, iter) = $tree_selection->get_selected Since most of the time you are only interested in the iter, "get_selected" returns only the iter in scalar context. @paths = $selection->get_selected_rows Returns the Gtk2::TreePath of each selected row, or an empty list if no rows are selected. The model is not returned, as documented in the C API reference. To get the model, try "$selection->get_tree_view->get_model". treeview = $selection->get_tree_view $selection->unselect_all $selection->unselect_iter ($iter) o $iter (Gtk2::TreeIter) $selection->unselect_path ($path) o $path (Gtk2::TreePath) $selection->unselect_range ($start_path, $end_path) o $start_path (Gtk2::TreePath) o $end_path (Gtk2::TreePath) Since: gtk+ 2.2 scalar = $selection->get_user_data SIGNALS
changed (Gtk2::TreeSelection) ENUMS AND FLAGS
enum Gtk2::SelectionMode o 'none' / 'GTK_SELECTION_NONE' o 'single' / 'GTK_SELECTION_SINGLE' o 'browse' / 'GTK_SELECTION_BROWSE' o 'multiple' / 'GTK_SELECTION_MULTIPLE' o 'extended' / 'GTK_SELECTION_EXTENDED' 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.14.2 2012-05-27 Gtk2::TreeSelection(3pm)
Man Page