]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkprogress.sgml
=== Released 2.3.1 ===
[~andy/gtk] / docs / reference / gtk / tmpl / gtkprogress.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkProgress
3
4 <!-- ##### SECTION Short_Description ##### -->
5 the base class for #GtkProgressBar.
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
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.  
12 </para>
13
14 <!-- ##### SECTION See_Also ##### -->
15 <para>
16
17 </para>
18
19 <!-- ##### STRUCT GtkProgress ##### -->
20 <para>
21 The #GtkProgress-struct struct contains private data only.
22 and should be accessed using the functions below.
23 </para>
24
25
26 <!-- ##### ARG GtkProgress:activity-mode ##### -->
27 <para>
28
29 </para>
30
31 <!-- ##### ARG GtkProgress:show-text ##### -->
32 <para>
33
34 </para>
35
36 <!-- ##### ARG GtkProgress:text-xalign ##### -->
37 <para>
38
39 </para>
40
41 <!-- ##### ARG GtkProgress:text-yalign ##### -->
42 <para>
43
44 </para>
45
46 <!-- ##### FUNCTION gtk_progress_set_show_text ##### -->
47 <para>
48 Controls whether progress text is shown.
49 </para>
50
51 @progress: a #GtkProgress.
52 @show_text: a boolean indicating whether the progress text
53 is shown.
54
55
56 <!-- ##### FUNCTION gtk_progress_set_text_alignment ##### -->
57 <para>
58 Controls the alignment of the text within the progress bar area.
59 </para>
60
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.
66
67
68 <!-- ##### FUNCTION gtk_progress_set_format_string ##### -->
69 <para>
70 Sets a format string used to display text indicating the
71 current progress.  The string can contain the following substitution characters:
72
73 <itemizedlist>
74 <listitem>
75 <para>
76 &percnt;v - the current progress value.
77 </para>
78 </listitem>
79 <listitem>
80 <para>
81 &percnt;l - the lower bound for the progress value.
82 </para>
83 </listitem>
84 <listitem>
85 <para>
86 &percnt;u - the upper bound for the progress value.
87 </para>
88 </listitem>
89 <listitem>
90 <para>
91 &percnt;p - the current progress percentage.
92 </para>
93 </listitem>
94 </itemizedlist>
95 </para>
96
97 @progress: a #GtkProgress.
98 @format: a string used to display progress text, or %NULL
99          to restore to the default format.
100
101
102 <!-- ##### FUNCTION gtk_progress_set_adjustment ##### -->
103 <para>
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.
107 </para>
108
109 @progress: a #GtkProgress.
110 @adjustment: the #GtkAdjustment to be associated with the #GtkProgress.
111
112
113 <!-- ##### FUNCTION gtk_progress_set_percentage ##### -->
114 <para>
115 Sets the current percentage completion for the #GtkProgress.
116 </para>
117
118 @progress: a #GtkProgress.
119 @percentage: the percentage complete which must be between 0.0
120 and 1.0.
121
122
123 <!-- ##### FUNCTION gtk_progress_set_value ##### -->
124 <para>
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.
128 </para>
129
130 @progress: a #GtkProgress.
131 @value: the value indicating the current completed amount.
132
133
134 <!-- ##### FUNCTION gtk_progress_get_value ##### -->
135 <para>
136 Returns the current progress complete value.
137 </para>
138
139 @progress: a #GtkProgress.
140 @Returns: the current progress complete value.
141
142
143 <!-- ##### FUNCTION gtk_progress_set_activity_mode ##### -->
144 <para>
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
148 complete.
149 </para>
150
151 @progress: a #GtkProgress.
152 @activity_mode: a boolean, %TRUE for activity mode.
153
154
155 <!-- ##### FUNCTION gtk_progress_get_current_text ##### -->
156 <para>
157 Returns the current text associated with the #GtkProgress.  This
158 text is the based on the underlying format string after any substitutions
159 are made.
160 </para>
161
162 @progress: a #GtkProgress.
163 @Returns: the text indicating the current progress.
164
165
166 <!-- ##### FUNCTION gtk_progress_get_text_from_value ##### -->
167 <para>
168 Returns the text indicating the progress based on the supplied value.
169 The current value for the #GtkProgress remains unchanged.  
170 </para>
171
172 @progress: a #GtkProgress.
173 @value: an absolute progress value to use when formatting the progress text.
174 @Returns: a string indicating the progress.
175
176
177 <!-- ##### FUNCTION gtk_progress_get_current_percentage ##### -->
178 <para>
179 Returns the current progress as a percentage.
180 </para>
181
182 @progress: a #GtkProgress.
183 @Returns: a number between 0.0 and 1.0 indicating the percentage complete.
184
185
186 <!-- ##### FUNCTION gtk_progress_get_percentage_from_value ##### -->
187 <para>
188 Returns the progress as a percentage calculated from the supplied
189 absolute progress value.
190 </para>
191
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.
196
197
198 <!-- ##### FUNCTION gtk_progress_configure ##### -->
199 <para>
200 Allows the configuration of the minimum, maximum, and current values for
201 the #GtkProgress.
202 </para>
203
204 @progress: a #GtkProgress.
205 @value: the current progress value.
206 @min: the minimum progress value.
207 @max: the maximum progress value.
208
209