<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-gtkcellrendererspin">

  <refnamediv>
    <refname>gtk.CellRendererSpin</refname>
      <refpurpose>an object that renders a spin button in a cell (new in
      PyGTK 2.10)</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.CellRendererSpin</classname></ooclass>
      <ooclass><classname><link linkend="class-gtkcellrenderertext">gtk.CellRendererText</link></classname></ooclass>
      <constructorsynopsis language="python">
        <methodname><link linkend="constructor-gtkcellrendererspin">gtk.CellRendererSpin</link></methodname>
        <methodparam></methodparam>
      </constructorsynopsis>
</classsynopsis>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

<synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +-- <link linkend="class-gtkobject">gtk.Object</link>
    +-- <link linkend="class-gtkcellrenderer">gtk.CellRenderer</link>
      +-- <link linkend="class-gtkcellrenderertext">gtk.CellRendererText</link>
        +-- <link linkend="class-gtkcellrendererspin">gtk.CellRendererSpin</link>
</synopsis>

  </refsect1>

  <refsect1 id="properties-gtkcellrendererspin">
    <title>gtk.CellRendererSpin Properties</title>

    <para><link linkend="properties-gtkobject">gtk.Object Properties</link></para>
    <para><link linkend="properties-gtkcellrenderer">gtk.CellRenderer Properties</link></para>
    <para><link linkend="properties-gtkcellrenderertext">gtk.CellRendererText Properties</link></para>

    <blockquote role="properties">
      <informaltable pgwide="1" frame="none">
	<tgroup cols="3">
	  <colspec column="1" colwidth="1in"/>
	  <colspec column="2" colwidth="1in"/>
	  <colspec column="3" colwidth="4in"/>
	  <tbody>

	    <row valign="top">
	      <entry>"adjustment"</entry>
	      <entry>Read-Write</entry>
	      <entry>The <link
	      linkend="class-gtkadjustment"><classname>gtk.Adjustment</classname></link>
	      that holds the value of the spinbutton. This must be non-None
	      for the cell renderer to be editable. Default value:
	      None. Available in GTK+ 2.10 and above.</entry>
	    </row>

	    <row valign="top">
	      <entry>"climb-rate"</entry>
	      <entry>Read-Write</entry>
	      <entry>The acceleration rate when you hold down a
	      button. Range: [0.0,MAXDOUBLE]. Default value: 0.0. Available
	      in GTK+ 2.10 and above.</entry>
	    </row>

	    <row valign="top">
	      <entry>"digits"</entry>
	      <entry>Read-Write</entry>
	      <entry>The number of decimal places to display. Range:
	      [0,20]. Default value: 0. Available in GTK+ 2.10 and
	      above.</entry>
	    </row>

	  </tbody>
	</tgroup>
      </informaltable>
    </blockquote>

  </refsect1>

  <refsect1 id="signal-prototypes-gtkcellrendererspin">
    <title>gtk.CellRendererSpin Signal Prototypes</title>

    <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkobject">gtk.Object Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkcellrenderer">gtk.CellRenderer Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkcellrenderertext">gtk.CellRendererText Signal Prototypes</link></para>
</refsect1>

  <refsect1>
    <title>Description</title>

    <para><link
    linkend="class-gtkcellrendererspin"><classname>gtk.CellRendererSpin</classname></link>
    renders text in a cell like <link
    linkend="class-gtkcellrenderertext"><classname>gtk.CellRendererText</classname></link>
    from which it is derived. But while <link
    linkend="class-gtkcellrenderertext"><classname>gtk.CellRendererText</classname></link>
    offers a simple entry to edit the text, <link
    linkend="class-gtkcellrendererspin"><classname>gtk.CellRendererSpin</classname></link>
    offers a <link
    linkend="class-gtkspinbutton"><classname>gtk.SpinButton</classname></link>
    widget. Of course, that means that the text has to be parseable as a
    floating point number.</para>

    <para>The range of the spinbutton is taken from the "adjustment"
    property of the cell renderer, which can be set explicitly or mapped to
    a column in the tree model. Like all properties of cellrenderers. <link
    linkend="class-gtkcellrendererspin"><classname>gtk.CellRendererSpin</classname></link>
    also has properties for the "climb-rate" and the number of "digits" to
    display. Other <link
    linkend="class-gtkspinbutton"><classname>gtk.SpinButton</classname></link>
    properties can be set in a handler for the "<link
    linkend="signal-gtkcellrenderer--editing-started">gtk.CellRenderer.editing-started</link>"
    signal. </para>

  </refsect1>

  <refsect1>
    <title>Constructor</title>

    <refsect2 id="constructor-gtkcellrendererspin">
      <title>gtk.CellRendererSpin</title>

      <programlisting><constructorsynopsis language="python">
        <methodname>gtk.CellRendererSpin</methodname>
        <methodparam></methodparam>
      </constructorsynopsis></programlisting>

      <variablelist>
        <varlistentry>
          <term><emphasis>Returns</emphasis>&nbsp;:</term>
          <listitem><simpara>a new <link
          linkend="class-gtkcellrendererspin"><classname>gtk.CellRendererSpin</classname></link></simpara></listitem>
        </varlistentry>
      </variablelist>

      <note>
        <para>This constructor is available in PyGTK 2.10 and above.</para>
      </note>

      <para>Creates a new <link
      linkend="class-gtkcellrendererspin"><classname>gtk.CellRendererSpin</classname></link>.</para>

    </refsect2>

  </refsect1>

</refentry>
