1<Type Name="ProgressBar" FullName="Gtk.ProgressBar">
2  <TypeSignature Language="C#" Maintainer="John Luke" Value="public class ProgressBar : Gtk.Widget" />
3  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ProgressBar extends Gtk.Widget" />
4  <AssemblyInfo>
5    <AssemblyName>gtk-sharp</AssemblyName>
6    <AssemblyPublicKey>
7    </AssemblyPublicKey>
8    <AssemblyVersion>2.12.0.0</AssemblyVersion>
9  </AssemblyInfo>
10  <ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
11  <Base>
12    <BaseTypeName>Gtk.Widget</BaseTypeName>
13  </Base>
14  <Interfaces>
15  </Interfaces>
16  <Docs>
17    <summary>A widget which indicates progress visually.</summary>
18    <remarks>
19      <para>The <see cref="T:Gtk.ProgressBar" /> is typically used to display the progress of a long running operation.
20				It provides a visual clue that processing is underway.
21				The <see cref="T:Gtk.ProgressBar" /> can be used in two different modes: percentage mode and activity mode.</para>
22      <para>When an application can determine how much work needs to take place (e.g. read a fixed number of bytes from a file) and can monitor its progress,
23				it can use the <see cref="T:Gtk.ProgressBar" /> in percentage mode and the user sees a growing bar indicating the percentage of the work that has been completed.
24				In this mode, the application is required to set <see cref="P:Gtk.ProgressBar.Fraction" /> periodically to update the progress bar.</para>
25      <para>When an application has no accurate way of knowing the amount of work to do, it can use the <see cref="T:Gtk.ProgressBar" /> in activity mode, which shows activity by a block moving back and forth within the progress area.
26				In this mode, the application is required to call <see cref="M:Gtk.ProgressBar.Pulse()" /> perodically to update the progress bar.</para>
27      <para>There is quite a bit of flexibility provided to control the appearance of the <see cref="T:Gtk.ProgressBar" />.
28				Functions are provided to control the orientation of the bar, optional text can be displayed along with the bar, and the step size used in activity mode can be set.</para>
29      <para>
30The following example show how percentage mode works
31</para>
32      <example>
33        <code lang="C#">
34using System;
35using Gtk;
36
37namespace TestGtkAlone
38{
39	public class TestProgress
40	{
41		static Gtk.ProgressBar PBar;
42		static void Main()
43		{
44			 Gtk.Application.Init();
45			 Gtk.Window WinPBar = new Window("Test Progress bar - Percentage mode");
46			 Gtk.HBox HContainer = new Gtk.HBox(false, 2);
47			 PBar = new ProgressBar();
48			 Gtk.Button ButtonStart = new Gtk.Button("Start Progress");
49			 HContainer.Add(PBar);
50			 HContainer.Add(ButtonStart);
51			 ButtonStart.Clicked += new EventHandler(ButtonStart_Clicked);
52			 WinPBar.Add(HContainer);
53			 WinPBar.ShowAll();
54
55			 Gtk.Application.Run();
56		}
57
58		public static void ButtonStart_Clicked(object sender, EventArgs args)
59		{
60			PBar.Adjustment.Lower = 0;
61			PBar.Adjustment.Upper = 1000;
62			while (PBar.Adjustment.Value &lt; PBar.Adjustment.Upper) {
63				PBar.Adjustment.Value+=1;
64			}
65		}
66
67	}
68
69}
70
71</code>
72      </example>
73    </remarks>
74  </Docs>
75  <Members>
76    <Member MemberName=".ctor">
77      <MemberSignature Language="C#" Value="public ProgressBar ();" />
78      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
79      <MemberType>Constructor</MemberType>
80      <AssemblyInfo>
81        <AssemblyVersion>2.12.0.0</AssemblyVersion>
82      </AssemblyInfo>
83      <ReturnValue />
84      <Parameters />
85      <Docs>
86        <summary>Creates a new <see cref="T:Gtk.ProgressBar" />.</summary>
87        <remarks>Creates a new <see cref="T:Gtk.ProgressBar" />.</remarks>
88      </Docs>
89    </Member>
90    <Member MemberName=".ctor">
91      <MemberSignature Language="C#" Value="protected ProgressBar (GLib.GType gtype);" />
92      <MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(valuetype GLib.GType gtype) cil managed" />
93      <MemberType>Constructor</MemberType>
94      <AssemblyInfo>
95        <AssemblyVersion>2.12.0.0</AssemblyVersion>
96      </AssemblyInfo>
97      <Attributes>
98        <Attribute>
99          <AttributeName>System.Obsolete</AttributeName>
100        </Attribute>
101      </Attributes>
102      <ReturnValue />
103      <Parameters>
104        <Parameter Name="gtype" Type="GLib.GType" />
105      </Parameters>
106      <Docs>
107        <param name="gtype">a <see cref="T:GLib.GType" /></param>
108        <summary>Protected Constructor.</summary>
109        <remarks>Chain to this constructor if you have manually registered a native <see cref="T:GLib.GType" /> value for your subclass.</remarks>
110      </Docs>
111    </Member>
112    <Member MemberName=".ctor">
113      <MemberSignature Language="C#" Value="public ProgressBar (Gtk.Adjustment adjustment);" />
114      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class Gtk.Adjustment adjustment) cil managed" />
115      <MemberType>Constructor</MemberType>
116      <AssemblyInfo>
117        <AssemblyVersion>2.12.0.0</AssemblyVersion>
118      </AssemblyInfo>
119      <ReturnValue />
120      <Parameters>
121        <Parameter Name="adjustment" Type="Gtk.Adjustment" />
122      </Parameters>
123      <Docs>
124        <param name="adjustment">a <see cref="T:Gtk.Adjustment" /></param>
125        <summary>Public constructor.</summary>
126        <remarks>
127        </remarks>
128        <since version="Gtk# 2.4" />
129      </Docs>
130    </Member>
131    <Member MemberName=".ctor">
132      <MemberSignature Language="C#" Value="public ProgressBar (IntPtr raw);" />
133      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(native int raw) cil managed" />
134      <MemberType>Constructor</MemberType>
135      <AssemblyInfo>
136        <AssemblyVersion>2.12.0.0</AssemblyVersion>
137      </AssemblyInfo>
138      <ReturnValue />
139      <Parameters>
140        <Parameter Name="raw" Type="System.IntPtr" />
141      </Parameters>
142      <Docs>
143        <param name="raw">Pointer to the C object.</param>
144        <summary>Internal constructor</summary>
145        <remarks>
146          <para>This is an internal constructor, and should not be used by user code.</para>
147        </remarks>
148      </Docs>
149    </Member>
150    <Member MemberName="ActivityBlocks">
151      <MemberSignature Language="C#" Value="public uint ActivityBlocks { get; set; }" />
152      <MemberSignature Language="ILAsm" Value=".property instance unsigned int32 ActivityBlocks" />
153      <MemberType>Property</MemberType>
154      <AssemblyInfo>
155        <AssemblyVersion>2.12.0.0</AssemblyVersion>
156      </AssemblyInfo>
157      <Attributes>
158        <Attribute>
159          <AttributeName>GLib.Property("activity-blocks")</AttributeName>
160        </Attribute>
161        <Attribute>
162          <AttributeName>System.Obsolete</AttributeName>
163        </Attribute>
164      </Attributes>
165      <ReturnValue>
166        <ReturnType>System.UInt32</ReturnType>
167      </ReturnValue>
168      <Parameters>
169      </Parameters>
170      <Docs>
171        <summary>The number of blocks used when the <see cref="T:Gtk.ProgressBar" /> is in activity mode.</summary>
172        <value>an object of type <see cref="T:System.UInt32" /></value>
173        <remarks>The number of blocks used when the <see cref="T:Gtk.ProgressBar" /> is in activity mode.
174					Larger numbers make the visible block smaller.</remarks>
175      </Docs>
176    </Member>
177    <Member MemberName="ActivityStep">
178      <MemberSignature Language="C#" Value="public uint ActivityStep { get; set; }" />
179      <MemberSignature Language="ILAsm" Value=".property instance unsigned int32 ActivityStep" />
180      <MemberType>Property</MemberType>
181      <AssemblyInfo>
182        <AssemblyVersion>2.12.0.0</AssemblyVersion>
183      </AssemblyInfo>
184      <Attributes>
185        <Attribute>
186          <AttributeName>GLib.Property("activity-step")</AttributeName>
187        </Attribute>
188        <Attribute>
189          <AttributeName>System.Obsolete</AttributeName>
190        </Attribute>
191      </Attributes>
192      <ReturnValue>
193        <ReturnType>System.UInt32</ReturnType>
194      </ReturnValue>
195      <Parameters>
196      </Parameters>
197      <Docs>
198        <summary>The step value used when the <see cref="T:Gtk.ProgressBar" /> is in activity mode.</summary>
199        <value>an object of type <see cref="T:System.UInt32" /></value>
200        <remarks>The step value used when the <see cref="T:Gtk.ProgressBar" /> is in activity mode.
201					The step is the amount by which the progress is incremented each iteration.</remarks>
202      </Docs>
203    </Member>
204    <Member MemberName="Adjustment">
205      <MemberSignature Language="C#" Value="public Gtk.Adjustment Adjustment { get; set; }" />
206      <MemberSignature Language="ILAsm" Value=".property instance class Gtk.Adjustment Adjustment" />
207      <MemberType>Property</MemberType>
208      <AssemblyInfo>
209        <AssemblyVersion>2.12.0.0</AssemblyVersion>
210      </AssemblyInfo>
211      <Attributes>
212        <Attribute>
213          <AttributeName>GLib.Property("adjustment")</AttributeName>
214        </Attribute>
215      </Attributes>
216      <ReturnValue>
217        <ReturnType>Gtk.Adjustment</ReturnType>
218      </ReturnValue>
219      <Parameters>
220      </Parameters>
221      <Docs>
222        <summary>Details about the increments used in updating the ProgressBar.</summary>
223        <value>an object of type <see cref="T:Gtk.Adjustment" /></value>
224        <remarks />
225      </Docs>
226    </Member>
227    <Member MemberName="BarStyle">
228      <MemberSignature Language="C#" Value="public Gtk.ProgressBarStyle BarStyle { get; set; }" />
229      <MemberSignature Language="ILAsm" Value=".property instance valuetype Gtk.ProgressBarStyle BarStyle" />
230      <MemberType>Property</MemberType>
231      <AssemblyInfo>
232        <AssemblyVersion>2.12.0.0</AssemblyVersion>
233      </AssemblyInfo>
234      <Attributes>
235        <Attribute>
236          <AttributeName>GLib.Property("bar-style")</AttributeName>
237        </Attribute>
238        <Attribute>
239          <AttributeName>System.Obsolete</AttributeName>
240        </Attribute>
241      </Attributes>
242      <ReturnValue>
243        <ReturnType>Gtk.ProgressBarStyle</ReturnType>
244      </ReturnValue>
245      <Parameters>
246      </Parameters>
247      <Docs>
248        <summary>The style for drawing the <see cref="T:Gtk.ProgressBar" />.</summary>
249        <value>an object of type <see cref="T:Gtk.ProgressBarStyle" /></value>
250        <remarks>The style for drawing the <see cref="T:Gtk.ProgressBar" />.
251					Continuous - The <see cref="T:Gtk.ProgressBar" /> grows in a smooth, continuous manner.
252					Discrete - The <see cref="T:Gtk.ProgressBar" /> grows in discrete, visible blocks.</remarks>
253      </Docs>
254    </Member>
255    <Member MemberName="DiscreteBlocks">
256      <MemberSignature Language="C#" Value="public uint DiscreteBlocks { get; set; }" />
257      <MemberSignature Language="ILAsm" Value=".property instance unsigned int32 DiscreteBlocks" />
258      <MemberType>Property</MemberType>
259      <AssemblyInfo>
260        <AssemblyVersion>2.12.0.0</AssemblyVersion>
261      </AssemblyInfo>
262      <Attributes>
263        <Attribute>
264          <AttributeName>GLib.Property("discrete-blocks")</AttributeName>
265        </Attribute>
266        <Attribute>
267          <AttributeName>System.Obsolete</AttributeName>
268        </Attribute>
269      </Attributes>
270      <ReturnValue>
271        <ReturnType>System.UInt32</ReturnType>
272      </ReturnValue>
273      <Parameters>
274      </Parameters>
275      <Docs>
276        <summary>The number of blocks that the <see cref="T:Gtk.ProgressBar" /> is divided into.</summary>
277        <value>an object of type <see cref="T:System.UInt32" /></value>
278        <remarks>The number of blocks that the <see cref="T:Gtk.ProgressBar" /> is divided into when the style is discrete.</remarks>
279      </Docs>
280    </Member>
281    <Member MemberName="Ellipsize">
282      <MemberSignature Language="C#" Value="public Pango.EllipsizeMode Ellipsize { get; set; }" />
283      <MemberSignature Language="ILAsm" Value=".property instance valuetype Pango.EllipsizeMode Ellipsize" />
284      <MemberType>Property</MemberType>
285      <AssemblyInfo>
286        <AssemblyVersion>2.12.0.0</AssemblyVersion>
287      </AssemblyInfo>
288      <Attributes>
289        <Attribute>
290          <AttributeName>GLib.Property("ellipsize")</AttributeName>
291        </Attribute>
292      </Attributes>
293      <ReturnValue>
294        <ReturnType>Pango.EllipsizeMode</ReturnType>
295      </ReturnValue>
296      <Parameters />
297      <Docs>
298        <summary>To be added</summary>
299        <value>a <see cref="T:Pango.EllipsizeMode" /></value>
300        <remarks>To be added</remarks>
301        <since version="Gtk# 2.6" />
302      </Docs>
303    </Member>
304    <Member MemberName="Fraction">
305      <MemberSignature Language="C#" Value="public double Fraction { get; set; }" />
306      <MemberSignature Language="ILAsm" Value=".property instance float64 Fraction" />
307      <MemberType>Property</MemberType>
308      <AssemblyInfo>
309        <AssemblyVersion>2.12.0.0</AssemblyVersion>
310      </AssemblyInfo>
311      <Attributes>
312        <Attribute>
313          <AttributeName>GLib.Property("fraction")</AttributeName>
314        </Attribute>
315      </Attributes>
316      <ReturnValue>
317        <ReturnType>System.Double</ReturnType>
318      </ReturnValue>
319      <Parameters>
320      </Parameters>
321      <Docs>
322        <summary>The current fraction of the task that has been completed.</summary>
323        <value>an object of type <see cref="T:System.Double" /></value>
324        <remarks>The current fraction of the task that has been completed.</remarks>
325      </Docs>
326    </Member>
327    <Member MemberName="GType">
328      <MemberSignature Language="C#" Value="public static GLib.GType GType { get; }" />
329      <MemberSignature Language="ILAsm" Value=".property valuetype GLib.GType GType" />
330      <MemberType>Property</MemberType>
331      <AssemblyInfo>
332        <AssemblyVersion>2.12.0.0</AssemblyVersion>
333      </AssemblyInfo>
334      <ReturnValue>
335        <ReturnType>GLib.GType</ReturnType>
336      </ReturnValue>
337      <Parameters />
338      <Docs>
339        <summary>GType Property.</summary>
340        <value>a <see cref="T:GLib.GType" /></value>
341        <remarks>Returns the native <see cref="T:GLib.GType" /> value for <see cref="T:Gtk.ProgressBar" />.</remarks>
342      </Docs>
343    </Member>
344    <Member MemberName="Orientation">
345      <MemberSignature Language="C#" Value="public Gtk.ProgressBarOrientation Orientation { get; set; }" />
346      <MemberSignature Language="ILAsm" Value=".property instance valuetype Gtk.ProgressBarOrientation Orientation" />
347      <MemberType>Property</MemberType>
348      <AssemblyInfo>
349        <AssemblyVersion>2.12.0.0</AssemblyVersion>
350      </AssemblyInfo>
351      <Attributes>
352        <Attribute>
353          <AttributeName>GLib.Property("orientation")</AttributeName>
354        </Attribute>
355      </Attributes>
356      <ReturnValue>
357        <ReturnType>Gtk.ProgressBarOrientation</ReturnType>
358      </ReturnValue>
359      <Parameters>
360      </Parameters>
361      <Docs>
362        <summary>The current <see cref="T:Gtk.ProgressBar" /> orientation.</summary>
363        <value>an object of type <see cref="T:Gtk.ProgressBarOrientation" /></value>
364        <remarks>The current <see cref="T:Gtk.ProgressBar" /> orientation.</remarks>
365      </Docs>
366    </Member>
367    <Member MemberName="Pulse">
368      <MemberSignature Language="C#" Value="public void Pulse ();" />
369      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Pulse() cil managed" />
370      <MemberType>Method</MemberType>
371      <AssemblyInfo>
372        <AssemblyVersion>2.12.0.0</AssemblyVersion>
373      </AssemblyInfo>
374      <ReturnValue>
375        <ReturnType>System.Void</ReturnType>
376      </ReturnValue>
377      <Parameters />
378      <Docs>
379        <summary>Indicates an unknown amount of progress has been made</summary>
380        <remarks>Indicates that some progress has been made, but you don't know how much.
381					This causes the <see cref="T:Gtk.ProgressBar" /> to enter "activity mode," where a block bounces back and forth.
382					Each call to <see cref="M:Gtk.ProgressBar.Pulse()" /> causes the block to move by a little bit (the amount of movement per pulse is determined by <see cref="P:Gtk.ProgressBar.PulseStep" />).</remarks>
383      </Docs>
384    </Member>
385    <Member MemberName="PulseStep">
386      <MemberSignature Language="C#" Value="public double PulseStep { get; set; }" />
387      <MemberSignature Language="ILAsm" Value=".property instance float64 PulseStep" />
388      <MemberType>Property</MemberType>
389      <AssemblyInfo>
390        <AssemblyVersion>2.12.0.0</AssemblyVersion>
391      </AssemblyInfo>
392      <Attributes>
393        <Attribute>
394          <AttributeName>GLib.Property("pulse-step")</AttributeName>
395        </Attribute>
396      </Attributes>
397      <ReturnValue>
398        <ReturnType>System.Double</ReturnType>
399      </ReturnValue>
400      <Parameters>
401      </Parameters>
402      <Docs>
403        <summary>The fraction of total <see cref="T:Gtk.ProgressBar" /> length to move the bouncing block for each call to <see cref="M:Gtk.ProgressBar.Pulse()" />.</summary>
404        <value>an object of type <see cref="T:System.Double" /></value>
405        <remarks>The fraction of total <see cref="T:Gtk.ProgressBar" /> length to move the bouncing block for each call to <see cref="M:Gtk.ProgressBar.Pulse()" />.</remarks>
406      </Docs>
407    </Member>
408    <Member MemberName="Text">
409      <MemberSignature Language="C#" Value="public string Text { get; set; }" />
410      <MemberSignature Language="ILAsm" Value=".property instance string Text" />
411      <MemberType>Property</MemberType>
412      <AssemblyInfo>
413        <AssemblyVersion>2.12.0.0</AssemblyVersion>
414      </AssemblyInfo>
415      <Attributes>
416        <Attribute>
417          <AttributeName>GLib.Property("text")</AttributeName>
418        </Attribute>
419      </Attributes>
420      <ReturnValue>
421        <ReturnType>System.String</ReturnType>
422      </ReturnValue>
423      <Parameters>
424      </Parameters>
425      <Docs>
426        <summary>The text displayed superimposed on the <see cref="T:Gtk.ProgressBar" />.</summary>
427        <value>an object of type <see cref="T:System.String" /></value>
428        <remarks>The text displayed superimposed on the <see cref="T:Gtk.ProgressBar" />, if any, otherwise <see langword="null" />.
429					The return value is a reference to the text, not a copy of it, so will become invalid if you change the text in the <see cref="T:Gtk.ProgressBar" />.</remarks>
430      </Docs>
431    </Member>
432    <Member MemberName="Update">
433      <MemberSignature Language="C#" Value="public void Update (double percentage);" />
434      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void Update(float64 percentage) cil managed" />
435      <MemberType>Method</MemberType>
436      <AssemblyInfo>
437        <AssemblyVersion>2.12.0.0</AssemblyVersion>
438      </AssemblyInfo>
439      <Attributes>
440        <Attribute>
441          <AttributeName>System.Obsolete</AttributeName>
442        </Attribute>
443      </Attributes>
444      <ReturnValue>
445        <ReturnType>System.Void</ReturnType>
446      </ReturnValue>
447      <Parameters>
448        <Parameter Name="percentage" Type="System.Double" />
449      </Parameters>
450      <Docs>
451        <param name="percentage">a <see cref="T:System.Double" />, the percentage completed this bar should display.</param>
452        <summary>Update the progress bar with a new percentage-done.
453It's marked as obsolete - it's better to use <see cref="M:Gtk.ProgressBar.Fraction" /></summary>
454        <remarks>
455        </remarks>
456        <since version="Gtk# 2.4" />
457      </Docs>
458    </Member>
459  </Members>
460</Type>
461