<!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>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> <a href="group__Widgets.html">Widgets</a> <a class="qindex" href="namespaces.html"> Namespaces</a> <a href="../../tutorial/html/index.html"> Book</a> </center> <hr width="100%"/> <!-- Generated by Doxygen 1.3-rc1 --> <h1>Gtk::TreeModelColumnRecord Class Reference<br> <small> [<a class="el" href="group__TreeView.html">TreeView Classes</a>]</small> </h1>Typedefed as <a class="el" href="classGtk_1_1TreeModel.html#s0">TreeModel::ColumnRecord</a>. <a href="#_details">More...</a> <p> <a href="classGtk_1_1TreeModelColumnRecord-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> <tr><td></td></tr> <tr><td colspan=2><br><h2>Public Methods</h2></td></tr> <tr><td nowrap align=right valign=top> </td><td valign=bottom><a class="el" href="classGtk_1_1TreeModelColumnRecord.html#a0">TreeModelColumnRecord</a> ()</td></tr> <tr><td nowrap align=right valign=top>virtual </td><td valign=bottom><a class="el" href="classGtk_1_1TreeModelColumnRecord.html#a1">~TreeModelColumnRecord</a> ()</td></tr> <tr><td nowrap align=right valign=top>void </td><td valign=bottom><a class="el" href="classGtk_1_1TreeModelColumnRecord.html#a2">add</a> (<a class="el" href="classGtk_1_1TreeModelColumnBase.html">TreeModelColumnBase</a>& column)</td></tr> <tr><td> </td><td><font size=-1><em>Adds a <a class="el" href="classGtk_1_1TreeModelColumn.html">TreeModelColumn</a> to this record.</em> <a href="#a2"></a><em></em></font><br><br></td></tr> <tr><td nowrap align=right valign=top>unsigned int </td><td valign=bottom><a class="el" href="classGtk_1_1TreeModelColumnRecord.html#a3">size</a> () const</td></tr> <tr><td nowrap align=right valign=top>const GType* </td><td valign=bottom><a class="el" href="classGtk_1_1TreeModelColumnRecord.html#a4">types</a> () const</td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Typedefed as <a class="el" href="classGtk_1_1TreeModel.html#s0">TreeModel::ColumnRecord</a>. <p> Keeps a record of <a class="el" href="classGtk_1_1TreeModelColumn.html">TreeModelColumns</a>. ColumnRecord objects are used to setup a new <a class="el" href="classGtk_1_1TreeModel.html">TreeModel</a> (or rather, an implementation of the model, like <a class="el" href="classGtk_1_1ListStore.html">Gtk::ListStore</a> or Gtk::TreeStore). It is convenient to do that by deriving from TreeModel::ColumnRecord: <div class="fragment"><pre> <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<Glib::ustring></a> filename; <a class="code" href="classGtk_1_1TreeModelColumn.html">Gtk::TreeModelColumn<Glib::ustring></a> description; <a class="code" href="classGtk_1_1TreeModelColumn.html">Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf></a> > thumbnail; MyModelColumns() { <a class="code" href="classGtk_1_1TreeModelColumnRecord.html#a2">add</a>(filename); <a class="code" href="classGtk_1_1TreeModelColumnRecord.html#a2">add</a>(description); <a class="code" href="classGtk_1_1TreeModelColumnRecord.html#a2">add</a>(thumbnail); } }; </pre></div>An instance of <code>MyModelColumns</code> should be passed to <a class="el" href="classGtk_1_1ListStore.html#d0">ListStore::create()</a> or <a class="el" href="classGtk_1_1TreeStore.html#d0">TreeStore::create()</a>. 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#a0">Gtk::TreeRow::operator[]()</a> to specify the column you're interested in. <p> Neither <a class="el" href="classGtk_1_1TreeModel.html#s0">TreeModel::ColumnRecord</a> nor the <a class="el" href="classGtk_1_1TreeModelColumn.html">TreeModelColumns</a> contain any real data -- it's merely a description of what type is stored in which column of a <a class="el" href="classGtk_1_1TreeModel.html">TreeModel</a>. Thus it's absolutely legal to use a statically allocated <a class="el" href="classGtk_1_1TreeModel.html#s0">TreeModel::ColumnRecord</a> (as long as you make sure it's instantiated after Gtk::Main), even when creating multiple models from it. <p> <hr><h2>Constructor & Destructor Documentation</h2> <a name="a0" doxytag="Gtk::TreeModelColumnRecord::TreeModelColumnRecord"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> Gtk::TreeModelColumnRecord::TreeModelColumnRecord </td> <td class="md" valign="top">(</td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="a1" doxytag="Gtk::TreeModelColumnRecord::~TreeModelColumnRecord"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> virtual Gtk::TreeModelColumnRecord::~TreeModelColumnRecord </td> <td class="md" valign="top">(</td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap><code> [virtual]</code></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <hr><h2>Member Function Documentation</h2> <a name="a2" doxytag="Gtk::TreeModelColumnRecord::add"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> void Gtk::TreeModelColumnRecord::add </td> <td class="md" valign="top">(</td> <td class="md" nowrap valign="top"><a class="el" href="classGtk_1_1TreeModelColumnBase.html">TreeModelColumnBase</a>& </td> <td class="mdname1" valign="top" nowrap> <em>column</em> </td> <td class="md" valign="top">) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <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#a2">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. </td> </tr> </table> <a name="a3" doxytag="Gtk::TreeModelColumnRecord::size"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> unsigned int Gtk::TreeModelColumnRecord::size </td> <td class="md" valign="top">(</td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <a name="a4" doxytag="Gtk::TreeModelColumnRecord::types"></a><p> <table width="100%" cellpadding="2" cellspacing="0" border="0"> <tr> <td class="md"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top"> const GType* Gtk::TreeModelColumnRecord::types </td> <td class="md" valign="top">(</td> <td class="mdname1" valign="top" nowrap> </td> <td class="md" valign="top">) </td> <td class="md" nowrap> const</td> </tr> </table> </td> </tr> </table> <table cellspacing=5 cellpadding=0 border=0> <tr> <td> </td> <td> <p> </td> </tr> </table> <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> <hr><address><small> Generated for gtkmm by <a href="http://www.doxygen.org/index.html"> Doxygen</a> 1.3-rc1 © 1997-2001</small></address> </body> </html>