1Gtk2::ListStore(3) User Contributed Perl Documentation Gtk2::ListStore(3)
2
3
4
6 Gtk2::ListStore - wrapper for GtkListStore
7
9 Glib::Object
10 +----Gtk2::ListStore
11
13 Gtk2::TreeModel
14 Gtk2::TreeDragSource
15 Gtk2::TreeDragDest
16 Gtk2::TreeSortable
17 Gtk2::Buildable
18
20 liststore = Gtk2::ListStore->new (...)
21 · ... (list) of strings
22
23 treeiter = $list_store->append
24 $list_store->clear
25 $list_store->set_column_types (...)
26 · ... (list) of strings
27
28 $list_store->set ($iter, $col1, $val1, ...)
29 · $iter (Gtk2::TreeIter)
30
31 · $col1 (integer) the first column number
32
33 · $val1 (scalar) the first value
34
35 · ... (list) pairs of column numbers and values
36
37 treeiter = $list_store->insert ($position)
38 · $position (integer)
39
40 treeiter = $list_store->insert_after ($sibling)
41 · $sibling (Gtk2::TreeIter or undef)
42
43 treeiter = $list_store->insert_before ($sibling)
44 · $sibling (Gtk2::TreeIter or undef)
45
46 treeiter = $list_store->insert_with_values ($position, ...)
47 · $position (integer) position to insert the new row
48
49 · ... (list) pairs of column numbers and values
50
51 Like doing insert followed by set, except that insert_with_values emits
52 only the row-inserted signal, rather than row-inserted, row-changed,
53 and, if the store is sorted, rows-reordered as in the multiple-
54 operation case. Since emitting the rows-reordered signal repeatedly
55 can affect the performance of the program, insert_with_values should
56 generally be preferred when inserting rows in a sorted list store.
57
58 Since: gtk+ 2.6
59
60 boolean = $list_store->iter_is_valid ($iter)
61 · $iter (Gtk2::TreeIter)
62
63 Since: gtk+ 2.2
64
65 $store->move_after ($iter, $position)
66 · $iter (Gtk2::TreeIter)
67
68 · $position (Gtk2::TreeIter or undef)
69
70 Since: gtk+ 2.2
71
72 $store->move_before ($iter, $position)
73 · $iter (Gtk2::TreeIter)
74
75 · $position (Gtk2::TreeIter or undef)
76
77 Since: gtk+ 2.2
78
79 treeiter = $list_store->prepend
80 boolean = $list_store->remove ($iter)
81 · $iter (Gtk2::TreeIter)
82
83 The return is always a boolean in the style of Gtk 2.2.x and up, even
84 when running on Gtk 2.0.x.
85
86 $store->reorder (...)
87 · ... (list) of integers the reordered posistions
88
89 Reorders store to follow the order indicated by new_order. Note that
90 this function only works with unsorted stores.
91
92 A list of position should be passed, one for each item in the list.
93
94 Since: gtk+ 2.2
95
96 $store->swap ($a, $b)
97 · $a (Gtk2::TreeIter)
98
99 · $b (Gtk2::TreeIter)
100
101 Since: gtk+ 2.2
102
103 $list_store->set_value ($iter, $col, $val)
104 · $iter (Gtk2::TreeIter)
105
106 · $val (scalar)
107
108 · $col (integer)
109
111 Gtk2, Glib::Object
112
114 Copyright (C) 2003-2011 by the gtk2-perl team.
115
116 This software is licensed under the LGPL. See Gtk2 for a full notice.
117
118
119
120perl v5.30.0 2019-07-26 Gtk2::ListStore(3)