<?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="GtkSpinButton">
<refmeta>
<refentrytitle role="top_of_page" id="GtkSpinButton.top_of_page">GtkSpinButton</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK4 Library</refmiscinfo>
</refmeta>
<refnamediv>
<refname>GtkSpinButton</refname>
<refpurpose>Retrieve an integer or floating-point number from
the user</refpurpose>
</refnamediv>

<refsect1 id="GtkSpinButton.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="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-configure">gtk_spin_button_configure</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-spin-button-new">gtk_spin_button_new</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-spin-button-new-with-range">gtk_spin_button_new_with_range</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-set-adjustment">gtk_spin_button_set_adjustment</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkAdjustment"><returnvalue>GtkAdjustment</returnvalue></link>&#160;*
</entry><entry role="function_name"><link linkend="gtk-spin-button-get-adjustment">gtk_spin_button_get_adjustment</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-set-digits">gtk_spin_button_set_digits</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-set-increments">gtk_spin_button_set_increments</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-set-range">gtk_spin_button_set_range</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gint"><returnvalue>gint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-get-value-as-int">gtk_spin_button_get_value_as_int</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-set-value">gtk_spin_button_set_value</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-set-update-policy">gtk_spin_button_set_update_policy</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-set-numeric">gtk_spin_button_set_numeric</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-spin">gtk_spin_button_spin</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-set-wrap">gtk_spin_button_set_wrap</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-set-snap-to-ticks">gtk_spin_button_set_snap_to_ticks</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-update">gtk_spin_button_update</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="guint"><returnvalue>guint</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-get-digits">gtk_spin_button_get_digits</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-get-increments">gtk_spin_button_get_increments</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-get-numeric">gtk_spin_button_get_numeric</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="void"><returnvalue>void</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-get-range">gtk_spin_button_get_range</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-get-snap-to-ticks">gtk_spin_button_get_snap_to_ticks</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="GtkSpinButtonUpdatePolicy"><returnvalue>GtkSpinButtonUpdatePolicy</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-get-update-policy">gtk_spin_button_get_update_policy</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gdouble"><returnvalue>gdouble</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-get-value">gtk_spin_button_get_value</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>
<row><entry role="function_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
</entry><entry role="function_name"><link linkend="gtk-spin-button-get-wrap">gtk_spin_button_get_wrap</link>&#160;<phrase role="c_punctuation">()</phrase></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkSpinButton.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="GtkSpinButton--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="GtkSpinButton--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="GtkSpinButton--digits">digits</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkSpinButton--numeric">numeric</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkSpinButton--snap-to-ticks">snap-to-ticks</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="GtkSpinButtonUpdatePolicy"><type>GtkSpinButtonUpdatePolicy</type></link></entry><entry role="property_name"><link linkend="GtkSpinButton--update-policy">update-policy</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="GtkSpinButton--value">value</link></entry><entry role="property_flags">Read / Write</entry></row>
<row><entry role="property_type"><link linkend="gboolean"><type>gboolean</type></link></entry><entry role="property_name"><link linkend="GtkSpinButton--wrap">wrap</link></entry><entry role="property_flags">Read / Write</entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkSpinButton.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<informaltable frame="none">
<tgroup cols="3">
<colspec colname="signal_proto_type" colwidth="150px"/>
<colspec colname="signal_proto_name" colwidth="300px"/>
<colspec colname="signal_proto_flags" colwidth="200px"/>
<tbody>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkSpinButton-change-value">change-value</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-ACTION:CAPS">Action</link></entry></row>
<row><entry role="signal_type"><link linkend="gint"><returnvalue>gint</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkSpinButton-input">input</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkSpinButton-output">output</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkSpinButton-value-changed">value-changed</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>
<row><entry role="signal_type"><link linkend="void"><returnvalue>void</returnvalue></link></entry><entry role="signal_name"><link linkend="GtkSpinButton-wrapped">wrapped</link></entry><entry role="signal_flags"><link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkSpinButton.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="GtkSpinButton-struct">GtkSpinButton</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GtkSpinButtonUpdatePolicy">GtkSpinButtonUpdatePolicy</link></entry></row>
<row><entry role="datatype_keyword">enum</entry><entry role="function_name"><link linkend="GtkSpinType">GtkSpinType</link></entry></row>
<row><entry role="define_keyword">#define</entry><entry role="function_name"><link linkend="GTK-INPUT-ERROR:CAPS">GTK_INPUT_ERROR</link></entry></row>

</tbody>
</tgroup>
</informaltable>
</refsect1>
<refsect1 id="GtkSpinButton.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="GtkWidget">GtkWidget</link>
            <phrase role="lineart">&#9584;&#9472;&#9472;</phrase> GtkSpinButton
</screen>
</refsect1>
<refsect1 id="GtkSpinButton.implemented-interfaces" role="impl_interfaces">
<title role="impl_interfaces.title">Implemented Interfaces</title>
<para>
GtkSpinButton implements
 <link linkend="AtkImplementorIface">AtkImplementorIface</link>,  <link linkend="GtkBuildable">GtkBuildable</link>,  <link linkend="GtkConstraintTarget">GtkConstraintTarget</link>,  <link linkend="GtkOrientable">GtkOrientable</link>,  <link linkend="GtkEditable">GtkEditable</link> and  <link linkend="GtkCellEditable">GtkCellEditable</link>.</para>

