📄 gtkspinbutton.html
字号:
<ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> value);</pre><p>Set the value of <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"><em class="parameter"><code>value</code></em> :</span></p></td><td> the new value</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3548835"></a><h3><a name="gtk-spin-button-set-update-policy"></a>gtk_spin_button_set_update_policy ()</h3><a class="indexterm" name="id3548849"></a><pre class="programlisting">void gtk_spin_button_set_update_policy (<a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a> *spin_button, <a class="link" href="GtkSpinButton.html#GtkSpinButtonUpdatePolicy">GtkSpinButtonUpdatePolicy</a> policy);</pre><p>Sets the update behavior of a spin button. This determines whether thespin button is always updated or only when a valid value is set.</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>policy</code></em> :</span></p></td><td> a <a class="link" href="GtkSpinButton.html#GtkSpinButtonUpdatePolicy"><span class="type">GtkSpinButtonUpdatePolicy</span></a> value</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3548940"></a><h3><a name="gtk-spin-button-set-numeric"></a>gtk_spin_button_set_numeric ()</h3><a class="indexterm" name="id3548954"></a><pre class="programlisting">void gtk_spin_button_set_numeric (<a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a> *spin_button, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> numeric);</pre><p>Sets the flag that determines if non-numeric text can be typed intothe spin button.</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>numeric</code></em> :</span></p></td><td> flag indicating if only numeric entry is allowed. </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3549035"></a><h3><a name="gtk-spin-button-spin"></a>gtk_spin_button_spin ()</h3><a class="indexterm" name="id3549049"></a><pre class="programlisting">void gtk_spin_button_spin (<a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a> *spin_button, <a class="link" href="GtkSpinButton.html#GtkSpinType">GtkSpinType</a> direction, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> increment);</pre><p>Increment or decrement a spin button's value in a specified directionby a specified amount.</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>direction</code></em> :</span></p></td><td> a <a class="link" href="GtkSpinButton.html#GtkSpinType"><span class="type">GtkSpinType</span></a> indicating the direction to spin.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>increment</code></em> :</span></p></td><td> step increment to apply in the specified direction.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3549161"></a><h3><a name="gtk-spin-button-set-wrap"></a>gtk_spin_button_set_wrap ()</h3><a class="indexterm" name="id3549174"></a><pre class="programlisting">void gtk_spin_button_set_wrap (<a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a> *spin_button, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> wrap);</pre><p>Sets the flag that determines if a spin button value wraps around to theopposite limit when the upper or lower limit of the range is exceeded.</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>wrap</code></em> :</span></p></td><td> a flag indicating if wrapping behavior is performed.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3549257"></a><h3><a name="gtk-spin-button-set-snap-to-ticks"></a>gtk_spin_button_set_snap_to_ticks ()</h3><a class="indexterm" name="id3549271"></a><pre class="programlisting">void gtk_spin_button_set_snap_to_ticks (<a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a> *spin_button, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> snap_to_ticks);</pre><p>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.</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>snap_to_ticks</code></em> :</span></p></td><td> a flag indicating if invalid values should be corrected.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3549354"></a><h3><a name="gtk-spin-button-update"></a>gtk_spin_button_update ()</h3><a class="indexterm" name="id3549368"></a><pre class="programlisting">void gtk_spin_button_update (<a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a> *spin_button);</pre><p>Manually force an update of the spin button.</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></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3549427"></a><h3><a name="gtk-spin-button-get-digits"></a>gtk_spin_button_get_digits ()</h3><a class="indexterm" name="id3549441"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> gtk_spin_button_get_digits (<a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a> *spin_button);</pre><p>Fetches the precision of <em class="parameter"><code>spin_button</code></em>. See <a class="link" href="GtkSpinButton.html#gtk-spin-button-set-digits"><code class="function">gtk_spin_button_set_digits()</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 precision</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3549526"></a><h3><a name="gtk-spin-button-get-increments"></a>gtk_spin_button_get_increments ()</h3><a class="indexterm" name="id3549540"></a><pre class="programlisting">void gtk_spin_button_get_increments (<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> *step, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> *page);</pre><p>Gets the current step and page the increments used by <em class="parameter"><code>spin_button</code></em>. See<a class="link" href="GtkSpinButton.html#gtk-spin-button-set-increments"><code class="function">gtk_spin_button_set_increments()</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>step</code></em> :</span></p></td><td> location to store step increment, 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>page</code></em> :</span></p></td><td> location to store page increment, 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">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -