<?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 index-Objects-Grouped SYSTEM "objects_grouped.sgml"-->
<refentry id="GtkSpinButton">
<refmeta>
<refentrytitle role="top_of_page" id="GtkSpinButton.top_of_page">GtkSpinButton</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>GTK Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>GtkSpinButton</refname>
<refpurpose>Retrieve an integer or floating-point number from the user</refpurpose>
</refnamediv>

<refsynopsisdiv id="GtkSpinButton.synopsis" role="synopsis">
<title role="synopsis.title">Synopsis</title>

<synopsis>

#include &lt;gtk/gtk.h&gt;

                    <link linkend="GtkSpinButton-struct">GtkSpinButton</link>;
enum                <link linkend="GtkSpinButtonUpdatePolicy">GtkSpinButtonUpdatePolicy</link>;
enum                <link linkend="GtkSpinType">GtkSpinType</link>;
<link linkend="void">void</link>                <link linkend="gtk-spin-button-configure">gtk_spin_button_configure</link>           (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="GtkAdjustment">GtkAdjustment</link> *adjustment,
                                                         <link linkend="gdouble">gdouble</link> climb_rate,
                                                         <link linkend="guint">guint</link> digits);
<link linkend="GtkWidget">GtkWidget</link>*          <link linkend="gtk-spin-button-new">gtk_spin_button_new</link>                 (<link linkend="GtkAdjustment">GtkAdjustment</link> *adjustment,
                                                         <link linkend="gdouble">gdouble</link> climb_rate,
                                                         <link linkend="guint">guint</link> digits);
<link linkend="GtkWidget">GtkWidget</link>*          <link linkend="gtk-spin-button-new-with-range">gtk_spin_button_new_with_range</link>      (<link linkend="gdouble">gdouble</link> min,
                                                         <link linkend="gdouble">gdouble</link> max,
                                                         <link linkend="gdouble">gdouble</link> step);
<link linkend="void">void</link>                <link linkend="gtk-spin-button-set-adjustment">gtk_spin_button_set_adjustment</link>      (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="GtkAdjustment">GtkAdjustment</link> *adjustment);
<link linkend="GtkAdjustment">GtkAdjustment</link>*      <link linkend="gtk-spin-button-get-adjustment">gtk_spin_button_get_adjustment</link>      (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button);
<link linkend="void">void</link>                <link linkend="gtk-spin-button-set-digits">gtk_spin_button_set_digits</link>          (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="guint">guint</link> digits);
<link linkend="void">void</link>                <link linkend="gtk-spin-button-set-increments">gtk_spin_button_set_increments</link>      (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="gdouble">gdouble</link> step,
                                                         <link linkend="gdouble">gdouble</link> page);
<link linkend="void">void</link>                <link linkend="gtk-spin-button-set-range">gtk_spin_button_set_range</link>           (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="gdouble">gdouble</link> min,
                                                         <link linkend="gdouble">gdouble</link> max);
#define             <link linkend="gtk-spin-button-get-value-as-float">gtk_spin_button_get_value_as_float</link>
<link linkend="gint">gint</link>                <link linkend="gtk-spin-button-get-value-as-int">gtk_spin_button_get_value_as_int</link>    (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button);
<link linkend="void">void</link>                <link linkend="gtk-spin-button-set-value">gtk_spin_button_set_value</link>           (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="gdouble">gdouble</link> value);
<link linkend="void">void</link>                <link linkend="gtk-spin-button-set-update-policy">gtk_spin_button_set_update_policy</link>   (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="GtkSpinButtonUpdatePolicy">GtkSpinButtonUpdatePolicy</link> policy);
<link linkend="void">void</link>                <link linkend="gtk-spin-button-set-numeric">gtk_spin_button_set_numeric</link>         (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="gboolean">gboolean</link> numeric);
<link linkend="void">void</link>                <link linkend="gtk-spin-button-spin">gtk_spin_button_spin</link>                (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="GtkSpinType">GtkSpinType</link> direction,
                                                         <link linkend="gdouble">gdouble</link> increment);
<link linkend="void">void</link>                <link linkend="gtk-spin-button-set-wrap">gtk_spin_button_set_wrap</link>            (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="gboolean">gboolean</link> wrap);
<link linkend="void">void</link>                <link linkend="gtk-spin-button-set-snap-to-ticks">gtk_spin_button_set_snap_to_ticks</link>   (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="gboolean">gboolean</link> snap_to_ticks);
<link linkend="void">void</link>                <link linkend="gtk-spin-button-update">gtk_spin_button_update</link>              (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button);
<link linkend="guint">guint</link>               <link linkend="gtk-spin-button-get-digits">gtk_spin_button_get_digits</link>          (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button);
<link linkend="void">void</link>                <link linkend="gtk-spin-button-get-increments">gtk_spin_button_get_increments</link>      (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="gdouble">gdouble</link> *step,
                                                         <link linkend="gdouble">gdouble</link> *page);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-spin-button-get-numeric">gtk_spin_button_get_numeric</link>         (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button);
<link linkend="void">void</link>                <link linkend="gtk-spin-button-get-range">gtk_spin_button_get_range</link>           (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="gdouble">gdouble</link> *min,
                                                         <link linkend="gdouble">gdouble</link> *max);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-spin-button-get-snap-to-ticks">gtk_spin_button_get_snap_to_ticks</link>   (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button);
<link linkend="GtkSpinButtonUpdatePolicy">GtkSpinButtonUpdatePolicy</link>  <link linkend="gtk-spin-button-get-update-policy">gtk_spin_button_get_update_policy</link>
                                                        (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button);
<link linkend="gdouble">gdouble</link>             <link linkend="gtk-spin-button-get-value">gtk_spin_button_get_value</link>           (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button);
<link linkend="gboolean">gboolean</link>            <link linkend="gtk-spin-button-get-wrap">gtk_spin_button_get_wrap</link>            (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button);
#define             <link linkend="GTK-INPUT-ERROR--CAPS">GTK_INPUT_ERROR</link>
</synopsis>
</refsynopsisdiv>

<refsect1 id="GtkSpinButton.object-hierarchy" role="object_hierarchy">
<title role="object_hierarchy.title">Object Hierarchy</title>
<synopsis>
  <link linkend="GObject">GObject</link>
   +----<link linkend="GInitiallyUnowned">GInitiallyUnowned</link>
         +----<link linkend="GtkObject">GtkObject</link>
               +----<link linkend="GtkWidget">GtkWidget</link>
                     +----<link linkend="GtkEntry">GtkEntry</link>
                           +----GtkSpinButton
</synopsis>
</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="GtkCellEditable">GtkCellEditable</link> and  <link linkend="GtkEditable">GtkEditable</link>.</para>
</refsect1>


<refsect1 id="GtkSpinButton.properties" role="properties">
<title role="properties.title">Properties</title>
<synopsis>
  &quot;<link linkend="GtkSpinButton--adjustment">adjustment</link>&quot;               <link linkend="GtkAdjustment">GtkAdjustment</link>*        : Read / Write
  &quot;<link linkend="GtkSpinButton--climb-rate">climb-rate</link>&quot;               <link linkend="gdouble">gdouble</link>               : Read / Write
  &quot;<link linkend="GtkSpinButton--digits">digits</link>&quot;                   <link linkend="guint">guint</link>                 : Read / Write
  &quot;<link linkend="GtkSpinButton--numeric">numeric</link>&quot;                  <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkSpinButton--snap-to-ticks">snap-to-ticks</link>&quot;            <link linkend="gboolean">gboolean</link>              : Read / Write
  &quot;<link linkend="GtkSpinButton--update-policy">update-policy</link>&quot;            <link linkend="GtkSpinButtonUpdatePolicy">GtkSpinButtonUpdatePolicy</link>  : Read / Write
  &quot;<link linkend="GtkSpinButton--value">value</link>&quot;                    <link linkend="gdouble">gdouble</link>               : Read / Write
  &quot;<link linkend="GtkSpinButton--wrap">wrap</link>&quot;                     <link linkend="gboolean">gboolean</link>              : Read / Write
</synopsis>
</refsect1>
<refsect1 id="GtkSpinButton.style-properties" role="style_properties">
<title role="style_properties.title">Style Properties</title>
<synopsis>
  &quot;<link linkend="GtkSpinButton--s-shadow-type">shadow-type</link>&quot;              <link linkend="GtkShadowType">GtkShadowType</link>         : Read
</synopsis>
</refsect1>

<refsect1 id="GtkSpinButton.signals" role="signal_proto">
<title role="signal_proto.title">Signals</title>
<synopsis>
  &quot;<link linkend="GtkSpinButton-change-value">change-value</link>&quot;                                   : Run Last / Action
  &quot;<link linkend="GtkSpinButton-input">input</link>&quot;                                          : Run Last
  &quot;<link linkend="GtkSpinButton-output">output</link>&quot;                                         : Run Last
  &quot;<link linkend="GtkSpinButton-value-changed">value-changed</link>&quot;                                  : Run Last
  &quot;<link linkend="GtkSpinButton-wrapped">wrapped</link>&quot;                                        : Run Last
