mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 18:05:29 +00:00
In doc:
2005-08-28 Ben Maurer <bmaurer@ximian.com> * en/Gtk/NodeSelection.xml: Docs In .: 2005-08-28 Ben Maurer <bmaurer@ximian.com> * gtk/NodeSelection.cs: helper api svn path=/trunk/gtk-sharp/; revision=49040
This commit is contained in:
parent
675b915e36
commit
327a28442e
|
@ -1,3 +1,7 @@
|
|||
2005-08-28 Ben Maurer <bmaurer@ximian.com>
|
||||
|
||||
* gtk/NodeSelection.cs: helper api
|
||||
|
||||
2005-08-27 Peter Williams <peter@newton.cx>
|
||||
|
||||
* gnome/Program.custom: Use a GLib.Argv in PersistentData to store
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2005-08-28 Ben Maurer <bmaurer@ximian.com>
|
||||
|
||||
* en/Gtk/NodeSelection.xml: Docs
|
||||
|
||||
2005-08-14 John Luke <john.luke@gmail.com>
|
||||
|
||||
* en/Gtk/IconView.xml: add iconview example
|
||||
|
|
|
@ -234,5 +234,21 @@
|
|||
<remarks />
|
||||
</Docs>
|
||||
</Member>
|
||||
<Member MemberName="SelectedNode">
|
||||
<MemberSignature Language="C#" Value="public Gtk.ITreeNode SelectedNode { set; get; };" />
|
||||
<MemberType>Property</MemberType>
|
||||
<ReturnValue>
|
||||
<ReturnType>Gtk.ITreeNode</ReturnType>
|
||||
</ReturnValue>
|
||||
<Exception cref="T:System.InvalidOperationException">The Multiple selection mode is in use.</exception>
|
||||
<Docs>
|
||||
<summary>The selected node</summary>
|
||||
<value>The currently selected node</value>
|
||||
<remarks>
|
||||
This property does not make sense in the Multiple selection mode. Therefore
|
||||
it will throw an exception when used under this mode.
|
||||
</remarks>
|
||||
</Docs>
|
||||
</Member>
|
||||
</Members>
|
||||
</Type>
|
||||
|
|
|
@ -130,5 +130,28 @@ namespace Gtk {
|
|||
return results;
|
||||
}
|
||||
}
|
||||
|
||||
public ITreeNode SelectedNode {
|
||||
get {
|
||||
if (Mode == SelectionMode.Multiple)
|
||||
throw new InvalidOperationException ("SelectedNode is not valid with multi-selection mode");
|
||||
|
||||
ITreeNode [] sn = SelectedNodes;
|
||||
if (sn.Length == 0)
|
||||
return null;
|
||||
return sn [0];
|
||||
}
|
||||
set {
|
||||
// with multiple mode, the behavior
|
||||
// here would be unclear. Does it just
|
||||
// select the `value' node or does it
|
||||
// make the `value' node the only
|
||||
// selected node.
|
||||
if (Mode == SelectionMode.Multiple)
|
||||
throw new InvalidOperationException ("SelectedNode is not valid with multi-selection mode");
|
||||
|
||||
SelectNode (value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue