gtkcellrendererpixbuf.html
来自「最新gtk中文资料集」· HTML 代码 · 共 317 行 · 第 1/2 页
HTML
317 行
pixbufs, when the <a class="link" href="GtkCellRenderer.html#GtkCellRenderer--is-expander">is-expander</a> property is <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>. If the <a class="link" href="GtkCellRenderer.html#GtkCellRenderer--is-expanded">is-expanded</a> property is <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> and the <a class="link" href="GtkCellRendererPixbuf.html#GtkCellRendererPixbuf--pixbuf-expander-open">pixbuf-expander-open</a> property is set to a pixbuf, it renders that pixbuf, if the <a class="link" href="GtkCellRenderer.html#GtkCellRenderer--is-expanded">is-expanded</a> property is <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> andthe <a class="link" href="GtkCellRendererPixbuf.html#GtkCellRendererPixbuf--pixbuf-expander-closed">pixbuf-expander-closed</a> property is set to a pixbuf, it renders that one. </p></div><div class="refsect1" lang="en"><a name="id3833906"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id3833916"></a><h3><a name="GtkCellRendererPixbuf-struct"></a>GtkCellRendererPixbuf</h3><a class="indexterm" name="id3833929"></a><pre class="programlisting">typedef struct _GtkCellRendererPixbuf GtkCellRendererPixbuf;</pre><p></p></div><hr><div class="refsect2" lang="en"><a name="id3833945"></a><h3><a name="gtk-cell-renderer-pixbuf-new"></a>gtk_cell_renderer_pixbuf_new ()</h3><a class="indexterm" name="id3833958"></a><pre class="programlisting"><a class="link" href="GtkCellRenderer.html" title="GtkCellRenderer">GtkCellRenderer</a>* gtk_cell_renderer_pixbuf_new (void);</pre><p>Creates a new <a class="link" href="GtkCellRendererPixbuf.html" title="GtkCellRendererPixbuf"><span class="type">GtkCellRendererPixbuf</span></a>. Adjust renderingparameters using object properties. Object properties can be setglobally (with <ahref="/usr/share/gtk-doc/html/gobject/gobject-The-Base-Object-Type.html#g-object-set"><code class="function">g_object_set()</code></a>). Also, with <a class="link" href="GtkTreeViewColumn.html" title="GtkTreeViewColumn"><span class="type">GtkTreeViewColumn</span></a>, youcan bind a property to a value in a <a class="link" href="GtkTreeModel.html" title="GtkTreeModel"><span class="type">GtkTreeModel</span></a>. For example, youcan bind the "pixbuf" property on the cell renderer to a pixbuf valuein the model, thus rendering a different image in each row of the<a class="link" href="GtkTreeView.html" title="GtkTreeView"><span class="type">GtkTreeView</span></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the new cell renderer</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id3834048"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id3834058"></a><h3><a name="GtkCellRendererPixbuf--follow-state"></a>The <code class="literal">"follow-state"</code> property</h3><a class="indexterm" name="id3834075"></a><pre class="programlisting"> "follow-state" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> : Read / Write</pre><p>Specifies whether the rendered pixbuf should be colorizedaccording to the <a class="link" href="GtkCellRenderer.html#GtkCellRendererState"><span class="type">GtkCellRendererState</span></a>.</p><p></p><p>Default value: FALSE</p><p>Since 2.8</p></div><hr><div class="refsect2" lang="en"><a name="id3834120"></a><h3><a name="GtkCellRendererPixbuf--icon-name"></a>The <code class="literal">"icon-name"</code> property</h3><a class="indexterm" name="id3834136"></a><pre class="programlisting"> "icon-name" <ahref="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray">gchararray</a> : Read / Write</pre><p>The name of the themed icon to display.This property only has an effect if not overridden by "stock_id" or "pixbuf" properties.</p><p></p><p>Default value: NULL</p><p>Since 2.8 </p></div><hr><div class="refsect2" lang="en"><a name="id3834173"></a><h3><a name="GtkCellRendererPixbuf--pixbuf"></a>The <code class="literal">"pixbuf"</code> property</h3><a class="indexterm" name="id3834190"></a><pre class="programlisting"> "pixbuf" <ahref="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf">GdkPixbuf</a> : Read / Write</pre><p>The pixbuf to render.</p></div><hr><div class="refsect2" lang="en"><a name="id3834214"></a><h3><a name="GtkCellRendererPixbuf--pixbuf-expander-closed"></a>The <code class="literal">"pixbuf-expander-closed"</code> property</h3><a class="indexterm" name="id3834230"></a><pre class="programlisting"> "pixbuf-expander-closed" <ahref="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf">GdkPixbuf</a> : Read / Write</pre><p>Pixbuf for closed expander.</p></div><hr><div class="refsect2" lang="en"><a name="id3834254"></a><h3><a name="GtkCellRendererPixbuf--pixbuf-expander-open"></a>The <code class="literal">"pixbuf-expander-open"</code> property</h3><a class="indexterm" name="id3834272"></a><pre class="programlisting"> "pixbuf-expander-open" <ahref="/usr/share/gtk-doc/html/gdk-pixbuf/gdk-pixbuf-gdk-pixbuf.html#GdkPixbuf">GdkPixbuf</a> : Read / Write</pre><p>Pixbuf for open expander.</p></div><hr><div class="refsect2" lang="en"><a name="id3834295"></a><h3><a name="GtkCellRendererPixbuf--stock-detail"></a>The <code class="literal">"stock-detail"</code> property</h3><a class="indexterm" name="id3834312"></a><pre class="programlisting"> "stock-detail" <ahref="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray">gchararray</a> : Read / Write</pre><p>Render detail to pass to the theme engine.</p><p>Default value: NULL</p></div><hr><div class="refsect2" lang="en"><a name="id3834339"></a><h3><a name="GtkCellRendererPixbuf--stock-id"></a>The <code class="literal">"stock-id"</code> property</h3><a class="indexterm" name="id3834356"></a><pre class="programlisting"> "stock-id" <ahref="/usr/share/gtk-doc/html/gobject/gobject-Standard-Parameter-and-Value-Types.html#gchararray">gchararray</a> : Read / Write</pre><p>The stock ID of the stock icon to render.</p><p>Default value: NULL</p></div><hr><div class="refsect2" lang="en"><a name="id3834382"></a><h3><a name="GtkCellRendererPixbuf--stock-size"></a>The <code class="literal">"stock-size"</code> property</h3><a class="indexterm" name="id3834398"></a><pre class="programlisting"> "stock-size" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> : Read / Write</pre><p>The GtkIconSize value that specifies the size of the rendered icon.</p><p>Default value: 1</p></div></div><div class="refsect1" lang="en"><a name="id3834427"></a><div class="refsect2" lang="en"><a name="id3834428"></a></div><hr><div class="refsect2" lang="en"><a name="id3834429"></a></div></div></div></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?