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 <!-- ##### FUNCTION gtk_progress_set_show_text ##### -->
28 Controls whether progress text is shown.
31 @progress: a #GtkProgress.
32 @show_text: a boolean indicating whether the progress text
36 <!-- ##### FUNCTION gtk_progress_set_text_alignment ##### -->
38 Controls the alignment of the text within the progress bar area.
41 @progress: a #GtkProgress.
42 @x_align: a number between 0.0 and 1.0 indicating the horizontal
43 alignment of the progress text within the #GtkProgress.
44 @y_align: a number between 0.0 and 1.0 indicating the vertical
45 alignment of the progress text within the #GtkProgress.
48 <!-- ##### FUNCTION gtk_progress_set_format_string ##### -->
50 Sets a format string used to display text indicating the
51 current progress. The string can contain the following substitution characters:
56 %%v - the current progress value.
61 %%l - the lower bound for the progress value.
66 %%u - the upper bound for the progress value.
71 %%p - the current progress percentage.
77 @progress: a #GtkProgress.
78 @format: a string used to display progress text.
81 <!-- ##### FUNCTION gtk_progress_set_adjustment ##### -->
83 Associates a #GtkAdjustment with the #GtkProgress. A #GtkAdjustment
84 is used to represent the upper and lower bounds and the step interval
85 of the underlying value for which progress is shown.
88 @progress: a #GtkProgress.
89 @adjustment: the #GtkAdjustment to be associated with the #GtkProgress.
92 <!-- ##### FUNCTION gtk_progress_set_percentage ##### -->
94 Sets the current percentage completion for the #GtkProgress.
97 @progress: a #GtkProgress.
98 @percentage: the percentage complete which must be between 0.0
102 <!-- ##### FUNCTION gtk_progress_set_value ##### -->
104 Sets the value within the #GtkProgress to an absolute value.
105 The value must be within the valid range of values for the
106 underlying #GtkAdjustment.
109 @progress: a #GtkProgress.
110 @value: the value indicating the current completed amount.
113 <!-- ##### FUNCTION gtk_progress_get_value ##### -->
115 Returns the current progress complete value.
118 @progress: a #GtkProgress.
119 @Returns: the current progress complete value.
122 <!-- ##### FUNCTION gtk_progress_set_activity_mode ##### -->
124 A #GtkProgress can be in one of two different modes: percentage
125 mode (the default) and activity mode. In activity mode, the
126 progress is simply indicated as activity rather than as a percentage
130 @progress: a #GtkProgress.
131 @activity_mode: a boolean, %TRUE for activity mode.
134 <!-- ##### FUNCTION gtk_progress_get_current_text ##### -->
136 Returns the current text associated with the #GtkProgress. This
137 text is the based on the underlying format string after any substitutions
141 @progress: a #GtkProgress.
142 @Returns: the text indicating the current progress.
145 <!-- ##### FUNCTION gtk_progress_get_text_from_value ##### -->
147 Returns the text indicating the progress based on the supplied value.
148 The current value for the #GtkProgress remains unchanged.
151 @progress: a #GtkProgress.
152 @value: an absolute progress value to use when formatting the progress text.
153 @Returns: a string indicating the progress.
156 <!-- ##### FUNCTION gtk_progress_get_current_percentage ##### -->
158 Returns the current progress as a percentage.
161 @progress: a #GtkProgress.
162 @Returns: a number between 0.0 and 1.0 indicating the percentage complete.
165 <!-- ##### FUNCTION gtk_progress_get_percentage_from_value ##### -->
167 Returns the progress as a percentage calculated from the supplied
168 absolute progress value.
171 @progress: a #GtkProgress.
172 @value: an absolute progress value.
173 @Returns: a number between 0.0 and 1.0 indicating the percentage complete
174 represented by @value.
177 <!-- ##### FUNCTION gtk_progress_configure ##### -->
179 Allows the configuration of the minimum, maximum, and current values for
183 @progress: a #GtkProgress.
184 @value: the current progress value.
185 @min: the minimum progress value.
186 @max: the maximum progress value.
189 <!-- ##### ARG GtkProgress:activity-mode ##### -->
191 A boolean indicating whether activity mode is enabled.
194 <!-- ##### ARG GtkProgress:show-text ##### -->
196 A boolean indicating whether the progress is shown as text.
199 <!-- ##### ARG GtkProgress:text-xalign ##### -->
201 A number between 0.0 and 1.0 specifying the horizontal alignment.
204 <!-- ##### ARG GtkProgress:text-yalign ##### -->
206 A number between 0.0 and 1.0 specifying the vertical alignment.