</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>,
<link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> 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 <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> are through a <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link>. See the
<link linkend="GtkAdjustment"><type>GtkAdjustment</type></link> section for more details about an adjustment's properties.
</para>
<para>
<example>
<title>Using a <structname>GtkSpinButton</structname> to get an integer.</title>
<programlisting>
/* 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 *a_spinner, gpointer user_data) {
   return gtk_spin_button_get_value_as_int (a_spinner);
}
void create_integer_spin_button (void) {
   GtkWidget *window, *spinner;
   GtkAdjustment *spinner_adj;
   spinner_adj = (GtkAdjustment *) gtk_adjustment_new (50.0, 0.0, 100.0, 1.0, 5.0, 5.0);
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   gtk_container_set_border_width (GTK_CONTAINER (window), 5);
   /* creates the spinner, with no decimal places */
   spinner = gtk_spin_button_new (spinner_adj, 1.0, 0);
   gtk_container_add (GTK_CONTAINER (window), spinner);
   gtk_widget_show_all (window);
   return;
}
</programlisting>
</example>
</para>
<para>
<example>
<title>Using a <structname>GtkSpinButton</structname> to get a floating point value.</title>
<programlisting>
/* Provides a function to retrieve a floating point value from a
 * GtkSpinButton, and creates a high precision spin button.
 */
gfloat grab_int_value (GtkSpinButton *a_spinner, gpointer user_data) {
   return gtk_spin_button_get_value (a_spinner);
}
void create_floating_spin_button (void) {
   GtkWidget *window, *spinner;
   GtkAdjustment *spinner_adj;
   spinner_adj = (GtkAdjustment *) gtk_adjustment_new (2.500, 0.0, 5.0, 0.001, 0.1, 0.1);
   window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
   gtk_container_set_border_width (GTK_CONTAINER (window), 5);
   /* creates the spinner, with three decimal places */
   spinner = gtk_spin_button_new (spinner_adj, 0.001, 3);
   gtk_container_add (GTK_CONTAINER (window), spinner);
   gtk_widget_show_all (window);
   return;
}
</programlisting>
</example>
</para>
</refsect1>

<refsect1 id="GtkSpinButton.details" role="details">
<title role="details.title">Details</title>
<refsect2 id="GtkSpinButton-struct" role="struct">
<title>GtkSpinButton</title>
<indexterm zone="GtkSpinButton-struct"><primary sortas="SpinButton">GtkSpinButton</primary></indexterm><programlisting>typedef struct _GtkSpinButton GtkSpinButton;</programlisting>
<para>
<structfield>entry</structfield> is the <link linkend="GtkEntry"><type>GtkEntry</type></link> part of the <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>
widget, and can be used accordingly. All other fields contain private data
and should only be modified using the functions below.
</para></refsect2>
<refsect2 id="GtkSpinButtonUpdatePolicy" role="enum">
<title>enum GtkSpinButtonUpdatePolicy</title>
<indexterm zone="GtkSpinButtonUpdatePolicy"><primary sortas="SpinButtonUpdatePolicy">GtkSpinButtonUpdatePolicy</primary></indexterm><programlisting>typedef enum
{
  GTK_UPDATE_ALWAYS,
  GTK_UPDATE_IF_VALID
} GtkSpinButtonUpdatePolicy;
</programlisting>
<para>
<informaltable pgwide="1" frame="none" role="enum">
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
<tbody>
<row>
<entry>GTK_UPDATE_ALWAYS</entry>
<entry>When refreshing your <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>, the value is always displayed.</entry>
</row>
<row>
<entry>GTK_UPDATE_IF_VALID</entry>
<entry>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 <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link>.</entry>
</row>
</tbody></tgroup></informaltable>
</para></refsect2>
<refsect2 id="GtkSpinType" role="enum">
<title>enum GtkSpinType</title>
<indexterm zone="GtkSpinType"><primary sortas="SpinType">GtkSpinType</primary></indexterm><programlisting>typedef enum
{
  GTK_SPIN_STEP_FORWARD,
  GTK_SPIN_STEP_BACKWARD,
  GTK_SPIN_PAGE_FORWARD,
  GTK_SPIN_PAGE_BACKWARD,
  GTK_SPIN_HOME,
  GTK_SPIN_END,
  GTK_SPIN_USER_DEFINED
} GtkSpinType;
</programlisting>
<para>
<informaltable pgwide="1" frame="none" role="struct">
<tgroup cols="2"><colspec colwidth="2*"/><colspec colwidth="8*"/>
<tbody>
<row>
<entry>GTK_SPIN_STEP_FORWARD,
GTK_SPIN_STEP_BACKWARD,
GTK_SPIN_PAGE_FORWARD,
GTK_SPIN_PAGE_BACKWARD</entry>
<entry>These values spin a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> by the relevant values of the spin button's <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link>.</entry>
</row>
<row>
<entry>GTK_SPIN_HOME,
GTK_SPIN_END</entry>
<entry>These set the spin button's value to the minimum or maxmimum possible values, (set by its <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link>), respectively.</entry>
</row>
<row>
<entry>GTK_SPIN_USER_DEFINED</entry>
<entry>The programmer must specify the exact amount to spin the <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>.</entry>
</row>
</tbody></tgroup></informaltable>
</para></refsect2>
<refsect2 id="gtk-spin-button-configure" role="function">
<title>gtk_spin_button_configure ()</title>
<indexterm zone="gtk-spin-button-configure"><primary sortas="spin_button_configure">gtk_spin_button_configure</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_spin_button_configure           (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="GtkAdjustment">GtkAdjustment</link> *adjustment,
                                                         <link linkend="gdouble">gdouble</link> climb_rate,
                                                         <link linkend="guint">guint</link> digits);</programlisting>
