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" />
2003-11-05 04:30:47 +00:00
<AssemblyInfo >
<AssemblyName > gtk-sharp</AssemblyName>
2003-12-24 01:35:30 +00:00
<AssemblyPublicKey >
</AssemblyPublicKey>
2005-09-03 04:11:38 +00:00
<AssemblyVersion > 2.6.0.0</AssemblyVersion>
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>
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 ()
{
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>
2005-03-15 17:34:36 +00:00
</remarks>
2003-11-05 04:30:47 +00:00
</Docs>
<Base >
<BaseTypeName > GLib.Object</BaseTypeName>
</Base>
<Interfaces >
<Interface >
2005-05-23 20:41:51 +00:00
<InterfaceName > System.Collections.IEnumerable</InterfaceName>
2003-11-05 04:30:47 +00:00
</Interface>
</Interfaces>
<Members >
<Member MemberName= "AddNode" >
<MemberSignature Language= "C#" Value= "public void AddNode (Gtk.ITreeNode node);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "node" Type= "Gtk.ITreeNode" />
</Parameters>
<Docs >
2005-03-15 17:34:36 +00:00
<summary > Appends the node to the root level of the tree</summary>
2003-11-05 04:30:47 +00:00
<param name= "node" > a <see cref= "T:Gtk.ITreeNode" /> </param>
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);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "node" Type= "Gtk.ITreeNode" />
<Parameter Name= "position" Type= "System.Int32" />
</Parameters>
<Docs >
<summary > Inserts the node into the root level of the tree</summary>
<param name= "node" > a <see cref= "T:Gtk.ITreeNode" /> </param>
<param name= "position" > the position to insert it at</param>
<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>
2003-11-18 20:13:39 +00:00
<Member MemberName= "GetNode" >
<MemberSignature Language= "C#" Value= "public Gtk.ITreeNode GetNode (Gtk.TreePath path);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > Gtk.ITreeNode</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "path" Type= "Gtk.TreePath" />
</Parameters>
<Docs >
<summary > Returns a node given a <see cref= "T:Gtk.TreePath" /> .</summary>
<param name= "path" > The path to look up.</param>
<remarks >
Looks up the node corresponding to <paramref name= "path" /> and returns it,
or null if the node cannot be found.
</remarks>
2005-05-23 20:41:51 +00:00
<returns > To be added.</returns>
2003-11-18 20:13:39 +00:00
</Docs>
</Member>
2003-11-05 04:30:47 +00:00
<Member MemberName= "RemoveNode" >
<MemberSignature Language= "C#" Value= "public void RemoveNode (Gtk.ITreeNode node);" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters >
<Parameter Name= "node" Type= "Gtk.ITreeNode" />
</Parameters>
<Docs >
2005-01-05 19:49:29 +00:00
<summary > Removes a node from the store.</summary>
2003-11-05 04:30:47 +00:00
<param name= "node" > a <see cref= "T:Gtk.ITreeNode" /> </param>
2003-11-06 01:52:32 +00:00
<remarks >
Removes <paramref name= "node" /> from the list of root level nodes.
</remarks>
2003-11-05 04:30:47 +00:00
</Docs>
</Member>
<Member MemberName= ".ctor" >
<MemberSignature Language= "C#" Value= "public NodeStore (Type node_type);" />
<MemberType > Constructor</MemberType>
<ReturnValue />
<Parameters >
<Parameter Name= "node_type" Type= "System.Type" />
</Parameters>
<Docs >
2003-11-06 01:52:32 +00:00
<summary > NodeStore constructor</summary>
2003-11-05 04:30:47 +00:00
<param name= "node_type" > a <see cref= "T:System.Type" /> </param>
2003-11-06 01:52:32 +00:00
<remarks >
2003-12-24 01:35:30 +00:00
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" /> .
2003-11-06 01:52:32 +00:00
</remarks>
2003-11-05 04:30:47 +00:00
</Docs>
</Member>
2004-09-03 15:53:34 +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 >
<summary > Native type value.</summary>
2005-05-23 20:41:51 +00:00
<value > a <see cref= "T:GLib.GType" /> </value>
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 ();" />
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>
2005-09-07 17:34:58 +00:00
<Member MemberName= "Clear" >
<MemberSignature Language= "C#" Value= "public void Clear ();" />
<MemberType > Method</MemberType>
<ReturnValue >
<ReturnType > System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs >
<summary > Removes all nodes from the store.</summary>
2005-09-07 17:56:34 +00:00
<remarks >
</remarks>
2005-09-07 17:34:58 +00:00
</Docs>
</Member>
2003-11-05 04:30:47 +00:00
</Members>
2005-06-17 18:43:30 +00:00
</Type>