File: classGtk_1_1TreeModelColumnRecord.html

package info (click to toggle)
gtkmm2.4 1%3A2.24.2-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 76,100 kB
  • sloc: xml: 80,438; sh: 10,948; cpp: 8,005; perl: 236; makefile: 224
file content (193 lines) | stat: -rw-r--r-- 14,401 bytes parent folder | download
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
<!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.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&#160;<span id="projectnumber">2.24.2</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <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 id="navrow2" class="tabs2">
    <ul class="tablist">
      <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="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;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_1TreeModelColumnRecord.html">TreeModelColumnRecord</a> </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> </div>
  <div class="headertitle">
<h1>Gtk::TreeModelColumnRecord 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::TreeModelColumnRecord" -->
<p>Typedefed as <a class="el" href="classGtk_1_1TreeModel.html#a58f10daabaa507b4c2473c9d1b6fa584">TreeModel::ColumnRecord</a>. <a href="#_details">More...</a></p>
<div class="dynheader">
Inheritance diagram for Gtk::TreeModelColumnRecord:</div>
<div class="dyncontent">
<div class="center"><img src="classGtk_1_1TreeModelColumnRecord__inherit__graph.png" border="0" usemap="#Gtk_1_1TreeModelColumnRecord_inherit__map" alt="Inheritance graph"/></div>
<map name="Gtk_1_1TreeModelColumnRecord_inherit__map" id="Gtk_1_1TreeModelColumnRecord_inherit__map">
<area shape="rect" id="node3" href="classGtk_1_1ComboBoxEntryText_1_1TextModelColumns.html" title="Gtk::ComboBoxEntryText::TextModelColumns" alt="" coords="252,5,540,35"/><area shape="rect" id="node5" href="classGtk_1_1ComboBoxText_1_1TextModelColumns.html" title="Gtk::ComboBoxText::TextModelColumns" alt="" coords="267,58,525,89"/><area shape="rect" id="node7" href="classGtk_1_1ListViewText_1_1TextModelColumns.html" title="Gtk::ListViewText::TextModelColumns" alt="" coords="275,111,517,142"/></map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<div class="dynheader">
Collaboration diagram for Gtk::TreeModelColumnRecord:</div>
<div class="dyncontent">
<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" id="node2" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00902.html" title="std::vector\&lt; GType \&gt;" alt="" coords="29,187,176,218"/><area shape="rect" id="node6" doxygen="libstdc++.tag:http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/a00902.html" title="std::vector\&lt; _Tp, _Alloc \&gt;" alt="" coords="119,89,292,119"/></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 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">&#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 identifies that colu...">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>
<div class="textblock"><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 identifies that colu...">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>
</div><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>)</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 &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>)</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 identifies that colu...">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 identifies that colu...">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 class="footer"/><address class="footer"><small>Generated on Fri Jul 8 2011 13:31:49 for gtkmm by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>