<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
               "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [
<!ENTITY % local.common.attrib "xmlns:xi  CDATA  #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY version SYSTEM "version.xml">
<!ENTITY pi "&#960;">
<!ENTITY solidus "&#8260;">
]>
<refentry id="GtkCellRendererPixbuf">
<refmeta>
<refentrytitle role="top_of_page" id="GtkCellRendererPixbuf.top_of_page">GtkCellRendererPixbuf</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkCellRendererPixbuf</refname>
<refpurpose>Renders a pixbuf in a cell</refpurpose>
</refnamediv>

<refsect1 id="GtkCellRendererPixbuf.functions" role="functions_proto">
<title role="functions_proto.title">Functions</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="functions_proto_type" colwidth="150px"/>
<colspec colname="functions_proto_name"/>
<tbody>
<row><entry role="function_type"><link linkend="GtkCellRenderer"><returnvalue>GtkCellRenderer</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-cell-renderer-pixbuf-new">gtk_cell_renderer_pixbuf_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkCellRendererPixbuf.properties" role="properties">
<title role="properties.title">Properties</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="properties_type" colwidth="150px"/>
<colspec colname="properties_name" colwidth="300px"/>
<colspec colname="properties_flags" colwidth="200px"/>
<tbody>
<row><entry role="property_type"><link linkend="GIcon"><type>GIcon</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkCellRendererPixbuf--gicon">gicon</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gchar"><type>gchar</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkCellRendererPixbuf--icon-name">icon-name</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkIconSize"><type>GtkIconSize</type></link></entry><entry role="property_name"><link linkend="GtkCellRendererPixbuf--icon-size">icon-size</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkCellRendererPixbuf--pixbuf">pixbuf</link></entry><entry role="property_flags">Write</entry></row>
<row><entry role="property_type"><link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkCellRendererPixbuf--pixbuf-expander-closed">pixbuf-expander-closed</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkCellRendererPixbuf--pixbuf-expander-open">pixbuf-expander-open</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GdkTexture"><type>GdkTexture</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkCellRendererPixbuf--texture">texture</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkCellRendererPixbuf.other" role="other_proto">
<title role="other_proto.title">Types and Values</title>
<informaltable pgwide="1" frame="none">
<tgroup cols="2">
<colspec colname="other_proto_type" colwidth="150px"/>
<colspec colname="other_proto_name"/>
<tbody>
<row><entry role="datatype_keyword"></entry><entry role="function_name"><link linkend="GtkCellRendererPixbuf-struct">GtkCellRendererPixbuf</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkCellRendererPixbuf.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<screen>    <link linkend="GObject">GObject</link>
    <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
        <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> <link linkend="GtkCellRenderer">GtkCellRenderer</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkCellRendererPixbuf
</screen>
</refsect1>

<refsect1 id="GtkCellRendererPixbuf.includes"><title>Includes</title><synopsis>#include &lt;gtk/gtk.h&gt;
</synopsis></refsect1>

<refsect1 id="GtkCellRendererPixbuf.description" role="desc">
<title role="desc.title">Description</title>
<para>A <link linkend="GtkCellRendererPixbuf"><type>GtkCellRendererPixbuf</type></link> can be used to render an image in a cell. It allows
to render either a given <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link> (set via the
<link linkend="GtkCellRendererPixbuf--pixbuf"><type>“pixbuf”</type></link> property) or a named icon (set via the
<link linkend="GtkCellRendererPixbuf--icon-name"><type>“icon-name”</type></link> property).</para>
<para>To support the tree view, <link linkend="GtkCellRendererPixbuf"><type>GtkCellRendererPixbuf</type></link> also supports rendering two
alternative pixbufs, when the <link linkend="GtkCellRenderer--is-expander"><type>“is-expander”</type></link> property is <link linkend="TRUE:CAPS"><literal>TRUE</literal></link>.
If the <link linkend="GtkCellRenderer--is-expanded"><type>“is-expanded”</type></link> property is <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> and the
<link linkend="GtkCellRendererPixbuf--pixbuf-expander-open"><type>“pixbuf-expander-open”</type></link> property is set to a pixbuf, it
renders that pixbuf, if the <link linkend="GtkCellRenderer--is-expanded"><type>“is-expanded”</type></link> property is <link linkend="FALSE:CAPS"><literal>FALSE</literal></link>
and the <link linkend="GtkCellRendererPixbuf--pixbuf-expander-closed"><type>“pixbuf-expander-closed”</type></link> property is set to a
pixbuf, it renders that one.</para>

