Some docs

svn path=/trunk/gtk-sharp/; revision=44542
This commit is contained in:
Miguel de Icaza 2005-05-15 17:23:20 +00:00
parent aa87b5bc36
commit 77dfe030c1
2 changed files with 73 additions and 8 deletions

View File

@ -10,9 +10,23 @@
</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>The ListStore is a columned list data structure to be used with <see cref="T:Gtk.TreeView" /> widget. It is the model part in Model/View/Controller design paradigm. The contents of the ListStore can be sorted and are drag-and-drop ready.
</summary>
<remarks />
<summary>The ListStore is a columned list data structure to be used with <see cref="T:Gtk.TreeView" /> widget. </summary>
<remarks>
<para>
Iteration: In new versions of Gtk# (2.0 and up) this class implements the <see cref="T:System.Collections.IEnumerable" /> interface, so code can be written like this:
</para>
<para>
<example>
<code lang="C#">
void DumpColumnValues (ListStore store, int col)
{
foreach (object[] row in store)
Console.WriteLine ("Value of column {0} is {2}", col, row [col]);
}
</code>
</example>
</para>
</remarks>
</Docs>
<Base>
<BaseTypeName>GLib.Object</BaseTypeName>
@ -1511,9 +1525,8 @@ The above example creates a new three columns list store. The types of the colum
<returns>a <see cref="T:System.Collections.IEnumerator" /></returns>
<remarks>
<para> If the elements of the current instance are modified while an enumeration is in progress, a call to <see cref="M:System.Collections.IEnumerator.MoveNext" /> or <see cref="P:System.Collections.IEnumerator.Current" /> throws <see cref="T:System.InvalidOperationException" />.</para>
</remarks>
</remarks>
</Docs>
</Member>
</Members>
</Type>
</Type>

View File

@ -10,8 +10,60 @@
</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>Tree and List store for <see cref="T:Gtk.ITreeNode" /> objects.</summary>
<summary>A store for <see cref="T:Gtk.TreeView" /> that provides data from an arbitrary class. It is simpler to use than the <see cref="T:Gtk.ListStore" />.</summary>
<remarks>
<para>
This class provides a simple mechanism of implementing the Model required by the <see cref="T:Gtk.TreeView" />.
</para>
<example>
<code lang="C#">
[TreeNode (ColumnCount=2)]
class DemoNode {
string name;
string email;
public DemoNode (string name, string email)
{
this.name = name;
this.email = email;
}
[TreeNodeValue (Column=0)]
public string Name {
get { return name; }
}
[TreeNodeValue (Column=1)]
public string EMail {
get { return email; }
}
}
class Demo {
NodeStore store;
void PopulateStore ()
{
NodeStore store = new NodeStore (typeof (MyRow));
DemoNode my_node = new DemoNode ("Miguel de Icaza", "miguel@ximian.com");
store.AddNode (my_node);
}
</code>
</example>
<para>
Iteration: In new versions of Gtk# (2.0 and up) this class implements the <see cref="T:System.Collections.IEnumerable" /> interface, so code can be written like this:
</para>
<para>
<example>
<code lang="C#">
void DumpColumnValues (NodeStore store, int col)
{
foreach (object[] row in store)
Console.WriteLine ("Value of column {0} is {2}", col, row [col]);
}
</code>
</example>
</para>
</remarks>
</Docs>
<Base>
@ -144,4 +196,4 @@
</Docs>
</Member>
</Members>
</Type>
</Type>