📄 gtkspinbutton.html
字号:
<a name="id3549681"></a><h3><a name="gtk-spin-button-get-numeric"></a>gtk_spin_button_get_numeric ()</h3><a class="indexterm" name="id3549695"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gtk_spin_button_get_numeric (<a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a> *spin_button);</pre><p>Returns whether non-numeric text can be typed into the spin button.See <a class="link" href="GtkSpinButton.html#gtk-spin-button-set-numeric"><code class="function">gtk_spin_button_set_numeric()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td><td> a <a class="link" href="GtkSpinButton.html" title="GtkSpinButton"><span class="type">GtkSpinButton</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if only numeric text can be entered</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3549786"></a><h3><a name="gtk-spin-button-get-range"></a>gtk_spin_button_get_range ()</h3><a class="indexterm" name="id3549800"></a><pre class="programlisting">void gtk_spin_button_get_range (<a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a> *spin_button, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> *min, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> *max);</pre><p>Gets the range allowed for <em class="parameter"><code>spin_button</code></em>. See<a class="link" href="GtkSpinButton.html#gtk-spin-button-set-range"><code class="function">gtk_spin_button_set_range()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td><td> a <a class="link" href="GtkSpinButton.html" title="GtkSpinButton"><span class="type">GtkSpinButton</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>min</code></em> :</span></p></td><td> location to store minimum allowed value, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>max</code></em> :</span></p></td><td> location to store maximum allowed value, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3549939"></a><h3><a name="gtk-spin-button-get-snap-to-ticks"></a>gtk_spin_button_get_snap_to_ticks ()</h3><a class="indexterm" name="id3549953"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gtk_spin_button_get_snap_to_ticks (<a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a> *spin_button);</pre><p>Returns whether the values are corrected to the nearest step. See<a class="link" href="GtkSpinButton.html#gtk-spin-button-set-snap-to-ticks"><code class="function">gtk_spin_button_set_snap_to_ticks()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td><td> a <a class="link" href="GtkSpinButton.html" title="GtkSpinButton"><span class="type">GtkSpinButton</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if values are snapped to the nearest step.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3550044"></a><h3><a name="gtk-spin-button-get-update-policy"></a>gtk_spin_button_get_update_policy ()</h3><a class="indexterm" name="id3550058"></a><pre class="programlisting"><a class="link" href="GtkSpinButton.html#GtkSpinButtonUpdatePolicy">GtkSpinButtonUpdatePolicy</a> gtk_spin_button_get_update_policy (<a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a> *spin_button);</pre><p>Gets the update behavior of a spin button. See<a class="link" href="GtkSpinButton.html#gtk-spin-button-set-update-policy"><code class="function">gtk_spin_button_set_update_policy()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td><td> a <a class="link" href="GtkSpinButton.html" title="GtkSpinButton"><span class="type">GtkSpinButton</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the current update policy</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3550140"></a><h3><a name="gtk-spin-button-get-value"></a>gtk_spin_button_get_value ()</h3><a class="indexterm" name="id3550153"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> gtk_spin_button_get_value (<a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a> *spin_button);</pre><p>Get the value in the <em class="parameter"><code>spin_button</code></em>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td><td> a <a class="link" href="GtkSpinButton.html" title="GtkSpinButton"><span class="type">GtkSpinButton</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the value of <em class="parameter"><code>spin_button</code></em></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3550233"></a><h3><a name="gtk-spin-button-get-wrap"></a>gtk_spin_button_get_wrap ()</h3><a class="indexterm" name="id3550246"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gtk_spin_button_get_wrap (<a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a> *spin_button);</pre><p>Returns whether the spin button's value wraps around to theopposite limit when the upper or lower limit of the range isexceeded. See <a class="link" href="GtkSpinButton.html#gtk-spin-button-set-wrap"><code class="function">gtk_spin_button_set_wrap()</code></a>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>spin_button</code></em> :</span></p></td><td> a <a class="link" href="GtkSpinButton.html" title="GtkSpinButton"><span class="type">GtkSpinButton</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the spin button wraps around</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3550338"></a><h3><a name="GTK-INPUT-ERROR:CAPS"></a>GTK_INPUT_ERROR</h3><a class="indexterm" name="id3550351"></a><pre class="programlisting">#define GTK_INPUT_ERROR -1</pre><p></p></div></div><div class="refsect1" lang="en"><a name="id3550367"></a><h2>Property Details</h2><div class="refsect2" lang="en"><a name="id3550377"></a><h3><a name="GtkSpinButton--adjustment"></a>The <code class="literal">"adjustment"</code> property</h3><a class="indexterm" name="id3550393"></a><pre class="programlisting"> "adjustment" <a class="link" href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> : Read / Write</pre><p>The adjustment that holds the value of the spinbutton.</p></div><hr><div class="refsect2" lang="en"><a name="id3550417"></a><h3><a name="GtkSpinButton--climb-rate"></a>The <code class="literal">"climb-rate"</code> property</h3><a class="indexterm" name="id3550434"></a><pre class="programlisting"> "climb-rate" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> : Read / Write</pre><p>The acceleration rate when you hold down a button.</p><p>Allowed values: >= 0</p><p>Default value: 0</p></div><hr><div class="refsect2" lang="en"><a name="id3550464"></a><h3><a name="GtkSpinButton--digits"></a>The <code class="literal">"digits"</code> property</h3><a class="indexterm" name="id3550481"></a><pre class="programlisting"> "digits" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> : Read / Write</pre><p>The number of decimal places to display.</p><p>Allowed values: <= 20</p><p>Default value: 0</p></div><hr><div class="refsect2" lang="en"><a name="id3550512"></a><h3><a name="GtkSpinButton--numeric"></a>The <code class="literal">"numeric"</code> property</h3><a class="indexterm" name="id3550529"></a><pre class="programlisting"> "numeric" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> : Read / Write</pre><p>Whether non-numeric characters should be ignored.</p><p>Default value: FALSE</p></div><hr><div class="refsect2" lang="en"><a name="id3550556"></a><h3><a name="GtkSpinButton--snap-to-ticks"></a>The <code class="literal">"snap-to-ticks"</code> property</h3><a class="indexterm" name="id3550572"></a><pre class="programlisting"> "snap-to-ticks" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> : Read / Write</pre><p>Whether erroneous values are automatically changed to a spin button's nearest step increment.</p><p>Default value: FALSE</p></div><hr><div class="refsect2" lang="en"><a name="id3550600"></a><h3><a name="GtkSpinButton--update-policy"></a>The <code class="literal">"update-policy"</code> property</h3><a class="indexterm" name="id3550617"></a><pre class="programlisting"> "update-policy" <a class="link" href="GtkSpinButton.html#GtkSpinButtonUpdatePolicy">GtkSpinButtonUpdatePolicy</a> : Read / Write</pre><p>Whether the spin button should update always, or only when the value is legal.</p><p>Default value: GTK_UPDATE_ALWAYS</p></div><hr><div class="refsect2" lang="en"><a name="id3550645"></a><h3><a name="GtkSpinButton--value"></a>The <code class="literal">"value"</code> property</h3><a class="indexterm" name="id3550661"></a><pre class="programlisting"> "value" <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> : Read / Write</pre><p>Reads the current value, or sets a new value.</p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -