1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171
|
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gtk.SpinButton</title><meta name="generator" content="DocBook XSL Stylesheets V1.65.1"><link rel="home" href="index.html" title="PyGTK 2.0 Reference Manual"><link rel="up" href="gtk-class-reference.html" title="The gtk Class Reference"><link rel="previous" href="class-gtksocket.html" title="gtk.Socket"><link rel="next" href="class-gtkstatusbar.html" title="gtk.Statusbar"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">gtk.SpinButton</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="class-gtksocket.html">Prev</a></td><th width="60%" align="center">The gtk Class Reference</th><td width="20%" align="right"><a accesskey="n" href="class-gtkstatusbar.html">Next</a></td></tr></table><hr></div><div class="refentry" lang="en"><a name="class-gtkspinbutton"></a><div class="titlepage"><div></div><div></div></div><div class="refnamediv"><h2>gtk.SpinButton</h2><p>gtk.SpinButton — retrieve an integer or floating-point number from the
user.</p></div><div class="refsect1" lang="en"><a name="id3505991"></a><h2>Synopsis</h2><table bgcolor="#D0E0F0" width="100%"><tr><td><pre class="classsynopsis">class <span class="ooclass"><span class="classname">gtk.SpinButton</span></span>(<span class="ooclass"><span class="classname"><a href="class-gtkentry.html" title="gtk.Entry">gtk.Entry</a></span></span>):
<code class="constructorsynopsis"> <span class="methodname"><a href="class-gtkspinbutton.html#constructor-gtkspinbutton" title="Constructor">gtk.SpinButton</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>adjustment</tt></b></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>climb_rate</tt></b></span><span class="initializer">=0.0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>digits</tt></b></span><span class="initializer">=0</span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--configure" title="gtk.SpinButton.configure">configure</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>adjustment</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>climb_rate</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>digits</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--set-adjustment" title="gtk.SpinButton.set_adjustment">set_adjustment</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>adjustment</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--get-adjustment" title="gtk.SpinButton.get_adjustment">get_adjustment</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--set-digits" title="gtk.SpinButton.set_digits">set_digits</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>digits</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--get-digits" title="gtk.SpinButton.get_digits">get_digits</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--set-increments" title="gtk.SpinButton.set_increments">set_increments</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>step</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>page</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--get-increments" title="gtk.SpinButton.get_increments">get_increments</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--set-range" title="gtk.SpinButton.set_range">set_range</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>min</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>max</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--get-range" title="gtk.SpinButton.get_range">get_range</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--get-value" title="gtk.SpinButton.get_value">get_value</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--get-value-as-int" title="gtk.SpinButton.get_value_as_int">get_value_as_int</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--set-value" title="gtk.SpinButton.set_value">set_value</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>value</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--set-update-policy" title="gtk.SpinButton.set_update_policy">set_update_policy</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>policy</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--get-update-policy" title="gtk.SpinButton.get_update_policy">get_update_policy</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--set-numeric" title="gtk.SpinButton.set_numeric">set_numeric</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>numeric</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--get-numeric" title="gtk.SpinButton.get_numeric">get_numeric</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--spin" title="gtk.SpinButton.spin">spin</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>direction</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>increment</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--set-wrap" title="gtk.SpinButton.set_wrap">set_wrap</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>wrap</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--get-wrap" title="gtk.SpinButton.get_wrap">get_wrap</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--set-snap-to-ticks" title="gtk.SpinButton.set_snap_to_ticks">set_snap_to_ticks</a></span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>snap_to_ticks</tt></b></span></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--get-snap-to-ticks" title="gtk.SpinButton.get_snap_to_ticks">get_snap_to_ticks</a></span>(<span class="methodparam"></span>)</code><br><code class="methodsynopsis"> def <span class="methodname"><a href="class-gtkspinbutton.html#method-gtkspinbutton--update" title="gtk.SpinButton.update">update</a></span>(<span class="methodparam"></span>)</code><br></pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3506498"></a><h2>Ancestry</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="synopsis">+-- <a href="class-gobject.html" title="gobject.GObject">gobject.GObject</a>
+-- <a href="class-gtkobject.html" title="gtk.Object">gtk.Object</a>
+-- <a href="class-gtkwidget.html" title="gtk.Widget">gtk.Widget</a>
+-- <a href="class-gtkentry.html" title="gtk.Entry">gtk.Entry</a> (implements <a href="class-gtkeditable.html" title="gtk.Editable">gtk.Editable</a>, <a href="class-gtkcelleditable.html" title="gtk.CellEditable">gtk.CellEditable</a>)
+-- <a href="class-gtkspinbutton.html" title="gtk.SpinButton">gtk.SpinButton</a>
</pre></td></tr></table></div><div class="refsect1" lang="en"><a name="id3506553"></a><h2>Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"adjustment"</td><td valign="top">Read-Write</td><td valign="top">The adjustment that holds the value of the
spinbutton</td></tr><tr valign="top"><td valign="top">"climb-rate"</td><td valign="top">Read-Write</td><td valign="top">The acceleration rate when you hold down a
button</td></tr><tr valign="top"><td valign="top">"digits"</td><td valign="top">Read-Write</td><td valign="top">The number of decimal places to display</td></tr><tr valign="top"><td valign="top">"numeric"</td><td valign="top">Read-Write</td><td valign="top">If <tt class="literal">TRUE</tt>, non-numeric characters
should be ignored</td></tr><tr valign="top"><td valign="top">"snap-to-ticks"</td><td valign="top">Read-Write</td><td valign="top">If <tt class="literal">TRUE</tt>, erroneous values are
automatically changed to a spin button's nearest step increment</td></tr><tr valign="top"><td valign="top">"update-policy"</td><td valign="top">Read-Write</td><td valign="top">either <tt class="literal">gtk.UPDATE_ALWAYS</tt> (the spin
button should update always), or <tt class="literal">gtk.UPDATE_IF_VALID</tt> the
spin button should update only when the value is legal)</td></tr><tr valign="top"><td valign="top">"value"</td><td valign="top">Read-Write</td><td valign="top">the current value</td></tr><tr valign="top"><td valign="top">"wrap"</td><td valign="top">Read-Write</td><td valign="top">If <tt class="literal">TRUE</tt>, a spin button should wrap
upon reaching its limits</td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3506768"></a><h2>Style Properties</h2><div class="blockquote"><table width="100%" border="0" bgcolor="#E0E0E0"><tr><td valign="top"><div class="informaltable"><table width="100%" border="0"><colgroup><col><col><col></colgroup><tbody><tr valign="top"><td valign="top">"shadow-type"</td><td valign="top">Read</td><td valign="top">the shadow type of the spinbutton - one of:
<tt class="literal">gtk.SHADOW_NONE</tt>, <tt class="literal">gtk.SHADOW_IN</tt>,
<tt class="literal">gtk.SHADOW_OUT</tt>, <tt class="literal">gtk.SHADOW_ETCHED_IN</tt>
or <tt class="literal">gtk.SHADOW_ETCHED_OUT</tt></td></tr></tbody></table></div></td></tr></table></div></div><div class="refsect1" lang="en"><a name="id3506857"></a><h2>Signal Prototypes</h2><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term">"<a href="class-gtkspinbutton.html#signal-gtkspinbutton--change-value" title='The "change-value" gtk.SpinButton Signal'>change-value</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>spinbutton</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>scrolltype</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtkspinbutton.html#signal-gtkspinbutton--input" title='The "input" gtk.SpinButton Signal'>input</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>spinbutton</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>value_ptr</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtkspinbutton.html#signal-gtkspinbutton--output" title='The "output" gtk.SpinButton Signal'>output</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>spinbutton</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr><tr><td><span class="term">"<a href="class-gtkspinbutton.html#signal-gtkspinbutton--value-changed" title='The "value-changed" gtk.SpinButton Signal'>value-changed</a>"</span></td><td><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>spinbutton</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></td></tr></tbody></table></div><div class="refsect1" lang="en"><a name="id3507042"></a><h2>Description</h2><p>A <a href="class-gtkspinbutton.html" title="gtk.SpinButton"><tt class="classname">gtk.SpinButton</tt></a>
is a subclass of <a href="class-gtkentry.html" title="gtk.Entry"><tt class="classname">gtk.Entry</tt></a> that
provides a way for a user to set the value of some numeric attribute within
a predefined range. Rather than having to directly type a number into a
<a href="class-gtkentry.html" title="gtk.Entry"><tt class="classname">gtk.Entry</tt></a>, a
<a href="class-gtkspinbutton.html" title="gtk.SpinButton"><tt class="classname">gtk.SpinButton</tt></a>
allows the user to click on one of two arrows to increment or decrement the
displayed value. A value can still be typed in and validated. A <a href="class-gtkspinbutton.html" title="gtk.SpinButton"><tt class="classname">gtk.SpinButton</tt></a>
uses a <a href="class-gtkadjustment.html" title="gtk.Adjustment"><tt class="classname">gtk.Adjustment</tt></a>
to specify the range and value of interest. See the <a href="class-gtkadjustment.html" title="gtk.Adjustment"><tt class="classname">gtk.Adjustment</tt></a>
section for more details about an adjustment's properties.</p></div><div class="refsect1" lang="en"><a name="constructor-gtkspinbutton"></a><h2>Constructor</h2><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="constructorsynopsis"> <span class="methodname">gtk.SpinButton</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>adjustment</tt></b></span><span class="initializer">=None</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>climb_rate</tt></b></span><span class="initializer">=0.0</span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>digits</tt></b></span><span class="initializer">=0</span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>adjustment</tt></b>:</span></td><td>a <a href="class-gtkadjustment.html" title="gtk.Adjustment"><tt class="classname">gtk.Adjustment</tt></a>
or None to create a new adjustment</td></tr><tr><td><span class="term"><b class="parameter"><tt>climb_rate</tt></b>:</span></td><td>the acceleration factor</td></tr><tr><td><span class="term"><b class="parameter"><tt>digits</tt></b>:</span></td><td>the number of decimal places to
display</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a new <a href="class-gtkspinbutton.html" title="gtk.SpinButton"><tt class="classname">gtk.SpinButton</tt></a>
widget</td></tr></tbody></table><p>Creates a new <a href="class-gtkspinbutton.html" title="gtk.SpinButton"><tt class="classname">gtk.SpinButton</tt></a>
widget using the <a href="class-gtkadjustment.html" title="gtk.Adjustment"><tt class="classname">gtk.Adjustment</tt></a>
specified by <i class="parameter"><tt>adjustment</tt></i>, the acceleration factor
specified by <i class="parameter"><tt>climb_rate</tt></i> and displaying the number of
decimals specified by <i class="parameter"><tt>digits</tt></i>. If
<i class="parameter"><tt>adjustment</tt></i> is <tt class="literal">None</tt> or is not
specified a new <a href="class-gtkadjustment.html" title="gtk.Adjustment"><tt class="classname">gtk.Adjustment</tt></a>
will be created. If <i class="parameter"><tt>climb_rate</tt></i> is not specified it
defaults to 0.0. If <i class="parameter"><tt>digits</tt></i> is not specified it
defaults to 0.</p></div><div class="refsect1" lang="en"><a name="id3507301"></a><h2>Methods</h2><div class="refsect2" lang="en"><a name="method-gtkspinbutton--configure"></a><h3>gtk.SpinButton.configure</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">configure</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>adjustment</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>climb_rate</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>digits</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>adjustment</tt></b>:</span></td><td>a <a href="class-gtkadjustment.html" title="gtk.Adjustment"><tt class="classname">gtk.Adjustment</tt></a>
or None to create a new adjustment</td></tr><tr><td><span class="term"><b class="parameter"><tt>climb_rate</tt></b>:</span></td><td>the acceleration factor</td></tr><tr><td><span class="term"><b class="parameter"><tt>digits</tt></b>:</span></td><td>the number of decimal places to
display</td></tr></tbody></table><p>The <tt class="methodname">configure</tt>() method changes the
properties of an existing spin button by associating the <a href="class-gtkadjustment.html" title="gtk.Adjustment"><tt class="classname">gtk.Adjustment</tt></a>
specified by <i class="parameter"><tt>adjustment</tt></i>, setting the acceleration
rate to the c value specified by <i class="parameter"><tt>climb_rate</tt></i> and
setting the number of decimal places to display to the value specified by
<i class="parameter"><tt>digits</tt></i>. If <i class="parameter"><tt>adjustment</tt></i> is
<tt class="literal">None</tt> a new <a href="class-gtkadjustment.html" title="gtk.Adjustment"><tt class="classname">gtk.Adjustment</tt></a>
will be created. </p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--set-adjustment"></a><h3>gtk.SpinButton.set_adjustment</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_adjustment</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>adjustment</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>adjustment</tt></b>:</span></td><td>a <a href="class-gtkadjustment.html" title="gtk.Adjustment"><tt class="classname">gtk.Adjustment</tt></a>
to replace the existing adjustment</td></tr></tbody></table><p>The <tt class="methodname">set_adjustment</tt>() method sets the
"adjustment" property to the value specified by
<i class="parameter"><tt>adjustment</tt></i> replacing the current adjustment object
associated with the spinbutton.</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--get-adjustment"></a><h3>gtk.SpinButton.get_adjustment</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_adjustment</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the <a href="class-gtkadjustment.html" title="gtk.Adjustment"><tt class="classname">gtk.Adjustment</tt></a>
object associated with the spinbutton</td></tr></tbody></table><p>The <tt class="methodname">get_adjustment</tt>() method returns the
value of the "adjustment" property.</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--set-digits"></a><h3>gtk.SpinButton.set_digits</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_digits</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>digits</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>digits</tt></b>:</span></td><td>the number of decimal places to be displayed
for the spin button's value</td></tr></tbody></table><p>The <tt class="methodname">set_digits</tt>() method sets the
"digits" property to the value specified by <i class="parameter"><tt>digits</tt></i>.
The value of "digits" determines the number of decimal places (up to 20
digits) to be displayed by the spinbutton.</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--get-digits"></a><h3>gtk.SpinButton.get_digits</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_digits</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the current number of decimal places to be
displayed</td></tr></tbody></table><p>The <tt class="methodname">get_digits</tt>() method returns the
value of the "digits" property. The value of "digits" determines the number
of decimal places the spinbutton displays. See the <a href="class-gtkspinbutton.html#method-gtkspinbutton--set-digits" title="gtk.SpinButton.set_digits"><tt class="methodname">set_digits</tt>()</a>
method for more detail.</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--set-increments"></a><h3>gtk.SpinButton.set_increments</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_increments</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>step</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>page</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>step</tt></b>:</span></td><td>increment applied for each
<span class="mousebutton">left</span> mousebutton press.</td></tr><tr><td><span class="term"><b class="parameter"><tt>page</tt></b>:</span></td><td>increment applied for each
<span class="mousebutton">middle</span> mousebutton press.</td></tr></tbody></table><p>The <tt class="methodname">set_increments</tt>() method sets the
<tt class="literal">step_increment</tt> and <tt class="literal">page_increment</tt>
attributes of the <a href="class-gtkadjustment.html" title="gtk.Adjustment"><tt class="classname">gtk.Adjustment</tt></a>
associated with the spinbutton to the values specified by
<i class="parameter"><tt>step</tt></i> and <i class="parameter"><tt>page</tt></i> respectively.
These affect how quickly the value changes when the spin button's arrows are
activated.</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--get-increments"></a><h3>gtk.SpinButton.get_increments</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_increments</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a tuple containing the step and page
increments</td></tr></tbody></table><p>The <tt class="methodname">get_increments</tt>() method returns a
tuple containing the values of the <tt class="literal">step_increment</tt> and
<tt class="literal">page_increment</tt> attributes of the <a href="class-gtkadjustment.html" title="gtk.Adjustment"><tt class="classname">gtk.Adjustment</tt></a>
associated with the spinbutton. See the <a href="class-gtkspinbutton.html#method-gtkspinbutton--set-increments" title="gtk.SpinButton.set_increments"><tt class="methodname">set_increments</tt>()</a>
method for more detail.</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--set-range"></a><h3>gtk.SpinButton.set_range</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_range</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>min</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>max</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>min</tt></b>:</span></td><td>the minimum allowable
value</td></tr><tr><td><span class="term"><b class="parameter"><tt>max</tt></b>:</span></td><td>the maximum allowable
value</td></tr></tbody></table><p>The <tt class="methodname">set_range</tt>() method sets the minimum
and maximum allowable values for spinbutton by setting the
<tt class="literal">lower</tt> and <tt class="literal">upper</tt> attributes of the
associated <a href="class-gtkadjustment.html" title="gtk.Adjustment"><tt class="classname">gtk.Adjustment</tt></a>
to the values of <i class="parameter"><tt>min</tt></i> and <i class="parameter"><tt>max</tt></i>
respectively.</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--get-range"></a><h3>gtk.SpinButton.get_range</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_range</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>a tuple containing the minimum and maximum
allowed values</td></tr></tbody></table><p>The <tt class="methodname">get_range</tt>() method returns a tuple
containing the range allowed for the spinbutton. See the <a href="class-gtkspinbutton.html#method-gtkspinbutton--set-range" title="gtk.SpinButton.set_range"><tt class="methodname">set_range</tt>()</a>
method for more detail.</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--get-value"></a><h3>gtk.SpinButton.get_value</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_value</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the value of the
spin_button</td></tr></tbody></table><p>The <tt class="methodname">get_value</tt>() method returns the
value of the "value" property of the spinbutton (really the
<tt class="literal">value</tt> attribute of the associated <a href="class-gtkadjustment.html" title="gtk.Adjustment"><tt class="classname">gtk.Adjustment</tt></a>).</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--get-value-as-int"></a><h3>gtk.SpinButton.get_value_as_int</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_value_as_int</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the value of the spinbutton as an
integer</td></tr></tbody></table><p>The <tt class="methodname">get_value_as_int</tt>() method returns
the value of the spinbutton represented as an integer.</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--set-value"></a><h3>gtk.SpinButton.set_value</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_value</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>value</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>value</tt></b>:</span></td><td>the new value</td></tr></tbody></table><p>The <tt class="methodname">set_value</tt>() method sets the value
of the "value" property to the value specified by
<i class="parameter"><tt>value</tt></i> (sets the <tt class="literal">value</tt> attribute of
the associated <a href="class-gtkadjustment.html" title="gtk.Adjustment"><tt class="classname">gtk.Adjustment</tt></a>.</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--set-update-policy"></a><h3>gtk.SpinButton.set_update_policy</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_update_policy</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>policy</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>policy</tt></b>:</span></td><td>the new update policy</td></tr></tbody></table><p>The <tt class="methodname">set_update_policy</tt>() method sets the
"update-policy" property to the value of <i class="parameter"><tt>policy</tt></i>. The
value of <i class="parameter"><tt>policy</tt></i> is either of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><tt class="literal">gtk.UPDATE_ALWAYS</tt></span></td><td>the value is always displayed.</td></tr><tr><td><span class="term"><tt class="literal">gtk.UPDATE_IF_VALID</tt></span></td><td>the value is only displayed if it is valid within the
bounds of the spinbutton's <a href="class-gtkadjustment.html" title="gtk.Adjustment"><tt class="classname">gtk.Adjustment</tt></a>.</td></tr></tbody></table><p></p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--get-update-policy"></a><h3>gtk.SpinButton.get_update_policy</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_update_policy</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td>the current update policy</td></tr></tbody></table><p>The <tt class="methodname">get_update_policy</tt>() method returns
the value of the "update-policy" property that determines the update
behavior of a spin button. See the <a href="class-gtkspinbutton.html#method-gtkspinbutton--set-update-policy" title="gtk.SpinButton.set_update_policy"><tt class="methodname">set_update_policy</tt>()</a>
method for more detail.</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--set-numeric"></a><h3>gtk.SpinButton.set_numeric</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_numeric</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>numeric</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>numeric</tt></b>:</span></td><td>a flag indicating if only numeric entry is
allowed.</td></tr></tbody></table><p>The <tt class="methodname">set_numeric</tt>() method sets the value
of the "numeric" property to the value of <i class="parameter"><tt>numeric</tt></i>. If
<i class="parameter"><tt>numeric</tt></i> is <tt class="literal">TRUE</tt> only numeric text
can be typed into the spin button.</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--get-numeric"></a><h3>gtk.SpinButton.get_numeric</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_numeric</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if only numeric text
can be entered</td></tr></tbody></table><p>The <tt class="methodname">get_numeric</tt>() method returns the
value of the "numeric" preoperty. See the <a href="class-gtkspinbutton.html#method-gtkspinbutton--set-numeric" title="gtk.SpinButton.set_numeric"><tt class="methodname">set_numeric</tt>()</a>
method for more detail.</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--spin"></a><h3>gtk.SpinButton.spin</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">spin</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>direction</tt></b></span></span>, <span class="methodparam"><span class="parameter"><b class="parameter"><tt>increment</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>direction</tt></b>:</span></td><td>the direction to spin.</td></tr><tr><td><span class="term"><b class="parameter"><tt>increment</tt></b>:</span></td><td>the step increment to apply in the specified
direction.</td></tr></tbody></table><p>The <tt class="methodname">spin</tt>() method increments or
decrements a spin button's value in the direction specified by
<i class="parameter"><tt>direction</tt></i> with a step size specified by
<i class="parameter"><tt>increment</tt></i>. The value of
<i class="parameter"><tt>increment</tt></i> is only used if direction is
<tt class="literal">gtk.SPIN_USER_DEFINED</tt>. The value of
<i class="parameter"><tt>direction</tt></i> must be one of:</p><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><tt class="literal">gtk.SPIN_STEP_FORWARD</tt></span></td><td>forward by step_increment</td></tr><tr><td><span class="term"><tt class="literal">gtk.SPIN_STEP_BACKWARD</tt></span></td><td>backward by step_increment</td></tr><tr><td><span class="term"><tt class="literal">gtk.SPIN_PAGE_FORWARD</tt></span></td><td>forward by step_increment</td></tr><tr><td><span class="term"><tt class="literal">gtk.SPIN_PAGE_BACKWARD</tt></span></td><td>backward by step_increment</td></tr><tr><td><span class="term"><tt class="literal">gtk.SPIN_HOME</tt></span></td><td>move to minimum value</td></tr><tr><td><span class="term"><tt class="literal">gtk.SPIN_END</tt></span></td><td>move to maximum value</td></tr><tr><td><span class="term"><tt class="literal">gtk.SPIN_USER_DEFINED</tt></span></td><td>add <i class="parameter"><tt>increment</tt></i> to the
value</td></tr></tbody></table><p></p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--set-wrap"></a><h3>gtk.SpinButton.set_wrap</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_wrap</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>wrap</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>wrap</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> wrapping is
performed.</td></tr></tbody></table><p>The <tt class="methodname">set_wrap</tt>() method sets the "wrap"
property to the value of <i class="parameter"><tt>wrap</tt></i>. If
<i class="parameter"><tt>wrap</tt></i> is <tt class="literal">TRUE</tt> the spin button value
wraps around to the opposite limit when the upper or lower limit of the
range is exceeded.</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--get-wrap"></a><h3>gtk.SpinButton.get_wrap</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_wrap</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the spin button
wraps</td></tr></tbody></table><p>The <tt class="methodname">get_wrap</tt>() method returns the value
of the "wrap" property. If the value of "wrap" is <tt class="literal">TRUE</tt>
the spinbutton's value wraps around to the opposite limit when the upper or
lower limit of the range is exceeded. See the <a href="class-gtkspinbutton.html#method-gtkspinbutton--set-wrap" title="gtk.SpinButton.set_wrap"><tt class="methodname">set_wrap</tt>()</a>
method.</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--set-snap-to-ticks"></a><h3>gtk.SpinButton.set_snap_to_ticks</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">set_snap_to_ticks</span>(<span class="methodparam"><span class="parameter"><b class="parameter"><tt>snap_to_ticks</tt></b></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><b class="parameter"><tt>snap_to_ticks</tt></b>:</span></td><td>if <tt class="literal">TRUE</tt> invalid values
should be corrected.</td></tr></tbody></table><p>The <tt class="methodname">set_snap_to_ticks</tt>() method sets the
"snap-to-ticks" property to the value of
<i class="parameter"><tt>snap_to_ticks</tt></i>. If
<i class="parameter"><tt>snap_to_ticks</tt></i> is <tt class="literal">TRUE</tt> values are
corrected to the nearest step increment when a spin button is activated
after providing an invalid value.</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--get-snap-to-ticks"></a><h3>gtk.SpinButton.get_snap_to_ticks</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">get_snap_to_ticks</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if values are snapped
to the nearest step.</td></tr></tbody></table><p>The <tt class="methodname">get_snap_to_ticks</tt>() method returns
the value of the "snap-to-ticks" property. If the value of "snap-to-ticks"
is <tt class="literal">TRUE</tt> the input values are corrected to the nearest
step. See the <a href="class-gtkspinbutton.html#method-gtkspinbutton--set-snap-to-ticks" title="gtk.SpinButton.set_snap_to_ticks"><tt class="methodname">set_snap_to_ticks</tt>()</a>
method.</p></div><div class="refsect2" lang="en"><a name="method-gtkspinbutton--update"></a><h3>gtk.SpinButton.update</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">update</span>(<span class="methodparam"></span>)</code></pre></td></tr></table><p>The <tt class="methodname">update</tt>() method manually forces an
update of the spin button.</p></div></div><div class="refsect1" lang="en"><a name="id3509160"></a><h2>Signals</h2><div class="refsect2" lang="en"><a name="signal-gtkspinbutton--change-value"></a><h3>The "change-value" gtk.SpinButton Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>spinbutton</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>scrolltype</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>spinbutton</tt></i>:</span></td><td>the spinbutton that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>scrolltype</tt></i>:</span></td><td>the scrolltype:
<tt class="literal">gtk.SCROLL_STEP_UP</tt>,
<tt class="literal">gtk.SCROLL_STEP_DOWN</tt>,
<tt class="literal">gtk.SCROLL_PAGE_UP</tt>, <tt class="literal">gtk.SCROLL_PAGE_DOWN,
<tt class="literal">gtk.SCROLL_START</tt> or
<tt class="literal">gtk.SCROLL_END</tt></tt></td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "change-value" signal is emitted when the spinbutton value is
changed by keyboard action using the <span><b class="keycap">Up Arrow</b></span>, <span><b class="keycap">Down Arrow</b></span>,
<span><b class="keycap">Page Up</b></span>, <span><b class="keycap">Page
Down</b></span>, <span><b class="keycap">Control</b></span>+<span><b class="keycap">Page Up</b></span>
or <span><b class="keycap">Control</b></span>+<span><b class="keycap">Page
Down</b></span> keys.</p></div><div class="refsect2" lang="en"><a name="signal-gtkspinbutton--input"></a><h3>The "input" gtk.SpinButton Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>spinbutton</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>value_ptr</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>spinbutton</tt></i>:</span></td><td>the spinbutton that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>value_ptr</tt></i>:</span></td><td>a pointer to the value</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if the input value was
retrieved and handled; <tt class="literal">FALSE</tt> if not handled and
-1 if an error occurred during processing.</td></tr></tbody></table><p>The "input" signal is emitted when the value changes. The
value_ptr is a GPointer to the value that cannot be accessed from PyGTK.
This signal cannot be handled in PyGTK.</p></div><div class="refsect2" lang="en"><a name="signal-gtkspinbutton--output"></a><h3>The "output" gtk.SpinButton Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>spinbutton</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>spinbutton</tt></i>:</span></td><td>the spinbutton that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>:</span></td><td><tt class="literal">TRUE</tt> if no further
processing is required.</td></tr></tbody></table><p>The "output" signal is emitted when the spinbutton display value
is changed either by setting a new value or changing the digits and on
realizing the widget. Returns <tt class="literal">TRUE</tt> if the handler
successfully set the text and no further processing is required.</p></div><div class="refsect2" lang="en"><a name="signal-gtkspinbutton--value-changed"></a><h3>The "value-changed" gtk.SpinButton Signal</h3><table border="0" bgcolor="#E0E0E0" width="100%"><tr><td><pre class="programlisting"><code class="methodsynopsis"> def <span class="methodname">callback</span>(<span class="methodparam"><span class="parameter"><i class="parameter"><tt>spinbutton</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>user_param1</tt></i></span></span>, <span class="methodparam"><span class="parameter"><i class="parameter"><tt>...</tt></i></span></span>)</code></pre></td></tr></table><table border="0" width="100%" bgcolor="#FFECCE"><col align="left" valign="top" width="0*"><tbody><tr><td><span class="term"><i class="parameter"><tt>spinbutton</tt></i>:</span></td><td>the spinbutton that received the
signal</td></tr><tr><td><span class="term"><i class="parameter"><tt>user_param1</tt></i>:</span></td><td>the first user parameter (if any) specified
with the <a href="class-gobject.html#method-gobject--connect" title="gobject.GObject.connect"><tt class="methodname">connect</tt>()</a>
method</td></tr><tr><td><span class="term"><i class="parameter"><tt>...</tt></i>:</span></td><td>additional user parameters (if
any)</td></tr></tbody></table><p>The "value-changed" signal is emitted when any of the settings (i.e. value, digits) that change the display of the spinbutton are changed.</p></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="class-gtksocket.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="gtk-class-reference.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="class-gtkstatusbar.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">gtk.Socket</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">gtk.Statusbar</td></tr></table></div></body></html>
|