1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 the base class for #GtkProgressBar.
7 <!-- ##### SECTION Long_Description ##### -->
9 A #GtkProgress is the abstract base class used to derive
10 a #GtkProgressBar which provides a visual representation of
11 the progress of a long running operation.
14 <!-- ##### SECTION See_Also ##### -->
19 <!-- ##### STRUCT GtkProgress ##### -->
21 The #GtkProgress-struct struct contains private data only.
22 and should be accessed using the functions below.
26 <!-- ##### ARG GtkProgress:activity-mode ##### -->
31 <!-- ##### ARG GtkProgress:show-text ##### -->
36 <!-- ##### ARG GtkProgress:text-xalign ##### -->
41 <!-- ##### ARG GtkProgress:text-yalign ##### -->
46 <!-- ##### FUNCTION gtk_progress_set_show_text ##### -->
48 Controls whether progress text is shown.
51 @progress: a #GtkProgress.
52 @show_text: a boolean indicating whether the progress text
56 <!-- ##### FUNCTION gtk_progress_set_text_alignment ##### -->
58 Controls the alignment of the text within the progress bar area.
61 @progress: a #GtkProgress.
62 @x_align: a number between 0.0 and 1.0 indicating the horizontal
63 alignment of the progress text within the #GtkProgress.
64 @y_align: a number between 0.0 and 1.0 indicating the vertical
65 alignment of the progress text within the #GtkProgress.
68 <!-- ##### FUNCTION gtk_progress_set_format_string ##### -->
70 Sets a format string used to display text indicating the
71 current progress. The string can contain the following substitution characters:
76 %v - the current progress value.
81 %l - the lower bound for the progress value.
86 %u - the upper bound for the progress value.
91 %p - the current progress percentage.
97 @progress: a #GtkProgress.
98 @format: a string used to display progress text, or %NULL
99 to restore to the default format.
102 <!-- ##### FUNCTION gtk_progress_set_adjustment ##### -->
104 Associates a #GtkAdjustment with the #GtkProgress. A #GtkAdjustment
105 is used to represent the upper and lower bounds and the step interval
106 of the underlying value for which progress is shown.
109 @progress: a #GtkProgress.
110 @adjustment: the #GtkAdjustment to be associated with the #GtkProgress.
113 <!-- ##### FUNCTION gtk_progress_set_percentage ##### -->
115 Sets the current percentage completion for the #GtkProgress.
118 @progress: a #GtkProgress.
119 @percentage: the percentage complete which must be between 0.0
123 <!-- ##### FUNCTION gtk_progress_set_value ##### -->
125 Sets the value within the #GtkProgress to an absolute value.
126 The value must be within the valid range of values for the
127 underlying #GtkAdjustment.
130 @progress: a #GtkProgress.
131 @value: the value indicating the current completed amount.
134 <!-- ##### FUNCTION gtk_progress_get_value ##### -->
136 Returns the current progress complete value.
139 @progress: a #GtkProgress.
140 @Returns: the current progress complete value.
143 <!-- ##### FUNCTION gtk_progress_set_activity_mode ##### -->
145 A #GtkProgress can be in one of two different modes: percentage
146 mode (the default) and activity mode. In activity mode, the
147 progress is simply indicated as activity rather than as a percentage
151 @progress: a #GtkProgress.
152 @activity_mode: a boolean, %TRUE for activity mode.
155 <!-- ##### FUNCTION gtk_progress_get_current_text ##### -->
157 Returns the current text associated with the #GtkProgress. This
158 text is the based on the underlying format string after any substitutions
162 @progress: a #GtkProgress.
163 @Returns: the text indicating the current progress.
166 <!-- ##### FUNCTION gtk_progress_get_text_from_value ##### -->
168 Returns the text indicating the progress based on the supplied value.
169 The current value for the #GtkProgress remains unchanged.
172 @progress: a #GtkProgress.
173 @value: an absolute progress value to use when formatting the progress text.
174 @Returns: a string indicating the progress.
177 <!-- ##### FUNCTION gtk_progress_get_current_percentage ##### -->
179 Returns the current progress as a percentage.
182 @progress: a #GtkProgress.
183 @Returns: a number between 0.0 and 1.0 indicating the percentage complete.
186 <!-- ##### FUNCTION gtk_progress_get_percentage_from_value ##### -->
188 Returns the progress as a percentage calculated from the supplied
189 absolute progress value.
192 @progress: a #GtkProgress.
193 @value: an absolute progress value.
194 @Returns: a number between 0.0 and 1.0 indicating the percentage complete
195 represented by @value.
198 <!-- ##### FUNCTION gtk_progress_configure ##### -->
200 Allows the configuration of the minimum, maximum, and current values for
204 @progress: a #GtkProgress.
205 @value: the current progress value.
206 @min: the minimum progress value.
207 @max: the maximum progress value.