1 <!-- ##### SECTION Title ##### -->
4 <!-- ##### SECTION Short_Description ##### -->
5 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 <!-- ##### SECTION Stability_Level ##### -->
22 <!-- ##### STRUCT GtkProgress ##### -->
24 The #GtkProgress-struct struct contains private data only.
25 and should be accessed using the functions below.
29 <!-- ##### ARG GtkProgress:activity-mode ##### -->
34 <!-- ##### ARG GtkProgress:show-text ##### -->
39 <!-- ##### ARG GtkProgress:text-xalign ##### -->
44 <!-- ##### ARG GtkProgress:text-yalign ##### -->
49 <!-- ##### FUNCTION gtk_progress_set_show_text ##### -->
51 Controls whether progress text is shown.
54 @progress: a #GtkProgress.
55 @show_text: a boolean indicating whether the progress text
59 <!-- ##### FUNCTION gtk_progress_set_text_alignment ##### -->
61 Controls the alignment of the text within the progress bar area.
64 @progress: a #GtkProgress.
65 @x_align: a number between 0.0 and 1.0 indicating the horizontal
66 alignment of the progress text within the #GtkProgress.
67 @y_align: a number between 0.0 and 1.0 indicating the vertical
68 alignment of the progress text within the #GtkProgress.
71 <!-- ##### FUNCTION gtk_progress_set_format_string ##### -->
73 Sets a format string used to display text indicating the
74 current progress. The string can contain the following substitution characters:
79 %v - the current progress value.
84 %l - the lower bound for the progress value.
89 %u - the upper bound for the progress value.
94 %p - the current progress percentage.
100 @progress: a #GtkProgress.
101 @format: a string used to display progress text, or %NULL
102 to restore to the default format.
105 <!-- ##### FUNCTION gtk_progress_set_adjustment ##### -->
107 Associates a #GtkAdjustment with the #GtkProgress. A #GtkAdjustment
108 is used to represent the upper and lower bounds and the step interval
109 of the underlying value for which progress is shown.
112 @progress: a #GtkProgress.
113 @adjustment: the #GtkAdjustment to be associated with the #GtkProgress.
116 <!-- ##### FUNCTION gtk_progress_set_percentage ##### -->
118 Sets the current percentage completion for the #GtkProgress.
121 @progress: a #GtkProgress.
122 @percentage: the percentage complete which must be between 0.0
126 <!-- ##### FUNCTION gtk_progress_set_value ##### -->
128 Sets the value within the #GtkProgress to an absolute value.
129 The value must be within the valid range of values for the
130 underlying #GtkAdjustment.
133 @progress: a #GtkProgress.
134 @value: the value indicating the current completed amount.
137 <!-- ##### FUNCTION gtk_progress_get_value ##### -->
139 Returns the current progress complete value.
142 @progress: a #GtkProgress.
143 @Returns: the current progress complete value.
146 <!-- ##### FUNCTION gtk_progress_set_activity_mode ##### -->
148 A #GtkProgress can be in one of two different modes: percentage
149 mode (the default) and activity mode. In activity mode, the
150 progress is simply indicated as activity rather than as a percentage
154 @progress: a #GtkProgress.
155 @activity_mode: a boolean, %TRUE for activity mode.
158 <!-- ##### FUNCTION gtk_progress_get_current_text ##### -->
160 Returns the current text associated with the #GtkProgress. This
161 text is the based on the underlying format string after any substitutions
165 @progress: a #GtkProgress.
166 @Returns: the text indicating the current progress.
169 <!-- ##### FUNCTION gtk_progress_get_text_from_value ##### -->
171 Returns the text indicating the progress based on the supplied value.
172 The current value for the #GtkProgress remains unchanged.
175 @progress: a #GtkProgress.
176 @value: an absolute progress value to use when formatting the progress text.
177 @Returns: a string indicating the progress.
180 <!-- ##### FUNCTION gtk_progress_get_current_percentage ##### -->
182 Returns the current progress as a percentage.
185 @progress: a #GtkProgress.
186 @Returns: a number between 0.0 and 1.0 indicating the percentage complete.
189 <!-- ##### FUNCTION gtk_progress_get_percentage_from_value ##### -->
191 Returns the progress as a percentage calculated from the supplied
192 absolute progress value.
195 @progress: a #GtkProgress.
196 @value: an absolute progress value.
197 @Returns: a number between 0.0 and 1.0 indicating the percentage complete
198 represented by @value.
201 <!-- ##### FUNCTION gtk_progress_configure ##### -->
203 Allows the configuration of the minimum, maximum, and current values for
207 @progress: a #GtkProgress.
208 @value: the current progress value.
209 @min: the minimum progress value.
210 @max: the maximum progress value.