gtktreeviewcolumn.html
来自「最新gtk中文资料集」· HTML 代码 · 共 1,052 行 · 第 1/5 页
HTML
1,052 行
<a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer">GtkCellRenderer</a> *cell, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> expand);</pre><p>Adds the <em class="parameter"><code>cell</code></em> to end of the column. If <em class="parameter"><code>expand</code></em> is <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>, then the <em class="parameter"><code>cell</code></em>is allocated no more space than it needs. Any unused space is dividedevenly between cells for which <em class="parameter"><code>expand</code></em> is <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</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>tree_column</code></em> :</span></p></td><td> A <a class="link" href="GtkTreeViewColumn.html" title="GtkTreeViewColumn"><span class="type">GtkTreeViewColumn</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cell</code></em> :</span></p></td><td> The <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>expand</code></em> :</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>cell</code></em> is to be given extra space allocated to <em class="parameter"><code>tree_column</code></em>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3704856"></a><h3><a name="gtk-tree-view-column-clear"></a>gtk_tree_view_column_clear ()</h3><a class="indexterm" name="id3704870"></a><pre class="programlisting">void gtk_tree_view_column_clear (<a class="link" href="GtkTreeViewColumn.html" title="GtkTreeViewColumn">GtkTreeViewColumn</a> *tree_column);</pre><p>Unsets all the mappings on all renderers on the <em class="parameter"><code>tree_column</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>tree_column</code></em> :</span></p></td><td> A <a class="link" href="GtkTreeViewColumn.html" title="GtkTreeViewColumn"><span class="type">GtkTreeViewColumn</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3704935"></a><h3><a name="gtk-tree-view-column-get-cell-renderers"></a>gtk_tree_view_column_get_cell_renderers ()</h3><a class="indexterm" name="id3704949"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList">GList</a>* gtk_tree_view_column_get_cell_renderers (<a class="link" href="GtkTreeViewColumn.html" title="GtkTreeViewColumn">GtkTreeViewColumn</a> *tree_column);</pre><p>Returns a newly-allocated <ahref="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of all the cell renderers in the column, in no particular order. The list must be freed with <ahref="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#g-list-free"><code class="function">g_list_free()</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>tree_column</code></em> :</span></p></td><td> A <a class="link" href="GtkTreeViewColumn.html" title="GtkTreeViewColumn"><span class="type">GtkTreeViewColumn</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> A list of <span class="type">GtkCellRenderers</span></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3705048"></a><h3><a name="gtk-tree-view-column-add-attribute"></a>gtk_tree_view_column_add_attribute ()</h3><a class="indexterm" name="id3705062"></a><pre class="programlisting">void gtk_tree_view_column_add_attribute (<a class="link" href="GtkTreeViewColumn.html" title="GtkTreeViewColumn">GtkTreeViewColumn</a> *tree_column, <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer">GtkCellRenderer</a> *cell_renderer, 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>tree_column</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_renderer</code></em> to be set from the value. So for exampleif column 2 of 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 fromcolumn 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>tree_column</code></em> :</span></p></td><td> A <a class="link" href="GtkTreeViewColumn.html" title="GtkTreeViewColumn"><span class="type">GtkTreeViewColumn</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cell_renderer</code></em> :</span></p></td><td> the <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a> to set attributes on</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></div><hr><div class="refsect2" lang="en"><a name="id3705232"></a><h3><a name="gtk-tree-view-column-set-attributes"></a>gtk_tree_view_column_set_attributes ()</h3><a class="indexterm" name="id3705247"></a><pre class="programlisting">void gtk_tree_view_column_set_attributes (<a class="link" href="GtkTreeViewColumn.html" title="GtkTreeViewColumn">GtkTreeViewColumn</a> *tree_column, <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer">GtkCellRenderer</a> *cell_renderer, ...);</pre><p>Sets the attributes in the list as the attributes of <em class="parameter"><code>tree_column</code></em>.The attributes should be in attribute/column order, as in<a class="link" href="GtkTreeViewColumn.html#gtk-tree-view-column-add-attribute"><code class="function">gtk_tree_view_column_add_attribute()</code></a>. All existing attributesare removed, and replaced 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>tree_column</code></em> :</span></p></td><td> A <a class="link" href="GtkTreeViewColumn.html" title="GtkTreeViewColumn"><span class="type">GtkTreeViewColumn</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cell_renderer</code></em> :</span></p></td><td> the <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a> we're setting the attributes of</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></div><hr><div class="refsect2" lang="en"><a name="id3705381"></a><h3><a name="gtk-tree-view-column-set-cell-data-func"></a>gtk_tree_view_column_set_cell_data_func ()</h3><a class="indexterm" name="id3705395"></a><pre class="programlisting">void gtk_tree_view_column_set_cell_data_func (<a class="link" href="GtkTreeViewColumn.html" title="GtkTreeViewColumn">GtkTreeViewColumn</a> *tree_column, <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer">GtkCellRenderer</a> *cell_renderer, <a class="link" href="GtkTreeViewColumn.html#GtkTreeCellDataFunc">GtkTreeCellDataFunc</a> func, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> func_data, <a class="link" href="gtk-Types.html#GtkDestroyNotify">GtkDestroyNotify</a> destroy);</pre><p>Sets the <span class="type">GtkTreeViewColumnFunc</span> to use for the column. Thisfunction is used instead of the standard attributes mapping forsetting the column value, and should set the value of <em class="parameter"><code>tree_column</code></em>'scell renderer 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 anolder 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>tree_column</code></em> :</span></p></td><td> A <a class="link" href="GtkTreeViewColumn.html" title="GtkTreeViewColumn"><span class="type">GtkTreeViewColumn</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>cell_renderer</code></em> :</span></p></td><td> A <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer"><span class="type">GtkCellRenderer</span></a>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?