</refsect1>

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

<refsect1 id="GtkSpinButton.description" role="desc">
<title role="desc.title">Description</title>
<para>A <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> is an ideal way to allow the user to set the value of
some attribute. Rather than having to directly type a number into a
<link linkend="GtkEntry"><type>GtkEntry</type></link>, GtkSpinButton allows the user to click on one of two arrows
to increment or decrement the displayed value. A value can still be
typed in, with the bonus that it can be checked to ensure it is in a
given range.</para>
<para>The main properties of a GtkSpinButton are through an adjustment.
See the <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link> section for more details about an adjustment's
properties. Note that GtkSpinButton will by default make its entry
large enough to accomodate the lower and upper bounds of the adjustment,
which can lead to surprising results. Best practice is to set both
the <link linkend="GtkEntry--width-chars"><type>“width-chars”</type></link> and <link linkend="GtkEntry--max-width-chars"><type>“max-width-chars”</type></link> poperties
to the desired number of characters to display in the entry.</para>
<refsect2><title>CSS nodes</title><informalexample><programlisting role="example"><![CDATA[
spinbutton.horizontal
├── text
│    ├── undershoot.left
│    ╰── undershoot.right
├── button.down
╰── button.up
]]></programlisting></informalexample>
<para></para>
<informalexample><programlisting role="example"><![CDATA[
spinbutton.vertical
├── button.up
├── text
│    ├── undershoot.left
│    ╰── undershoot.right
╰── button.down
]]></programlisting></informalexample>
<para></para>
<para>GtkSpinButtons main CSS node has the name spinbutton. It creates subnodes
for the entry and the two buttons, with these names. The button nodes have
the style classes .up and .down. The GtkText subnodes (if present) are put
below the text node. The orientation of the spin button is reflected in
the .vertical or .horizontal style class on the main node.</para>
<refsect3><title>Using a GtkSpinButton to get an integer</title><informalexample><programlisting role="example"><![CDATA[
// Provides a function to retrieve an integer value from a GtkSpinButton
// and creates a spin button to model percentage values.

gint
grab_int_value (GtkSpinButton *button,
                gpointer       user_data)
{
  return gtk_spin_button_get_value_as_int (button);
}

void
create_integer_spin_button (void)
{

  GtkWidget *window, *button;
  GtkAdjustment *adjustment;

  adjustment = gtk_adjustment_new (50.0, 0.0, 100.0, 1.0, 5.0, 0.0);

  window = gtk_window_new ();

  // creates the spinbutton, with no decimal places
  button = gtk_spin_button_new (adjustment, 1.0, 0);
  gtk_window_set_child (GTK_WINDOW (window), button);

  gtk_widget_show (window);
}
]]></programlisting></informalexample>
<para></para>
</refsect3>
<refsect3><title>Using a GtkSpinButton to get a floating point value</title><informalexample><programlisting role="example"><![CDATA[
// Provides a function to retrieve a floating point value from a
// GtkSpinButton, and creates a high precision spin button.

float
grab_float_value (GtkSpinButton *button,
                  gpointer       user_data)
{
  return gtk_spin_button_get_value (button);
}

void
create_floating_spin_button (void)
{
  GtkWidget *window, *button;
  GtkAdjustment *adjustment;

  adjustment = gtk_adjustment_new (2.500, 0.0, 5.0, 0.001, 0.1, 0.0);

  window = gtk_window_new ();

  // creates the spinbutton, with three decimal places
  button = gtk_spin_button_new (adjustment, 0.001, 3);
  gtk_window_set_child (GTK_WINDOW (window), button);

  gtk_widget_show (window);
}
]]></programlisting></informalexample>
<para></para>
</refsect3>
</refsect2>

</refsect1>
<refsect1 id="GtkSpinButton.functions_details" role="details">
<title role="details.title">Functions</title>
<refsect2 id="gtk-spin-button-configure" role="function">
<title>gtk_spin_button_configure&#160;()</title>
<indexterm zone="gtk-spin-button-configure"><primary>gtk_spin_button_configure</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_spin_button_configure (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>,
                           <parameter><link linkend="GtkAdjustment"><type>GtkAdjustment</type></link> *adjustment</parameter>,
                           <parameter><link linkend="gdouble"><type>gdouble</type></link> climb_rate</parameter>,
                           <parameter><link linkend="guint"><type>guint</type></link> digits</parameter>);</programlisting>
<para>Changes the properties of an existing spin button. The adjustment,
climb rate, and number of decimal places are updated accordingly.</para>
<refsect3 id="gtk-spin-button-configure.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>adjustment</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link> to replace the spin button’s
existing adjustment, or <link linkend="NULL:CAPS"><literal>NULL</literal></link> to leave its current adjustment unchanged. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>nullable</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>climb_rate</para></entry>
<entry role="parameter_description"><para>the new climb rate</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>digits</para></entry>
<entry role="parameter_description"><para>the number of decimal places to display in the spin button</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-new" role="function">
<title>gtk_spin_button_new&#160;()</title>
<indexterm zone="gtk-spin-button-new"><primary>gtk_spin_button_new</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_spin_button_new (<parameter><link linkend="GtkAdjustment"><type>GtkAdjustment</type></link> *adjustment</parameter>,
                     <parameter><link linkend="gdouble"><type>gdouble</type></link> climb_rate</parameter>,
                     <parameter><link linkend="guint"><type>guint</type></link> digits</parameter>);</programlisting>
<para>Creates a new <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>.</para>
<refsect3 id="gtk-spin-button-new.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>adjustment</para></entry>
<entry role="parameter_description"><para>the <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link> object that this spin
button should use, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>climb_rate</para></entry>
<entry role="parameter_description"><para>specifies by how much the rate of change in the value will
accelerate if you continue to hold down an up/down button or arrow key</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>digits</para></entry>
<entry role="parameter_description"><para>the number of decimal places to display</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-spin-button-new.returns" role="returns">
<title>Returns</title>
<para> The new spin button as a <link linkend="GtkWidget"><type>GtkWidget</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-new-with-range" role="function">
<title>gtk_spin_button_new_with_range&#160;()</title>
<indexterm zone="gtk-spin-button-new-with-range"><primary>gtk_spin_button_new_with_range</primary></indexterm>
<programlisting language="C"><link linkend="GtkWidget"><returnvalue>GtkWidget</returnvalue></link>&#160;*
gtk_spin_button_new_with_range (<parameter><link linkend="gdouble"><type>gdouble</type></link> min</parameter>,
                                <parameter><link linkend="gdouble"><type>gdouble</type></link> max</parameter>,
                                <parameter><link linkend="gdouble"><type>gdouble</type></link> step</parameter>);</programlisting>
<para>This is a convenience constructor that allows creation of a numeric
<link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> without manually creating an adjustment. The value is
initially set to the minimum value and a page increment of 10 * <parameter>step</parameter>

is the default. The precision of the spin button is equivalent to the
precision of <parameter>step</parameter>
.</para>
<para>Note that the way in which the precision is derived works best if <parameter>step</parameter>

is a power of ten. If the resulting precision is not suitable for your
needs, use <link linkend="gtk-spin-button-set-digits"><function>gtk_spin_button_set_digits()</function></link> to correct it.</para>
<refsect3 id="gtk-spin-button-new-with-range.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>min</para></entry>
<entry role="parameter_description"><para>Minimum allowable value</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>max</para></entry>
<entry role="parameter_description"><para>Maximum allowable value</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>step</para></entry>
<entry role="parameter_description"><para>Increment added or subtracted by spinning the widget</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-spin-button-new-with-range.returns" role="returns">
<title>Returns</title>
<para> The new spin button as a <link linkend="GtkWidget"><type>GtkWidget</type></link></para>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-set-adjustment" role="function">
<title>gtk_spin_button_set_adjustment&#160;()</title>
<indexterm zone="gtk-spin-button-set-adjustment"><primary>gtk_spin_button_set_adjustment</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_spin_button_set_adjustment (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>,
                                <parameter><link linkend="GtkAdjustment"><type>GtkAdjustment</type></link> *adjustment</parameter>);</programlisting>
<para>Replaces the <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link> associated with <parameter>spin_button</parameter>
.</para>
<refsect3 id="gtk-spin-button-set-adjustment.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>adjustment</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link> to replace the existing adjustment</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-get-adjustment" role="function">
<title>gtk_spin_button_get_adjustment&#160;()</title>
<indexterm zone="gtk-spin-button-get-adjustment"><primary>gtk_spin_button_get_adjustment</primary></indexterm>
<programlisting language="C"><link linkend="GtkAdjustment"><returnvalue>GtkAdjustment</returnvalue></link>&#160;*
gtk_spin_button_get_adjustment (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>);</programlisting>
<para>Get the adjustment associated with a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para>
<refsect3 id="gtk-spin-button-get-adjustment.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-spin-button-get-adjustment.returns" role="returns">
<title>Returns</title>
<para>the <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link> of <parameter>spin_button</parameter>
. </para>
<para><emphasis role="annotation">[<acronym>transfer none</acronym>]</emphasis></para>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-set-digits" role="function">
<title>gtk_spin_button_set_digits&#160;()</title>
<indexterm zone="gtk-spin-button-set-digits"><primary>gtk_spin_button_set_digits</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_spin_button_set_digits (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>,
                            <parameter><link linkend="guint"><type>guint</type></link> digits</parameter>);</programlisting>
<para>Set the precision to be displayed by <parameter>spin_button</parameter>
. Up to 20 digit precision
is allowed.</para>
<refsect3 id="gtk-spin-button-set-digits.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>digits</para></entry>
<entry role="parameter_description"><para>the number of digits after the decimal point to be displayed for the spin button’s value</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-set-increments" role="function">
<title>gtk_spin_button_set_increments&#160;()</title>
<indexterm zone="gtk-spin-button-set-increments"><primary>gtk_spin_button_set_increments</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_spin_button_set_increments (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>,
                                <parameter><link linkend="gdouble"><type>gdouble</type></link> step</parameter>,
                                <parameter><link linkend="gdouble"><type>gdouble</type></link> page</parameter>);</programlisting>
<para>Sets the step and page increments for spin_button.  This affects how
quickly the value changes when the spin button’s arrows are activated.</para>
<refsect3 id="gtk-spin-button-set-increments.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>step</para></entry>
<entry role="parameter_description"><para>increment applied for a button 1 press.</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>page</para></entry>
<entry role="parameter_description"><para>increment applied for a button 2 press.</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-set-range" role="function">
<title>gtk_spin_button_set_range&#160;()</title>
<indexterm zone="gtk-spin-button-set-range"><primary>gtk_spin_button_set_range</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_spin_button_set_range (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>,
                           <parameter><link linkend="gdouble"><type>gdouble</type></link> min</parameter>,
                           <parameter><link linkend="gdouble"><type>gdouble</type></link> max</parameter>);</programlisting>
<para>Sets the minimum and maximum allowable values for <parameter>spin_button</parameter>
.</para>
<para>If the current value is outside this range, it will be adjusted
to fit within the range, otherwise it will remain unchanged.</para>
<refsect3 id="gtk-spin-button-set-range.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>min</para></entry>
<entry role="parameter_description"><para>minimum allowable value</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>max</para></entry>
<entry role="parameter_description"><para>maximum allowable value</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-get-value-as-int" role="function">
<title>gtk_spin_button_get_value_as_int&#160;()</title>
<indexterm zone="gtk-spin-button-get-value-as-int"><primary>gtk_spin_button_get_value_as_int</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
gtk_spin_button_get_value_as_int (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>);</programlisting>
<para>Get the value <parameter>spin_button</parameter>
 represented as an integer.</para>
<refsect3 id="gtk-spin-button-get-value-as-int.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-spin-button-get-value-as-int.returns" role="returns">
<title>Returns</title>
<para> the value of <parameter>spin_button</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-set-value" role="function">
<title>gtk_spin_button_set_value&#160;()</title>
<indexterm zone="gtk-spin-button-set-value"><primary>gtk_spin_button_set_value</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_spin_button_set_value (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>,
                           <parameter><link linkend="gdouble"><type>gdouble</type></link> value</parameter>);</programlisting>
<para>Sets the value of <parameter>spin_button</parameter>
.</para>
<refsect3 id="gtk-spin-button-set-value.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>value</para></entry>
<entry role="parameter_description"><para>the new value</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-set-update-policy" role="function">
<title>gtk_spin_button_set_update_policy&#160;()</title>
<indexterm zone="gtk-spin-button-set-update-policy"><primary>gtk_spin_button_set_update_policy</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_spin_button_set_update_policy (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>,
                                   <parameter><link linkend="GtkSpinButtonUpdatePolicy"><type>GtkSpinButtonUpdatePolicy</type></link> policy</parameter>);</programlisting>
<para>Sets the update behavior of a spin button.
This determines whether the spin button is always updated
or only when a valid value is set.</para>
<refsect3 id="gtk-spin-button-set-update-policy.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>policy</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButtonUpdatePolicy"><type>GtkSpinButtonUpdatePolicy</type></link> value</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-set-numeric" role="function">
<title>gtk_spin_button_set_numeric&#160;()</title>
<indexterm zone="gtk-spin-button-set-numeric"><primary>gtk_spin_button_set_numeric</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_spin_button_set_numeric (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>,
                             <parameter><link linkend="gboolean"><type>gboolean</type></link> numeric</parameter>);</programlisting>
<para>Sets the flag that determines if non-numeric text can be typed
into the spin button.</para>
<refsect3 id="gtk-spin-button-set-numeric.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>numeric</para></entry>
<entry role="parameter_description"><para>flag indicating if only numeric entry is allowed</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-spin" role="function">
<title>gtk_spin_button_spin&#160;()</title>
<indexterm zone="gtk-spin-button-spin"><primary>gtk_spin_button_spin</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_spin_button_spin (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>,
                      <parameter><link linkend="GtkSpinType"><type>GtkSpinType</type></link> direction</parameter>,
                      <parameter><link linkend="gdouble"><type>gdouble</type></link> increment</parameter>);</programlisting>
<para>Increment or decrement a spin button’s value in a specified
direction by a specified amount.</para>
<refsect3 id="gtk-spin-button-spin.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>direction</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinType"><type>GtkSpinType</type></link> indicating the direction to spin</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>increment</para></entry>
<entry role="parameter_description"><para>step increment to apply in the specified direction</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-set-wrap" role="function">
<title>gtk_spin_button_set_wrap&#160;()</title>
<indexterm zone="gtk-spin-button-set-wrap"><primary>gtk_spin_button_set_wrap</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_spin_button_set_wrap (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>,
                          <parameter><link linkend="gboolean"><type>gboolean</type></link> wrap</parameter>);</programlisting>
<para>Sets the flag that determines if a spin button value wraps
around to the opposite limit when the upper or lower limit
of the range is exceeded.</para>
<refsect3 id="gtk-spin-button-set-wrap.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>wrap</para></entry>
<entry role="parameter_description"><para>a flag indicating if wrapping behavior is performed</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-set-snap-to-ticks" role="function">
<title>gtk_spin_button_set_snap_to_ticks&#160;()</title>
<indexterm zone="gtk-spin-button-set-snap-to-ticks"><primary>gtk_spin_button_set_snap_to_ticks</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_spin_button_set_snap_to_ticks (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>,
                                   <parameter><link linkend="gboolean"><type>gboolean</type></link> snap_to_ticks</parameter>);</programlisting>
