1Gtk2::TreeSelection(3)User Contributed Perl DocumentationGtk2::TreeSelection(3)
2
3
4

NAME

6       Gtk2::TreeSelection - wrapper for GtkTreeSelection
7

HIERARCHY

9         Glib::Object
10         +----Gtk2::TreeSelection
11

METHODS

13   integer = $selection->count_selected_rows
14   boolean = $selection->iter_is_selected ($iter)
15       •   $iter (Gtk2::TreeIter)
16
17   selectionmode = $selection->get_mode
18   $selection->set_mode ($type)
19       •   $type (Gtk2::SelectionMode)
20
21   boolean = $selection->path_is_selected ($path)
22       •   $path (Gtk2::TreePath)
23
24   $selection->select_all
25   $selection->set_select_function ($func, $data=undef)
26       •   $func (scalar)
27
28       •   $data (scalar)
29
30   $selection->select_iter ($iter)
31       •   $iter (Gtk2::TreeIter)
32
33   $selection->select_path ($path)
34       •   $path (Gtk2::TreePath)
35
36   $selection->select_range ($start_path, $end_path)
37       •   $start_path (Gtk2::TreePath)
38
39       •   $end_path (Gtk2::TreePath)
40
41   $selection->selected_foreach ($func, $data=undef)
42       •   $func (subroutine)
43
44       •   $data (scalar)
45
46       Call $func on every selected row in $selection's view.
47
48   iter = $tree_selection->get_selected
49   (model, iter) = $tree_selection->get_selected
50       Since most of the time you are only interested in the iter,
51       "get_selected" returns only the iter in scalar context.
52
53   @paths = $selection->get_selected_rows
54       Returns the Gtk2::TreePath of each selected row, or an empty list if no
55       rows are selected.  The model is not returned, as documented in the C
56       API reference.  To get the model, try
57       "$selection->get_tree_view->get_model".
58
59   treeview = $selection->get_tree_view
60   $selection->unselect_all
61   $selection->unselect_iter ($iter)
62       •   $iter (Gtk2::TreeIter)
63
64   $selection->unselect_path ($path)
65       •   $path (Gtk2::TreePath)
66
67   $selection->unselect_range ($start_path, $end_path)
68       •   $start_path (Gtk2::TreePath)
69
70       •   $end_path (Gtk2::TreePath)
71
72       Since: gtk+ 2.2
73
74   scalar = $selection->get_user_data

SIGNALS

76       changed (Gtk2::TreeSelection)
77

ENUMS AND FLAGS

79   enum Gtk2::SelectionMode
80       •   'none' / 'GTK_SELECTION_NONE'
81
82       •   'single' / 'GTK_SELECTION_SINGLE'
83
84       •   'browse' / 'GTK_SELECTION_BROWSE'
85
86       •   'multiple' / 'GTK_SELECTION_MULTIPLE'
87
88       •   'extended' / 'GTK_SELECTION_EXTENDED'
89

SEE ALSO

91       Gtk2, Glib::Object
92
94       Copyright (C) 2003-2011 by the gtk2-perl team.
95
96       This software is licensed under the LGPL.  See Gtk2 for a full notice.
97
98
99
100perl v5.32.1                      2021-01-27            Gtk2::TreeSelection(3)
Impressum