<para>
Changes the properties of an existing spin button. The adjustment, climb rate, and number of decimal places are all changed accordingly, after this function call.
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>adjustment</parameter>&#160;:</term>
<listitem><simpara>a <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link>.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>climb_rate</parameter>&#160;:</term>
<listitem><simpara>the new climb rate.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>digits</parameter>&#160;:</term>
<listitem><simpara>the number of decimal places to display in the spin button.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-new" role="function">
<title>gtk_spin_button_new ()</title>
<indexterm zone="gtk-spin-button-new"><primary sortas="spin_button_new">gtk_spin_button_new</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>*          gtk_spin_button_new                 (<link linkend="GtkAdjustment">GtkAdjustment</link> *adjustment,
                                                         <link linkend="gdouble">gdouble</link> climb_rate,
                                                         <link linkend="guint">guint</link> digits);</programlisting>
<para>
Creates a new <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>.
</para><variablelist role="params">
<varlistentry><term><parameter>adjustment</parameter>&#160;:</term>
<listitem><simpara>the <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link> object that this spin button should use.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>climb_rate</parameter>&#160;:</term>
<listitem><simpara>specifies how much the spin button changes when an arrow is clicked on.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>digits</parameter>&#160;:</term>
<listitem><simpara>the number of decimal places to display.
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>The new spin button as a <link linkend="GtkWidget"><type>GtkWidget</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-new-with-range" role="function">
<title>gtk_spin_button_new_with_range ()</title>
<indexterm zone="gtk-spin-button-new-with-range"><primary sortas="spin_button_new_with_range">gtk_spin_button_new_with_range</primary></indexterm><programlisting><link linkend="GtkWidget">GtkWidget</link>*          gtk_spin_button_new_with_range      (<link linkend="gdouble">gdouble</link> min,
                                                         <link linkend="gdouble">gdouble</link> max,
                                                         <link linkend="gdouble">gdouble</link> step);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>min</parameter>&#160;:</term>
<listitem><simpara> Minimum allowable value
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>max</parameter>&#160;:</term>
<listitem><simpara> Maximum allowable value
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>step</parameter>&#160;:</term>
<listitem><simpara> Increment added or subtracted by spinning the widget
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> The new spin button as a <link linkend="GtkWidget"><type>GtkWidget</type></link>.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-set-adjustment" role="function">
<title>gtk_spin_button_set_adjustment ()</title>
<indexterm zone="gtk-spin-button-set-adjustment"><primary sortas="spin_button_set_adjustment">gtk_spin_button_set_adjustment</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_spin_button_set_adjustment      (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="GtkAdjustment">GtkAdjustment</link> *adjustment);</programlisting>
<para>
Replaces the <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link> associated with <parameter>spin_button</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>adjustment</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link> to replace the existing adjustment
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-get-adjustment" role="function">
<title>gtk_spin_button_get_adjustment ()</title>
<indexterm zone="gtk-spin-button-get-adjustment"><primary sortas="spin_button_get_adjustment">gtk_spin_button_get_adjustment</primary></indexterm><programlisting><link linkend="GtkAdjustment">GtkAdjustment</link>*      gtk_spin_button_get_adjustment      (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button);</programlisting>
<para>
Get the adjustment associated with a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link></para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the <link linkend="GtkAdjustment"><type>GtkAdjustment</type></link> of <parameter>spin_button</parameter>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-set-digits" role="function">
<title>gtk_spin_button_set_digits ()</title>
<indexterm zone="gtk-spin-button-set-digits"><primary sortas="spin_button_set_digits">gtk_spin_button_set_digits</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_spin_button_set_digits          (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="guint">guint</link> digits);</programlisting>
<para>
Set the precision to be displayed by <parameter>spin_button</parameter>. Up to 20 digit precision
is allowed.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>digits</parameter>&#160;:</term>
<listitem><simpara> the number of digits after the decimal point to be displayed for the spin button's value
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-set-increments" role="function">
<title>gtk_spin_button_set_increments ()</title>
<indexterm zone="gtk-spin-button-set-increments"><primary sortas="spin_button_set_increments">gtk_spin_button_set_increments</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_spin_button_set_increments      (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="gdouble">gdouble</link> step,
                                                         <link linkend="gdouble">gdouble</link> page);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>step</parameter>&#160;:</term>
