1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174
|
<!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 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 class="tabs">
<ul>
<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="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class 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" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00716.html" title="std::vector\< GType \>" alt="" coords="31,181,175,211"/><area shape="rect" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00716.html" title="std::vector\< _Tp, _Alloc \>" 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"> </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 </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 </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>& column)</td></tr>
<tr><td class="mdescLeft"> </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 </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* </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<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" title="A Gtk::TreeModelColumn describes the C++ type of the data in a model column, and...">Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf></a> > 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 & 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> ) </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> ) </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 &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>& </td>
<td class="paramname"> <em>column</em></td>
<td> ) </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> ) </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> ) </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 
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
</body>
</html>
|