Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > main-release > by-pkgid > 22e237efd6851989a23adf3360bb53d0 > files > 774

gtkmm2.4-doc-2.20.3-1mdv2010.1.x86_64.rpm

<!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::TreeModelColumnRecord 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.6.1 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;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 class="tabs">
    <ul>
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="namespaceGtk.html">Gtk</a>::<a class="el" href="classGtk_1_1TreeModelColumnRecord.html">TreeModelColumnRecord</a>
  </div>
</div>
<div class="contents">
<h1>Gtk::TreeModelColumnRecord Class Reference<br/>
<small>
[<a class="el" href="group__TreeView.html">TreeView Classes</a>]</small>
</h1><!-- doxytag: class="Gtk::TreeModelColumnRecord" -->
<p>Typedefed as <a class="el" href="classGtk_1_1TreeModel.html#a58f10daabaa507b4c2473c9d1b6fa584">TreeModel::ColumnRecord</a>. <a href="#_details">More...</a></p>

<p>Inherited by <a class="el" href="classGtk_1_1ComboBoxEntryText_1_1TextModelColumns.html">Gtk::ComboBoxEntryText::TextModelColumns</a>, <a class="el" href="classGtk_1_1ComboBoxText_1_1TextModelColumns.html">Gtk::ComboBoxText::TextModelColumns</a>, and <a class="el" href="classGtk_1_1ListViewText_1_1TextModelColumns.html">Gtk::ListViewText::TextModelColumns</a>.</p>
<div class="dynheader">
Collaboration diagram for Gtk::TreeModelColumnRecord:</div>
<div class="dynsection">
<div class="center"><img src="classGtk_1_1TreeModelColumnRecord__coll__graph.png" border="0" usemap="#Gtk_1_1TreeModelColumnRecord_coll__map" alt="Collaboration graph"/></div>
<map name="Gtk_1_1TreeModelColumnRecord_coll__map" id="Gtk_1_1TreeModelColumnRecord_coll__map">
<area shape="rect" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00716.html" title="std::vector\&lt; GType \&gt;" alt="" coords="31,181,175,211"/><area shape="rect" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00716.html" title="std::vector\&lt; _Tp, _Alloc \&gt;" alt="" coords="119,85,292,115"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>

<p><a href="classGtk_1_1TreeModelColumnRecord-members.html">List of all members.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1TreeModelColumnRecord.html#af0c1c552400694ad0d7e5695f8868d78">TreeModelColumnRecord</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1TreeModelColumnRecord.html#a3ebe61558fecbcf761ee01f5ec8c0312">~TreeModelColumnRecord</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1TreeModelColumnRecord.html#a7084fc10fa1abf0d7317558b8462559f">add</a> (<a class="el" href="classGtk_1_1TreeModelColumnBase.html">TreeModelColumnBase</a>&amp; column)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a <a class="el" href="classGtk_1_1TreeModelColumn.html" title="A Gtk::TreeModelColumn describes the C++ type of the data in a model column, and...">TreeModelColumn</a> to this record. <a href="#a7084fc10fa1abf0d7317558b8462559f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1TreeModelColumnRecord.html#a024f6f44405b1f1c61a7e85d41dafe7d">size</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const GType*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1TreeModelColumnRecord.html#af56c98a2bce96003a281b4cd831f1139">types</a> () const </td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>Typedefed as <a class="el" href="classGtk_1_1TreeModel.html#a58f10daabaa507b4c2473c9d1b6fa584">TreeModel::ColumnRecord</a>. </p>
<p>Keeps a record of <a class="el" href="classGtk_1_1TreeModelColumn.html">TreeModelColumns</a>.</p>
<p>ColumnRecord objects are used to setup a new instance of a <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> (or rather, a new instance of an implementation of the model, such as <a class="el" href="classGtk_1_1ListStore.html" title="Thist is a list model for use with a Gtk::TreeView widget.">Gtk::ListStore</a> or <a class="el" href="classGtk_1_1TreeStore.html">Gtk::TreeStore</a>). It is convenient to do that by deriving from <a class="el" href="classGtk_1_1TreeModel.html#a58f10daabaa507b4c2473c9d1b6fa584">TreeModel::ColumnRecord</a>: </p>
<div class="fragment"><pre class="fragment"> <span class="keyword">class </span>MyModelColumns : <span class="keyword">public</span> Gtk::TreeModel::ColumnRecord
 {
 <span class="keyword">public</span>:
   <a class="code" href="classGtk_1_1TreeModelColumn.html">Gtk::TreeModelColumn&lt;Glib::ustring&gt;</a> filename;
   <a class="code" href="classGtk_1_1TreeModelColumn.html">Gtk::TreeModelColumn&lt;Glib::ustring&gt;</a> description;
   <a class="code" href="classGtk_1_1TreeModelColumn.html" title="A Gtk::TreeModelColumn describes the C++ type of the data in a model column, and...">Gtk::TreeModelColumn&lt; Glib::RefPtr&lt;Gdk::Pixbuf&gt;</a> &gt; thumbnail;

   MyModelColumns() { <a class="code" href="classGtk_1_1TreeModelColumnRecord.html#a7084fc10fa1abf0d7317558b8462559f" title="Adds a TreeModelColumn to this record.">add</a>(filename); <a class="code" href="classGtk_1_1TreeModelColumnRecord.html#a7084fc10fa1abf0d7317558b8462559f" title="Adds a TreeModelColumn to this record.">add</a>(description); <a class="code" href="classGtk_1_1TreeModelColumnRecord.html#a7084fc10fa1abf0d7317558b8462559f" title="Adds a TreeModelColumn to this record.">add</a>(thumbnail); }
 };
