1Gtk2::TreeSelection(3)User Contributed Perl DocumentationGtk2::TreeSelection(3)
2
3
4
6 Gtk2::TreeSelection
7
9 Glib::Object
10 +----Gtk2::TreeSelection
11
13 integer = $selection->count_selected_rows
14
15 boolean = $selection->iter_is_selected ($iter)
16
17 * $iter (Gtk2::TreeIter)
18
19 selectionmode = $selection->get_mode
20
21 $selection->set_mode ($type)
22
23 * $type (Gtk2::SelectionMode)
24
25 boolean = $selection->path_is_selected ($path)
26
27 * $path (Gtk2::TreePath)
28
29 $selection->select_all
30
31 $selection->set_select_function ($func, $data=undef)
32
33 * $func (scalar)
34 * $data (scalar)
35
36 $selection->select_iter ($iter)
37
38 * $iter (Gtk2::TreeIter)
39
40 $selection->select_path ($path)
41
42 * $path (Gtk2::TreePath)
43
44 $selection->select_range ($start_path, $end_path)
45
46 * $start_path (Gtk2::TreePath)
47 * $end_path (Gtk2::TreePath)
48
49 $selection->selected_foreach ($func, $data=undef)
50
51 * $func (subroutine)
52 * $data (scalar)
53
54 Call $func on every selected row in $selection's view.
55
56 iter = $tree_selection->get_selected
57
58 (model, iter) = $tree_selection->get_selected
59
60 Since most of the time you are only interested in the iter,
61 "get_selected" returns only the iter in scalar context.
62
63 @paths = $selection->get_selected_rows
64
65 Returns the Gtk2::TreePath of each selected row, or an empty list
66 if no rows are selected. The model is not returned, as documented
67 in the C API reference. To get the model, try "$selecā
68 tion->get_tree_view->get_model".
69
70 treeview = $selection->get_tree_view
71
72 $selection->unselect_all
73
74 $selection->unselect_iter ($iter)
75
76 * $iter (Gtk2::TreeIter)
77
78 $selection->unselect_path ($path)
79
80 * $path (Gtk2::TreePath)
81
82 $selection->unselect_range ($start_path, $end_path)
83
84 * $start_path (Gtk2::TreePath)
85 * $end_path (Gtk2::TreePath)
86
87 scalar = $selection->get_user_data
88
90 changed (Gtk2::TreeSelection)
91
93 enum Gtk2::SelectionMode
94
95 * 'none' / 'GTK_SELECTION_NONE'
96 * 'single' / 'GTK_SELECTION_SINGLE'
97 * 'browse' / 'GTK_SELECTION_BROWSE'
98 * 'multiple' / 'GTK_SELECTION_MULTIPLE'
99 * 'extended' / 'GTK_SELECTION_EXTENDED'
100
102 Gtk2, Glib::Object
103
105 Copyright (C) 2003-2007 by the gtk2-perl team.
106
107 This software is licensed under the LGPL. See Gtk2 for a full notice.
108
109
110
111perl v5.8.8 2007-03-18 Gtk2::TreeSelection(3)