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

📄 gtkprogressbar.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<a class="link" href="GtkProgressBar.html#gtk-progress-bar-get-text"><code class="function">gtk_progress_bar_get_text()</code></a>, <a class="link" href="GtkProgressBar.html#gtk-progress-bar-get-fraction"><code class="function">gtk_progress_bar_get_fraction()</code></a>, <a class="link" href="GtkProgressBar.html#gtk-progress-bar-get-pulse-step"><code class="function">gtk_progress_bar_get_pulse_step()</code></a>, <a class="link" href="GtkProgressBar.html#gtk-progress-bar-get-orientation"><code class="function">gtk_progress_bar_get_orientation()</code></a>. These have been grouped at the beginning of this section, followed by a large chunk of deprecated 1.2 compatibility functions.</p></div></div><div class="refsect1" lang="en"><a name="id3470353"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id3470364"></a><h3><a name="GtkProgressBar-struct"></a>GtkProgressBar</h3><a class="indexterm" name="id3470377"></a><pre class="programlisting">typedef struct _GtkProgressBar GtkProgressBar;</pre><p>The <a class="link" href="GtkProgressBar.html#GtkProgressBar-struct"><span class="type">GtkProgressBar</span></a> struct contains private data only, and should be accessed using the functions below.</p></div><hr><div class="refsect2" lang="en"><a name="id3470403"></a><h3><a name="gtk-progress-bar-new"></a>gtk_progress_bar_new ()</h3><a class="indexterm" name="id3470416"></a><pre class="programlisting"><a class="link" href="GtkWidget.html" title="GtkWidget">GtkWidget</a>*          gtk_progress_bar_new                (void);</pre><p>Creates a new <a class="link" href="GtkProgressBar.html" title="GtkProgressBar"><span class="type">GtkProgressBar</span></a>.</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>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="id3470469"></a><h3><a name="gtk-progress-bar-pulse"></a>gtk_progress_bar_pulse ()</h3><a class="indexterm" name="id3470482"></a><pre class="programlisting">void                gtk_progress_bar_pulse              (<a class="link" href="GtkProgressBar.html" title="GtkProgressBar">GtkProgressBar</a> *pbar);</pre><p>Indicates that some progress is made, but you don't know how much.Causes the progress bar to enter "activity mode," where a blockbounces back and forth. Each call to <a class="link" href="GtkProgressBar.html#gtk-progress-bar-pulse"><code class="function">gtk_progress_bar_pulse()</code></a>causes the block to move by a little bit (the amount of movementper pulse is determined by <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>&#160;:</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="id3470566"></a><h3><a name="gtk-progress-bar-set-text"></a>gtk_progress_bar_set_text ()</h3><a class="indexterm" name="id3470580"></a><pre class="programlisting">void                gtk_progress_bar_set_text           (<a class="link" href="GtkProgressBar.html" title="GtkProgressBar">GtkProgressBar</a> *pbar,                                                         const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a> *text);</pre><p>Causes the given <em class="parameter"><code>text</code></em> to appear superimposed on 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>&#160;:</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>text</code></em>&#160;:</span></p></td><td> a UTF-8 string, 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="id3470677"></a><h3><a name="gtk-progress-bar-set-fraction"></a>gtk_progress_bar_set_fraction ()</h3><a class="indexterm" name="id3470691"></a><pre class="programlisting">void                gtk_progress_bar_set_fraction       (<a class="link" href="GtkProgressBar.html" title="GtkProgressBar">GtkProgressBar</a> *pbar,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> fraction);</pre><p>Causes the progress bar to "fill in" the given fractionof the bar. The fraction should be between 0.0 and 1.0,inclusive.</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>&#160;:</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>fraction</code></em>&#160;:</span></p></td><td> fraction of the task that's been completed</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3470773"></a><h3><a name="gtk-progress-bar-set-pulse-step"></a>gtk_progress_bar_set_pulse_step ()</h3><a class="indexterm" name="id3470786"></a><pre class="programlisting">void                gtk_progress_bar_set_pulse_step     (<a class="link" href="GtkProgressBar.html" title="GtkProgressBar">GtkProgressBar</a> *pbar,                                                         <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gdouble">gdouble</a> fraction);</pre><p>Sets the fraction of total progress bar length to move thebouncing block for each call to <a class="link" href="GtkProgressBar.html#gtk-progress-bar-pulse"><code class="function">gtk_progress_bar_pulse()</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>&#160;:</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>fraction</code></em>&#160;:</span></p></td><td> fraction between 0.0 and 1.0</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3470879"></a><h3><a name="gtk-progress-bar-set-orientation"></a>gtk_progress_bar_set_orientation ()</h3><a class="indexterm" name="id3470892"></a><pre class="programlisting">void                gtk_progress_bar_set_orientation    (<a class="link" href="GtkProgressBar.html" title="GtkProgressBar">GtkProgressBar</a> *pbar,                                                         <a class="link" href="GtkProgressBar.html#GtkProgressBarOrientation">GtkProgressBarOrientation</a> orientation);</pre><p>Causes the progress bar to switch to a different orientation(left-to-right, right-to-left, top-to-bottom, or bottom-to-top).</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>&#160;:</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>orientation</code></em>&#160;:</span></p></td><td> orientation of the progress bar</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3470976"></a><h3><a name="gtk-progress-bar-set-ellipsize"></a>gtk_progress_bar_set_ellipsize ()</h3><a class="indexterm" name="id3470992"></a><pre class="programlisting">void                gtk_progress_bar_set_ellipsize      (<a class="link" href="GtkProgressBar.html" title="GtkProgressBar">GtkProgressBar</a> *pbar,                                                         <ahref="/usr/share/gtk-doc/html/pango/pango-Layout-Objects.html#PangoEllipsizeMode">PangoEllipsizeMode</a> mode);</pre><p>Sets the mode used to ellipsize (add an ellipsis: "...") the text if there is not enough space to render the entire string.</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>&#160;:</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>mode</code></em>&#160;:</span></p></td><td> a <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="id3471088"></a><h3><a name="GtkProgressBarOrientation"></a>enum GtkProgressBarOrientation</h3><a class="indexterm" name="id3471102"></a><pre class="programlisting">typedef enum{  GTK_PROGRESS_LEFT_TO_RIGHT,  GTK_PROGRESS_RIGHT_TO_LEFT,  GTK_PROGRESS_BOTTOM_TO_TOP,  GTK_PROGRESS_TOP_TO_BOTTOM} GtkProgressBarOrientation;</pre><p>An enumeration representing possible orientations and growthdirections for the visible 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-LEFT-TO-RIGHT:CAPS"></a><code class="literal">GTK_PROGRESS_LEFT_TO_RIGHT</code></span></p></td><td>A horizontal progress bar growing from left to right.</td></tr><tr><td><p><span class="term"><a name="GTK-PROGRESS-RIGHT-TO-LEFT:CAPS"></a><code class="literal">GTK_PROGRESS_RIGHT_TO_LEFT</code></span></p></td><td>A horizontal progress bar growing from right to left.</td></tr><tr><td><p><span class="term"><a name="GTK-PROGRESS-BOTTOM-TO-TOP:CAPS"></a><code class="literal">GTK_PROGRESS_BOTTOM_TO_TOP</code></span></p></td><td>A vertical progress bar growing from bottom to top.</td></tr><tr><td><p><span class="term"><a name="GTK-PROGRESS-TOP-TO-BOTTOM:CAPS"></a><code class="literal">GTK_PROGRESS_TOP_TO_BOTTOM</code></span></p></td><td>A vertical progress bar growing from top to bottom.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3471220"></a><h3><a name="gtk-progress-bar-get-text"></a>gtk_progress_bar_get_text ()</h3><a class="indexterm" name="id3471233"></a><pre class="programlisting">const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gchar">gchar</a>*        gtk_progress_bar_get_text           (<a class="link" href="GtkProgressBar.html" title="GtkProgressBar">GtkProgressBar</a> *pbar);</pre><p>

⌨️ 快捷键说明

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