<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>gtkmm: Gtk::ListStore Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.3 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">gtkmm <span id="projectnumber">2.24.4</span></div> </td> </tr> </tbody> </table> </div> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="classes.html"><span>Class Index</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceGtk.html">Gtk</a> </li> <li class="navelem"><a class="el" href="classGtk_1_1ListStore.html">ListStore</a> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#pub-static-methods">Static Public Member Functions</a> | <a href="#pro-methods">Protected Member Functions</a> | <a href="#related">Related Functions</a> </div> <div class="headertitle"> <h1>Gtk::ListStore Class Reference<div class="ingroups"><a class="el" href="group__TreeView.html">TreeView Classes</a></div></h1> </div> </div> <div class="contents"> <!-- doxytag: class="Gtk::ListStore" --><!-- doxytag: inherits="Glib::Object,Gtk::TreeModel,Gtk::TreeSortable,Gtk::TreeDragSource,Gtk::TreeDragDest" --> <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> <div class="dynheader"> Inheritance diagram for Gtk::ListStore:</div> <div class="dyncontent"> <div class="center"><img src="classGtk_1_1ListStore__inherit__graph.png" border="0" usemap="#Gtk_1_1ListStore_inherit__map" alt="Inheritance graph"/></div> <map name="Gtk_1_1ListStore_inherit__map" id="Gtk_1_1ListStore_inherit__map"> <area shape="rect" id="node2" href="../../../glibmm-2.4/reference/html/classGlib_1_1Object.html" title="Glib::Object" alt="" coords="5,160,99,189"/><area shape="rect" id="node4" href="../../../glibmm-2.4/reference/html/classGlib_1_1ObjectBase.html" title="Glib::ObjectBase" alt="" coords="109,83,235,112"/><area shape="rect" id="node10" href="../../../glibmm-2.4/reference/html/classGlib_1_1Interface.html" title="Glib::Interface" alt="" coords="181,160,291,189"/><area shape="rect" id="node6" href="../../../libsigc++-2.0/reference/html/structsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="115,5,229,35"/><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="32,237,147,267"/><area shape="rect" id="node13" href="classGtk_1_1TreeSortable.html" title="Gtk::TreeSortable" alt="" coords="171,237,301,267"/><area shape="rect" id="node16" href="classGtk_1_1TreeDragSource.html" title="Gtk::TreeDragSource" alt="" coords="325,237,480,267"/><area shape="rect" id="node19" href="classGtk_1_1TreeDragDest.html" title="Gtk::TreeDragDest" alt="" coords="504,237,643,267"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <div class="dynheader"> Collaboration diagram for Gtk::ListStore:</div> <div class="dyncontent"> <div class="center"><img src="classGtk_1_1ListStore__coll__graph.png" border="0" usemap="#Gtk_1_1ListStore_coll__map" alt="Collaboration graph"/></div> <map name="Gtk_1_1ListStore_coll__map" id="Gtk_1_1ListStore_coll__map"> <area shape="rect" id="node2" href="../../../glibmm-2.4/reference/html/classGlib_1_1Object.html" title="Glib::Object" alt="" coords="5,160,99,189"/><area shape="rect" id="node4" href="../../../glibmm-2.4/reference/html/classGlib_1_1ObjectBase.html" title="Glib::ObjectBase" alt="" coords="109,83,235,112"/><area shape="rect" id="node10" href="../../../glibmm-2.4/reference/html/classGlib_1_1Interface.html" title="Glib::Interface" alt="" coords="181,160,291,189"/><area shape="rect" id="node6" href="../../../libsigc++-2.0/reference/html/structsigc_1_1trackable.html" title="sigc::trackable" alt="" coords="115,5,229,35"/><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="32,237,147,267"/><area shape="rect" id="node13" href="classGtk_1_1TreeSortable.html" title="Gtk::TreeSortable" alt="" coords="171,237,301,267"/><area shape="rect" id="node16" href="classGtk_1_1TreeDragSource.html" title="Gtk::TreeDragSource" alt="" coords="325,237,480,267"/><area shape="rect" id="node19" href="classGtk_1_1TreeDragDest.html" title="Gtk::TreeDragDest" alt="" coords="504,237,643,267"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classGtk_1_1ListStore-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <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> <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> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a5086758716b9f34a5219b1387aebe59c"></a><br/></td></tr> <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> <tr><td class="mdescLeft"> </td><td class="mdescRight">Provides access to the underlying C GObject. <a href="#a8d0844616280900206a77aaec2c546d7"></a><br/></td></tr> <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> <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> <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> <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> <tr><td class="mdescLeft"> </td><td class="mdescRight">Removes the given row from the list store. <a href="#abf6e5cbe94951adc5b62120d9df1b562"></a><br/></td></tr> <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> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new row before the position. <a href="#ab71d860741465ea79bc352c4575e47ec"></a><br/></td></tr> <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> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new row after the position. <a href="#ab9032c9d9f620e10f32428e2358f44df"></a><br/></td></tr> <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> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new row at the start. <a href="#a1fd8146c61bae1a95b050e9126ea1928"></a><br/></td></tr> <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> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a new row at the end. <a href="#af47307c865cc5de0856fe3f8571fc681"></a><br/></td></tr> <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> <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> <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> <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> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1ListStore.html#a9f90bf171dda629135f4573ef9eaeef0">reorder</a> (const <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1ArrayHandle.html">Glib::ArrayHandle</a>< int >& new_order)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Reorders the list store to follow the order indicated by <em>new_order</em>. <a href="#a9f90bf171dda629135f4573ef9eaeef0"></a><br/></td></tr> <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> <tr><td class="mdescLeft"> </td><td class="mdescRight">Removes all rows from the list store. <a href="#a770bf1cc24ab0e02bdd96531107da603"></a><br/></td></tr> <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> <tr><td class="mdescLeft"> </td><td class="mdescRight"><warning>This function is slow. <a href="#ae307acf882557f319dc309963c07705a"></a><br/></td></tr> <tr><td colspan="2"><h2><a name="pub-static-methods"></a> Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" href="../../../glibmm-2.4/reference/html/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> <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> <tr><td colspan="2"><h2><a name="pro-methods"></a> Protected Member Functions</h2></td></tr> <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> <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> <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> <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" href="../../../glibmm-2.4/reference/html/classGlib_1_1ValueBase.html">Glib::ValueBase</a>&<a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01191.html#ga1c9e781d8d15a3814a601f471797c825">value</a>)</td></tr> <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> <tr><td colspan="2"><h2><a name="related"></a> Related Functions</h2></td></tr> <tr><td colspan="2">(Note that these are not member functions.) <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="../../../glibmm-2.4/reference/html/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> <tr><td class="mdescLeft"> </td><td class="mdescRight">A <a class="elRef" href="../../../glibmm-2.4/reference/html/namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. <a href="#ac9a0a0d9b34c33a9775ec4d89da2f0df"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <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> <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> </div><hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="a8c5efcf41ba5958337c69ec539f678df"></a><!-- doxytag: member="Gtk::ListStore::~ListStore" ref="a8c5efcf41ba5958337c69ec539f678df" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual Gtk::ListStore::~ListStore </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <a class="anchor" id="aab8cae9bc8193ce13e7b983092405d25"></a><!-- doxytag: member="Gtk::ListStore::ListStore" ref="aab8cae9bc8193ce13e7b983092405d25" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Gtk::ListStore::ListStore </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [protected]</code></td> </tr> </table> </div> <div class="memdoc"> <p>When using this constructor, you must use <a class="el" href="classGtk_1_1ListStore.html#a6abba5fb66c20f1bfcea79adff7aa321">set_column_types()</a> immediately afterwards. </p> <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> </div> </div> <a class="anchor" id="a6fdbba7946ad83842d61574697dddbc6"></a><!-- doxytag: member="Gtk::ListStore::ListStore" ref="a6fdbba7946ad83842d61574697dddbc6" args="(const TreeModelColumnRecord &columns)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">Gtk::ListStore::ListStore </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGtk_1_1TreeModelColumnRecord.html">TreeModelColumnRecord</a>& </td> <td class="paramname"><em>columns</em></td><td>)</td> <td><code> [explicit, protected]</code></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <hr/><h2>Member Function Documentation</h2> <a class="anchor" id="af47307c865cc5de0856fe3f8571fc681"></a><!-- doxytag: member="Gtk::ListStore::append" ref="af47307c865cc5de0856fe3f8571fc681" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGtk_1_1TreeIter.html">iterator</a> Gtk::ListStore::append </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Creates a new row at the end. </p> <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> <dl class="return"><dt><b>Returns:</b></dt><dd>An iterator to the new row. </dd></dl> </div> </div> <a class="anchor" id="a770bf1cc24ab0e02bdd96531107da603"></a><!-- doxytag: member="Gtk::ListStore::clear" ref="a770bf1cc24ab0e02bdd96531107da603" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gtk::ListStore::clear </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Removes all rows from the list store. </p> </div> </div> <a class="anchor" id="aaa6c530560f66872482a0650739276c5"></a><!-- doxytag: member="Gtk::ListStore::create" ref="aaa6c530560f66872482a0650739276c5" args="(const TreeModelColumnRecord &columns)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr</a><<a class="el" href="classGtk_1_1ListStore.html">ListStore</a>> Gtk::ListStore::create </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGtk_1_1TreeModelColumnRecord.html">TreeModelColumnRecord</a>& </td> <td class="paramname"><em>columns</em></td><td>)</td> <td><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <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> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">columns</td><td>The column types for this tree model. </td></tr> </table> </dd> </dl> <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> </div> </div> <a class="anchor" id="abf6e5cbe94951adc5b62120d9df1b562"></a><!-- doxytag: member="Gtk::ListStore::erase" ref="abf6e5cbe94951adc5b62120d9df1b562" args="(const iterator &iter)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGtk_1_1TreeIter.html">iterator</a> Gtk::ListStore::erase </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& </td> <td class="paramname"><em>iter</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Removes the given row from the list store. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">iter</td><td>The iterator to the row to be removed. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>An iterator to the next row, or <a class="elRef" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a01176.html#ga9390a942ee3787d3c444ebeb276d872f">end()</a> if there is none. </dd></dl> </div> </div> <a class="anchor" id="a8d0844616280900206a77aaec2c546d7"></a><!-- doxytag: member="Gtk::ListStore::gobj" ref="a8d0844616280900206a77aaec2c546d7" args="() const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const GtkListStore* Gtk::ListStore::gobj </td> <td>(</td> <td class="paramname"></td><td>)</td> <td> const<code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C GObject. </p> <p>Reimplemented from <a class="el" href="classGtk_1_1TreeDragDest.html#ad1b553d8d973304da419ffcafa679482">Gtk::TreeDragDest</a>.</p> </div> </div> <a class="anchor" id="a5086758716b9f34a5219b1387aebe59c"></a><!-- doxytag: member="Gtk::ListStore::gobj" ref="a5086758716b9f34a5219b1387aebe59c" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GtkListStore* Gtk::ListStore::gobj </td> <td>(</td> <td class="paramname"></td><td>)</td> <td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C GObject. </p> <p>Reimplemented from <a class="el" href="classGtk_1_1TreeDragDest.html#a32d7775ca642898c25273907634a28b9">Gtk::TreeDragDest</a>.</p> </div> </div> <a class="anchor" id="aabc577b9267750688417879a066d49b8"></a><!-- doxytag: member="Gtk::ListStore::gobj_copy" ref="aabc577b9267750688417879a066d49b8" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">GtkListStore* Gtk::ListStore::gobj_copy </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. </p> </div> </div> <a class="anchor" id="ab71d860741465ea79bc352c4575e47ec"></a><!-- doxytag: member="Gtk::ListStore::insert" ref="ab71d860741465ea79bc352c4575e47ec" args="(const iterator &iter)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGtk_1_1TreeIter.html">iterator</a> Gtk::ListStore::insert </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& </td> <td class="paramname"><em>iter</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Creates a new row before the position. </p> <p>If iter is <a class="elRef" 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> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">iter</td><td>An iterator to the row before which the new row will be inserted. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>An iterator to the new row. </dd></dl> </div> </div> <a class="anchor" id="ab9032c9d9f620e10f32428e2358f44df"></a><!-- doxytag: member="Gtk::ListStore::insert_after" ref="ab9032c9d9f620e10f32428e2358f44df" args="(const iterator &iter)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGtk_1_1TreeIter.html">iterator</a> Gtk::ListStore::insert_after </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& </td> <td class="paramname"><em>iter</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Creates a new row after the position. </p> <p>If iter is <a class="elRef" 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> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">iter</td><td>An iterator to the row after which the new row will be inserted. </td></tr> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>An iterator to the new row. </dd></dl> </div> </div> <a class="anchor" id="ae307acf882557f319dc309963c07705a"></a><!-- doxytag: member="Gtk::ListStore::iter_is_valid" ref="ae307acf882557f319dc309963c07705a" args="(const iterator &iter) const " --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool Gtk::ListStore::iter_is_valid </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& </td> <td class="paramname"><em>iter</em></td><td>)</td> <td> const<code> [virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <p><warning>This function is slow. </p> <p>Only use it for debugging and/or testing purposes.</warning></p> <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> <dl class="since_2_2"><dt><b><a class="el" href="since_2_2.html#_since_2_2000098">Since gtkmm 2.2:</a></b></dt><dd></dd></dl> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <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> </table> </dd> </dl> <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> <p>Reimplemented from <a class="el" href="classGtk_1_1TreeModel.html#aa5c6526633d0fa8a78fd3d14d1fbd6cf">Gtk::TreeModel</a>.</p> </div> </div> <a class="anchor" id="a2f3617442cd5b52db485f4dc31f91da9"></a><!-- doxytag: member="Gtk::ListStore::iter_swap" ref="a2f3617442cd5b52db485f4dc31f91da9" args="(const iterator &a, const iterator &b)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gtk::ListStore::iter_swap </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& </td> <td class="paramname"><em>a</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& </td> <td class="paramname"><em>b</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Swaps <em>a</em> and <em>b</em> in <em>store</em>. </p> <p>Note that this function only works with unsorted stores.</p> <dl class="since_2_2"><dt><b><a class="el" href="since_2_2.html#_since_2_2000097">Since gtkmm 2.2:</a></b></dt><dd></dd></dl> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <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> <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> </table> </dd> </dl> </div> </div> <a class="anchor" id="acc5515fbabf7826d6d3a0e15ca81d2b9"></a><!-- doxytag: member="Gtk::ListStore::move" ref="acc5515fbabf7826d6d3a0e15ca81d2b9" args="(const iterator &source, const iterator &destination)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gtk::ListStore::move </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& </td> <td class="paramname"><em>source</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& </td> <td class="paramname"><em>destination</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Moves <em>source</em> to the position at <em>destination</em>. </p> <p>Note that this function only works with unsorted stores. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">source</td><td>The row that should be moved. </td></tr> <tr><td class="paramname">destination</td><td>The position to move to. </td></tr> </table> </dd> </dl> </div> </div> <a class="anchor" id="a1fd8146c61bae1a95b050e9126ea1928"></a><!-- doxytag: member="Gtk::ListStore::prepend" ref="a1fd8146c61bae1a95b050e9126ea1928" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classGtk_1_1TreeIter.html">iterator</a> Gtk::ListStore::prepend </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Creates a new row at the start. </p> <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> <dl class="return"><dt><b>Returns:</b></dt><dd>An iterator to the new row. </dd></dl> </div> </div> <a class="anchor" id="a9f90bf171dda629135f4573ef9eaeef0"></a><!-- doxytag: member="Gtk::ListStore::reorder" ref="a9f90bf171dda629135f4573ef9eaeef0" args="(const Glib::ArrayHandle< int > &new_order)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gtk::ListStore::reorder </td> <td>(</td> <td class="paramtype">const <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1ArrayHandle.html">Glib::ArrayHandle</a>< int > & </td> <td class="paramname"><em>new_order</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Reorders the list store to follow the order indicated by <em>new_order</em>. </p> <p>Note that this function only works with unsorted stores. </p> </div> </div> <a class="anchor" id="a6abba5fb66c20f1bfcea79adff7aa321"></a><!-- doxytag: member="Gtk::ListStore::set_column_types" ref="a6abba5fb66c20f1bfcea79adff7aa321" args="(const TreeModelColumnRecord &columns)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void Gtk::ListStore::set_column_types </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGtk_1_1TreeModelColumnRecord.html">TreeModelColumnRecord</a>& </td> <td class="paramname"><em>columns</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> </div> </div> <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)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">virtual void Gtk::ListStore::set_value_impl </td> <td>(</td> <td class="paramtype">const <a class="el" href="classGtk_1_1TreeIter.html">iterator</a>& </td> <td class="paramname"><em>row</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"><em>column</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1ValueBase.html">Glib::ValueBase</a> & </td> <td class="paramname"><em>value</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [protected, virtual]</code></td> </tr> </table> </div> <div class="memdoc"> <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> <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> <p>Reimplemented from <a class="el" href="classGtk_1_1TreeModel.html#a26cf070eadb8e242bcf2b57f7e6d7d9e">Gtk::TreeModel</a>.</p> </div> </div> <hr/><h2>Friends And Related Function Documentation</h2> <a class="anchor" id="ac9a0a0d9b34c33a9775ec4d89da2f0df"></a><!-- doxytag: member="Gtk::ListStore::wrap" ref="ac9a0a0d9b34c33a9775ec4d89da2f0df" args="(GtkListStore *object, bool take_copy=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="elRef" href="../../../glibmm-2.4/reference/html/classGlib_1_1RefPtr.html">Glib::RefPtr</a>< <a class="el" href="classGtk_1_1ListStore.html">Gtk::ListStore</a> > wrap </td> <td>(</td> <td class="paramtype">GtkListStore * </td> <td class="paramname"><em>object</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"><em>take_copy</em> = <code>false</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [related]</code></td> </tr> </table> </div> <div class="memdoc"> <p>A <a class="elRef" href="../../../glibmm-2.4/reference/html/namespaceGlib.html#a671306f4a3a0cae5ab4d7a9d54886592">Glib::wrap()</a> method for this object. </p> <dl><dt><b>Parameters:</b></dt><dd> <table class="params"> <tr><td class="paramname">object</td><td>The C instance. </td></tr> <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> </table> </dd> </dl> <dl class="return"><dt><b>Returns:</b></dt><dd>A C++ instance that wraps this C instance. </dd></dl> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>gtkmm/liststore.h</li> </ul> </div> <hr class="footer"/><address class="footer"><small>Generated on Tue Jun 25 2013 for gtkmm by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address> </body> </html>