</refsect1>
<refsect1 id="GtkCellRendererPixbuf.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-cell-renderer-pixbuf-new" role="function">
<title>gtk_cell_renderer_pixbuf_new&#160;()</title>
<indexterm zone="gtk-cell-renderer-pixbuf-new"><primary>gtk_cell_renderer_pixbuf_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkCellRenderer"><returnvalue>GtkCellRenderer</returnvalue></link>&#160;*
gtk_cell_renderer_pixbuf_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="GtkCellRendererPixbuf"><type>GtkCellRendererPixbuf</type></link>. Adjust rendering
parameters using object properties. Object properties can be set
globally (with <link linkend="g-object-set"><function>g_object_set()</function></link>). Also, with <link linkend="GtkTreeViewColumn"><type>GtkTreeViewColumn</type></link>, you
can bind a property to a value in a <link linkend="GtkTreeModel"><type>GtkTreeModel</type></link>. For example, you
can bind the “pixbuf” property on the cell renderer to a pixbuf value
in the model, thus rendering a different image in each row of the
<link linkend="GtkTreeView"><type>GtkTreeView</type></link>.</para>
<refsect3 id="gtk-cell-renderer-pixbuf-new.returns" role="returns">
<title>Returns</title>
<para> the new cell renderer</para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkCellRendererPixbuf.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkCellRendererPixbuf-struct" role="struct">
<title>GtkCellRendererPixbuf</title>
<indexterm zone="GtkCellRendererPixbuf-struct"><primary>GtkCellRendererPixbuf</primary></indexterm>
<programlisting language="C">typedef struct _GtkCellRendererPixbuf GtkCellRendererPixbuf;</programlisting>
</refsect2>

</refsect1>
<refsect1 id="GtkCellRendererPixbuf.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkCellRendererPixbuf--gicon" role="property"><title>The <literal>“gicon”</literal> property</title>
<indexterm zone="GtkCellRendererPixbuf--gicon"><primary>GtkCellRendererPixbuf:gicon</primary></indexterm>
<programlisting>  “gicon”                    <link linkend="GIcon"><type>GIcon</type></link>&#160;*</programlisting>
<para>The GIcon representing the icon to display.
If the icon theme is changed, the image will be updated
automatically.</para>
<para>Owner: GtkCellRendererPixbuf</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkCellRendererPixbuf--icon-name" role="property"><title>The <literal>“icon-name”</literal> property</title>
<indexterm zone="GtkCellRendererPixbuf--icon-name"><primary>GtkCellRendererPixbuf:icon-name</primary></indexterm>
<programlisting>  “icon-name”                <link linkend="gchar"><type>gchar</type></link>&#160;*</programlisting>
<para>The name of the themed icon to display.
This property only has an effect if not overridden by the "pixbuf" property.</para>
<para>Owner: GtkCellRendererPixbuf</para>
<para>Flags: Read / Write</para>
<para>Default value: NULL</para>
</refsect2>
<refsect2 id="GtkCellRendererPixbuf--icon-size" role="property"><title>The <literal>“icon-size”</literal> property</title>
<indexterm zone="GtkCellRendererPixbuf--icon-size"><primary>GtkCellRendererPixbuf:icon-size</primary></indexterm>
<programlisting>  “icon-size”                <link linkend="GtkIconSize"><type>GtkIconSize</type></link></programlisting>
<para>The <link linkend="GtkIconSize"><type>GtkIconSize</type></link> value that specifies the size of the rendered icon.</para>
<para>Owner: GtkCellRendererPixbuf</para>
<para>Flags: Read / Write</para>
<para>Default value: GTK_ICON_SIZE_INHERIT</para>
</refsect2>
<refsect2 id="GtkCellRendererPixbuf--pixbuf" role="property"><title>The <literal>“pixbuf”</literal> property</title>
<indexterm zone="GtkCellRendererPixbuf--pixbuf"><primary>GtkCellRendererPixbuf:pixbuf</primary></indexterm>
<programlisting>  “pixbuf”                   <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>&#160;*</programlisting>
<para>The pixbuf to render.</para><para>Owner: GtkCellRendererPixbuf</para>
<para>Flags: Write</para>
</refsect2>
<refsect2 id="GtkCellRendererPixbuf--pixbuf-expander-closed" role="property"><title>The <literal>“pixbuf-expander-closed”</literal> property</title>
<indexterm zone="GtkCellRendererPixbuf--pixbuf-expander-closed"><primary>GtkCellRendererPixbuf:pixbuf-expander-closed</primary></indexterm>
<programlisting>  “pixbuf-expander-closed”   <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>&#160;*</programlisting>
<para>Pixbuf for closed expander.</para><para>Owner: GtkCellRendererPixbuf</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkCellRendererPixbuf--pixbuf-expander-open" role="property"><title>The <literal>“pixbuf-expander-open”</literal> property</title>
<indexterm zone="GtkCellRendererPixbuf--pixbuf-expander-open"><primary>GtkCellRendererPixbuf:pixbuf-expander-open</primary></indexterm>
<programlisting>  “pixbuf-expander-open”     <link linkend="GdkPixbuf"><type>GdkPixbuf</type></link>&#160;*</programlisting>
<para>Pixbuf for open expander.</para><para>Owner: GtkCellRendererPixbuf</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkCellRendererPixbuf--texture" role="property"><title>The <literal>“texture”</literal> property</title>
<indexterm zone="GtkCellRendererPixbuf--texture"><primary>GtkCellRendererPixbuf:texture</primary></indexterm>
<programlisting>  “texture”                  <link linkend="GdkTexture"><type>GdkTexture</type></link>&#160;*</programlisting>
<para>The texture to render.</para><para>Owner: GtkCellRendererPixbuf</para>
<para>Flags: Read / Write</para>
</refsect2>

</refsect1>

</refentry>
