2003-02-12 02:00:12 +00:00
<Type Name= "ProgressBar" FullName= "Gtk.ProgressBar" >
2005-05-23 20:41:51 +00:00
<TypeSignature Language= "C#" Maintainer= "John Luke" Value= "public class ProgressBar : Gtk.Widget" />
2003-02-12 02:00:12 +00:00
<AssemblyInfo >
<AssemblyName > gtk-sharp</AssemblyName>
2003-12-24 01:35:30 +00:00
<AssemblyPublicKey >
</AssemblyPublicKey>
2007-12-06 18:37:54 +00:00
<AssemblyVersion > 2.12.0.0</AssemblyVersion>
2003-02-12 02:00:12 +00:00
</AssemblyInfo>
2003-02-23 07:26:30 +00:00
<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>
2003-02-12 02:00:12 +00:00
<Docs >
2003-05-15 00:47:59 +00:00
<summary > A widget which indicates progress visually.</summary>
<remarks >
2003-07-17 06:38:40 +00:00
<para > The <see cref= "T:Gtk.ProgressBar" /> is typically used to display the progress of a long running operation.
2003-05-15 00:47:59 +00:00
It provides a visual clue that processing is underway.
2003-07-17 06:38:40 +00:00
The <see cref= "T:Gtk.ProgressBar" /> can be used in two different modes: percentage mode and activity mode.</para>
<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,
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.
In this mode, the application is required to set <see cref= "P:Gtk.ProgressBar.Fraction" /> periodically to update the progress bar.</para>
<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.
In this mode, the application is required to call <see cref= "M:Gtk.ProgressBar.Pulse()" /> perodically to update the progress bar.</para>
<para > There is quite a bit of flexibility provided to control the appearance of the <see cref= "T:Gtk.ProgressBar" /> .
2003-05-15 00:47:59 +00:00
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>
2007-02-11 14:02:31 +00:00
<para >
The following example show how percentage mode works
</para>
<example >
<code lang= "C#" >
using System;
using Gtk;
namespace TestGtkAlone
{
public class TestProgress
{
static Gtk.ProgressBar PBar;
static void Main()
{
Gtk.Application.Init();
Gtk.Window WinPBar = new Window("Test Progress bar - Percentage mode");
Gtk.HBox HContainer = new Gtk.HBox(false, 2);
PBar = new ProgressBar();
Gtk.Button ButtonStart = new Gtk.Button("Start Progress");
HContainer.Add(PBar);
HContainer.Add(ButtonStart);
ButtonStart.Clicked += new EventHandler(ButtonStart_Clicked);
WinPBar.Add(HContainer);
WinPBar.ShowAll();
Gtk.Application.Run();
}
public static void ButtonStart_Clicked(object sender, EventArgs args)
{
PBar.Adjustment.Lower = 0;
PBar.Adjustment.Upper = 1000;
while (PBar.Adjustment.Value < PBar.Adjustment.Upper) {
PBar.Adjustment.Value+=1;
}
}
}
}
</code>
</example>
2003-07-17 06:38:40 +00:00
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
<Base >
2005-02-15 21:53:03 +00:00
<BaseTypeName > Gtk.Widget</BaseTypeName>
2003-02-12 02:00:12 +00:00
</Base>
2007-01-16 16:18:05 +00:00
<Interfaces >
</Interfaces>
2003-02-12 02:00:12 +00:00
<Members >
<Member MemberName= "Pulse" >
<MemberSignature Language= "C#" Value= "public void Pulse ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2003-05-15 00:47:59 +00:00
<summary > Indicates an unknown amount of progress has been made</summary>
<remarks > Indicates that some progress has been made, but you don't know how much.
2003-07-17 06:38:40 +00:00
This causes the <see cref= "T:Gtk.ProgressBar" /> to enter "activity mode," where a block bounces back and forth.
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>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public ProgressBar (IntPtr raw);" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
2003-09-17 21:56:59 +00:00
<Parameter Name= "raw" Type= "System.IntPtr" />
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-02-23 07:26:30 +00:00
<summary > Internal constructor</summary>
<param name= "raw" > Pointer to the C object.</param>
<remarks >
<para > This is an internal constructor, and should not be used by user code.</para>
</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public ProgressBar ();" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters />
<Docs >
2003-07-17 06:38:40 +00:00
<summary > Creates a new <see cref= "T:Gtk.ProgressBar" /> .</summary>
<remarks > Creates a new <see cref= "T:Gtk.ProgressBar" /> .</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
</Member>
<Member MemberName= "Adjustment" >
<MemberSignature Language= "C#" Value= "public Gtk.Adjustment Adjustment { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > Gtk.Adjustment</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2004-09-06 14:49:53 +00:00
<summary > Details about the increments used in updating the ProgressBar.</summary>
2005-05-23 20:41:51 +00:00
<value > an object of type <see cref= "T:Gtk.Adjustment" /> </value>
2004-11-05 21:25:40 +00:00
<remarks />
2003-02-12 02:00:12 +00:00
</Docs>
2005-06-16 18:56:42 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > GLib.Property("adjustment")</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-06-16 18:56:42 +00:00
</Attributes>
</Member>
2003-02-12 02:00:12 +00:00
<Member MemberName= "DiscreteBlocks" >
<MemberSignature Language= "C#" Value= "public uint DiscreteBlocks { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.UInt32</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-07-17 06:38:40 +00:00
<summary > The number of blocks that the <see cref= "T:Gtk.ProgressBar" /> is divided into.</summary>
2005-05-23 20:41:51 +00:00
<value > an object of type <see cref= "T:System.UInt32" /> </value>
2003-07-17 06:38:40 +00:00
<remarks > The number of blocks that the <see cref= "T:Gtk.ProgressBar" /> is divided into when the style is discrete.</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
2005-06-16 18:56:42 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > GLib.Property("discrete-blocks")</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-08-23 17:02:47 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > System.Obsolete</AttributeName>
2005-08-23 17:02:47 +00:00
</Attribute>
2005-06-16 18:56:42 +00:00
</Attributes>
</Member>
2003-02-12 02:00:12 +00:00
<Member MemberName= "Text" >
<MemberSignature Language= "C#" Value= "public string Text { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.String</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-07-17 06:38:40 +00:00
<summary > The text displayed superimposed on the <see cref= "T:Gtk.ProgressBar" /> .</summary>
2005-05-23 20:41:51 +00:00
<value > an object of type <see cref= "T:System.String" /> </value>
2003-07-17 06:38:40 +00:00
<remarks > The text displayed superimposed on the <see cref= "T:Gtk.ProgressBar" /> , if any, otherwise <see langword= "null" /> .
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>
2003-02-12 02:00:12 +00:00
</Docs>
2005-06-16 18:56:42 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > GLib.Property("text")</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-06-16 18:56:42 +00:00
</Attributes>
</Member>
2003-02-12 02:00:12 +00:00
<Member MemberName= "Orientation" >
<MemberSignature Language= "C#" Value= "public Gtk.ProgressBarOrientation Orientation { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > Gtk.ProgressBarOrientation</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-07-17 06:38:40 +00:00
<summary > The current <see cref= "T:Gtk.ProgressBar" /> orientation.</summary>
2005-05-23 20:41:51 +00:00
<value > an object of type <see cref= "T:Gtk.ProgressBarOrientation" /> </value>
2003-07-17 06:38:40 +00:00
<remarks > The current <see cref= "T:Gtk.ProgressBar" /> orientation.</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
2005-06-16 18:56:42 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > GLib.Property("orientation")</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-06-16 18:56:42 +00:00
</Attributes>
</Member>
2003-02-12 02:00:12 +00:00
<Member MemberName= "ActivityStep" >
<MemberSignature Language= "C#" Value= "public uint ActivityStep { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.UInt32</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-07-17 06:38:40 +00:00
<summary > The step value used when the <see cref= "T:Gtk.ProgressBar" /> is in activity mode.</summary>
2005-05-23 20:41:51 +00:00
<value > an object of type <see cref= "T:System.UInt32" /> </value>
2003-07-17 06:38:40 +00:00
<remarks > The step value used when the <see cref= "T:Gtk.ProgressBar" /> is in activity mode.
2003-05-15 00:47:59 +00:00
The step is the amount by which the progress is incremented each iteration.</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
2005-06-16 18:56:42 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > GLib.Property("activity-step")</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-08-23 17:02:47 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > System.Obsolete</AttributeName>
2005-08-23 17:02:47 +00:00
</Attribute>
2005-06-16 18:56:42 +00:00
</Attributes>
</Member>
2003-02-12 02:00:12 +00:00
<Member MemberName= "Fraction" >
<MemberSignature Language= "C#" Value= "public double Fraction { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.Double</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-05-15 00:47:59 +00:00
<summary > The current fraction of the task that has been completed.</summary>
2005-05-23 20:41:51 +00:00
<value > an object of type <see cref= "T:System.Double" /> </value>
2003-05-15 00:47:59 +00:00
<remarks > The current fraction of the task that has been completed.</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
2005-06-16 18:56:42 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > GLib.Property("fraction")</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-06-16 18:56:42 +00:00
</Attributes>
</Member>
2003-02-12 02:00:12 +00:00
<Member MemberName= "ActivityBlocks" >
<MemberSignature Language= "C#" Value= "public uint ActivityBlocks { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.UInt32</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-07-17 06:38:40 +00:00
<summary > The number of blocks used when the <see cref= "T:Gtk.ProgressBar" /> is in activity mode.</summary>
2005-05-23 20:41:51 +00:00
<value > an object of type <see cref= "T:System.UInt32" /> </value>
2003-07-17 06:38:40 +00:00
<remarks > The number of blocks used when the <see cref= "T:Gtk.ProgressBar" /> is in activity mode.
2003-05-15 00:47:59 +00:00
Larger numbers make the visible block smaller.</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
2005-06-16 18:56:42 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > GLib.Property("activity-blocks")</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-08-23 17:02:47 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > System.Obsolete</AttributeName>
2005-08-23 17:02:47 +00:00
</Attribute>
2005-06-16 18:56:42 +00:00
</Attributes>
</Member>
2003-02-12 02:00:12 +00:00
<Member MemberName= "BarStyle" >
<MemberSignature Language= "C#" Value= "public Gtk.ProgressBarStyle BarStyle { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > Gtk.ProgressBarStyle</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-07-17 06:38:40 +00:00
<summary > The style for drawing the <see cref= "T:Gtk.ProgressBar" /> .</summary>
2005-05-23 20:41:51 +00:00
<value > an object of type <see cref= "T:Gtk.ProgressBarStyle" /> </value>
2003-07-17 06:38:40 +00:00
<remarks > The style for drawing the <see cref= "T:Gtk.ProgressBar" /> .
Continuous - The <see cref= "T:Gtk.ProgressBar" /> grows in a smooth, continuous manner.
Discrete - The <see cref= "T:Gtk.ProgressBar" /> grows in discrete, visible blocks.</remarks>
2003-02-12 02:00:12 +00:00
</Docs>
2005-06-16 18:56:42 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > GLib.Property("bar-style")</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-08-23 17:02:47 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > System.Obsolete</AttributeName>
2005-08-23 17:02:47 +00:00
</Attribute>
2005-06-16 18:56:42 +00:00
</Attributes>
</Member>
2003-02-12 02:00:12 +00:00
<Member MemberName= "PulseStep" >
<MemberSignature Language= "C#" Value= "public double PulseStep { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > System.Double</ReturnType>
</ReturnValue>
2003-12-24 01:35:30 +00:00
<Parameters >
</Parameters>
2003-02-12 02:00:12 +00:00
<Docs >
2003-07-17 06:38:40 +00:00
<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>
2005-05-23 20:41:51 +00:00
<value > an object of type <see cref= "T:System.Double" /> </value>
2003-07-17 06:38:40 +00:00
<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>
2003-02-12 02:00:12 +00:00
</Docs>
2005-06-16 18:56:42 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > GLib.Property("pulse-step")</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-06-16 18:56:42 +00:00
</Attributes>
</Member>
2003-12-24 01:35:30 +00:00
<Member MemberName= "GType" >
<MemberSignature Language= "C#" Value= "public static GLib.GType GType { get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > GLib.GType</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
2004-06-21 20:14:42 +00:00
<summary > GType Property.</summary>
2005-05-23 20:41:51 +00:00
<value > a <see cref= "T:GLib.GType" /> </value>
2004-06-21 20:14:42 +00:00
<remarks > Returns the native <see cref= "T:GLib.GType" /> value for <see cref= "T:Gtk.ProgressBar" /> .</remarks>
2003-12-24 01:35:30 +00:00
</Docs>
</Member>
2003-03-07 01:30:00 +00:00
<Member MemberName= ".ctor" >
2003-12-24 01:35:30 +00:00
<MemberSignature Language= "C#" Value= "protected ProgressBar (GLib.GType gtype);" />
2003-03-07 01:30:00 +00:00
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
2003-12-24 01:35:30 +00:00
<Parameter Name= "gtype" Type= "GLib.GType" />
2003-09-17 21:56:59 +00:00
</Parameters>
2003-03-07 01:30:00 +00:00
<Docs >
2004-06-21 20:33:11 +00:00
<summary > Protected Constructor.</summary>
2003-12-24 01:35:30 +00:00
<param name= "gtype" > a <see cref= "T:GLib.GType" /> </param>
2004-06-21 20:33:11 +00:00
<remarks > Chain to this constructor if you have manually registered a native <see cref= "T:GLib.GType" /> value for your subclass.</remarks>
2003-03-07 01:30:00 +00:00
</Docs>
2005-06-16 18:56:42 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > System.Obsolete</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-06-16 18:56:42 +00:00
</Attributes>
</Member>
2004-11-05 21:25:40 +00:00
<Member MemberName= "Update" >
<MemberSignature Language= "C#" Value= "public void Update (double percentage);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "percentage" Type= "System.Double" />
</Parameters>
<Docs >
2006-04-11 21:16:27 +00:00
<summary > Update the progress bar with a new percentage-done.
It's marked as obsolete - it's better to use <see cref= "M:Gtk.ProgressBar.Fraction" /> </summary>
2004-12-30 18:55:02 +00:00
<param name= "percentage" > a <see cref= "T:System.Double" /> , the percentage completed this bar should display.</param>
2005-02-15 21:53:03 +00:00
<remarks >
</remarks>
2005-06-16 18:56:42 +00:00
<since version= "Gtk# 2.4" />
2004-11-05 21:25:40 +00:00
</Docs>
</Member>
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public ProgressBar (Gtk.Adjustment adjustment);" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
<Parameter Name= "adjustment" Type= "Gtk.Adjustment" />
</Parameters>
<Docs >
2004-12-30 18:55:02 +00:00
<summary > Public constructor.</summary>
2004-11-05 21:25:40 +00:00
<param name= "adjustment" > a <see cref= "T:Gtk.Adjustment" /> </param>
2005-02-15 21:53:03 +00:00
<remarks >
</remarks>
2005-06-16 18:56:42 +00:00
<since version= "Gtk# 2.4" />
2004-11-05 21:25:40 +00:00
</Docs>
</Member>
2005-04-21 17:10:54 +00:00
<Member MemberName= "Ellipsize" >
<MemberSignature Language= "C#" Value= "public Pango.EllipsizeMode Ellipsize { set; get; };" />
<MemberType > Property</MemberType>
<ReturnValue >
<ReturnType > Pango.EllipsizeMode</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
<summary > To be added</summary>
2005-05-23 20:41:51 +00:00
<value > a <see cref= "T:Pango.EllipsizeMode" /> </value>
2005-04-21 17:10:54 +00:00
<remarks > To be added</remarks>
2005-06-16 19:27:40 +00:00
<since version= "Gtk# 2.6" />
2005-04-21 17:10:54 +00:00
</Docs>
2005-06-16 18:56:42 +00:00
<Attributes >
2005-05-23 20:41:51 +00:00
<Attribute >
2007-01-16 16:18:05 +00:00
<AttributeName > GLib.Property("ellipsize")</AttributeName>
2005-05-23 20:41:51 +00:00
</Attribute>
2005-06-16 18:56:42 +00:00
</Attributes>
</Member>
2003-02-12 02:00:12 +00:00
</Members>
2007-03-02 18:06:55 +00:00
</Type>