📄 gtkcelllayout.html
字号:
<div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cell_layout</code></em> :</span></p></td><td> A <a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cell</code></em> :</span></p></td><td> A <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a> to reorder.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>position</code></em> :</span></p></td><td> New position to insert <em class="parameter"><code>cell</code></em> at.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3816922"></a><h3><a name="gtk-cell-layout-clear"></a>gtk_cell_layout_clear ()</h3><a class="indexterm" name="id3816937"></a><pre class="programlisting">void gtk_cell_layout_clear (<a class="link" href="GtkCellLayout.html" title="GtkCellLayout">GtkCellLayout</a> *cell_layout);</pre><p>Unsets all the mappings on all renderers on <em class="parameter"><code>cell_layout</code></em> andremoves all renderers from <em class="parameter"><code>cell_layout</code></em>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cell_layout</code></em> :</span></p></td><td> A <a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a>.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3817015"></a><h3><a name="gtk-cell-layout-set-attributes"></a>gtk_cell_layout_set_attributes ()</h3><a class="indexterm" name="id3817031"></a><pre class="programlisting">void gtk_cell_layout_set_attributes (<a class="link" href="GtkCellLayout.html" title="GtkCellLayout">GtkCellLayout</a> *cell_layout, <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer">GtkCellRenderer</a> *cell, ...);</pre><p>Sets the attributes in list as the attributes of <em class="parameter"><code>cell_layout</code></em>. Theattributes should be in attribute/column order, as in<a class="link" href="GtkCellLayout.html#gtk-cell-layout-add-attribute"><code class="function">gtk_cell_layout_add_attribute()</code></a>. All existing attributes are removed, andreplaced with the new attributes.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cell_layout</code></em> :</span></p></td><td> A <a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cell</code></em> :</span></p></td><td> A <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>...</code></em> :</span></p></td><td> A <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>-terminated list of attributes.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3817171"></a><h3><a name="gtk-cell-layout-add-attribute"></a>gtk_cell_layout_add_attribute ()</h3><a class="indexterm" name="id3817187"></a><pre class="programlisting">void gtk_cell_layout_add_attribute (<a class="link" href="GtkCellLayout.html" title="GtkCellLayout">GtkCellLayout</a> *cell_layout, <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer">GtkCellRenderer</a> *cell, const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *attribute, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> column);</pre><p>Adds an attribute mapping to the list in <em class="parameter"><code>cell_layout</code></em>. The <em class="parameter"><code>column</code></em> is thecolumn of the model to get a value from, and the <em class="parameter"><code>attribute</code></em> is theparameter on <em class="parameter"><code>cell</code></em> to be set from the value. So for example if column 2of the model contains strings, you could have the "text" attribute of a<a class="link" href="GtkCellRendererText.html" title="GtkCellRendererText"><span class="type">GtkCellRendererText</span></a> get its values from column 2.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cell_layout</code></em> :</span></p></td><td> A <a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cell</code></em> :</span></p></td><td> A <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>attribute</code></em> :</span></p></td><td> An attribute on the renderer.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>column</code></em> :</span></p></td><td> The column position on the model to get the attribute from.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3817364"></a><h3><a name="gtk-cell-layout-set-cell-data-func"></a>gtk_cell_layout_set_cell_data_func ()</h3><a class="indexterm" name="id3817380"></a><pre class="programlisting">void gtk_cell_layout_set_cell_data_func (<a class="link" href="GtkCellLayout.html" title="GtkCellLayout">GtkCellLayout</a> *cell_layout, <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer">GtkCellRenderer</a> *cell, <a class="link" href="GtkCellLayout.html#GtkCellLayoutDataFunc">GtkCellLayoutDataFunc</a> func, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> func_data, <ahref="/usr/share/gtk-doc/html/glib/glib-Datasets.html#GDestroyNotify">GDestroyNotify</a> destroy);</pre><p>Sets the <a class="link" href="GtkCellLayout.html#GtkCellLayoutDataFunc"><span class="type">GtkCellLayoutDataFunc</span></a> to use for <em class="parameter"><code>cell_layout</code></em>. This functionis used instead of the standard attributes mapping for setting thecolumn value, and should set the value of <em class="parameter"><code>cell_layout</code></em>'s cell renderer(s)as appropriate. <em class="parameter"><code>func</code></em> may be <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to remove and older one.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cell_layout</code></em> :</span></p></td><td> A <a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cell</code></em> :</span></p></td><td> A <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>func</code></em> :</span></p></td><td> The <a class="link" href="GtkCellLayout.html#GtkCellLayoutDataFunc"><span class="type">GtkCellLayoutDataFunc</span></a> to use.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>func_data</code></em> :</span></p></td><td> The user data for <em class="parameter"><code>func</code></em>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>destroy</code></em> :</span></p></td><td> The destroy notification for <em class="parameter"><code>func_data</code></em>.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3817602"></a><h3><a name="gtk-cell-layout-clear-attributes"></a>gtk_cell_layout_clear_attributes ()</h3><a class="indexterm" name="id3817617"></a><pre class="programlisting">void gtk_cell_layout_clear_attributes (<a class="link" href="GtkCellLayout.html" title="GtkCellLayout">GtkCellLayout</a> *cell_layout, <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer">GtkCellRenderer</a> *cell);</pre><p>Clears all existing attributes previously set with<a class="link" href="GtkCellLayout.html#gtk-cell-layout-set-attributes"><code class="function">gtk_cell_layout_set_attributes()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>cell_layout</code></em> :</span></p></td><td> A <a class="link" href="GtkCellLayout.html" title="GtkCellLayout"><span class="type">GtkCellLayout</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cell</code></em> :</span></p></td><td> A <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a> to clear the attribute mapping on.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div></div><div class="refsect1" lang="en"><a name="id3817726"></a><div class="refsect2" lang="en"><a name="id3817727"></a></div><hr><div class="refsect2" lang="en"><a name="id3817728"></a></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -