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
<!-- ##### SECTION Image ##### -->
25
<!-- ##### STRUCT GtkProgress ##### -->
27
The #GtkProgress-struct struct contains private data only.
28
and should be accessed using the functions below.
32
<!-- ##### ARG GtkProgress:activity-mode ##### -->
37
<!-- ##### ARG GtkProgress:show-text ##### -->
42
<!-- ##### ARG GtkProgress:text-xalign ##### -->
47
<!-- ##### ARG GtkProgress:text-yalign ##### -->
52
<!-- ##### FUNCTION gtk_progress_set_show_text ##### -->
54
Controls whether progress text is shown.
57
@progress: a #GtkProgress.
58
@show_text: a boolean indicating whether the progress text
62
<!-- ##### FUNCTION gtk_progress_set_text_alignment ##### -->
64
Controls the alignment of the text within the progress bar area.
67
@progress: a #GtkProgress.
68
@x_align: a number between 0.0 and 1.0 indicating the horizontal
69
alignment of the progress text within the #GtkProgress.
70
@y_align: a number between 0.0 and 1.0 indicating the vertical
71
alignment of the progress text within the #GtkProgress.
74
<!-- ##### FUNCTION gtk_progress_set_format_string ##### -->
76
Sets a format string used to display text indicating the
77
current progress. The string can contain the following substitution characters:
82
%v - the current progress value.
87
%l - the lower bound for the progress value.
92
%u - the upper bound for the progress value.
97
%p - the current progress percentage.
103
@progress: a #GtkProgress.
104
@format: a string used to display progress text, or %NULL
105
to restore to the default format.
108
<!-- ##### FUNCTION gtk_progress_set_adjustment ##### -->
110
Associates a #GtkAdjustment with the #GtkProgress. A #GtkAdjustment
111
is used to represent the upper and lower bounds and the step interval
112
of the underlying value for which progress is shown.
115
@progress: a #GtkProgress.
116
@adjustment: the #GtkAdjustment to be associated with the #GtkProgress.
119
<!-- ##### FUNCTION gtk_progress_set_percentage ##### -->
121
Sets the current percentage completion for the #GtkProgress.
124
@progress: a #GtkProgress.
125
@percentage: the percentage complete which must be between 0.0
129
<!-- ##### FUNCTION gtk_progress_set_value ##### -->
131
Sets the value within the #GtkProgress to an absolute value.
132
The value must be within the valid range of values for the
133
underlying #GtkAdjustment.
136
@progress: a #GtkProgress.
137
@value: the value indicating the current completed amount.
140
<!-- ##### FUNCTION gtk_progress_get_value ##### -->
142
Returns the current progress complete value.
145
@progress: a #GtkProgress.
146
@Returns: the current progress complete value.
149
<!-- ##### FUNCTION gtk_progress_set_activity_mode ##### -->
151
A #GtkProgress can be in one of two different modes: percentage
152
mode (the default) and activity mode. In activity mode, the
153
progress is simply indicated as activity rather than as a percentage
157
@progress: a #GtkProgress.
158
@activity_mode: a boolean, %TRUE for activity mode.
161
<!-- ##### FUNCTION gtk_progress_get_current_text ##### -->
163
Returns the current text associated with the #GtkProgress. This
164
text is the based on the underlying format string after any substitutions
168
@progress: a #GtkProgress.
169
@Returns: the text indicating the current progress.
172
<!-- ##### FUNCTION gtk_progress_get_text_from_value ##### -->
174
Returns the text indicating the progress based on the supplied value.
175
The current value for the #GtkProgress remains unchanged.
178
@progress: a #GtkProgress.
179
@value: an absolute progress value to use when formatting the progress text.
180
@Returns: a string indicating the progress.
183
<!-- ##### FUNCTION gtk_progress_get_current_percentage ##### -->
185
Returns the current progress as a percentage.
188
@progress: a #GtkProgress.
189
@Returns: a number between 0.0 and 1.0 indicating the percentage complete.
192
<!-- ##### FUNCTION gtk_progress_get_percentage_from_value ##### -->
194
Returns the progress as a percentage calculated from the supplied
195
absolute progress value.
198
@progress: a #GtkProgress.
199
@value: an absolute progress value.
200
@Returns: a number between 0.0 and 1.0 indicating the percentage complete
201
represented by @value.
204
<!-- ##### FUNCTION gtk_progress_configure ##### -->
206
Allows the configuration of the minimum, maximum, and current values for
210
@progress: a #GtkProgress.
211
@value: the current progress value.
212
@min: the minimum progress value.
213
@max: the maximum progress value.