📄 gtkcelllayout.html
字号:
<hr><div class="refsect2" lang="en"><a name="id3815990"></a><h3><a name="GtkCellLayoutIface"></a>GtkCellLayoutIface</h3><a class="indexterm" name="id3816002"></a><pre class="programlisting">typedef struct { GTypeInterface g_iface; /* Virtual Table */ void (* pack_start) (GtkCellLayout *cell_layout, GtkCellRenderer *cell, gboolean expand); void (* pack_end) (GtkCellLayout *cell_layout, GtkCellRenderer *cell, gboolean expand); void (* clear) (GtkCellLayout *cell_layout); void (* add_attribute) (GtkCellLayout *cell_layout, GtkCellRenderer *cell, const gchar *attribute, gint column); void (* set_cell_data_func) (GtkCellLayout *cell_layout, GtkCellRenderer *cell, GtkCellLayoutDataFunc func, gpointer func_data, GDestroyNotify destroy); void (* clear_attributes) (GtkCellLayout *cell_layout, GtkCellRenderer *cell); void (* reorder) (GtkCellLayout *cell_layout, GtkCellRenderer *cell, gint position); GList* (* get_cells) (GtkCellLayout *cell_layout);} GtkCellLayoutIface;</pre><p></p></div><hr><div class="refsect2" lang="en"><a name="id3816042"></a><h3><a name="GtkCellLayoutDataFunc"></a>GtkCellLayoutDataFunc ()</h3><a class="indexterm" name="id3816056"></a><pre class="programlisting">void (*GtkCellLayoutDataFunc) (<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="GtkTreeModel.html" title="GtkTreeModel">GtkTreeModel</a> *tree_model, <a class="link" href="GtkTreeModel.html#GtkTreeIter">GtkTreeIter</a> *iter, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gpointer">gpointer</a> data);</pre><p>A function which should set the value of <em class="parameter"><code>cell_layout</code></em>'s cell renderer(s)as appropriate. </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>the cell renderer whose value is to be set</td></tr><tr><td><p><span class="term"><em class="parameter"><code>tree_model</code></em> :</span></p></td><td>the model</td></tr><tr><td><p><span class="term"><em class="parameter"><code>iter</code></em> :</span></p></td><td>a <a class="link" href="GtkTreeModel.html#GtkTreeIter"><span class="type">GtkTreeIter</span></a> indicating the row to set the value for</td></tr><tr><td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td><td>user data passed to <a class="link" href="GtkCellLayout.html#gtk-cell-layout-set-cell-data-func"><code class="function">gtk_cell_layout_set_cell_data_func()</code></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3816226"></a><h3><a name="gtk-cell-layout-pack-start"></a>gtk_cell_layout_pack_start ()</h3><a class="indexterm" name="id3816242"></a><pre class="programlisting">void gtk_cell_layout_pack_start (<a class="link" href="GtkCellLayout.html" title="GtkCellLayout">GtkCellLayout</a> *cell_layout, <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>Packs the <em class="parameter"><code>cell</code></em> into the beginning of <em class="parameter"><code>cell_layout</code></em>. 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 spaceis divided evenly 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>Note that reusing the same cell renderer is not supported.</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>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>cell_layout</code></em>.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3816436"></a><h3><a name="gtk-cell-layout-pack-end"></a>gtk_cell_layout_pack_end ()</h3><a class="indexterm" name="id3816452"></a><pre class="programlisting">void gtk_cell_layout_pack_end (<a class="link" href="GtkCellLayout.html" title="GtkCellLayout">GtkCellLayout</a> *cell_layout, <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 the end of <em class="parameter"><code>cell_layout</code></em>. 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 isdivided evenly 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>Note that reusing the same cell renderer is not supported.</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>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>cell_layout</code></em>.</td></tr></tbody></table></div><p class="since">Since 2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3816647"></a><h3><a name="gtk-cell-layout-get-cells"></a>gtk_cell_layout_get_cells ()</h3><a class="indexterm" name="id3816663"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList">GList</a>* gtk_cell_layout_get_cells (<a class="link" href="GtkCellLayout.html" title="GtkCellLayout">GtkCellLayout</a> *cell_layout);</pre><p>Returns the cell renderers which have been added to <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><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a list of cell renderers. The list, but not the renderers has been newly allocated and should 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> when no longer needed.</td></tr></tbody></table></div><p class="since">Since 2.12</p></div><hr><div class="refsect2" lang="en"><a name="id3816758"></a><h3><a name="gtk-cell-layout-reorder"></a>gtk_cell_layout_reorder ()</h3><a class="indexterm" name="id3816773"></a><pre class="programlisting">void gtk_cell_layout_reorder (<a class="link" href="GtkCellLayout.html" title="GtkCellLayout">GtkCellLayout</a> *cell_layout, <a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer">GtkCellRenderer</a> *cell, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a> position);</pre><p>Re-inserts <em class="parameter"><code>cell</code></em> at <em class="parameter"><code>position</code></em>. Note that <em class="parameter"><code>cell</code></em> has already to be packedinto <em class="parameter"><code>cell_layout</code></em> for this to function properly.</p><p></p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -