1Gtk2::TreeStore(3)    User Contributed Perl Documentation   Gtk2::TreeStore(3)
2
3
4

NAME

6       Gtk2::TreeStore - wrapper for GtkTreeStore
7

HIERARCHY

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

INTERFACES

13         Gtk2::TreeModel
14         Gtk2::TreeDragSource
15         Gtk2::TreeDragDest
16         Gtk2::TreeSortable
17         Gtk2::Buildable
18

METHODS

20   treestore = Gtk2::TreeStore->new (...)
21       •   ... (list) of strings, package names
22
23   treeiter = $tree_store->append ($parent)
24       •   $parent (Gtk2::TreeIter or undef)
25
26   $tree_store->clear
27   $tree_store->set_column_types (...)
28       •   ... (list) of strings, package names
29
30   $tree_store->set ($iter, $col1, $val1, ...)
31       •   $iter (Gtk2::TreeIter)
32
33       •   $col1 (integer) the first column number
34
35       •   $val1 (scalar) the first value
36
37       •   ... (list) pairs of columns and values
38
39   treeiter = $tree_store->insert ($parent, $position)
40       •   $parent (Gtk2::TreeIter or undef)
41
42       •   $position (integer)
43
44   treeiter = $tree_store->insert_after ($parent, $sibling)
45       •   $parent (Gtk2::TreeIter or undef)
46
47       •   $sibling (Gtk2::TreeIter or undef)
48
49   treeiter = $tree_store->insert_before ($parent, $sibling)
50       •   $parent (Gtk2::TreeIter or undef)
51
52       •   $sibling (Gtk2::TreeIter or undef)
53
54   treeiter = $tree_store->insert_with_values ($parent, $position, ...)
55       •   $parent (Gtk2::TreeIter or undef)
56
57       •   $position (integer) position to insert the new row
58
59       •   ... (list) pairs of column numbers and values
60
61       Like doing insert followed by set, except that insert_with_values emits
62       only the row-inserted signal, rather than row-inserted, row-changed,
63       and, if the store is sorted, rows-reordered as in the multiple-
64       operation case.  Since emitting the rows-reordered signal repeatedly
65       can affect the performance of the program, insert_with_values should
66       generally be preferred when inserting rows in a sorted tree store.
67
68       Since: gtk+ 2.10
69
70   boolean = $tree_store->is_ancestor ($iter, $descendant)
71       •   $iter (Gtk2::TreeIter)
72
73       •   $descendant (Gtk2::TreeIter)
74
75   integer = $tree_store->iter_depth ($iter)
76       •   $iter (Gtk2::TreeIter)
77
78   boolean = $tree_store->iter_is_valid ($iter)
79       •   $iter (Gtk2::TreeIter)
80
81       Since: gtk+ 2.2
82
83   $tree_store->move_after ($iter, $position)
84       •   $iter (Gtk2::TreeIter)
85
86       •   $position (Gtk2::TreeIter or undef)
87
88       Since: gtk+ 2.2
89
90   $tree_store->move_before ($iter, $position)
91       •   $iter (Gtk2::TreeIter)
92
93       •   $position (Gtk2::TreeIter or undef)
94
95       Since: gtk+ 2.2
96
97   treeiter = $tree_store->prepend ($parent)
98       •   $parent (Gtk2::TreeIter or undef)
99
100   boolean = $tree_store->remove ($iter)
101       •   $iter (Gtk2::TreeIter)
102
103       The return is always a boolean in the style of Gtk 2.2.x and up, even
104       when running on Gtk 2.0.x.
105
106   $tree_store->reorder ($parent, ...)
107       •   $parent (Gtk2::TreeIter or undef)
108
109       •   ... (list) of integer's, the new_order
110
111       Since: gtk+ 2.2
112
113   $tree_store->swap ($a, $b)
114       •   $a (Gtk2::TreeIter)
115
116       •   $b (Gtk2::TreeIter)
117
118       Since: gtk+ 2.2
119
120   $tree_store->set_value ($iter, $col1, $val1, ...)
121       •   $iter (Gtk2::TreeIter)
122
123       •   $col1 (integer) the first column number
124
125       •   $val1 (scalar) the first value
126
127       •   ... (list) pairs of columns and values
128
129       Alias for Gtk2::TreeStore::set().
130

SEE ALSO

132       Gtk2, Glib::Object
133
135       Copyright (C) 2003-2011 by the gtk2-perl team.
136
137       This software is licensed under the LGPL.  See Gtk2 for a full notice.
138
139
140
141perl v5.32.1                      2021-01-27                Gtk2::TreeStore(3)
Impressum