📄 gtkprogressbar.html
字号:
Retrieves the text displayed superimposed on the progress bar,if any, otherwise <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>. The return value is a referenceto the text, not a copy of it, so will become invalidif you change the text in the progress bar.</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>pbar</code></em> :</span></p></td><td> a <a class="link" href="GtkProgressBar.html" title="GtkProgressBar"><span class="type">GtkProgressBar</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> text, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>; this string is owned by the widgetand should not be modified or freed.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3471327"></a><h3><a name="gtk-progress-bar-get-fraction"></a>gtk_progress_bar_get_fraction ()</h3><a class="indexterm" name="id3471340"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> gtk_progress_bar_get_fraction (<a class="link" href="GtkProgressBar.html" title="GtkProgressBar">GtkProgressBar</a> *pbar);</pre><p>Returns the current fraction of the task that's been completed.</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>pbar</code></em> :</span></p></td><td> a <a class="link" href="GtkProgressBar.html" title="GtkProgressBar"><span class="type">GtkProgressBar</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a fraction from 0.0 to 1.0</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3471410"></a><h3><a name="gtk-progress-bar-get-pulse-step"></a>gtk_progress_bar_get_pulse_step ()</h3><a class="indexterm" name="id3471424"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> gtk_progress_bar_get_pulse_step (<a class="link" href="GtkProgressBar.html" title="GtkProgressBar">GtkProgressBar</a> *pbar);</pre><p>Retrieves the pulse step set with <a class="link" href="GtkProgressBar.html#gtk-progress-bar-set-pulse-step"><code class="function">gtk_progress_bar_set_pulse_step()</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>pbar</code></em> :</span></p></td><td> a <a class="link" href="GtkProgressBar.html" title="GtkProgressBar"><span class="type">GtkProgressBar</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a fraction from 0.0 to 1.0</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3471504"></a><h3><a name="gtk-progress-bar-get-orientation"></a>gtk_progress_bar_get_orientation ()</h3><a class="indexterm" name="id3471518"></a><pre class="programlisting"><a class="link" href="GtkProgressBar.html#GtkProgressBarOrientation">GtkProgressBarOrientation</a> gtk_progress_bar_get_orientation (<a class="link" href="GtkProgressBar.html" title="GtkProgressBar">GtkProgressBar</a> *pbar);</pre><p>Retrieves the current progress bar orientation.</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>pbar</code></em> :</span></p></td><td> a <a class="link" href="GtkProgressBar.html" title="GtkProgressBar"><span class="type">GtkProgressBar</span></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> orientation of the progress bar</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3471589"></a><h3><a name="gtk-progress-bar-get-ellipsize"></a>gtk_progress_bar_get_ellipsize ()</h3><a class="indexterm" name="id3471605"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoEllipsizeMode">PangoEllipsizeMode</a> gtk_progress_bar_get_ellipsize (<a class="link" href="GtkProgressBar.html" title="GtkProgressBar">GtkProgressBar</a> *pbar);</pre><p>Returns the ellipsizing position of the progressbar. See <a class="link" href="GtkProgressBar.html#gtk-progress-bar-set-ellipsize"><code class="function">gtk_progress_bar_set_ellipsize()</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>pbar</code></em> :</span></p></td><td> a <a class="link" href="GtkProgressBar.html" title="GtkProgressBar"><span class="type">GtkProgressBar</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/pango/pango-Layout-Objects.html#PangoEllipsizeMode"><span class="type">PangoEllipsizeMode</span></a></td></tr></tbody></table></div><p class="since">Since 2.6</p></div><hr><div class="refsect2" lang="en"><a name="id3471700"></a><h3><a name="gtk-progress-bar-new-with-adjustment"></a>gtk_progress_bar_new_with_adjustment ()</h3><a class="indexterm" name="id3471716"></a><pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>* gtk_progress_bar_new_with_adjustment (<a class="link" href="GtkAdjustment.html" title="GtkAdjustment">GtkAdjustment</a> *adjustment);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_progress_bar_new_with_adjustment</code> is deprecated and should not be used in newly-written code.</p></div><p>Creates a new <a class="link" href="GtkProgressBar.html" title="GtkProgressBar"><span class="type">GtkProgressBar</span></a> with an associated <a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</span></a>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>adjustment</code></em> :</span></p></td><td>a <a class="link" href="GtkAdjustment.html" title="GtkAdjustment"><span class="type">GtkAdjustment</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="GtkProgressBar.html" title="GtkProgressBar"><span class="type">GtkProgressBar</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3471821"></a><h3><a name="gtk-progress-bar-set-bar-style"></a>gtk_progress_bar_set_bar_style ()</h3><a class="indexterm" name="id3471837"></a><pre class="programlisting">void gtk_progress_bar_set_bar_style (<a class="link" href="GtkProgressBar.html" title="GtkProgressBar">GtkProgressBar</a> *pbar, <a class="link" href="GtkProgressBar.html#GtkProgressBarStyle">GtkProgressBarStyle</a> style);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_progress_bar_set_bar_style</code> is deprecated and should not be used in newly-written code.</p></div><p>Sets the style of the <a class="link" href="GtkProgressBar.html" title="GtkProgressBar"><span class="type">GtkProgressBar</span></a>. The default style is<a class="link" href="GtkProgressBar.html#GTK-PROGRESS-CONTINUOUS:CAPS"><code class="literal">GTK_PROGRESS_CONTINUOUS</code></a>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>pbar</code></em> :</span></p></td><td>a <a class="link" href="GtkProgressBar.html" title="GtkProgressBar"><span class="type">GtkProgressBar</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>style</code></em> :</span></p></td><td>a <a class="link" href="GtkProgressBar.html#GtkProgressBarStyle"><span class="type">GtkProgressBarStyle</span></a> value indicating the desired style.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3471958"></a><h3><a name="GtkProgressBarStyle"></a>enum GtkProgressBarStyle</h3><a class="indexterm" name="id3471971"></a><pre class="programlisting">typedef enum{ GTK_PROGRESS_CONTINUOUS, GTK_PROGRESS_DISCRETE} GtkProgressBarStyle;</pre><p>An enumeration representing the styles for drawing the progress bar.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><a name="GTK-PROGRESS-CONTINUOUS:CAPS"></a><code class="literal">GTK_PROGRESS_CONTINUOUS</code></span></p></td><td>The progress bar grows in a smooth, continuous manner.</td></tr><tr><td><p><span class="term"><a name="GTK-PROGRESS-DISCRETE:CAPS"></a><code class="literal">GTK_PROGRESS_DISCRETE</code></span></p></td><td>The progress bar grows in discrete, visible blocks.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3472038"></a><h3><a name="gtk-progress-bar-set-discrete-blocks"></a>gtk_progress_bar_set_discrete_blocks ()</h3><a class="indexterm" name="id3472054"></a><pre class="programlisting">void gtk_progress_bar_set_discrete_blocks (<a class="link" href="GtkProgressBar.html" title="GtkProgressBar">GtkProgressBar</a> *pbar, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guint">guint</a> blocks);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">gtk_progress_bar_set_discrete_blocks</code> is deprecated and should not be used in newly-written code.</p></div><p>Sets the number of blocks that the progress bar is divided intowhen the style is <a class="link" href="GtkProgressBar.html#GTK-PROGRESS-DISCRETE:CAPS"><code class="literal">GTK_PROGRESS_DISCRETE</code></a>.</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>pbar</code></em> :</span></p></td><td>a <a class="link" href="GtkProgressBar.html" title="GtkProgressBar"><span class="type">GtkProgressBar</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>blocks</code></em> :</span></p></td>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -