1
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
<html xmlns="http://www.w3.org/1999/xhtml">
4
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
5
<title>gtkmm: Gtk::ListStore Class Reference</title>
6
<link href="tabs.css" rel="stylesheet" type="text/css"/>
7
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
10
<!-- Generated by Doxygen 1.7.3 -->
13
<table cellspacing="0" cellpadding="0">
15
<tr style="height: 56px;">
16
<td style="padding-left: 0.5em;">
17
<div id="projectname">gtkmm <span id="projectnumber">3.0.1</span></div>
23
<div id="navrow1" class="tabs">
25
<li><a href="index.html"><span>Main Page</span></a></li>
26
<li><a href="pages.html"><span>Related Pages</span></a></li>
27
<li><a href="modules.html"><span>Modules</span></a></li>
28
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
29
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
32
<div id="navrow2" class="tabs2">
34
<li><a href="annotated.html"><span>Class List</span></a></li>
35
<li><a href="classes.html"><span>Class Index</span></a></li>
36
<li><a href="inherits.html"><span>Class Hierarchy</span></a></li>
37
<li><a href="functions.html"><span>Class Members</span></a></li>
40
<div id="nav-path" class="navpath">
42
<li class="navelem"><a class="el" href="namespaceGtk.html">Gtk</a> </li>
43
<li class="navelem"><a class="el" href="classGtk_1_1ListStore.html">ListStore</a> </li>
49
<a href="#pub-methods">Public Member Functions</a> |
50
<a href="#pub-static-methods">Static Public Member Functions</a> |
51
<a href="#pro-methods">Protected Member Functions</a> |
52
<a href="#related">Related Functions</a> </div>
53
<div class="headertitle">
54
<h1>Gtk::ListStore Class Reference<div class="ingroups"><a class="el" href="group__TreeView.html">TreeView Classes</a></div></h1> </div>
56
<div class="contents">
57
<!-- doxytag: class="Gtk::ListStore" --><!-- doxytag: inherits="Glib::Object,Gtk::TreeModel,Gtk::TreeSortable,Gtk::TreeDragSource,Gtk::TreeDragDest,Gtk::Buildable" -->
58
<p>Thist is a list model for use with a <a class="el" href="classGtk_1_1TreeView.html" title="The TreeView widget displays the model (Gtk::TreeModel) data and allows the user to interact with it...">Gtk::TreeView</a> widget. <a href="#_details">More...</a></p>
59
<div class="dynheader">
60
Inheritance diagram for Gtk::ListStore:</div>
61
<div class="dyncontent">
62
<div class="center"><img src="classGtk_1_1ListStore__inherit__graph.png" border="0" usemap="#Gtk_1_1ListStore_inherit__map" alt="Inheritance graph"/></div>
63
<map name="Gtk_1_1ListStore_inherit__map" id="Gtk_1_1ListStore_inherit__map">
64
<area shape="rect" id="node2" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1Object.html" title="Glib::Object" alt="" coords="337,10,428,41"/><area shape="rect" id="node4" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1ObjectBase.html" title="Glib::ObjectBase" alt="" coords="161,89,281,120"/><area shape="rect" id="node10" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1Interface.html" title="Glib::Interface" alt="" coords="331,116,435,146"/><area shape="rect" id="node6" doxygen="libsigc++-2.0.tag:http://library.gnome.org/devel/libsigc++/unstable/" href="http://library.gnome.org/devel/libsigc++/unstable/structsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="5,89,112,120"/><area shape="rect" id="node8" href="classGtk_1_1TreeModel.html" title="This class defines a generic tree interface for use by the Gtk::TreeView widget." alt="" coords="500,36,609,66"/><area shape="rect" id="node13" href="classGtk_1_1TreeSortable.html" title="Gtk::TreeSortable" alt="" coords="493,89,616,120"/><area shape="rect" id="node16" href="classGtk_1_1TreeDragSource.html" title="Gtk::TreeDragSource" alt="" coords="483,142,627,173"/><area shape="rect" id="node19" href="classGtk_1_1TreeDragDest.html" title="Gtk::TreeDragDest" alt="" coords="489,196,620,226"/><area shape="rect" id="node22" href="classGtk_1_1Buildable.html" title="A base class for objects that can be built by Gtk::Builder." alt="" coords="503,249,607,280"/></map>
65
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
66
<div class="dynheader">
67
Collaboration diagram for Gtk::ListStore:</div>
68
<div class="dyncontent">
69
<div class="center"><img src="classGtk_1_1ListStore__coll__graph.png" border="0" usemap="#Gtk_1_1ListStore_coll__map" alt="Collaboration graph"/></div>
70
<map name="Gtk_1_1ListStore_coll__map" id="Gtk_1_1ListStore_coll__map">
71
<area shape="rect" id="node2" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1Object.html" title="Glib::Object" alt="" coords="337,10,428,41"/><area shape="rect" id="node4" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1ObjectBase.html" title="Glib::ObjectBase" alt="" coords="161,89,281,120"/><area shape="rect" id="node10" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1Interface.html" title="Glib::Interface" alt="" coords="331,116,435,146"/><area shape="rect" id="node6" doxygen="libsigc++-2.0.tag:http://library.gnome.org/devel/libsigc++/unstable/" href="http://library.gnome.org/devel/libsigc++/unstable/structsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="5,89,112,120"/><area shape="rect" id="node8" href="classGtk_1_1TreeModel.html" title="This class defines a generic tree interface for use by the Gtk::TreeView widget." alt="" coords="500,36,609,66"/><area shape="rect" id="node13" href="classGtk_1_1TreeSortable.html" title="Gtk::TreeSortable" alt="" coords="493,89,616,120"/><area shape="rect" id="node16" href="classGtk_1_1TreeDragSource.html" title="Gtk::TreeDragSource" alt="" coords="483,142,627,173"/><area shape="rect" id="node19" href="classGtk_1_1TreeDragDest.html" title="Gtk::TreeDragDest" alt="" coords="489,196,620,226"/><area shape="rect" id="node22" href="classGtk_1_1Buildable.html" title="A base class for objects that can be built by Gtk::Builder." alt="" coords="503,249,607,280"/></map>
72
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
74
<p><a href="classGtk_1_1ListStore-members.html">List of all members.</a></p>
75
<table class="memberdecls">
76
<tr><td colspan="2"><h2><a name="pub-methods"></a>
77
Public Member Functions</h2></td></tr>
78
<tr><td class="memItemLeft" align="right" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#a8c5efcf41ba5958337c69ec539f678df">~ListStore</a> ()</td></tr>
79
<tr><td class="memItemLeft" align="right" valign="top">GtkListStore* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#a5086758716b9f34a5219b1387aebe59c">gobj</a> ()</td></tr>
80
<tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a5086758716b9f34a5219b1387aebe59c"></a><br/></td></tr>
81
<tr><td class="memItemLeft" align="right" valign="top">const GtkListStore* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#a8d0844616280900206a77aaec2c546d7">gobj</a> () const </td></tr>
82
<tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a8d0844616280900206a77aaec2c546d7"></a><br/></td></tr>
83
<tr><td class="memItemLeft" align="right" valign="top">GtkListStore* </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#aabc577b9267750688417879a066d49b8">gobj_copy</a> ()</td></tr>
84
<tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. <a href="#aabc577b9267750688417879a066d49b8"></a><br/></td></tr>
85
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#a6abba5fb66c20f1bfcea79adff7aa321">set_column_types</a> (const <a class="el" href="classGtk_1_1TreeModelColumnRecord.html">TreeModelColumnRecord</a>& columns)</td></tr>
86
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGtk_1_1TreeIter.html">iterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#abf6e5cbe94951adc5b62120d9df1b562">erase</a> (const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& iter)</td></tr>
87
<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes the given row from the list store. <a href="#abf6e5cbe94951adc5b62120d9df1b562"></a><br/></td></tr>
88
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGtk_1_1TreeIter.html">iterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#ab71d860741465ea79bc352c4575e47ec">insert</a> (const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& iter)</td></tr>
89
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new row before the position. <a href="#ab71d860741465ea79bc352c4575e47ec"></a><br/></td></tr>
90
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGtk_1_1TreeIter.html">iterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#ab9032c9d9f620e10f32428e2358f44df">insert_after</a> (const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& iter)</td></tr>
91
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new row after the position. <a href="#ab9032c9d9f620e10f32428e2358f44df"></a><br/></td></tr>
92
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGtk_1_1TreeIter.html">iterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#a1fd8146c61bae1a95b050e9126ea1928">prepend</a> ()</td></tr>
93
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new row at the start. <a href="#a1fd8146c61bae1a95b050e9126ea1928"></a><br/></td></tr>
94
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classGtk_1_1TreeIter.html">iterator</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#af47307c865cc5de0856fe3f8571fc681">append</a> ()</td></tr>
95
<tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new row at the end. <a href="#af47307c865cc5de0856fe3f8571fc681"></a><br/></td></tr>
96
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#a2f3617442cd5b52db485f4dc31f91da9">iter_swap</a> (const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& a, const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& b)</td></tr>
97
<tr><td class="mdescLeft"> </td><td class="mdescRight">Swaps <em>a</em> and <em>b</em> in <em>store</em>. <a href="#a2f3617442cd5b52db485f4dc31f91da9"></a><br/></td></tr>
98
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#acc5515fbabf7826d6d3a0e15ca81d2b9">move</a> (const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& source, const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& destination)</td></tr>
99
<tr><td class="mdescLeft"> </td><td class="mdescRight">Moves <em>source</em> to the position at <em>destination</em>. <a href="#acc5515fbabf7826d6d3a0e15ca81d2b9"></a><br/></td></tr>
100
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#a8afcdd1bd1b5c5b8fa2630d4ab106784">reorder</a> (const <a class="elRef" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00738.html">std::vector</a>< int >& new_order)</td></tr>
101
<tr><td class="mdescLeft"> </td><td class="mdescRight">Reorders the list store to follow the order indicated by <em>new_order</em>. <a href="#a8afcdd1bd1b5c5b8fa2630d4ab106784"></a><br/></td></tr>
102
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#a770bf1cc24ab0e02bdd96531107da603">clear</a> ()</td></tr>
103
<tr><td class="mdescLeft"> </td><td class="mdescRight">Removes all rows from the list store. <a href="#a770bf1cc24ab0e02bdd96531107da603"></a><br/></td></tr>
104
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#ae307acf882557f319dc309963c07705a">iter_is_valid</a> (const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& iter) const </td></tr>
105
<tr><td class="mdescLeft"> </td><td class="mdescRight"><warning>This function is slow. <a href="#ae307acf882557f319dc309963c07705a"></a><br/></td></tr>
106
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
107
Static Public Member Functions</h2></td></tr>
108
<tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGtk_1_1ListStore.html">ListStore</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#aaa6c530560f66872482a0650739276c5">create</a> (const <a class="el" href="classGtk_1_1TreeModelColumnRecord.html">TreeModelColumnRecord</a>& columns)</td></tr>
109
<tr><td class="mdescLeft"> </td><td class="mdescRight">Instantiate a new <a class="el" href="classGtk_1_1ListStore.html" title="Thist is a list model for use with a Gtk::TreeView widget.">ListStore</a>. <a href="#aaa6c530560f66872482a0650739276c5"></a><br/></td></tr>
110
<tr><td colspan="2"><h2><a name="pro-methods"></a>
111
Protected Member Functions</h2></td></tr>
112
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#aab8cae9bc8193ce13e7b983092405d25">ListStore</a> ()</td></tr>
113
<tr><td class="mdescLeft"> </td><td class="mdescRight">When using this constructor, you must use <a class="el" href="classGtk_1_1ListStore.html#a6abba5fb66c20f1bfcea79adff7aa321">set_column_types()</a> immediately afterwards. <a href="#aab8cae9bc8193ce13e7b983092405d25"></a><br/></td></tr>
114
<tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#a6fdbba7946ad83842d61574697dddbc6">ListStore</a> (const <a class="el" href="classGtk_1_1TreeModelColumnRecord.html">TreeModelColumnRecord</a>& columns)</td></tr>
115
<tr><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#add757d2d02d35b5ea782c86eef04bae7">set_value_impl</a> (const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& row, int column, const <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1ValueBase.html">Glib::ValueBase</a>&<a class="elRef" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01191.html#ga1c9e781d8d15a3814a601f471797c825">value</a>)</td></tr>
116
<tr><td class="mdescLeft"> </td><td class="mdescRight">Override and implement this in a derived <a class="el" href="classGtk_1_1TreeModel.html" title="This class defines a generic tree interface for use by the Gtk::TreeView widget.">TreeModel</a> class, so that Row::operator() and <a class="el" href="classGtk_1_1TreeRow.html#ae25785fc6de538f6dd632bb434a5f2ff" title="Sets the value of this column of this row.">Row::set_value()</a> work. <a href="#add757d2d02d35b5ea782c86eef04bae7"></a><br/></td></tr>
117
<tr><td colspan="2"><h2><a name="related"></a>
118
Related Functions</h2></td></tr>
119
<tr><td colspan="2">(Note that these are not member functions.) <br/></td></tr>
120
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGtk_1_1ListStore.html">Gtk::ListStore</a> > </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#ac9a0a0d9b34c33a9775ec4d89da2f0df">wrap</a> (GtkListStore* object, bool take_copy=false)</td></tr>
121
<tr><td class="mdescLeft"> </td><td class="mdescRight">A <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. <a href="#ac9a0a0d9b34c33a9775ec4d89da2f0df"></a><br/></td></tr>
123
<hr/><a name="_details"></a><h2>Detailed Description</h2>
124
<div class="textblock"><p>Thist is a list model for use with a <a class="el" href="classGtk_1_1TreeView.html" title="The TreeView widget displays the model (Gtk::TreeModel) data and allows the user to interact with it...">Gtk::TreeView</a> widget. </p>
125
<p>It implements the <a class="el" href="classGtk_1_1TreeModel.html" title="This class defines a generic tree interface for use by the Gtk::TreeView widget.">Gtk::TreeModel</a> interface, and also implements the <a class="el" href="classGtk_1_1TreeSortable.html">Gtk::TreeSortable</a> interface so you can sort the list using the view. Finally, it also implements the tree drag and drop interfaces. </p>
126
</div><hr/><h2>Constructor & Destructor Documentation</h2>
127
<a class="anchor" id="a8c5efcf41ba5958337c69ec539f678df"></a><!-- doxytag: member="Gtk::ListStore::~ListStore" ref="a8c5efcf41ba5958337c69ec539f678df" args="()" -->
128
<div class="memitem">
129
<div class="memproto">
130
<table class="memname">
132
<td class="memname">virtual Gtk::ListStore::~ListStore </td>
134
<td class="paramname"></td><td>)</td>
135
<td><code> [virtual]</code></td>
143
<a class="anchor" id="aab8cae9bc8193ce13e7b983092405d25"></a><!-- doxytag: member="Gtk::ListStore::ListStore" ref="aab8cae9bc8193ce13e7b983092405d25" args="()" -->
144
<div class="memitem">
145
<div class="memproto">
146
<table class="memname">
148
<td class="memname">Gtk::ListStore::ListStore </td>
150
<td class="paramname"></td><td>)</td>
151
<td><code> [protected]</code></td>
157
<p>When using this constructor, you must use <a class="el" href="classGtk_1_1ListStore.html#a6abba5fb66c20f1bfcea79adff7aa321">set_column_types()</a> immediately afterwards. </p>
158
<p>This can be useful when deriving from this class, with a fixed <a class="el" href="classGtk_1_1TreeModelColumnRecord.html" title="Typedefed as TreeModel::ColumnRecord.">TreeModelColumnRecord</a> that is a member of the class. There is no <a class="el" href="classGtk_1_1ListStore.html#aaa6c530560f66872482a0650739276c5" title="Instantiate a new ListStore.">create()</a> method that corresponds to this constructor, because this constructor should only be used by derived classes. </p>
162
<a class="anchor" id="a6fdbba7946ad83842d61574697dddbc6"></a><!-- doxytag: member="Gtk::ListStore::ListStore" ref="a6fdbba7946ad83842d61574697dddbc6" args="(const TreeModelColumnRecord &columns)" -->
163
<div class="memitem">
164
<div class="memproto">
165
<table class="memname">
167
<td class="memname">Gtk::ListStore::ListStore </td>
169
<td class="paramtype">const <a class="el" href="classGtk_1_1TreeModelColumnRecord.html">TreeModelColumnRecord</a>& </td>
170
<td class="paramname"><em>columns</em></td><td>)</td>
171
<td><code> [explicit, protected]</code></td>
179
<hr/><h2>Member Function Documentation</h2>
180
<a class="anchor" id="af47307c865cc5de0856fe3f8571fc681"></a><!-- doxytag: member="Gtk::ListStore::append" ref="af47307c865cc5de0856fe3f8571fc681" args="()" -->
181
<div class="memitem">
182
<div class="memproto">
183
<table class="memname">
185
<td class="memname"><a class="el" href="classGtk_1_1TreeIter.html">iterator</a> Gtk::ListStore::append </td>
187
<td class="paramname"></td><td>)</td>
194
<p>Creates a new row at the end. </p>
195
<p>The row will be empty - to fill in values, you need to dereference the returned iterator and use <a class="el" href="classGtk_1_1TreeRow.html#ad1880375e2c3b45a6ba69b225dd7f6a4" title="Use this to set and get the value of this column of this row.">Row::operator[]</a> or <a class="el" href="classGtk_1_1TreeRow.html#ae25785fc6de538f6dd632bb434a5f2ff" title="Sets the value of this column of this row.">Row::set_value()</a>. See also <a class="el" href="classGtk_1_1ListStore.html#ab71d860741465ea79bc352c4575e47ec" title="Creates a new row before the position.">insert()</a> and <a class="el" href="classGtk_1_1ListStore.html#a1fd8146c61bae1a95b050e9126ea1928" title="Creates a new row at the start.">prepend()</a>.</p>
196
<dl class="return"><dt><b>Returns:</b></dt><dd>An iterator to the new row. </dd></dl>
200
<a class="anchor" id="a770bf1cc24ab0e02bdd96531107da603"></a><!-- doxytag: member="Gtk::ListStore::clear" ref="a770bf1cc24ab0e02bdd96531107da603" args="()" -->
201
<div class="memitem">
202
<div class="memproto">
203
<table class="memname">
205
<td class="memname">void Gtk::ListStore::clear </td>
207
<td class="paramname"></td><td>)</td>
214
<p>Removes all rows from the list store. </p>
218
<a class="anchor" id="aaa6c530560f66872482a0650739276c5"></a><!-- doxytag: member="Gtk::ListStore::create" ref="aaa6c530560f66872482a0650739276c5" args="(const TreeModelColumnRecord &columns)" -->
219
<div class="memitem">
220
<div class="memproto">
221
<table class="memname">
223
<td class="memname">static <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGtk_1_1ListStore.html">ListStore</a>> Gtk::ListStore::create </td>
225
<td class="paramtype">const <a class="el" href="classGtk_1_1TreeModelColumnRecord.html">TreeModelColumnRecord</a>& </td>
226
<td class="paramname"><em>columns</em></td><td>)</td>
227
<td><code> [static]</code></td>
233
<p>Instantiate a new <a class="el" href="classGtk_1_1ListStore.html" title="Thist is a list model for use with a Gtk::TreeView widget.">ListStore</a>. </p>
234
<dl><dt><b>Parameters:</b></dt><dd>
235
<table class="params">
236
<tr><td class="paramname">columns</td><td>The column types for this tree model. </td></tr>
240
<dl class="return"><dt><b>Returns:</b></dt><dd>The new <a class="el" href="classGtk_1_1ListStore.html" title="Thist is a list model for use with a Gtk::TreeView widget.">ListStore</a>. </dd></dl>
244
<a class="anchor" id="abf6e5cbe94951adc5b62120d9df1b562"></a><!-- doxytag: member="Gtk::ListStore::erase" ref="abf6e5cbe94951adc5b62120d9df1b562" args="(const iterator &iter)" -->
245
<div class="memitem">
246
<div class="memproto">
247
<table class="memname">
249
<td class="memname"><a class="el" href="classGtk_1_1TreeIter.html">iterator</a> Gtk::ListStore::erase </td>
251
<td class="paramtype">const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& </td>
252
<td class="paramname"><em>iter</em></td><td>)</td>
259
<p>Removes the given row from the list store. </p>
260
<dl><dt><b>Parameters:</b></dt><dd>
261
<table class="params">
262
<tr><td class="paramname">iter</td><td>The iterator to the row to be removed. </td></tr>
266
<dl class="return"><dt><b>Returns:</b></dt><dd>An iterator to the next row, or <a class="elRef" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01176.html#ga9390a942ee3787d3c444ebeb276d872f">end()</a> if there is none. </dd></dl>
270
<a class="anchor" id="a8d0844616280900206a77aaec2c546d7"></a><!-- doxytag: member="Gtk::ListStore::gobj" ref="a8d0844616280900206a77aaec2c546d7" args="() const " -->
271
<div class="memitem">
272
<div class="memproto">
273
<table class="memname">
275
<td class="memname">const GtkListStore* Gtk::ListStore::gobj </td>
277
<td class="paramname"></td><td>)</td>
278
<td> const<code> [inline]</code></td>
284
<p>Provides access to the underlying C GObject. </p>
286
<p>Reimplemented from <a class="el" href="classGtk_1_1Buildable.html#a473a9829001f8f0136eecd7bb5ddb523">Gtk::Buildable</a>.</p>
290
<a class="anchor" id="a5086758716b9f34a5219b1387aebe59c"></a><!-- doxytag: member="Gtk::ListStore::gobj" ref="a5086758716b9f34a5219b1387aebe59c" args="()" -->
291
<div class="memitem">
292
<div class="memproto">
293
<table class="memname">
295
<td class="memname">GtkListStore* Gtk::ListStore::gobj </td>
297
<td class="paramname"></td><td>)</td>
298
<td><code> [inline]</code></td>
304
<p>Provides access to the underlying C GObject. </p>
306
<p>Reimplemented from <a class="el" href="classGtk_1_1Buildable.html#a7985d36d675f0b8bb3bc8ce5cca2e986">Gtk::Buildable</a>.</p>
310
<a class="anchor" id="aabc577b9267750688417879a066d49b8"></a><!-- doxytag: member="Gtk::ListStore::gobj_copy" ref="aabc577b9267750688417879a066d49b8" args="()" -->
311
<div class="memitem">
312
<div class="memproto">
313
<table class="memname">
315
<td class="memname">GtkListStore* Gtk::ListStore::gobj_copy </td>
317
<td class="paramname"></td><td>)</td>
324
<p>Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. </p>
328
<a class="anchor" id="ab71d860741465ea79bc352c4575e47ec"></a><!-- doxytag: member="Gtk::ListStore::insert" ref="ab71d860741465ea79bc352c4575e47ec" args="(const iterator &iter)" -->
329
<div class="memitem">
330
<div class="memproto">
331
<table class="memname">
333
<td class="memname"><a class="el" href="classGtk_1_1TreeIter.html">iterator</a> Gtk::ListStore::insert </td>
335
<td class="paramtype">const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& </td>
336
<td class="paramname"><em>iter</em></td><td>)</td>
343
<p>Creates a new row before the position. </p>
344
<p>If iter is <a class="elRef" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01176.html#ga9390a942ee3787d3c444ebeb276d872f">end()</a> then a new row will be appended to the list. The row will be empty - to fill in values, you need to dereference the returned iterator and use <a class="el" href="classGtk_1_1TreeRow.html#ad1880375e2c3b45a6ba69b225dd7f6a4" title="Use this to set and get the value of this column of this row.">Row::operator[]</a> or <a class="el" href="classGtk_1_1TreeRow.html#ae25785fc6de538f6dd632bb434a5f2ff" title="Sets the value of this column of this row.">Row::set_value()</a>. See also <a class="el" href="classGtk_1_1ListStore.html#a1fd8146c61bae1a95b050e9126ea1928" title="Creates a new row at the start.">prepend()</a> and <a class="el" href="classGtk_1_1ListStore.html#af47307c865cc5de0856fe3f8571fc681" title="Creates a new row at the end.">append()</a>.</p>
345
<dl><dt><b>Parameters:</b></dt><dd>
346
<table class="params">
347
<tr><td class="paramname">iter</td><td>An iterator to the row before which the new row will be inserted. </td></tr>
351
<dl class="return"><dt><b>Returns:</b></dt><dd>An iterator to the new row. </dd></dl>
355
<a class="anchor" id="ab9032c9d9f620e10f32428e2358f44df"></a><!-- doxytag: member="Gtk::ListStore::insert_after" ref="ab9032c9d9f620e10f32428e2358f44df" args="(const iterator &iter)" -->
356
<div class="memitem">
357
<div class="memproto">
358
<table class="memname">
360
<td class="memname"><a class="el" href="classGtk_1_1TreeIter.html">iterator</a> Gtk::ListStore::insert_after </td>
362
<td class="paramtype">const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& </td>
363
<td class="paramname"><em>iter</em></td><td>)</td>
370
<p>Creates a new row after the position. </p>
371
<p>If iter is <a class="elRef" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01176.html#ga9390a942ee3787d3c444ebeb276d872f">end()</a> then a new row will be prepended to the list. The row will be empty - to fill in values, you need to dereference the returned iterator and use <a class="el" href="classGtk_1_1TreeRow.html#ad1880375e2c3b45a6ba69b225dd7f6a4" title="Use this to set and get the value of this column of this row.">Row::operator[]</a> or <a class="el" href="classGtk_1_1TreeRow.html#ae25785fc6de538f6dd632bb434a5f2ff" title="Sets the value of this column of this row.">Row::set_value()</a>. See also <a class="el" href="classGtk_1_1ListStore.html#ab71d860741465ea79bc352c4575e47ec" title="Creates a new row before the position.">insert()</a>, <a class="el" href="classGtk_1_1ListStore.html#a1fd8146c61bae1a95b050e9126ea1928" title="Creates a new row at the start.">prepend()</a> and <a class="el" href="classGtk_1_1ListStore.html#af47307c865cc5de0856fe3f8571fc681" title="Creates a new row at the end.">append()</a>.</p>
372
<dl><dt><b>Parameters:</b></dt><dd>
373
<table class="params">
374
<tr><td class="paramname">iter</td><td>An iterator to the row after which the new row will be inserted. </td></tr>
378
<dl class="return"><dt><b>Returns:</b></dt><dd>An iterator to the new row. </dd></dl>
382
<a class="anchor" id="ae307acf882557f319dc309963c07705a"></a><!-- doxytag: member="Gtk::ListStore::iter_is_valid" ref="ae307acf882557f319dc309963c07705a" args="(const iterator &iter) const " -->
383
<div class="memitem">
384
<div class="memproto">
385
<table class="memname">
387
<td class="memname">bool Gtk::ListStore::iter_is_valid </td>
389
<td class="paramtype">const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& </td>
390
<td class="paramname"><em>iter</em></td><td>)</td>
397
<p><warning>This function is slow. </p>
398
<p>Only use it for debugging and/or testing purposes.</warning></p>
399
<p>Checks if the given iter is a valid iter for this <a class="el" href="classGtk_1_1ListStore.html" title="Thist is a list model for use with a Gtk::TreeView widget.">Gtk::ListStore</a>.</p>
400
<dl class="since_2_2"><dt><b><a class="el" href="since_2_2.html#_since_2_2000065">Since gtkmm 2.2:</a></b></dt><dd></dd></dl>
401
<dl><dt><b>Parameters:</b></dt><dd>
402
<table class="params">
403
<tr><td class="paramname">iter</td><td>A <a class="el" href="classGtk_1_1TreeIter.html" title="A Gtk::TreeModel::iterator is a reference to a specific node on a specific model.">Gtk::TreeIter</a>. </td></tr>
407
<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> if the iter is valid, <code>false</code> if the iter is invalid. </dd></dl>
411
<a class="anchor" id="a2f3617442cd5b52db485f4dc31f91da9"></a><!-- doxytag: member="Gtk::ListStore::iter_swap" ref="a2f3617442cd5b52db485f4dc31f91da9" args="(const iterator &a, const iterator &b)" -->
412
<div class="memitem">
413
<div class="memproto">
414
<table class="memname">
416
<td class="memname">void Gtk::ListStore::iter_swap </td>
418
<td class="paramtype">const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& </td>
419
<td class="paramname"><em>a</em>, </td>
422
<td class="paramkey"></td>
424
<td class="paramtype">const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& </td>
425
<td class="paramname"><em>b</em> </td>
436
<p>Swaps <em>a</em> and <em>b</em> in <em>store</em>. </p>
437
<p>Note that this function only works with unsorted stores.</p>
438
<dl class="since_2_2"><dt><b><a class="el" href="since_2_2.html#_since_2_2000064">Since gtkmm 2.2:</a></b></dt><dd></dd></dl>
439
<dl><dt><b>Parameters:</b></dt><dd>
440
<table class="params">
441
<tr><td class="paramname">a</td><td>A <a class="el" href="classGtk_1_1TreeIter.html" title="A Gtk::TreeModel::iterator is a reference to a specific node on a specific model.">Gtk::TreeIter</a>. </td></tr>
442
<tr><td class="paramname">b</td><td>Another <a class="el" href="classGtk_1_1TreeIter.html" title="A Gtk::TreeModel::iterator is a reference to a specific node on a specific model.">Gtk::TreeIter</a>. </td></tr>
449
<a class="anchor" id="acc5515fbabf7826d6d3a0e15ca81d2b9"></a><!-- doxytag: member="Gtk::ListStore::move" ref="acc5515fbabf7826d6d3a0e15ca81d2b9" args="(const iterator &source, const iterator &destination)" -->
450
<div class="memitem">
451
<div class="memproto">
452
<table class="memname">
454
<td class="memname">void Gtk::ListStore::move </td>
456
<td class="paramtype">const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& </td>
457
<td class="paramname"><em>source</em>, </td>
460
<td class="paramkey"></td>
462
<td class="paramtype">const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& </td>
463
<td class="paramname"><em>destination</em> </td>
474
<p>Moves <em>source</em> to the position at <em>destination</em>. </p>
475
<p>Note that this function only works with unsorted stores. </p>
476
<dl><dt><b>Parameters:</b></dt><dd>
477
<table class="params">
478
<tr><td class="paramname">source</td><td>The row that should be moved. </td></tr>
479
<tr><td class="paramname">destination</td><td>The position to move to. </td></tr>
486
<a class="anchor" id="a1fd8146c61bae1a95b050e9126ea1928"></a><!-- doxytag: member="Gtk::ListStore::prepend" ref="a1fd8146c61bae1a95b050e9126ea1928" args="()" -->
487
<div class="memitem">
488
<div class="memproto">
489
<table class="memname">
491
<td class="memname"><a class="el" href="classGtk_1_1TreeIter.html">iterator</a> Gtk::ListStore::prepend </td>
493
<td class="paramname"></td><td>)</td>
500
<p>Creates a new row at the start. </p>
501
<p>The row will be empty - to fill in values, you need to dereference the returned iterator and use <a class="el" href="classGtk_1_1TreeRow.html#ad1880375e2c3b45a6ba69b225dd7f6a4" title="Use this to set and get the value of this column of this row.">Row::operator[]</a> or <a class="el" href="classGtk_1_1TreeRow.html#ae25785fc6de538f6dd632bb434a5f2ff" title="Sets the value of this column of this row.">Row::set_value()</a>. See also <a class="el" href="classGtk_1_1ListStore.html#ab71d860741465ea79bc352c4575e47ec" title="Creates a new row before the position.">insert()</a> and <a class="el" href="classGtk_1_1ListStore.html#af47307c865cc5de0856fe3f8571fc681" title="Creates a new row at the end.">append()</a>.</p>
502
<dl class="return"><dt><b>Returns:</b></dt><dd>An iterator to the new row. </dd></dl>
506
<a class="anchor" id="a8afcdd1bd1b5c5b8fa2630d4ab106784"></a><!-- doxytag: member="Gtk::ListStore::reorder" ref="a8afcdd1bd1b5c5b8fa2630d4ab106784" args="(const std::vector< int > &new_order)" -->
507
<div class="memitem">
508
<div class="memproto">
509
<table class="memname">
511
<td class="memname">void Gtk::ListStore::reorder </td>
513
<td class="paramtype">const <a class="elRef" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00738.html">std::vector</a>< int > & </td>
514
<td class="paramname"><em>new_order</em></td><td>)</td>
521
<p>Reorders the list store to follow the order indicated by <em>new_order</em>. </p>
522
<p>Note that this function only works with unsorted stores. </p>
526
<a class="anchor" id="a6abba5fb66c20f1bfcea79adff7aa321"></a><!-- doxytag: member="Gtk::ListStore::set_column_types" ref="a6abba5fb66c20f1bfcea79adff7aa321" args="(const TreeModelColumnRecord &columns)" -->
527
<div class="memitem">
528
<div class="memproto">
529
<table class="memname">
531
<td class="memname">void Gtk::ListStore::set_column_types </td>
533
<td class="paramtype">const <a class="el" href="classGtk_1_1TreeModelColumnRecord.html">TreeModelColumnRecord</a>& </td>
534
<td class="paramname"><em>columns</em></td><td>)</td>
543
<a class="anchor" id="add757d2d02d35b5ea782c86eef04bae7"></a><!-- doxytag: member="Gtk::ListStore::set_value_impl" ref="add757d2d02d35b5ea782c86eef04bae7" args="(const iterator &row, int column, const Glib::ValueBase &value)" -->
544
<div class="memitem">
545
<div class="memproto">
546
<table class="memname">
548
<td class="memname">virtual void Gtk::ListStore::set_value_impl </td>
550
<td class="paramtype">const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& </td>
551
<td class="paramname"><em>row</em>, </td>
554
<td class="paramkey"></td>
556
<td class="paramtype">int </td>
557
<td class="paramname"><em>column</em>, </td>
560
<td class="paramkey"></td>
562
<td class="paramtype">const <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1ValueBase.html">Glib::ValueBase</a> & </td>
563
<td class="paramname"><em>value</em> </td>
568
<td></td><td><code> [protected, virtual]</code></td>
574
<p>Override and implement this in a derived <a class="el" href="classGtk_1_1TreeModel.html" title="This class defines a generic tree interface for use by the Gtk::TreeView widget.">TreeModel</a> class, so that Row::operator() and <a class="el" href="classGtk_1_1TreeRow.html#ae25785fc6de538f6dd632bb434a5f2ff" title="Sets the value of this column of this row.">Row::set_value()</a> work. </p>
575
<p>You can probably just implement this by calling set_value_vfunc(). Your implementation of <a class="el" href="classGtk_1_1ListStore.html#add757d2d02d35b5ea782c86eef04bae7" title="Override and implement this in a derived TreeModel class, so that Row::operator() and Row::set_value(...">set_value_impl()</a> should also call <a class="el" href="classGtk_1_1TreeModel.html#a8f06ebb80f930bb780eab62aac748df2" title="Emits the "row-changed" signal on tree_model.">row_changed()</a> after changing the value. </p>
577
<p>Reimplemented from <a class="el" href="classGtk_1_1TreeModel.html#a26cf070eadb8e242bcf2b57f7e6d7d9e">Gtk::TreeModel</a>.</p>
581
<hr/><h2>Friends And Related Function Documentation</h2>
582
<a class="anchor" id="ac9a0a0d9b34c33a9775ec4d89da2f0df"></a><!-- doxytag: member="Gtk::ListStore::wrap" ref="ac9a0a0d9b34c33a9775ec4d89da2f0df" args="(GtkListStore *object, bool take_copy=false)" -->
583
<div class="memitem">
584
<div class="memproto">
585
<table class="memname">
587
<td class="memname"><a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGtk_1_1ListStore.html">Gtk::ListStore</a> > wrap </td>
589
<td class="paramtype">GtkListStore * </td>
590
<td class="paramname"><em>object</em>, </td>
593
<td class="paramkey"></td>
595
<td class="paramtype">bool </td>
596
<td class="paramname"><em>take_copy</em> = <code>false</code> </td>
601
<td></td><td><code> [related]</code></td>
607
<p>A <a class="elRef" doxygen="glibmm-2.4.tag:http://library.gnome.org/devel/glibmm/unstable/" href="http://library.gnome.org/devel/glibmm/unstable/namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. </p>
608
<dl><dt><b>Parameters:</b></dt><dd>
609
<table class="params">
610
<tr><td class="paramname">object</td><td>The C instance. </td></tr>
611
<tr><td class="paramname">take_copy</td><td>False if the result should take ownership of the C instance. True if it should take a new copy or ref. </td></tr>
615
<dl class="return"><dt><b>Returns:</b></dt><dd>A C++ instance that wraps this C instance. </dd></dl>
619
<hr/>The documentation for this class was generated from the following file:<ul>
620
<li>gtkmm/liststore.h</li>
623
<hr class="footer"/><address class="footer"><small>Generated on Mon May 9 2011 10:20:09 for gtkmm by 
624
<a href="http://www.doxygen.org/index.html">
625
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>