<listitem><simpara> increment applied for a button 1 press.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>page</parameter>&#160;:</term>
<listitem><simpara> increment applied for a button 2 press.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-set-range" role="function">
<title>gtk_spin_button_set_range ()</title>
<indexterm zone="gtk-spin-button-set-range"><primary sortas="spin_button_set_range">gtk_spin_button_set_range</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_spin_button_set_range           (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="gdouble">gdouble</link> min,
                                                         <link linkend="gdouble">gdouble</link> max);</programlisting>
<para>
Sets the minimum and maximum allowable values for <parameter>spin_button</parameter></para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>min</parameter>&#160;:</term>
<listitem><simpara> minimum allowable value
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>max</parameter>&#160;:</term>
<listitem><simpara> maximum allowable value
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-get-value-as-float" role="macro" condition="deprecated:Use gtk_spin_button_get_value() instead.">
<title>gtk_spin_button_get_value_as_float</title>
<indexterm zone="gtk-spin-button-get-value-as-float" role="deprecated"><primary sortas="spin_button_get_value_as_float">gtk_spin_button_get_value_as_float</primary></indexterm><programlisting>#define gtk_spin_button_get_value_as_float gtk_spin_button_get_value
</programlisting>
<warning><para><literal>gtk_spin_button_get_value_as_float</literal> is deprecated and should not be used in newly-written code. Use <link linkend="gtk-spin-button-get-value"><function>gtk_spin_button_get_value()</function></link> instead.</para></warning>
<para>
Gets the value in the <parameter>spin_button</parameter>.
</para><variablelist role="params">
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>the value of <parameter>spin_button</parameter>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-get-value-as-int" role="function">
<title>gtk_spin_button_get_value_as_int ()</title>
<indexterm zone="gtk-spin-button-get-value-as-int"><primary sortas="spin_button_get_value_as_int">gtk_spin_button_get_value_as_int</primary></indexterm><programlisting><link linkend="gint">gint</link>                gtk_spin_button_get_value_as_int    (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button);</programlisting>
<para>
Get the value <parameter>spin_button</parameter> represented as an integer.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the value of <parameter>spin_button</parameter>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-set-value" role="function">
<title>gtk_spin_button_set_value ()</title>
<indexterm zone="gtk-spin-button-set-value"><primary sortas="spin_button_set_value">gtk_spin_button_set_value</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_spin_button_set_value           (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="gdouble">gdouble</link> value);</programlisting>
<para>
Set the value of <parameter>spin_button</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>value</parameter>&#160;:</term>
<listitem><simpara> the new value
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-set-update-policy" role="function">
<title>gtk_spin_button_set_update_policy ()</title>
<indexterm zone="gtk-spin-button-set-update-policy"><primary sortas="spin_button_set_update_policy">gtk_spin_button_set_update_policy</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_spin_button_set_update_policy   (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="GtkSpinButtonUpdatePolicy">GtkSpinButtonUpdatePolicy</link> policy);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>policy</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButtonUpdatePolicy"><type>GtkSpinButtonUpdatePolicy</type></link> value
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-set-numeric" role="function">
<title>gtk_spin_button_set_numeric ()</title>
<indexterm zone="gtk-spin-button-set-numeric"><primary sortas="spin_button_set_numeric">gtk_spin_button_set_numeric</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_spin_button_set_numeric         (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="gboolean">gboolean</link> numeric);</programlisting>
<para>
Sets the flag that determines if non-numeric text can be typed into
the spin button.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>numeric</parameter>&#160;:</term>
<listitem><simpara> flag indicating if only numeric entry is allowed. 
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-spin" role="function">
<title>gtk_spin_button_spin ()</title>
<indexterm zone="gtk-spin-button-spin"><primary sortas="spin_button_spin">gtk_spin_button_spin</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_spin_button_spin                (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="GtkSpinType">GtkSpinType</link> direction,
                                                         <link linkend="gdouble">gdouble</link> increment);</programlisting>
<para>
Increment or decrement a spin button's value in a specified direction
by a specified amount.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>direction</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinType"><type>GtkSpinType</type></link> indicating the direction to spin.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>increment</parameter>&#160;:</term>
<listitem><simpara> step increment to apply in the specified direction.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-set-wrap" role="function">
<title>gtk_spin_button_set_wrap ()</title>
<indexterm zone="gtk-spin-button-set-wrap"><primary sortas="spin_button_set_wrap">gtk_spin_button_set_wrap</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_spin_button_set_wrap            (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="gboolean">gboolean</link> wrap);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>wrap</parameter>&#160;:</term>
<listitem><simpara> a flag indicating if wrapping behavior is performed.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-set-snap-to-ticks" role="function">
<title>gtk_spin_button_set_snap_to_ticks ()</title>
<indexterm zone="gtk-spin-button-set-snap-to-ticks"><primary sortas="spin_button_set_snap_to_ticks">gtk_spin_button_set_snap_to_ticks</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_spin_button_set_snap_to_ticks   (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="gboolean">gboolean</link> snap_to_ticks);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> 
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>snap_to_ticks</parameter>&#160;:</term>
<listitem><simpara> a flag indicating if invalid values should be corrected.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-update" role="function">
<title>gtk_spin_button_update ()</title>
<indexterm zone="gtk-spin-button-update"><primary sortas="spin_button_update">gtk_spin_button_update</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_spin_button_update              (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button);</programlisting>
<para>
Manually force an update of the spin button.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link> 
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-get-digits" role="function">
<title>gtk_spin_button_get_digits ()</title>
<indexterm zone="gtk-spin-button-get-digits"><primary sortas="spin_button_get_digits">gtk_spin_button_get_digits</primary></indexterm><programlisting><link linkend="guint">guint</link>               gtk_spin_button_get_digits          (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the current precision
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-get-increments" role="function">
<title>gtk_spin_button_get_increments ()</title>
<indexterm zone="gtk-spin-button-get-increments"><primary sortas="spin_button_get_increments">gtk_spin_button_get_increments</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_spin_button_get_increments      (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="gdouble">gdouble</link> *step,
                                                         <link linkend="gdouble">gdouble</link> *page);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>step</parameter>&#160;:</term>
<listitem><simpara> location to store step increment, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>page</parameter>&#160;:</term>
<listitem><simpara> location to store page increment, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-get-numeric" role="function">
<title>gtk_spin_button_get_numeric ()</title>
<indexterm zone="gtk-spin-button-get-numeric"><primary sortas="spin_button_get_numeric">gtk_spin_button_get_numeric</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_spin_button_get_numeric         (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if only numeric text can be entered
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-get-range" role="function">
<title>gtk_spin_button_get_range ()</title>
<indexterm zone="gtk-spin-button-get-range"><primary sortas="spin_button_get_range">gtk_spin_button_get_range</primary></indexterm><programlisting><link linkend="void">void</link>                gtk_spin_button_get_range           (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                         <link linkend="gdouble">gdouble</link> *min,
                                                         <link linkend="gdouble">gdouble</link> *max);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>min</parameter>&#160;:</term>
<listitem><simpara> location to store minimum allowed value, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>max</parameter>&#160;:</term>
<listitem><simpara> location to store maximum allowed value, or <link linkend="NULL--CAPS"><literal>NULL</literal></link>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-get-snap-to-ticks" role="function">
<title>gtk_spin_button_get_snap_to_ticks ()</title>
<indexterm zone="gtk-spin-button-get-snap-to-ticks"><primary sortas="spin_button_get_snap_to_ticks">gtk_spin_button_get_snap_to_ticks</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_spin_button_get_snap_to_ticks   (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if values are snapped to the nearest step.
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-get-update-policy" role="function">
<title>gtk_spin_button_get_update_policy ()</title>
<indexterm zone="gtk-spin-button-get-update-policy"><primary sortas="spin_button_get_update_policy">gtk_spin_button_get_update_policy</primary></indexterm><programlisting><link linkend="GtkSpinButtonUpdatePolicy">GtkSpinButtonUpdatePolicy</link>  gtk_spin_button_get_update_policy
                                                        (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the current update policy
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-get-value" role="function">
<title>gtk_spin_button_get_value ()</title>
<indexterm zone="gtk-spin-button-get-value"><primary sortas="spin_button_get_value">gtk_spin_button_get_value</primary></indexterm><programlisting><link linkend="gdouble">gdouble</link>             gtk_spin_button_get_value           (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button);</programlisting>
<para>
Get the value in the <parameter>spin_button</parameter>.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> the value of <parameter>spin_button</parameter>
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="gtk-spin-button-get-wrap" role="function">
<title>gtk_spin_button_get_wrap ()</title>
<indexterm zone="gtk-spin-button-get-wrap"><primary sortas="spin_button_get_wrap">gtk_spin_button_get_wrap</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            gtk_spin_button_get_wrap            (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button);</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>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> a <link linkend="GtkSpinButton"><type>GtkSpinButton</type></link>
</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the spin button wraps around
</simpara></listitem></varlistentry>
</variablelist></refsect2>
<refsect2 id="GTK-INPUT-ERROR--CAPS" role="macro">
<title>GTK_INPUT_ERROR</title>
<indexterm zone="GTK-INPUT-ERROR--CAPS"><primary sortas="INPUT_ERROR">GTK_INPUT_ERROR</primary></indexterm><programlisting>#define GTK_INPUT_ERROR -1
</programlisting>
<para>
</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>&quot;adjustment&quot;</literal> property</title>
<indexterm zone="GtkSpinButton--adjustment"><primary sortas="SpinButton:adjustment">GtkSpinButton:adjustment</primary></indexterm><programlisting>  &quot;adjustment&quot;               <link linkend="GtkAdjustment">GtkAdjustment</link>*        : Read / Write</programlisting>
<para>The adjustment that holds the value of the spinbutton.</para></refsect2>
<refsect2 id="GtkSpinButton--climb-rate" role="property"><title>The <literal>&quot;climb-rate&quot;</literal> property</title>
<indexterm zone="GtkSpinButton--climb-rate"><primary sortas="SpinButton:climb-rate">GtkSpinButton:climb-rate</primary></indexterm><programlisting>  &quot;climb-rate&quot;               <link linkend="gdouble">gdouble</link>               : Read / Write</programlisting>
<para>The acceleration rate when you hold down a button.</para><para>Allowed values: &gt;= 0</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GtkSpinButton--digits" role="property"><title>The <literal>&quot;digits&quot;</literal> property</title>
<indexterm zone="GtkSpinButton--digits"><primary sortas="SpinButton:digits">GtkSpinButton:digits</primary></indexterm><programlisting>  &quot;digits&quot;                   <link linkend="guint">guint</link>                 : Read / Write</programlisting>
<para>The number of decimal places to display.</para><para>Allowed values: &lt;= 20</para>
<para>Default value: 0</para>
</refsect2>
<refsect2 id="GtkSpinButton--numeric" role="property"><title>The <literal>&quot;numeric&quot;</literal> property</title>
<indexterm zone="GtkSpinButton--numeric"><primary sortas="SpinButton:numeric">GtkSpinButton:numeric</primary></indexterm><programlisting>  &quot;numeric&quot;                  <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>Whether non-numeric characters should be ignored.</para><para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkSpinButton--snap-to-ticks" role="property"><title>The <literal>&quot;snap-to-ticks&quot;</literal> property</title>
<indexterm zone="GtkSpinButton--snap-to-ticks"><primary sortas="SpinButton:snap-to-ticks">GtkSpinButton:snap-to-ticks</primary></indexterm><programlisting>  &quot;snap-to-ticks&quot;            <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>Whether erroneous values are automatically changed to a spin button's nearest step increment.</para><para>Default value: FALSE</para>
</refsect2>
<refsect2 id="GtkSpinButton--update-policy" role="property"><title>The <literal>&quot;update-policy&quot;</literal> property</title>
<indexterm zone="GtkSpinButton--update-policy"><primary sortas="SpinButton:update-policy">GtkSpinButton:update-policy</primary></indexterm><programlisting>  &quot;update-policy&quot;            <link linkend="GtkSpinButtonUpdatePolicy">GtkSpinButtonUpdatePolicy</link>  : Read / Write</programlisting>
<para>Whether the spin button should update always, or only when the value is legal.</para><para>Default value: GTK_UPDATE_ALWAYS</para>
</refsect2>
<refsect2 id="GtkSpinButton--value" role="property"><title>The <literal>&quot;value&quot;</literal> property</title>
<indexterm zone="GtkSpinButton--value"><primary sortas="SpinButton:value">GtkSpinButton:value</primary></indexterm><programlisting>  &quot;value&quot;                    <link linkend="gdouble">gdouble</link>               : Read / Write</programlisting>
<para>Reads the current value, or sets a new value.</para><para>Default value: 0</para>
</refsect2>
<refsect2 id="GtkSpinButton--wrap" role="property"><title>The <literal>&quot;wrap&quot;</literal> property</title>
<indexterm zone="GtkSpinButton--wrap"><primary sortas="SpinButton:wrap">GtkSpinButton:wrap</primary></indexterm><programlisting>  &quot;wrap&quot;                     <link linkend="gboolean">gboolean</link>              : Read / Write</programlisting>
<para>Whether a spin button should wrap upon reaching its limits.</para><para>Default value: FALSE</para>
</refsect2>
</refsect1>
<refsect1 id="GtkSpinButton.style-property-details" role="style_properties_details">
<title role="style_properties_details.title">Style Property Details</title>
<refsect2 id="GtkSpinButton--s-shadow-type" role="property"><title>The <literal>&quot;shadow-type&quot;</literal> style property</title>
<indexterm zone="GtkSpinButton--s-shadow-type"><primary sortas="SpinButton:shadow-type">GtkSpinButton:shadow-type</primary></indexterm><programlisting>  &quot;shadow-type&quot;              <link linkend="GtkShadowType">GtkShadowType</link>         : Read</programlisting>
<para>
the type of border that surrounds the arrows of a spin button.
</para><para>Default value: GTK_SHADOW_IN</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>&quot;change-value&quot;</literal> signal</title>
<indexterm zone="GtkSpinButton-change-value"><primary sortas="SpinButton::change-value">GtkSpinButton::change-value</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkSpinButton">GtkSpinButton</link> *spinbutton,
                                                        <link linkend="GtkScrollType">GtkScrollType</link>  arg1,
                                                        <link linkend="gpointer">gpointer</link>       user_data)       : Run Last / Action</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spinbutton</parameter>&#160;:</term>
<listitem><simpara>the object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg1</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GtkSpinButton-input" role="signal"><title>The <literal>&quot;input&quot;</literal> signal</title>
<indexterm zone="GtkSpinButton-input"><primary sortas="SpinButton::input">GtkSpinButton::input</primary></indexterm><programlisting><link linkend="gint">gint</link>                user_function                      (<link linkend="GtkSpinButton">GtkSpinButton</link> *spinbutton,
                                                        <link linkend="gpointer">gpointer</link>       arg1,
                                                        <link linkend="gpointer">gpointer</link>       user_data)       : Run Last</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spinbutton</parameter>&#160;:</term>
<listitem><simpara>the object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>arg1</parameter>&#160;:</term>
<listitem><simpara>
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara>
</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GtkSpinButton-output" role="signal"><title>The <literal>&quot;output&quot;</literal> signal</title>
<indexterm zone="GtkSpinButton-output"><primary sortas="SpinButton::output">GtkSpinButton::output</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link>            user_function                      (<link linkend="GtkSpinButton">GtkSpinButton</link> *spin_button,
                                                        <link linkend="gpointer">gpointer</link>       user_data)        : Run Last</programlisting>
<para>
The ::output signal can be used to change to formatting
of the value that is displayed in the spin buttons entry.
<informalexample><programlisting>
/&ast; show leading zeros &ast;/
static gboolean
on_output (GtkSpinButton *spin,
           gpointer       data)
{
   GtkAdjustment *adj;
   gchar *text;
   int value;
   adj = gtk_spin_button_get_adjustment (spin);
   value = (int)gtk_adjustment_get_value (adj);
   text = g_strdup_printf ("%02d", value);
   gtk_entry_set_text (GTK_ENTRY (spin), text);
   g_free (text);
   
   return TRUE;
}
</programlisting></informalexample></para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spin_button</parameter>&#160;:</term>
<listitem><simpara> the object which received the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
<varlistentry><term><emphasis>Returns</emphasis>&#160;:</term><listitem><simpara> <link linkend="TRUE--CAPS"><literal>TRUE</literal></link> if the value has been displayed.
</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GtkSpinButton-value-changed" role="signal"><title>The <literal>&quot;value-changed&quot;</literal> signal</title>
<indexterm zone="GtkSpinButton-value-changed"><primary sortas="SpinButton::value-changed">GtkSpinButton::value-changed</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkSpinButton">GtkSpinButton</link> *spinbutton,
                                                        <link linkend="gpointer">gpointer</link>       user_data)       : Run Last</programlisting>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spinbutton</parameter>&#160;:</term>
<listitem><simpara>the object which received the signal.
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist></refsect2><refsect2 id="GtkSpinButton-wrapped" role="signal"><title>The <literal>&quot;wrapped&quot;</literal> signal</title>
<indexterm zone="GtkSpinButton-wrapped" role="2.10"><primary sortas="SpinButton::wrapped">GtkSpinButton::wrapped</primary></indexterm><programlisting><link linkend="void">void</link>                user_function                      (<link linkend="GtkSpinButton">GtkSpinButton</link> *spinbutton,
                                                        <link linkend="gpointer">gpointer</link>       user_data)       : Run Last</programlisting>
<para>
The wrapped signal is emitted right after the spinbutton wraps
from its maximum to minimum value or vice-versa.</para>
<para>
</para><variablelist role="params">
<varlistentry><term><parameter>spinbutton</parameter>&#160;:</term>
<listitem><simpara> the object which received the signal
</simpara></listitem></varlistentry>
<varlistentry><term><parameter>user_data</parameter>&#160;:</term>
<listitem><simpara>user data set when the signal handler was connected.</simpara></listitem></varlistentry>
</variablelist><para>Since 2.10</para></refsect2>
</refsect1>


<refsect1 id="GtkSpinButton.see-also">
<title>See Also</title>
<para>
<variablelist>
<varlistentry>
<term><link linkend="GtkEntry"><type>GtkEntry</type></link></term>
<listitem><para>retrieve text rather than numbers.</para></listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>

</refentry>
