📄 gtkrange.html
字号:
<a name="id4294197"></a><h3><a name="GtkRange-struct"></a>GtkRange</h3><a class="indexterm" name="id4294210"></a><pre class="programlisting">typedef struct _GtkRange GtkRange;</pre><p></p></div><hr><div class="refsect2" lang="en"><a name="id4294224"></a><h3><a name="gtk-range-get-fill-level"></a>gtk_range_get_fill_level ()</h3><a class="indexterm" name="id4294240"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> gtk_range_get_fill_level (<a class="link" href="GtkRange.html" title="GtkRange">GtkRange</a> *range);</pre><p>Gets the current position of the fill level indicator.</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>range</code></em> :</span></p></td><td> A <a class="link" href="GtkRange.html" title="GtkRange"><span class="type">GtkRange</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> The current fill level</td></tr></tbody></table></div><p class="since">Since 2.12</p></div><hr><div class="refsect2" lang="en"><a name="id4294316"></a><h3><a name="gtk-range-get-restrict-to-fill-level"></a>gtk_range_get_restrict_to_fill_level ()</h3><a class="indexterm" name="id4294332"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gtk_range_get_restrict_to_fill_level (<a class="link" href="GtkRange.html" title="GtkRange">GtkRange</a> *range);</pre><p>Gets whether the range is restricted to the fill level.</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>range</code></em> :</span></p></td><td> A <a class="link" href="GtkRange.html" title="GtkRange"><span class="type">GtkRange</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 <em class="parameter"><code>range</code></em> is restricted to the fill level.</td></tr></tbody></table></div><p class="since">Since 2.12</p></div><hr><div class="refsect2" lang="en"><a name="id4294425"></a><h3><a name="gtk-range-get-show-fill-level"></a>gtk_range_get_show_fill_level ()</h3><a class="indexterm" name="id4294441"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> gtk_range_get_show_fill_level (<a class="link" href="GtkRange.html" title="GtkRange">GtkRange</a> *range);</pre><p>Gets whether the range displays the fill level graphically.</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>range</code></em> :</span></p></td><td> A <a class="link" href="GtkRange.html" title="GtkRange"><span class="type">GtkRange</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 <em class="parameter"><code>range</code></em> shows the fill level.</td></tr></tbody></table></div><p class="since">Since 2.12</p></div><hr><div class="refsect2" lang="en"><a name="id4294533"></a><h3><a name="gtk-range-set-fill-level"></a>gtk_range_set_fill_level ()</h3><a class="indexterm" name="id4294548"></a><pre class="programlisting">void gtk_range_set_fill_level (<a class="link" href="GtkRange.html" title="GtkRange">GtkRange</a> *range, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> fill_level);</pre><p>Set the new position of the fill level indicator.</p><p>The "fill level" is probably best described by its most prominentuse case, which is an indicator for the amount of pre-buffering ina streaming media player. In that use case, the value of the rangewould indicate the current play position, and the fill level wouldbe the position up to which the file/stream has been downloaded.</p><p>This amount of prebuffering can be displayed on the range's troughand is themeable separately from the trough. To enable fill leveldisplay, use <a class="link" href="GtkRange.html#gtk-range-set-show-fill-level"><code class="function">gtk_range_set_show_fill_level()</code></a>. The range defaultsto not showing the fill level.</p><p>Additionally, it's possible to restrict the range's slider positionto values which are smaller than the fill level. This is controllerby <a class="link" href="GtkRange.html#gtk-range-set-restrict-to-fill-level"><code class="function">gtk_range_set_restrict_to_fill_level()</code></a> and is by defaultenabled.</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>range</code></em> :</span></p></td><td> a <a class="link" href="GtkRange.html" title="GtkRange"><span class="type">GtkRange</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>fill_level</code></em> :</span></p></td><td> the new position of the fill level indicator</td></tr></tbody></table></div><p class="since">Since 2.12</p></div><hr><div class="refsect2" lang="en"><a name="id4294681"></a><h3><a name="gtk-range-set-restrict-to-fill-level"></a>gtk_range_set_restrict_to_fill_level ()</h3><a class="indexterm" name="id4294697"></a><pre class="programlisting">void gtk_range_set_restrict_to_fill_level (<a class="link" href="GtkRange.html" title="GtkRange">GtkRange</a> *range, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> restrict_to_fill_level);</pre><p>Sets whether the slider is restricted to the fill level. See<a class="link" href="GtkRange.html#gtk-range-set-fill-level"><code class="function">gtk_range_set_fill_level()</code></a> for a general description of the filllevel concept.</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>range</code></em> :</span></p></td><td> A <a class="link" href="GtkRange.html" title="GtkRange"><span class="type">GtkRange</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>restrict_to_fill_level</code></em> :</span></p></td><td> Whether the fill level restricts slider movement.</td></tr></tbody></table></div><p class="since">Since 2.12</p></div><hr><div class="refsect2" lang="en"><a name="id4294799"></a><h3><a name="gtk-range-set-show-fill-level"></a>gtk_range_set_show_fill_level ()</h3><a class="indexterm" name="id4294815"></a><pre class="programlisting">void gtk_range_set_show_fill_level (<a class="link" href="GtkRange.html" title="GtkRange">GtkRange</a> *range, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> show_fill_level);</pre><p>Sets whether a graphical fill level is show on the trough. See<a class="link" href="GtkRange.html#gtk-range-set-fill-level"><code class="function">gtk_range_set_fill_level()</code></a> for a general description of the filllevel concept.</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>range</code></em> :</span></p></td><td> A <a class="link" href="GtkRange.html" title="GtkRange"><span class="type">GtkRange</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>show_fill_level</code></em> :</span></p></td><td> Whether a fill level indicator graphics is shown.</td></tr></tbody></table></div><p class="since">Since 2.12</p></div><hr><div class="refsect2" lang="en"><a name="id4294916"></a><h3><a name="gtk-range-get-adjustment"></a>gtk_range_get_adjustment ()</h3><a class="indexterm" name="id4294929"></a><pre class="programlisting"><a class="link" href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a>* gtk_range_get_adjustment (<a class="link" href="GtkRange.html" title="GtkRange">GtkRange</a> *range);</pre><p>Get the <a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a> which is the "model" object for <a class="link" href="GtkRange.html" title="GtkRange"><span class="type">GtkRange</span></a>.See <a class="link" href="GtkRange.html#gtk-range-set-adjustment"><code class="function">gtk_range_set_adjustment()</code></a> for details.The return value does not have a reference added, so should notbe unreferenced.</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>range</code></em> :</span></p></td><td> a <a class="link" href="GtkRange.html" title="GtkRange"><span class="type">GtkRange</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a <a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a></td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id4295034"></a><h3><a name="gtk-range-set-update-policy"></a>gtk_range_set_update_policy ()</h3><a class="indexterm" name="id4295048"></a><pre class="programlisting">void gtk_range_set_update_policy (<a class="link" href="GtkRange.html" title="GtkRange">GtkRange</a> *range, <a class="link" href="gtk-Standard-Enumerations.html#GtkUpdateType">GtkUpdateType</a> policy);</pre><p>Sets the update policy for the range. <span class="type">GTK_UPDATE_CONTINUOUS</span> means thatanytime the range slider is moved, the range value will change and thevalue_changed signal will be emitted. <span class="type">GTK_UPDATE_DELAYED</span> means thatthe value will be updated after a brief timeout where no slider motionoccurs, so updates are spaced by a short time rather thancontinuous. <span class="type">GTK_UPDATE_DISCONTINUOUS</span> means that the value will onlybe updated when the user releases the button and ends the sliderdrag operation.</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>range</code></em> :</span></p></td><td> a <a class="link" href="GtkRange.html" title="GtkRange"><span class="type">GtkRange</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>policy</code></em> :</span></p></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -