⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gtkspinbutton.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</table></div></div><hr><div class="refsect2" lang="en"><a name="id3547823"></a><h3><a name="gtk-spin-button-new-with-range"></a>gtk_spin_button_new_with_range ()</h3><a class="indexterm" name="id3547836"></a><pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          gtk_spin_button_new_with_range      (<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,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> step);</pre><p>This is a convenience constructor that allows creation of a numeric <a class="link" href="GtkSpinButton.html" title="GtkSpinButton"><span class="type">GtkSpinButton</span></a> without manually creating an adjustment. The value is initially set to the minimum value and a page increment of 10 * <em class="parameter"><code>step</code></em>is the default. The precision of the spin button is equivalent to the precision of <em class="parameter"><code>step</code></em>. </p><p>Note that the way in which the precision is derived works best if <em class="parameter"><code>step</code></em> is a power of ten. If the resulting precision is not suitable for your needs, use <a class="link" href="GtkSpinButton.html#gtk-spin-button-set-digits"><code class="function">gtk_spin_button_set_digits()</code></a> to correct it.</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>min</code></em>&#160;:</span></p></td><td> Minimum allowable value</td></tr><tr><td><p><span class="term"><em class="parameter"><code>max</code></em>&#160;:</span></p></td><td> Maximum allowable value</td></tr><tr><td><p><span class="term"><em class="parameter"><code>step</code></em>&#160;:</span></p></td><td> Increment added or subtracted by spinning the widget</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> The new spin button as a <a class="link" href="GtkWidget.html" title="GtkWidget"><span class="type">GtkWidget</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3547996"></a><h3><a name="gtk-spin-button-set-adjustment"></a>gtk_spin_button_set_adjustment ()</h3><a class="indexterm" name="id3548009"></a><pre class="programlisting">void                gtk_spin_button_set_adjustment      (<a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a> *spin_button,                                                         <a class="link" href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> *adjustment);</pre><p>Replaces the <a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a> associated with <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>&#160;:</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>adjustment</code></em>&#160;:</span></p></td><td> a <a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a> to replace the existing adjustment</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3548112"></a><h3><a name="gtk-spin-button-get-adjustment"></a>gtk_spin_button_get_adjustment ()</h3><a class="indexterm" name="id3548125"></a><pre class="programlisting"><a class="link" href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a>*      gtk_spin_button_get_adjustment      (<a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a> *spin_button);</pre><p>Get the adjustment associated with a <a class="link" href="GtkSpinButton.html" title="GtkSpinButton"><span class="type">GtkSpinButton</span></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>&#160;:</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>&#160;:</span></p></td><td> the <a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a> of <em class="parameter"><code>spin_button</code></em></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3548216"></a><h3><a name="gtk-spin-button-set-digits"></a>gtk_spin_button_set_digits ()</h3><a class="indexterm" name="id3548230"></a><pre class="programlisting">void                gtk_spin_button_set_digits          (<a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a> *spin_button,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> digits);</pre><p>Set the precision to be displayed by <em class="parameter"><code>spin_button</code></em>. Up to 20 digit precisionis allowed.</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>&#160;:</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>digits</code></em>&#160;:</span></p></td><td> the number of digits after the decimal point to be displayed for the spin button's value</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3548318"></a><h3><a name="gtk-spin-button-set-increments"></a>gtk_spin_button_set_increments ()</h3><a class="indexterm" name="id3548331"></a><pre class="programlisting">void                gtk_spin_button_set_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>Sets the step and page increments for spin_button.  This affects how quickly the value changes when the spin button's arrows are activated.</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>&#160;:</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>&#160;:</span></p></td><td> increment applied for a button 1 press.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>page</code></em>&#160;:</span></p></td><td> increment applied for a button 2 press.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3548436"></a><h3><a name="gtk-spin-button-set-range"></a>gtk_spin_button_set_range ()</h3><a class="indexterm" name="id3548450"></a><pre class="programlisting">void                gtk_spin_button_set_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>Sets the minimum and maximum allowable values for <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>&#160;:</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>&#160;:</span></p></td><td> minimum allowable value</td></tr><tr><td><p><span class="term"><em class="parameter"><code>max</code></em>&#160;:</span></p></td><td> maximum allowable value</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3548557"></a><h3><a name="gtk-spin-button-get-value-as-float"></a>gtk_spin_button_get_value_as_float</h3><a class="indexterm" name="id3548573"></a><pre class="programlisting">#define gtk_spin_button_get_value_as_float gtk_spin_button_get_value</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_spin_button_get_value_as_float</code> is deprecated and should not be used in newly-written code.</p></div><p>Gets the value in the <em class="parameter"><code>spin_button</code></em>. This function is deprecated,use <a class="link" href="GtkSpinButton.html#gtk-spin-button-get-value"><code class="function">gtk_spin_button_get_value()</code></a> instead.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</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="id3548640"></a><h3><a name="gtk-spin-button-get-value-as-int"></a>gtk_spin_button_get_value_as_int ()</h3><a class="indexterm" name="id3548654"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gint">gint</a>                gtk_spin_button_get_value_as_int    (<a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a> *spin_button);</pre><p>Get the value <em class="parameter"><code>spin_button</code></em> represented as an integer.</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>&#160;:</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>&#160;:</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="id3548735"></a><h3><a name="gtk-spin-button-set-value"></a>gtk_spin_button_set_value ()</h3><a class="indexterm" name="id3548749"></a><pre class="programlisting">void                gtk_spin_button_set_value           (<a class="link" href="GtkSpinButton.html" title="GtkSpinButton">GtkSpinButton</a> *spin_button,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -