svn path=/trunk/gtk-sharp/; revision=72613
This commit is contained in:
Miguel de Icaza 2007-02-11 14:02:31 +00:00
parent d2c6e9e528
commit 33dc5b11e5
3 changed files with 80 additions and 7 deletions

View File

@ -7,8 +7,37 @@
</AssemblyInfo>
<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>
<Docs>
<summary>To be added</summary>
<remarks>To be added</remarks>
<summary>Abstraction for Removable devices.</summary>
<remarks>
<para>
The VolumeMonitor offers a simple way to get removable devices: name, icon, type, etc and operations: Eject, Mount, Unmount and others.
</para>
<para>
In order to use, you need to execute the static method <see cref="M:Gnome.Vfs.VolumeMonitor.Get" />. This method give you a pointer to VolumeMonitor, this is a singleton, which means that it will exists and be valid until <see cref="M:Gnome.Vfs.Vfs.Shutdown" /></para>
<example>
<code lang="C#">
// This example show how to get all connected drives
using System;
using Gnome.Vfs;
namespace TestGnomeVFS
{
public class Test()
{
public static void Main()
{
Vfs.Initialize();
VolumeMonitor vMonitor = VolumeMonitor.Get();
Drive[] drv = vMonitor.ConnectedDrives;
foreach Drive d in drv) {
Console.WriteLine(d.DisplayName);
}
Vfs.Shutdown();
}
}
}
</code>
</example>
</remarks>
</Docs>
<Base>
<BaseTypeName>GLib.Object</BaseTypeName>
@ -318,4 +347,4 @@
</Docs>
</Member>
</Members>
</Type>
</Type>

View File

@ -56,7 +56,7 @@ Iteration: In new versions of Gtk# (2.0 and up) this class implements the <see c
<Parameters />
<Docs>
<summary>
Returns the number of children that <paramref name="iter" /> has.
Returns the number of children that the toplevel node has. Is used to retrieve the number of rows in the <see cref="T:Gtk.ListStore" />.
</summary>
<returns>an object of type <see cref="T:System.Int32" />, the number of children of <paramref name="iter" />.</returns>
<remarks>As a special case, if <paramref name="iter" /> is <see langword="null" />, then the number
@ -687,7 +687,7 @@ Iteration: In new versions of Gtk# (2.0 and up) this class implements the <see c
<Parameter Name="n" Type="System.Int32" />
</Parameters>
<Docs>
<param name="iter">a <see cref="T:Gtk.TreeIter&amp;" /></param>
<param name="iter">a <see cref="T:Gtk.TreeIter" /></param>
<param name="parent">To be added.</param>
<param name="n">a <see cref="T:System.Int32" /></param>
<summary>Sets <paramref name="iter" /> to be the child of <paramref name="parent" />, using the given index. The first index is 0. If <paramref name="n" /> is too big, or <paramref name="parent" /> has no children, <paramref name="iter" /> is set to an invalid iterator and false is returned. <paramref name="parent" /> will remain a valid node after this function has been called. As a special case, if <paramref name="parent" /> is <see langword="null" />, then the <paramref name="n" />th root node is set.
@ -1562,4 +1562,4 @@ The above example creates a new three columns list store. The types of the colum
</Docs>
</Member>
</Members>
</Type>
</Type>

View File

@ -20,6 +20,50 @@
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" />.
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>
<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 &lt; PBar.Adjustment.Upper) {
PBar.Adjustment.Value+=1;
}
}
}
}
</code>
</example>
</remarks>
</Docs>
<Base>
@ -339,4 +383,4 @@ It's marked as obsolete - it's better to use <see cref="M:Gtk.ProgressBar.Fracti
</Attributes>
</Member>
</Members>
</Type>
</Type>