Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > 9411cff4bc6d4e61b29ae81cd24665af > files > 785

gtkmm2.4-doc-2.12.7-1mdv2008.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>gtkmm 2.4: Gtk::TreeModelColumnRecord Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#ffffff">
<table border="0" width="100%">
<tr>
    <td width="10%" height="40"><img src="../../images/gtkmm_logo.gif" alt="logo" border="0" width="100%" height="100%"/></td>
    <td width="90%" height="40"><img src="../../images/top.gif" alt="top" width="100%" height="40"/></td>
</tr>
</table>
<center>
  <a class="qindex" href="../../index.html">Main Page</a> &nbsp;
  <a href="group__Widgets.html">Widgets</a> &nbsp;
  <a class="qindex" href="namespaces.html"> Namespaces</a> &nbsp;
  <a href="../../tutorial/html/index.html"> Book</a> &nbsp;
</center>
<hr width="100%"/>
<!-- begin main content -->
<div id="content">
<!-- Generated by Doxygen 1.5.1 -->
<div class="nav">
<a class="el" href="namespaceGtk.html">Gtk</a>::<a class="el" href="classGtk_1_1TreeModelColumnRecord.html">TreeModelColumnRecord</a></div>
<h1>Gtk::TreeModelColumnRecord Class Reference<br>
<small>
[<a class="el" href="group__TreeView.html">TreeView Classes</a>]</small>
</h1><!-- doxytag: class="Gtk::TreeModelColumnRecord" -->Inheritance diagram for Gtk::TreeModelColumnRecord:<p><center><img src="classGtk_1_1TreeModelColumnRecord__inherit__graph.png" border="0" usemap="#Gtk_1_1TreeModelColumnRecord__inherit__map" alt="Inheritance graph"></center>
<map name="Gtk_1_1TreeModelColumnRecord__inherit__map">
<area href="classGtk_1_1ComboBoxEntryText_1_1TextModelColumns.html" shape="rect" coords="5,84,312,110" alt="">
<area href="classGtk_1_1ComboBoxText_1_1TextModelColumns.html" shape="rect" coords="336,84,611,110" alt="">
<area href="classGtk_1_1ListViewText_1_1TextModelColumns.html" shape="rect" coords="635,84,891,110" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classGtk_1_1TreeModelColumnRecord-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
Typedefed as <a class="el" href="classGtk_1_1TreeModel.html#58f10daabaa507b4c2473c9d1b6fa584">TreeModel::ColumnRecord</a>. 
<p>
Keeps a record of <a class="el" href="classGtk_1_1TreeModelColumn.html">TreeModelColumns</a>.<p>
ColumnRecord objects are used to setup a new instance of a <a class="el" href="classGtk_1_1TreeModel.html">TreeModel</a> (or rather, a new instance of an implementation of the model, such as <a class="el" href="classGtk_1_1ListStore.html">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#58f10daabaa507b4c2473c9d1b6fa584">TreeModel::ColumnRecord</a>: <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">Gtk::TreeModelColumn&lt; Glib::RefPtr&lt;Gdk::Pixbuf&gt;</a> &gt;  thumbnail;

   MyModelColumns() { <a class="code" href="classGtk_1_1TreeModelColumnRecord.html#7084fc10fa1abf0d7317558b8462559f">add</a>(filename); <a class="code" href="classGtk_1_1TreeModelColumnRecord.html#7084fc10fa1abf0d7317558b8462559f">add</a>(description); <a class="code" href="classGtk_1_1TreeModelColumnRecord.html#7084fc10fa1abf0d7317558b8462559f">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#7084fc10fa1abf0d7317558b8462559f">add()</a> method.<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#aa6c530560f66872482a0650739276c5">ListStore::create()</a> or <a class="el" href="classGtk_1_1TreeStore.html#65fc563bfbef2f1a31028cd33ff228c0">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#dbb3433651455b7ecf0a07b7012ecf17">Gtk::TreeRow::operator[]()</a> to specify the column you're interested in.<p>
Neither <a class="el" href="classGtk_1_1TreeModel.html#58f10daabaa507b4c2473c9d1b6fa584">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">TreeModel</a>, and save you from having to repeat that type information in several places.<p>
Thus you may use a statically allocated <a class="el" href="classGtk_1_1TreeModel.html#58f10daabaa507b4c2473c9d1b6fa584">TreeModel::ColumnRecord</a> (as long as you make sure it's instantiated after <a class="el" href="classGtk_1_1Main.html">Gtk::Main</a>), even when creating multiple models from it. However, it is very difficult to specify the sequence of allocation of static objects, so this should probably be avoided. 
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1TreeModelColumnRecord.html#7084fc10fa1abf0d7317558b8462559f">add</a> (<a class="el" href="classGtk_1_1TreeModelColumnBase.html">TreeModelColumnBase</a>&amp; column)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Adds a <a class="el" href="classGtk_1_1TreeModelColumn.html">TreeModelColumn</a> to this record.  <a href="#7084fc10fa1abf0d7317558b8462559f"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">unsigned int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1TreeModelColumnRecord.html#68a155c4f306f46985e8ac96f73cb5be">size</a> () const</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1TreeModelColumnRecord.html#f0c1c552400694ad0d7e5695f8868d78">TreeModelColumnRecord</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">const GType*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1TreeModelColumnRecord.html#b91e162d1826310baeed8859fe3148ff">types</a> () const</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classGtk_1_1TreeModelColumnRecord.html#3ebe61558fecbcf761ee01f5ec8c0312">~TreeModelColumnRecord</a> ()</td></tr>

</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="f0c1c552400694ad0d7e5695f8868d78"></a><!-- doxytag: member="Gtk::TreeModelColumnRecord::TreeModelColumnRecord" ref="f0c1c552400694ad0d7e5695f8868d78" 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>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="3ebe61558fecbcf761ee01f5ec8c0312"></a><!-- doxytag: member="Gtk::TreeModelColumnRecord::~TreeModelColumnRecord" ref="3ebe61558fecbcf761ee01f5ec8c0312" 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>&nbsp;)&nbsp;</td>
          <td width="100%"><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="7084fc10fa1abf0d7317558b8462559f"></a><!-- doxytag: member="Gtk::TreeModelColumnRecord::add" ref="7084fc10fa1abf0d7317558b8462559f" 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;&nbsp;</td>
          <td class="paramname"> <em>column</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Adds a <a class="el" href="classGtk_1_1TreeModelColumn.html">TreeModelColumn</a> to this record. 
<p>
<a class="el" href="classGtk_1_1TreeModelColumnRecord.html#7084fc10fa1abf0d7317558b8462559f">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">TreeModelColumn</a> is final, and you're free to pass it around by value. 
</div>
</div><p>
<a class="anchor" name="68a155c4f306f46985e8ac96f73cb5be"></a><!-- doxytag: member="Gtk::TreeModelColumnRecord::size" ref="68a155c4f306f46985e8ac96f73cb5be" 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>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<a class="anchor" name="b91e162d1826310baeed8859fe3148ff"></a><!-- doxytag: member="Gtk::TreeModelColumnRecord::types" ref="b91e162d1826310baeed8859fe3148ff" 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>&nbsp;)&nbsp;</td>
          <td width="100%"> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="treemodelcolumn_8h.html">treemodelcolumn.h</a></ul>
</div>
<!-- end main content -->

<hr><address><small>
Generated for gtkmm 2.4 by <a href="http://www.doxygen.org/index.html">
Doxygen</a> 1.5.1 &copy;&nbsp;1997-2001</small></address>
</body>
</html>