<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <linklocation="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
<summary>The selection object for <seecref="T:Gtk.TreeView"/>.</summary>
<remarks><para>TreeSelection provides a single class for managing selection information on the List/Tree widget.</para>
<para>A TreeSelection object is automatically created when a new <seecref="T:Gtk.TreeView"/> widget is created and is inherently tied to it. A TreeSelection cannot exist independently of a <seecref="T:Gtk.TreeView"/>. Selection information is retrieved from the <seecref="T:Gtk.TreeView"/> with the <seecref="P:Gtk.TreeView.Selection"/> property.</para>
<para>TreeSelection can check the selection status of the tree, as well as select and deselect individual rows. Selection is done completely on the view. As a result, multiple views of the same model can have completely different selections. Additionally, you cannot change the selection of a row that is not currently displayed by the view without expanding its parents first.</para>
<para>One of the important things to remember when monitoring the selection of a view is that the <seecref="F:Gtk.TreeSelection.Changed"/> event is mostly a hint. For example, it may only fire once when a range of rows is selected. It may also fire when nothing has happened, such as when <seecref="M:Gtk.TreeSelection.SelectRow"/> is called on a row that is already selected.</para></remarks>
<summary>Get information about the currently selected node.</summary>
<paramname="model">A convenient accessor to the <seecref="T:Gtk.TreeModel"/> that this TreeSelection's <seecref="T:Gtk.TreeView"/> is associated with.</param>
<paramname="iter">The position that was selected.</param>
<returns><seelangword="true"/> if a row was selected</returns>
<remarks><para>This method will not work if the TreeSelection <seecref="P:Gtk.TreeSelection.Mode"/> has been set to <seecref="P:Gtk.SelectionMode.Multiple"/>. In that case you should use <seecref="M:Gtk.TreeSelection.SelectedForeach"/>.</para></remarks>
<summary>Selects every node in this <seecref="T:Gtk.TreeView"/>.</summary>
<remarks><para>The <seecref="P:Gtk.TreeSelection.Mode"/> must be set to <seecref="P:Gtk.SelectionMode.Multiple"/> for this method to work.</para></remarks>
<summary>Invokes the delegate passed in by <seeparamref="func"/> for each selected row in the <seecref="T:Gtk.TreeView"/>.</summary>
<paramname="func">The delegate that should be called for each selected row.</param>
<remarks><para>This method is useful when the <seecref="P:Gtk.TreeSelection.Mode"/> of this TreeSelection is set to <seecref="P:Gtk.Selection.Multiple"/>. It is currently the only way to access selection information for multiple rows. See the class overview for an example on how to effectively use this method for selection tracking.</para></remarks>
<summary>Add a hook into selection and unselection.</summary>
<paramname="func">A delegate to invoke before a node is (un)selected.</param>
<paramname="data">Raw data to pass to <paramrefname="func"/> when it is called.</param>
<paramname="destroy">A delegate to be notified when <paramrefname="data"/> should be destroyed. Can be <seelangword="null"/>.</param>
<remarks><para> If set, <paramrefname="func"/> is called before any node is selected or unselected, giving some control over which nodes are selected. The select function should return <seelangword="true"/> if the state of the node may be toggled, and <seelangword="false"/> if the state of the node should be left unchanged.</para></remarks>
<summary>Manages the way rows can be selected.</summary>
<paramname="value">A new mode of selection.</param>
<returns>The current mode dictating selection behaviour.</returns>
<remarks><para>Rows may be deselected by changing this property. For example, if <seecref="P:Gtk.SelectionMode.Multiple"/> rows are selected and the mode is changed to <seecref="P:Gtk.SelectionMode.Single"/> or <seecref="P:Gtk.SelectionMode.Browse"/>.</para></remarks>
<summary>Get the <seecref="T:Gtk.TreeView"/> that this TreeSelection is associated with.</summary>
<returns>The <seecref="T:Gtk.TreeView"/> that this TreeSelection is tied to.</returns>
<remarks><para>A TreeSelection object can only be retrieved from a <seecref="T:Gtk.TreeView"/>. That is done with its <seecref="P:Gtk.TreeView.Selection"/> property.</para></remarks>
<summary>Fired when the selection (may have) changed.</summary>
<remarks><para>This event is mostly a hint. It may only be fired once when a range of rows are selected, and it may occasionally be fired when nothing has happened.</para></remarks>
<returns>Creates a new instance of TreeSelection, using the GLib-provided type</returns>
<remarks>
<para>This is a constructor used by derivative types of <seecref="T:Gtk.TreeSelection"/> that would have their own GLib type assigned to it. This is not typically used by C# code.</para>