2003-11-05 04:30:47 +00:00
<Type Name= "NodeStore" FullName= "Gtk.NodeStore" >
2005-05-23 20:41:51 +00:00
<TypeSignature Language= "C#" Maintainer= "Mike Kestner" Value= "public class NodeStore : GLib.Object, System.Collections.IEnumerable" />
2011-11-09 16:01:51 +00:00
<TypeSignature Language= "ILAsm" Value= ".class public auto ansi beforefieldinit NodeStore extends GLib.Object implements class System.Collections.IEnumerable" />
2003-11-05 04:30:47 +00:00
<AssemblyInfo >
<AssemblyName > gtk-sharp</AssemblyName>
2003-12-24 01:35:30 +00:00
<AssemblyPublicKey >
</AssemblyPublicKey>
2003-11-05 04:30:47 +00:00
</AssemblyInfo>
2003-11-06 01:52:32 +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>
2011-11-09 16:01:51 +00:00
<Base >
<BaseTypeName > GLib.Object</BaseTypeName>
</Base>
<Interfaces >
<Interface >
<InterfaceName > System.Collections.IEnumerable</InterfaceName>
</Interface>
</Interfaces>
2003-11-05 04:30:47 +00:00
<Docs >
2005-05-15 17:23:20 +00:00
<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>
2005-03-15 17:34:36 +00:00
<remarks >
2005-05-15 17:23:20 +00:00
<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 ()
{
2006-12-26 07:13:57 +00:00
NodeStore store = new NodeStore (typeof (DemoNode));
2005-05-15 17:23:20 +00:00
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)
2006-12-26 07:13:57 +00:00
Console.WriteLine ("Value of column {0} is {1}", col, row [col]);
2005-05-15 17:23:20 +00:00
}
</code>
</example>
</para>
2005-03-15 17:34:36 +00:00
</remarks>
2003-11-05 04:30:47 +00:00
</Docs>
<Members >
2011-11-09 16:01:51 +00:00
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public NodeStore (Type node_type);" />
<MemberSignature Language= "ILAsm" Value= ".method public hidebysig specialname rtspecialname instance void .ctor(class System.Type node_type) cil managed" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
<Parameter Name= "node_type" Type= "System.Type" />
</Parameters>
<Docs >
<param name= "node_type" > a <see cref= "T:System.Type" /> </param>
<summary > NodeStore constructor</summary>
<remarks >
Creates a <see cref= "T:Gtk.NodeStore" /> for nodes of the specified <paramref name= "node_type" /> .
The type provided in <paramref name= "node_type" /> must implement <see cref= "T:Gtk.ITreeNode" /> .
</remarks>
</Docs>
</Member>
2003-11-05 04:30:47 +00:00
<Member MemberName= "AddNode" >
<MemberSignature Language= "C#" Value= "public void AddNode (Gtk.ITreeNode node);" />
2011-11-09 16:01:51 +00:00
<MemberSignature Language= "ILAsm" Value= ".method public hidebysig instance void AddNode(class Gtk.ITreeNode node) cil managed" />
2003-11-05 04:30:47 +00:00
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "node" Type= "Gtk.ITreeNode" />
</Parameters>
<Docs >
<param name= "node" > a <see cref= "T:Gtk.ITreeNode" /> </param>
2011-11-09 16:01:51 +00:00
<summary > Appends the node to the root level of the tree</summary>
2003-11-06 01:52:32 +00:00
<remarks >
Adds <paramref name= "node" /> to the end of the list of root level nodes.
</remarks>
2003-11-05 04:30:47 +00:00
</Docs>
</Member>
2005-03-15 17:34:36 +00:00
<Member MemberName= "AddNode" >
<MemberSignature Language= "C#" Value= "public void AddNode (Gtk.ITreeNode node, int position);" />
2011-11-09 16:01:51 +00:00
<MemberSignature Language= "ILAsm" Value= ".method public hidebysig instance void AddNode(class Gtk.ITreeNode node, int32 position) cil managed" />
2005-03-15 17:34:36 +00:00
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "node" Type= "Gtk.ITreeNode" />
<Parameter Name= "position" Type= "System.Int32" />
</Parameters>
<Docs >
<param name= "node" > a <see cref= "T:Gtk.ITreeNode" /> </param>
<param name= "position" > the position to insert it at</param>
2011-11-09 16:01:51 +00:00
<summary > Inserts the node into the root level of the tree</summary>
2005-03-15 17:34:36 +00:00
<remarks >
Adds <paramref name= "node" /> to the list of root level nodes before the node
currently at <paramref name= "position" /> .
</remarks>
2005-06-16 18:56:42 +00:00
<since version= "Gtk# 2.4" />
2005-03-15 17:34:36 +00:00
</Docs>
</Member>
2011-11-09 16:01:51 +00:00
<Member MemberName= "Clear" >
<MemberSignature Language= "C#" Value= "public void Clear ();" />
<MemberSignature Language= "ILAsm" Value= ".method public hidebysig instance void Clear() cil managed" />
2003-11-05 04:30:47 +00:00
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
2004-09-03 15:53:34 +00:00
<Parameters />
<Docs >
2011-11-09 16:01:51 +00:00
<summary > Removes all nodes from the store.</summary>
2004-09-03 15:53:34 +00:00
<remarks >
</remarks>
</Docs>
</Member>
2005-04-26 13:45:27 +00:00
<Member MemberName= "GetEnumerator" >
2005-05-23 20:41:51 +00:00
<MemberSignature Language= "C#" Value= "public System.Collections.IEnumerator GetEnumerator ();" />
2011-11-09 16:01:51 +00:00
<MemberSignature Language= "ILAsm" Value= ".method public hidebysig newslot virtual instance class System.Collections.IEnumerator GetEnumerator() cil managed" />
2005-04-26 13:45:27 +00:00
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Collections.IEnumerator</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
<summary > Gets an enumerator for the root nodes.</summary>
<returns > a <see cref= "T:System.Collections.IEnumerator" /> </returns>
<remarks > Children of root nodes are not enumerated. You must traverse them independently.</remarks>
2005-06-16 18:56:42 +00:00
<since version= "Gtk# 2.4" />
2005-04-26 13:45:27 +00:00
</Docs>
</Member>
2011-11-09 16:01:51 +00:00
<Member MemberName= "GetNode" >
<MemberSignature Language= "C#" Value= "public Gtk.ITreeNode GetNode (Gtk.TreePath path);" />
<MemberSignature Language= "ILAsm" Value= ".method public hidebysig instance class Gtk.ITreeNode GetNode(class Gtk.TreePath path) cil managed" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > Gtk.ITreeNode</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "path" Type= "Gtk.TreePath" />
</Parameters>
<Docs >
<param name= "path" > The path to look up.</param>
<summary > Returns a node given a <see cref= "T:Gtk.TreePath" /> .</summary>
<returns > To be added.</returns>
<remarks >
Looks up the node corresponding to <paramref name= "path" /> and returns it,
or null if the node cannot be found.
</remarks>
</Docs>
</Member>
<Member MemberName= "RemoveNode" >
<MemberSignature Language= "C#" Value= "public void RemoveNode (Gtk.ITreeNode node);" />
<MemberSignature Language= "ILAsm" Value= ".method public hidebysig instance void RemoveNode(class Gtk.ITreeNode node) cil managed" />
2005-09-07 17:34:58 +00:00
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
2011-11-09 16:01:51 +00:00
<Parameters >
<Parameter Name= "node" Type= "Gtk.ITreeNode" />
</Parameters>
2005-09-07 17:34:58 +00:00
<Docs >
2011-11-09 16:01:51 +00:00
<param name= "node" > a <see cref= "T:Gtk.ITreeNode" /> </param>
<summary > Removes a node from the store.</summary>
2005-09-07 17:56:34 +00:00
<remarks >
2011-11-09 16:01:51 +00:00
Removes <paramref name= "node" /> from the list of root level nodes.
2005-09-07 17:56:34 +00:00
</remarks>
2005-09-07 17:34:58 +00:00
</Docs>
</Member>
2003-11-05 04:30:47 +00:00
</Members>
2007-01-16 16:18:05 +00:00
</Type>