<html> <head><title>Gtk-- Reference: Gtk::Progress</title></head> <body bgcolor="#F0F0F0" text="#000000" link="#0000FF" vlink="#000077" alink="#FF0000"> <table align=center border=0 cellspacing=10> <tr> <td><a href="class_index.html">Class Index</a></td> <td><a href="cross_index.html">Cross Index</a></td> <td><a href="name_index.html">Namespace Index</a></td> </table> <h1 align=center>Class Gtk::Progress</h1><p> <b> The base class for <tt><font color=navy><b>Gtk::ProgressBar</b></font></tt>.</b><br> Contained in: <a href="Gtk.html">Gtk</a><br> Derived from: <a href="Gtk%3A%3AWidget.html">Gtk::Widget</a> <br> Derived by: <a href="Gtk::ProgressBar.html">Gtk::ProgressBar</a> <p> #include <gtk--/progress.h> <p> <hr noshade> <table border=0> <tr><td colspan=3><h3>public function member index:</h3></td> <tr valign=top><td align=right><tt><tt>signal</tt> <tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2489"><tt><font color=blue><b>act_mode_enter</b></font></tt></a></td><td><tt>()</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2478"><tt><font color=blue><b>configure</b></font></tt></a></td><td><tt>(<tt><font color=purple>gfloat</font></tt> <tt><font color=blue>value</font></tt>, <tt><font color=purple>gfloat</font></tt> <tt><font color=blue>min</font></tt>, <tt><font color=purple>gfloat</font></tt> <tt><font color=blue>max</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><a href="Gtk%3A%3AAdjustment.html"><tt><font color=navy><b>Adjustment</b></font></tt></a>*</tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2475"><tt><font color=blue><b>get_adjustment</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>gfloat</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2485"><tt><font color=blue><b>get_current_percentage</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=navy>string</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2483"><tt><font color=blue><b>get_current_text</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>gfloat</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2486"><tt><font color=blue><b>get_percentage_from_value</b></font></tt></a></td><td><tt>(<tt><font color=purple>gfloat</font></tt> <tt><font color=blue>value</font></tt>) <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=navy>string</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2484"><tt><font color=blue><b>get_text_from_value</b></font></tt></a></td><td><tt>(<tt><font color=purple>gfloat</font></tt> <tt><font color=blue>value</font></tt>) <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>gfloat</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2481"><tt><font color=blue><b>get_value</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt><font color=navy>GtkProgress</font></tt>*</tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2468"><tt><font color=blue><b>gtkobj</b></font></tt></a></td><td><tt>()</tt>;</td> <tr valign=top><td align=right><tt><tt>const</tt> <tt><font color=navy>GtkProgress</font></tt>*</tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2469"><tt><font color=blue><b>gtkobj</b></font></tt></a></td><td><tt>() <tt>const</tt></tt>;</td> <tr valign=top><td align=right><tt><tt>static</tt> <tt><font color=purple>bool</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2470"><tt><font color=blue><b>isA</b></font></tt></a></td><td><tt>(<a href="Gtk%3A%3AObject.html"><tt><font color=navy><b>Object</b></font></tt></a>* <tt><font color=blue>object</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt>signal</tt> <tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2487"><tt><font color=blue><b>paint</b></font></tt></a></td><td><tt>()</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2482"><tt><font color=blue><b>set_activity_mode</b></font></tt></a></td><td><tt>(<tt><font color=purple>bool</font></tt> <tt><font color=blue>activity_mode</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2476"><tt><font color=blue><b>set_adjustment</b></font></tt></a></td><td><tt>(<a href="Gtk%3A%3AAdjustment.html"><tt><font color=navy><b>Adjustment</b></font></tt></a>& <tt><font color=blue>adjustment</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2477"><tt><font color=blue><b>set_adjustment</b></font></tt></a></td><td><tt>(<a href="Gtk%3A%3AAdjustment.html"><tt><font color=navy><b>Adjustment</b></font></tt></a>* <tt><font color=blue>adjustment</font></tt>=0)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2474"><tt><font color=blue><b>set_format_string</b></font></tt></a></td><td><tt>(<tt>const</tt> <tt><font color=navy>string</font></tt>& <tt><font color=blue>format</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2479"><tt><font color=blue><b>set_percentage</b></font></tt></a></td><td><tt>(<tt><font color=purple>gfloat</font></tt> <tt><font color=blue>percentage</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2472"><tt><font color=blue><b>set_show_text</b></font></tt></a></td><td><tt>(<tt><font color=purple>bool</font></tt> <tt><font color=blue>show_text</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2473"><tt><font color=blue><b>set_text_alignment</b></font></tt></a></td><td><tt>(<tt><font color=purple>gfloat</font></tt> <tt><font color=blue>x_align</font></tt>, <tt><font color=purple>gfloat</font></tt> <tt><font color=blue>y_align</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2480"><tt><font color=blue><b>set_value</b></font></tt></a></td><td><tt>(<tt><font color=purple>gfloat</font></tt> <tt><font color=blue>value</font></tt>)</tt>;</td> <tr valign=top><td align=right><tt><tt>signal</tt> <tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2488"><tt><font color=blue><b>update</b></font></tt></a></td><td><tt>()</tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> </tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2471"><tt><font color=blue><b>~Progress</b></font></tt></a></td><td><tt>()</tt>;</td> <tr><td> </td><tr><td colspan=3><h3>protected function member index:</h3></td> <tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2492"><tt><font color=blue><b>act_mode_enter_impl</b></font></tt></a></td><td><tt>()</tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2490"><tt><font color=blue><b>paint_impl</b></font></tt></a></td><td><tt>()</tt>;</td> <tr valign=top><td align=right><tt><tt>virtual</tt> <tt><font color=purple>void</font></tt></tt> </td><td align=right><a href="Gtk%3A%3AProgress.html#2491"><tt><font color=blue><b>update_impl</b></font></tt></a></td><td><tt>()</tt>;</td> <tr><td> </td></table> <hr noshade> <h2>Description:</h2> A <tt><font color=navy><b>Gtk::Progress</b></font></tt> is the abstract base class used to derive a <tt><font color=navy><b>Gtk::ProgressBar</b></font></tt> which provides a visual representation of the progress of a long running operation.<br> <p> <hr noshade> <h2>Function Member Descriptions:</h2> <a name="2478"><font size=+1><b>Gtk::Progress::configure</b></font></a> - Allows the configuration of the minimum, maximum, and current values for the <tt><font color=navy><b>Gtk::Progress</b></font></tt>.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>void</font></tt></tt> <a href="Gtk%3A%3AProgress.html#2478"><tt><font color=blue><b>configure</b></font></tt></a><tt>(<tt><font color=purple>gfloat</font></tt> <tt><font color=blue>value</font></tt>, <tt><font color=purple>gfloat</font></tt> <tt><font color=blue>min</font></tt>, <tt><font color=purple>gfloat</font></tt> <tt><font color=blue>max</font></tt>)</tt>;<br><blockquote> value: The current progress value. <P> min: The minimum progress value. <P> max: The maximum progress value.</blockquote> <br><br> <a name="2485"><font size=+1><b>Gtk::Progress::get_current_percentage</b></font></a> - Returns the current progress as a percentage.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>gfloat</font></tt></tt> <a href="Gtk%3A%3AProgress.html#2485"><tt><font color=blue><b>get_current_percentage</b></font></tt></a><tt>() <tt>const</tt></tt>;<br><blockquote> Returns: A number between 0.0 and 1.0 indicating the percentage complete.</blockquote> <br><br> <a name="2483"><font size=+1><b>Gtk::Progress::get_current_text</b></font></a> - Returns the current text associated with the <tt><font color=navy><b>Gtk::Progress</b></font></tt>.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=navy>string</font></tt></tt> <a href="Gtk%3A%3AProgress.html#2483"><tt><font color=blue><b>get_current_text</b></font></tt></a><tt>() <tt>const</tt></tt>;<br><blockquote> This text is the based on the underlying format string after any substitutions are made. <P> Returns: The text indicating the current progress.</blockquote> <br><br> <a name="2486"><font size=+1><b>Gtk::Progress::get_percentage_from_value</b></font></a> - Returns the progress as a percentage calculated from the supplied absolute progress value.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>gfloat</font></tt></tt> <a href="Gtk%3A%3AProgress.html#2486"><tt><font color=blue><b>get_percentage_from_value</b></font></tt></a><tt>(<tt><font color=purple>gfloat</font></tt> <tt><font color=blue>value</font></tt>) <tt>const</tt></tt>;<br><blockquote> value: An absolute progress value. <P> Returns: a number between 0.0 and 1.0 indicating the percentage complete represented by value.</blockquote> <br><br> <a name="2484"><font size=+1><b>Gtk::Progress::get_text_from_value</b></font></a> - Returns the text indicating the progress based on the supplied value.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=navy>string</font></tt></tt> <a href="Gtk%3A%3AProgress.html#2484"><tt><font color=blue><b>get_text_from_value</b></font></tt></a><tt>(<tt><font color=purple>gfloat</font></tt> <tt><font color=blue>value</font></tt>) <tt>const</tt></tt>;<br><blockquote> The current value for the <tt><font color=navy><b>Gtk::Progress</b></font></tt> remains unchanged. <P> value: An absolute progress value to use when formatting the progress text. <P> Returns: A string indicating the progress.</blockquote> <br><br> <a name="2481"><font size=+1><b>Gtk::Progress::get_value</b></font></a> - Returns the current progress complete value.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>gfloat</font></tt></tt> <a href="Gtk%3A%3AProgress.html#2481"><tt><font color=blue><b>get_value</b></font></tt></a><tt>() <tt>const</tt></tt>;<br><blockquote> Returns: The current progress complete value.</blockquote> <br><br> <a name="2468"><font size=+1><b>Gtk::Progress::gtkobj</b></font></a> - Returns the underlaying gtk+ object.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=navy>GtkProgress</font></tt>*</tt> <a href="Gtk%3A%3AProgress.html#2468"><tt><font color=blue><b>gtkobj</b></font></tt></a><tt>()</tt>;<br><br> <a name="2470"><font size=+1><b>Gtk::Progress::isA</b></font></a> - Returns true if object is this type.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt>static</tt> <tt><font color=purple>bool</font></tt></tt> <a href="Gtk%3A%3AProgress.html#2470"><tt><font color=blue><b>isA</b></font></tt></a><tt>(<a href="Gtk%3A%3AObject.html"><tt><font color=navy><b>Object</b></font></tt></a>* <tt><font color=blue>object</font></tt>)</tt>;<br><br> <a name="2482"><font size=+1><b>Gtk::Progress::set_activity_mode</b></font></a> - A <tt><font color=navy><b>Gtk::Progress</b></font></tt> can be in one of two different modes: percentage<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>void</font></tt></tt> <a href="Gtk%3A%3AProgress.html#2482"><tt><font color=blue><b>set_activity_mode</b></font></tt></a><tt>(<tt><font color=purple>bool</font></tt> <tt><font color=blue>activity_mode</font></tt>)</tt>;<br><blockquote> mode (the default) and activity mode. In activity mode, the progress is simply indicated as activity rather than as a percentage complete. <P> activity_mode: A boolean, TRUE for activity mode.</blockquote> <br><br> <a name="2476"><font size=+1><b>Gtk::Progress::set_adjustment</b></font></a> - Associates a <tt><font color=navy><b>Gtk::Adjustment</b></font></tt> with the <tt><font color=navy><b>Gtk::Progress</b></font></tt>.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>void</font></tt></tt> <a href="Gtk%3A%3AProgress.html#2476"><tt><font color=blue><b>set_adjustment</b></font></tt></a><tt>(<a href="Gtk%3A%3AAdjustment.html"><tt><font color=navy><b>Adjustment</b></font></tt></a>& <tt><font color=blue>adjustment</font></tt>)</tt>;<br><blockquote> A <tt><font color=navy><b>Gtk::Adjustment</b></font></tt> is used to represent the upper and lower bounds and the step interval of the underlying value for which progress is shown. <P> adjustment: The <tt><font color=navy><b>Gtk::Adjustment</b></font></tt> to be associated with the <tt><font color=navy><b>Gtk::Progress</b></font></tt>.</blockquote> <br><br> <a name="2474"><font size=+1><b>Gtk::Progress::set_format_string</b></font></a> - Sets a format string used to display text indicating the current progress.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>void</font></tt></tt> <a href="Gtk%3A%3AProgress.html#2474"><tt><font color=blue><b>set_format_string</b></font></tt></a><tt>(<tt>const</tt> <tt><font color=navy>string</font></tt>& <tt><font color=blue>format</font></tt>)</tt>;<br><blockquote> format: A string used to display progress text. The string can contain the following substitution characters: <P> %v - the current progress value. <P> %l - the lower bound for the progress value. <P> %u - the upper bound for the progress value. <P> %p - the current progress percentage.</blockquote> <br><br> <a name="2479"><font size=+1><b>Gtk::Progress::set_percentage</b></font></a> - Sets the current percentage completion for the <tt><font color=navy><b>Gtk::Progress</b></font></tt>.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>void</font></tt></tt> <a href="Gtk%3A%3AProgress.html#2479"><tt><font color=blue><b>set_percentage</b></font></tt></a><tt>(<tt><font color=purple>gfloat</font></tt> <tt><font color=blue>percentage</font></tt>)</tt>;<br><blockquote> percentage: The percentage complete which must be between 0.0 and 1.0.</blockquote> <br><br> <a name="2472"><font size=+1><b>Gtk::Progress::set_show_text</b></font></a> - Controls whether progress text is shown.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>void</font></tt></tt> <a href="Gtk%3A%3AProgress.html#2472"><tt><font color=blue><b>set_show_text</b></font></tt></a><tt>(<tt><font color=purple>bool</font></tt> <tt><font color=blue>show_text</font></tt>)</tt>;<br><blockquote> show_text: A boolean indicating whether the progress text is shown.</blockquote> <br><br> <a name="2473"><font size=+1><b>Gtk::Progress::set_text_alignment</b></font></a> - Controls the alignment of the text within the progress bar area.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>void</font></tt></tt> <a href="Gtk%3A%3AProgress.html#2473"><tt><font color=blue><b>set_text_alignment</b></font></tt></a><tt>(<tt><font color=purple>gfloat</font></tt> <tt><font color=blue>x_align</font></tt>, <tt><font color=purple>gfloat</font></tt> <tt><font color=blue>y_align</font></tt>)</tt>;<br><blockquote> x_align: A number between 0.0 and 1.0 indicating the horizontal alignment of the progress text within the <tt><font color=navy><b>Gtk::Progress</b></font></tt>. <P> y_align: A number between 0.0 and 1.0 indicating the vertical alignment of the progress text within the <tt><font color=navy><b>Gtk::Progress</b></font></tt>.</blockquote> <br><br> <a name="2480"><font size=+1><b>Gtk::Progress::set_value</b></font></a> - Sets the value within the <tt><font color=navy><b>Gtk::Progress</b></font></tt> to an absolute value.<br> <hr size="1" width="70%" align="left" noshade="noshade"><tt><tt><font color=purple>void</font></tt></tt> <a href="Gtk%3A%3AProgress.html#2480"><tt><font color=blue><b>set_value</b></font></tt></a><tt>(<tt><font color=purple>gfloat</font></tt> <tt><font color=blue>value</font></tt>)</tt>;<br><blockquote> The value must be within the valid range of values for the underlying <tt><font color=navy><b>Gtk::Adjustment</b></font></tt>. <P> value: The value indicating the current completed amount.</blockquote> <br><br> <hr noshade> </html>