<para>Sets the policy as to whether values are corrected to the
nearest step increment when a spin button is activated after
providing an invalid value.</para>
<refsect3 id="gtk-spin-button-set-snap-to-ticks.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>snap_to_ticks</para></entry>
<entry role="parameter_description"><para>a flag indicating if invalid values should be corrected</para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-update" role="function">
<title>gtk_spin_button_update&#160;()</title>
<indexterm zone="gtk-spin-button-update"><primary>gtk_spin_button_update</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_spin_button_update (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>);</programlisting>
<para>Manually force an update of the spin button.</para>
<refsect3 id="gtk-spin-button-update.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-get-digits" role="function">
<title>gtk_spin_button_get_digits&#160;()</title>
<indexterm zone="gtk-spin-button-get-digits"><primary>gtk_spin_button_get_digits</primary></indexterm>
<programlisting language="C"><link linkend="guint"><returnvalue>guint</returnvalue></link>
gtk_spin_button_get_digits (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>);</programlisting>
<para>Fetches the precision of <parameter>spin_button</parameter>
. See <link linkend="gtk-spin-button-set-digits"><function>gtk_spin_button_set_digits()</function></link>.</para>
<refsect3 id="gtk-spin-button-get-digits.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-spin-button-get-digits.returns" role="returns">
<title>Returns</title>
<para> the current precision</para>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-get-increments" role="function">
<title>gtk_spin_button_get_increments&#160;()</title>
<indexterm zone="gtk-spin-button-get-increments"><primary>gtk_spin_button_get_increments</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_spin_button_get_increments (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>,
                                <parameter><link linkend="gdouble"><type>gdouble</type></link> *step</parameter>,
                                <parameter><link linkend="gdouble"><type>gdouble</type></link> *page</parameter>);</programlisting>
<para>Gets the current step and page the increments used by <parameter>spin_button</parameter>
. See
<link linkend="gtk-spin-button-set-increments"><function>gtk_spin_button_set_increments()</function></link>.</para>
<refsect3 id="gtk-spin-button-get-increments.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>step</para></entry>
<entry role="parameter_description"><para>location to store step increment, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>page</para></entry>
<entry role="parameter_description"><para>location to store page increment, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>allow-none</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-get-numeric" role="function">
<title>gtk_spin_button_get_numeric&#160;()</title>
<indexterm zone="gtk-spin-button-get-numeric"><primary>gtk_spin_button_get_numeric</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_spin_button_get_numeric (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>);</programlisting>
<para>Returns whether non-numeric text can be typed into the spin button.
See <link linkend="gtk-spin-button-set-numeric"><function>gtk_spin_button_set_numeric()</function></link>.</para>
<refsect3 id="gtk-spin-button-get-numeric.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-spin-button-get-numeric.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if only numeric text can be entered</para>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-get-range" role="function">
<title>gtk_spin_button_get_range&#160;()</title>
<indexterm zone="gtk-spin-button-get-range"><primary>gtk_spin_button_get_range</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
gtk_spin_button_get_range (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>,
                           <parameter><link linkend="gdouble"><type>gdouble</type></link> *min</parameter>,
                           <parameter><link linkend="gdouble"><type>gdouble</type></link> *max</parameter>);</programlisting>
<para>Gets the range allowed for <parameter>spin_button</parameter>
.
See <link linkend="gtk-spin-button-set-range"><function>gtk_spin_button_set_range()</function></link>.</para>
<refsect3 id="gtk-spin-button-get-range.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>min</para></entry>
<entry role="parameter_description"><para>location to store minimum allowed value, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>optional</acronym>]</emphasis></entry></row>
<row><entry role="parameter_name"><para>max</para></entry>
<entry role="parameter_description"><para>location to store maximum allowed value, or <link linkend="NULL:CAPS"><literal>NULL</literal></link>. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>optional</acronym>]</emphasis></entry></row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-get-snap-to-ticks" role="function">
<title>gtk_spin_button_get_snap_to_ticks&#160;()</title>
<indexterm zone="gtk-spin-button-get-snap-to-ticks"><primary>gtk_spin_button_get_snap_to_ticks</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_spin_button_get_snap_to_ticks (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>);</programlisting>
<para>Returns whether the values are corrected to the nearest step.
See <link linkend="gtk-spin-button-set-snap-to-ticks"><function>gtk_spin_button_set_snap_to_ticks()</function></link>.</para>
<refsect3 id="gtk-spin-button-get-snap-to-ticks.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-spin-button-get-snap-to-ticks.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if values are snapped to the nearest step</para>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-get-update-policy" role="function">
<title>gtk_spin_button_get_update_policy&#160;()</title>
<indexterm zone="gtk-spin-button-get-update-policy"><primary>gtk_spin_button_get_update_policy</primary></indexterm>
<programlisting language="C"><link linkend="GtkSpinButtonUpdatePolicy"><returnvalue>GtkSpinButtonUpdatePolicy</returnvalue></link>
gtk_spin_button_get_update_policy (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>);</programlisting>
<para>Gets the update behavior of a spin button.
See <link linkend="gtk-spin-button-set-update-policy"><function>gtk_spin_button_set_update_policy()</function></link>.</para>
<refsect3 id="gtk-spin-button-get-update-policy.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-spin-button-get-update-policy.returns" role="returns">
<title>Returns</title>
<para> the current update policy</para>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-get-value" role="function">
<title>gtk_spin_button_get_value&#160;()</title>
<indexterm zone="gtk-spin-button-get-value"><primary>gtk_spin_button_get_value</primary></indexterm>
<programlisting language="C"><link linkend="gdouble"><returnvalue>gdouble</returnvalue></link>
gtk_spin_button_get_value (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>);</programlisting>
<para>Get the value in the <parameter>spin_button</parameter>
.</para>
<refsect3 id="gtk-spin-button-get-value.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-spin-button-get-value.returns" role="returns">
<title>Returns</title>
<para> the value of <parameter>spin_button</parameter>
</para>
</refsect3></refsect2>
<refsect2 id="gtk-spin-button-get-wrap" role="function">
<title>gtk_spin_button_get_wrap&#160;()</title>
<indexterm zone="gtk-spin-button-get-wrap"><primary>gtk_spin_button_get_wrap</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
gtk_spin_button_get_wrap (<parameter><link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button</parameter>);</programlisting>
<para>Returns whether the spin button’s value wraps around to the
opposite limit when the upper or lower limit of the range is
exceeded. See <link linkend="gtk-spin-button-set-wrap"><function>gtk_spin_button_set_wrap()</function></link>.</para>
<refsect3 id="gtk-spin-button-get-wrap.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="gtk-spin-button-get-wrap.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the spin button wraps around</para>
</refsect3></refsect2>

</refsect1>
<refsect1 id="GtkSpinButton.other_details" role="details">
<title role="details.title">Types and Values</title>
<refsect2 id="GtkSpinButton-struct" role="struct">
<title>GtkSpinButton</title>
<indexterm zone="GtkSpinButton-struct"><primary>GtkSpinButton</primary></indexterm>
<programlisting language="C">typedef struct _GtkSpinButton GtkSpinButton;</programlisting>
</refsect2>
<refsect2 id="GtkSpinButtonUpdatePolicy" role="enum">
<title>enum GtkSpinButtonUpdatePolicy</title>
<indexterm zone="GtkSpinButtonUpdatePolicy"><primary>GtkSpinButtonUpdatePolicy</primary></indexterm>
<para>The spin button update policy determines whether the spin button displays
values even if they are outside the bounds of its adjustment.
See <link linkend="gtk-spin-button-set-update-policy"><function>gtk_spin_button_set_update_policy()</function></link>.</para>
<refsect3 id="GtkSpinButtonUpdatePolicy.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="GTK-UPDATE-ALWAYS:CAPS">GTK_UPDATE_ALWAYS</para></entry>
<entry role="enum_member_description"><para>When refreshing your <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>, the value is
always displayed</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-UPDATE-IF-VALID:CAPS">GTK_UPDATE_IF_VALID</para></entry>
<entry role="enum_member_description"><para>When refreshing your <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>, the value is
only displayed if it is valid within the bounds of the spin button's
adjustment</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GtkSpinType" role="enum">
<title>enum GtkSpinType</title>
<indexterm zone="GtkSpinType"><primary>GtkSpinType</primary></indexterm>
<para>The values of the GtkSpinType enumeration are used to specify the
change to make in <link linkend="gtk-spin-button-spin"><function>gtk_spin_button_spin()</function></link>.</para>
<refsect3 id="GtkSpinType.members" role="enum_members">
<title>Members</title>
<informaltable role="enum_members_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="enum_members_name" colwidth="300px"/>
<colspec colname="enum_members_description"/>
<colspec colname="enum_members_annotations" colwidth="200px"/>
<tbody>
<row role="constant"><entry role="enum_member_name"><para id="GTK-SPIN-STEP-FORWARD:CAPS">GTK_SPIN_STEP_FORWARD</para></entry>
<entry role="enum_member_description"><para>Increment by the adjustments step increment.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-SPIN-STEP-BACKWARD:CAPS">GTK_SPIN_STEP_BACKWARD</para></entry>
<entry role="enum_member_description"><para>Decrement by the adjustments step increment.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-SPIN-PAGE-FORWARD:CAPS">GTK_SPIN_PAGE_FORWARD</para></entry>
<entry role="enum_member_description"><para>Increment by the adjustments page increment.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-SPIN-PAGE-BACKWARD:CAPS">GTK_SPIN_PAGE_BACKWARD</para></entry>
<entry role="enum_member_description"><para>Decrement by the adjustments page increment.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-SPIN-HOME:CAPS">GTK_SPIN_HOME</para></entry>
<entry role="enum_member_description"><para>Go to the adjustments lower bound.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-SPIN-END:CAPS">GTK_SPIN_END</para></entry>
<entry role="enum_member_description"><para>Go to the adjustments upper bound.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
<row role="constant"><entry role="enum_member_name"><para id="GTK-SPIN-USER-DEFINED:CAPS">GTK_SPIN_USER_DEFINED</para></entry>
<entry role="enum_member_description"><para>Change by a specified amount.</para>
</entry>
<entry role="enum_member_annotations"></entry>
</row>
</tbody></tgroup></informaltable>
</refsect3></refsect2>
<refsect2 id="GTK-INPUT-ERROR:CAPS" role="macro">
<title>GTK_INPUT_ERROR</title>
<indexterm zone="GTK-INPUT-ERROR:CAPS"><primary>GTK_INPUT_ERROR</primary></indexterm>
<programlisting language="C">#define GTK_INPUT_ERROR -1
</programlisting>
<para>Constant to return from a signal handler for the <link linkend="GtkSpinButton-input"><type>“input”</type></link>
signal in case of conversion failure.</para>
</refsect2>

</refsect1>
<refsect1 id="GtkSpinButton.property-details" role="property_details">
<title role="property_details.title">Property Details</title>
<refsect2 id="GtkSpinButton--adjustment" role="property"><title>The <literal>“adjustment”</literal> property</title>
<indexterm zone="GtkSpinButton--adjustment"><primary>GtkSpinButton:adjustment</primary></indexterm>
<programlisting>  “adjustment”               <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link>&#160;*</programlisting>
<para>The adjustment that holds the value of the spin button.</para><para>Owner: GtkSpinButton</para>
<para>Flags: Read / Write</para>
</refsect2>
<refsect2 id="GtkSpinButton--climb-rate" role="property"><title>The <literal>“climb-rate”</literal> property</title>
<indexterm zone="GtkSpinButton--climb-rate"><primary>GtkSpinButton: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 or key.</para><para>Owner: GtkSpinButton</para>
<para>Flags: Read / Write</para>
<para>Allowed values: &gt;= 0</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GtkSpinButton--digits" role="property"><title>The <literal>“digits”</literal> property</title>
<indexterm zone="GtkSpinButton--digits"><primary>GtkSpinButton:digits</primary></indexterm>
<programlisting>  “digits”                   <link linkend="guint"><type>guint</type></link></programlisting>
<para>The number of decimal places to display.</para><para>Owner: GtkSpinButton</para>
<para>Flags: Read / Write</para>
<para>Allowed values: &lt;= 20</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GtkSpinButton--numeric" role="property"><title>The <literal>“numeric”</literal> property</title>
<indexterm zone="GtkSpinButton--numeric"><primary>GtkSpinButton:numeric</primary></indexterm>
<programlisting>  “numeric”                  <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether non-numeric characters should be ignored.</para><para>Owner: GtkSpinButton</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkSpinButton--snap-to-ticks" role="property"><title>The <literal>“snap-to-ticks”</literal> property</title>
<indexterm zone="GtkSpinButton--snap-to-ticks"><primary>GtkSpinButton:snap-to-ticks</primary></indexterm>
<programlisting>  “snap-to-ticks”            <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether erroneous values are automatically changed to a spin button’s nearest step increment.</para><para>Owner: GtkSpinButton</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkSpinButton--update-policy" role="property"><title>The <literal>“update-policy”</literal> property</title>
<indexterm zone="GtkSpinButton--update-policy"><primary>GtkSpinButton:update-policy</primary></indexterm>
<programlisting>  “update-policy”            <link linkend="GtkSpinButtonUpdatePolicy"><type>GtkSpinButtonUpdatePolicy</type></link></programlisting>
<para>Whether the spin button should update always, or only when the value is legal.</para><para>Owner: GtkSpinButton</para>
<para>Flags: Read / Write</para>
<para>Default value: GTK_UPDATE_ALWAYS</para>
</refsect2>
<refsect2 id="GtkSpinButton--value" role="property"><title>The <literal>“value”</literal> property</title>
<indexterm zone="GtkSpinButton--value"><primary>GtkSpinButton:value</primary></indexterm>
<programlisting>  “value”                    <link linkend="gdouble"><type>gdouble</type></link></programlisting>
<para>Reads the current value, or sets a new value.</para><para>Owner: GtkSpinButton</para>
<para>Flags: Read / Write</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GtkSpinButton--wrap" role="property"><title>The <literal>“wrap”</literal> property</title>
<indexterm zone="GtkSpinButton--wrap"><primary>GtkSpinButton:wrap</primary></indexterm>
<programlisting>  “wrap”                     <link linkend="gboolean"><type>gboolean</type></link></programlisting>
<para>Whether a spin button should wrap upon reaching its limits.</para><para>Owner: GtkSpinButton</para>
<para>Flags: Read / Write</para>
<para>Default value: FALSE</para>
</refsect2>

</refsect1>
<refsect1 id="GtkSpinButton.signal-details" role="signals">
<title role="signals.title">Signal Details</title>
<refsect2 id="GtkSpinButton-change-value" role="signal"><title>The <literal>“change-value”</literal> signal</title>
<indexterm zone="GtkSpinButton-change-value"><primary>GtkSpinButton::change-value</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button,
               <link linkend="GtkScrollType"><type>GtkScrollType</type></link>  scroll,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The ::change-value signal is a <link linkend="GtkBindingSignal">keybinding signal</link>

which gets emitted when the user initiates a value change. </para>
<para>Applications should not connect to it, but may emit it with

<link linkend="g-signal-emit-by-name"><function>g_signal_emit_by_name()</function></link> if they need to control the cursor
programmatically.</para>
<para>The default bindings for this signal are Up/Down and PageUp and/PageDown.</para>
<refsect3 id="GtkSpinButton-change-value.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>the object on which the signal was emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>scroll</para></entry>
<entry role="parameter_description"><para>a <link linkend="GtkScrollType"><type>GtkScrollType</type></link> to specify the speed and amount of change</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-ACTION:CAPS">Action</link></para>
</refsect2><refsect2 id="GtkSpinButton-input" role="signal"><title>The <literal>“input”</literal> signal</title>
<indexterm zone="GtkSpinButton-input"><primary>GtkSpinButton::input</primary></indexterm>
<programlisting language="C"><link linkend="gint"><returnvalue>gint</returnvalue></link>
user_function (<link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button,
               <link linkend="gpointer"><type>gpointer</type></link>       new_value,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The ::input signal can be used to influence the conversion of
the users input into a double value. The signal handler is
expected to use <link linkend="gtk-editable-get-text"><function>gtk_editable_get_text()</function></link> to retrieve the text of
the spinbutton and set <parameter>new_value</parameter>
 to the new value.</para>
<para>The default conversion uses <link linkend="g-strtod"><function>g_strtod()</function></link>.</para>
<refsect3 id="GtkSpinButton-input.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>the object on which the signal was emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><para>new_value</para></entry>
<entry role="parameter_description"><para>return location for the new value. </para></entry>
<entry role="parameter_annotations"><emphasis role="annotation">[<acronym>out</acronym>][<acronym>type</acronym> double]</emphasis></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="GtkSpinButton-input.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> for a successful conversion, <link linkend="FALSE:CAPS"><literal>FALSE</literal></link> if the input
was not handled, and <link linkend="GTK-INPUT-ERROR:CAPS"><literal>GTK_INPUT_ERROR</literal></link> if the conversion failed.</para>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkSpinButton-output" role="signal"><title>The <literal>“output”</literal> signal</title>
<indexterm zone="GtkSpinButton-output"><primary>GtkSpinButton::output</primary></indexterm>
<programlisting language="C"><link linkend="gboolean"><returnvalue>gboolean</returnvalue></link>
user_function (<link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The ::output signal can be used to change to formatting
of the value that is displayed in the spin buttons entry.</para>
<informalexample><programlisting role="example"><![CDATA[
// show leading zeros
static gboolean
on_output (GtkSpinButton *spin,
           gpointer       data)
{
   GtkAdjustment *adjustment;
   gchar *text;
   int value;

   adjustment = gtk_spin_button_get_adjustment (spin);
   value = (int)gtk_adjustment_get_value (adjustment);
   text = g_strdup_printf ("%02d", value);
   gtk_spin_button_set_text (spin, text):
   g_free (text);

   return TRUE;
}
]]></programlisting></informalexample>
<para></para>
<refsect3 id="GtkSpinButton-output.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>the object on which the signal was emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><refsect3 id="GtkSpinButton-output.returns" role="returns">
<title>Returns</title>
<para> <link linkend="TRUE:CAPS"><literal>TRUE</literal></link> if the value has been displayed</para>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkSpinButton-value-changed" role="signal"><title>The <literal>“value-changed”</literal> signal</title>
<indexterm zone="GtkSpinButton-value-changed"><primary>GtkSpinButton::value-changed</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The ::value-changed signal is emitted when the value represented by
<parameter>spinbutton</parameter>
 changes. Also see the <link linkend="GtkSpinButton-output"><type>“output”</type></link> signal.</para>
<refsect3 id="GtkSpinButton-value-changed.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>the object on which the signal was emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2><refsect2 id="GtkSpinButton-wrapped" role="signal"><title>The <literal>“wrapped”</literal> signal</title>
<indexterm zone="GtkSpinButton-wrapped"><primary>GtkSpinButton::wrapped</primary></indexterm>
<programlisting language="C"><link linkend="void"><returnvalue>void</returnvalue></link>
user_function (<link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> *spin_button,
               <link linkend="gpointer"><type>gpointer</type></link>       user_data)</programlisting>
<para>The ::wrapped signal is emitted right after the spinbutton wraps
from its maximum to minimum value or vice-versa.</para>
<refsect3 id="GtkSpinButton-wrapped.parameters" role="parameters">
<title>Parameters</title>
<informaltable role="parameters_table" pgwide="1" frame="none">
<tgroup cols="3">
<colspec colname="parameters_name" colwidth="150px"/>
<colspec colname="parameters_description"/>
<colspec colname="parameters_annotations" colwidth="200px"/>
<tbody>
<row><entry role="parameter_name"><para>spin_button</para></entry>
<entry role="parameter_description"><para>the object on which the signal was emitted</para></entry>
<entry role="parameter_annotations"></entry></row>
<row><entry role="parameter_name"><simpara>user_data</simpara></entry>
<entry role="parameter_description"><simpara>user data set when the signal handler was connected.</simpara></entry>
<entry role="parameter_annotations"></entry></row>
</tbody></tgroup></informaltable>
</refsect3><para>Flags: <link linkend="G-SIGNAL-RUN-LAST:CAPS">Run Last</link></para>
</refsect2>
</refsect1>
<refsect1 id="GtkSpinButton.see-also">
<title>See Also</title>
<para><link linkend="GtkEntry"><type>GtkEntry</type></link></para>

</refsect1>

</refentry>