</pre></div><p>Whether or not you derive your own ColumnRecord, you need to add the <a class="el" href="classGtk_1_1TreeModelColumn.html">TreeModelColumns</a> to the ColumnRecord with the <a class="el" href="classGtk_1_1TreeModelColumnRecord.html#a7084fc10fa1abf0d7317558b8462559f" title="Adds a TreeModelColumn to this record.">add()</a> method.</p>
<p>A ColumnRecord instance, such as an instance of <code>MyModelColumns</code> should then be passed to <a class="el" href="classGtk_1_1ListStore.html#aaa6c530560f66872482a0650739276c5" title="Instantiate a new ListStore.">ListStore::create()</a> or <a class="el" href="classGtk_1_1TreeStore.html#a65fc563bfbef2f1a31028cd33ff228c0" title="Instantiate a new TreeStore.">TreeStore::create()</a>. The <a class="el" href="classGtk_1_1TreeModelColumn.html">TreeModelColumns</a>, such as the members <code>filename</code>, <code>description</code> and <code>thumbnail</code> can then be used with <a class="el" href="classGtk_1_1TreeRow.html#ad1880375e2c3b45a6ba69b225dd7f6a4" title="Use this to set and get the value of this column of this row.">Gtk::TreeRow::operator[]()</a> to specify the column you're interested in.</p>
<p>Neither <a class="el" href="classGtk_1_1TreeModel.html#a58f10daabaa507b4c2473c9d1b6fa584">TreeModel::ColumnRecord</a> nor the <a class="el" href="classGtk_1_1TreeModelColumn.html">TreeModelColumns</a> contain any real data -- they merely describe what C++ type is stored in which column of a <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>, and save you from having to repeat that type information in several places.</p>
<p>Thus <a class="el" href="classGtk_1_1TreeModel.html#a58f10daabaa507b4c2473c9d1b6fa584">TreeModel::ColumnRecord</a> can be made a singleton (as long as you make sure it's instantiated after <a class="el" href="classGtk_1_1Main.html" title="Main application class Every application must have one of these objects.">Gtk::Main</a>), even when creating multiple models from it. </p>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="af0c1c552400694ad0d7e5695f8868d78"></a><!-- doxytag: member="Gtk::TreeModelColumnRecord::TreeModelColumnRecord" ref="af0c1c552400694ad0d7e5695f8868d78" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Gtk::TreeModelColumnRecord::TreeModelColumnRecord </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a3ebe61558fecbcf761ee01f5ec8c0312"></a><!-- doxytag: member="Gtk::TreeModelColumnRecord::~TreeModelColumnRecord" ref="a3ebe61558fecbcf761ee01f5ec8c0312" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual Gtk::TreeModelColumnRecord::~TreeModelColumnRecord </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a7084fc10fa1abf0d7317558b8462559f"></a><!-- doxytag: member="Gtk::TreeModelColumnRecord::add" ref="a7084fc10fa1abf0d7317558b8462559f" args="(TreeModelColumnBase &amp;column)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Gtk::TreeModelColumnRecord::add </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classGtk_1_1TreeModelColumnBase.html">TreeModelColumnBase</a>&amp;&#160;</td>
          <td class="paramname"> <em>column</em></td>
          <td>&#160;)&#160;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Adds a <a class="el" href="classGtk_1_1TreeModelColumn.html" title="A Gtk::TreeModelColumn describes the C++ type of the data in a model column, and...">TreeModelColumn</a> to this record. </p>
<p><a class="el" href="classGtk_1_1TreeModelColumnRecord.html#a7084fc10fa1abf0d7317558b8462559f" title="Adds a TreeModelColumn to this record.">add()</a> not only registers the <em>column</em>, but also assigns a column index to it. Once registered, the <a class="el" href="classGtk_1_1TreeModelColumn.html" title="A Gtk::TreeModelColumn describes the C++ type of the data in a model column, and...">TreeModelColumn</a> is final, and you're free to pass it around by value. </p>

</div>
</div>
<a class="anchor" id="a024f6f44405b1f1c61a7e85d41dafe7d"></a><!-- doxytag: member="Gtk::TreeModelColumnRecord::size" ref="a024f6f44405b1f1c61a7e85d41dafe7d" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">unsigned int Gtk::TreeModelColumnRecord::size </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="af56c98a2bce96003a281b4cd831f1139"></a><!-- doxytag: member="Gtk::TreeModelColumnRecord::types" ref="af56c98a2bce96003a281b4cd831f1139" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const GType* Gtk::TreeModelColumnRecord::types </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&#160;)&#160;</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>gtkmm/treemodelcolumn.h</li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated on Tue May 4 13:22:11 2010 for gtkmm by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>