<?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="GtkCellRendererSpin">
<refmeta>
<refentrytitle role="top_of_page" id="GtkCellRendererSpin.top_of_page">GtkCellRendererSpin</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkCellRendererSpin</refname>
<refpurpose>Renders a spin button in a cell</refpurpose>
</refnamediv>

<refsect1 id="GtkCellRendererSpin.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-spin-new">gtk_cell_renderer_spin_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkCellRendererSpin.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="GtkAdjustment"><type>GtkAdjustment</type></link>&#160;*</entry><entry role="property_name"><link linkend="GtkCellRendererSpin--adjustment">adjustment</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gdouble"><type>gdouble</type></link></entry><entry role="property_name"><link linkend="GtkCellRendererSpin--climb-rate">climb-rate</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="guint"><type>guint</type></link></entry><entry role="property_name"><link linkend="GtkCellRendererSpin--digits">digits</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkCellRendererSpin.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="GtkCellRendererSpin-struct">GtkCellRendererSpin</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkCellRendererSpin.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> <link linkend="GtkCellRendererText">GtkCellRendererText</link>
                <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkCellRendererSpin
</screen>
</refsect1>

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

<refsect1 id="GtkCellRendererSpin.description" role="desc">
<title role="desc.title">Description</title>
<para><link linkend="GtkCellRendererSpin"><type>GtkCellRendererSpin</type></link> renders text in a cell like <link linkend="GtkCellRendererText"><type>GtkCellRendererText</type></link> from
which it is derived. But while <link linkend="GtkCellRendererText"><type>GtkCellRendererText</type></link> offers a simple entry to
edit the text, <link linkend="GtkCellRendererSpin"><type>GtkCellRendererSpin</type></link> offers a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> widget. Of course,
that means that the text has to be parseable as a floating point number.</para>
<para>The range of the spinbutton is taken from the adjustment property of the
cell renderer, which can be set explicitly or mapped to a column in the
tree model, like all properties of cell renders. <link linkend="GtkCellRendererSpin"><type>GtkCellRendererSpin</type></link>
also has properties for the <link linkend="GtkCellRendererSpin--climb-rate"><type>“climb-rate”</type></link> and the number
of <link linkend="GtkCellRendererSpin--digits"><type>“digits”</type></link> to display. Other <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> properties
can be set in a handler for the <link linkend="GtkCellRenderer-editing-started"><type>“editing-started”</type></link> signal.</para>
<para>The <link linkend="GtkCellRendererSpin"><type>GtkCellRendererSpin</type></link> cell renderer was added in GTK 2.10.</para>

</refsect1>
<refsect1 id="GtkCellRendererSpin.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-cell-renderer-spin-new" role="function">
<title>gtk_cell_renderer_spin_new&#160;()</title>
<indexterm zone="gtk-cell-renderer-spin-new"><primary>gtk_cell_renderer_spin_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkCellRenderer"><returnvalue>GtkCellRenderer</returnvalue></link>&#160;*
gtk_cell_renderer_spin_new (<parameter><type>void</type></parameter>);</programlisting>
<para>Creates a new <link linkend="GtkCellRendererSpin"><type>GtkCellRendererSpin</type></link>.</para>
<refsect3 id="gtk-cell-renderer-spin-new.returns" role="returns">
<title>Returns</title>
<para> a new <link linkend="GtkCellRendererSpin"><type>GtkCellRendererSpin</type></link></para>
</refsect3></refsect2>

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

</refsect1>
<refsect1 id="GtkCellRendererSpin.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkCellRendererSpin--adjustment" role="property"><title>The <literal>“adjustment”</literal> property</title>
<indexterm zone="GtkCellRendererSpin--adjustment"><primary>GtkCellRendererSpin:adjustment</primary></indexterm>
<programlisting>  “adjustment”               <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link>&#160;*</programlisting>
<para>The adjustment that holds the value of the spinbutton.

This must be non-<link linkend="NULL:CAPS"><literal>NULL</literal></link> for the cell renderer to be editable.</para>
<para>Owner: GtkCellRendererSpin</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkCellRendererSpin--climb-rate" role="property"><title>The <literal>“climb-rate”</literal> property</title>
<indexterm zone="GtkCellRendererSpin--climb-rate"><primary>GtkCellRendererSpin:climb-rate</primary></indexterm>
<programlisting>  “climb-rate”               <link linkend="gdouble"><type>gdouble</type></link></programlisting>
<para>The acceleration rate when you hold down a button.</para>
<para>Owner: GtkCellRendererSpin</para>
<para>Flags: Read / Write</para>
<para>Allowed values: &gt;= 0</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GtkCellRendererSpin--digits" role="property"><title>The <literal>“digits”</literal> property</title>
<indexterm zone="GtkCellRendererSpin--digits"><primary>GtkCellRendererSpin:digits</primary></indexterm>
<programlisting>  “digits”                   <link linkend="guint"><type>guint</type></link></programlisting>
<para>The number of decimal places to display.</para>
<para>Owner: GtkCellRendererSpin</para>
<para>Flags: Read / Write</para>
<para>Allowed values: &lt;= 20</para>
<para>Default value: 0</para>
</refsect2>

</refsect1>
<refsect1 id="GtkCellRendererSpin.see-also">
<title>See Also</title>
<para><link linkend="GtkCellRendererText"><type>GtkCellRendererText</type></link>, <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para>

</refsect1>

</refentry>
