2005-07-19 Todd Berman <tberman@off.net>

* gtk/TreeSelection.custom: Add an overload for GetSelected to remove
        the need to always pass in that damn TreeModel.
        * doc/en/Gtk/TreeSelection.xml: Add documentation for the new
        overload.


svn path=/trunk/gtk-sharp/; revision=47475
This commit is contained in:
Todd Berman 2005-07-20 17:08:28 +00:00
parent 70d2492071
commit 455d319d34
3 changed files with 31 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2005-07-19 Todd Berman <tberman@off.net>
* gtk/TreeSelection.custom: Add an overload for GetSelected to remove
the need to always pass in that damn TreeModel.
* doc/en/Gtk/TreeSelection.xml: Add documentation for the new
overload.
2005-07-19 Dan Winship <danw@novell.com>
* generator/Parameters.cs: Remove the AllowComplexRefs flag.

View file

@ -539,5 +539,21 @@ class TreeSelectionSample
<since version="Gtk# 2.4" />
</Docs>
</Member>
<Member MemberName="GetSelected">
<MemberSignature Language="C#" Value="public bool GetSelected (out Gtk.TreeIter iter);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="iter" Type="Gtk.TreeIter&amp;" RefType="out" />
</Parameters>
<Docs>
<param name="iter">The position that was selected.</param>
<summary>Gets information about the currently selected node.</summary>
<returns><see langword="true" /> if a row is selected.</returns>
<remarks>This convenience method doesnt require an out <see cref="Gtk.TreeModel" />. It is useful in the case that you already have a copy of the TreeModel.</remarks>
</Docs>
</Member>
</Members>
</Type>

View file

@ -58,3 +58,11 @@
{
SelectFunction = func;
}
[DllImport("libgtk-win32-2.0-0.dll", EntryPoint="gtk_tree_selection_get_selected")]
static extern bool gtk_tree_selection_get_selected_without_model (IntPtr raw, IntPtr model, out Gtk.TreeIter iter);
public bool GetSelected (out Gtk.TreeIter iter)
{
return gtk_tree_selection_get_selected_without_model (Handle, IntPtr.Zero, out iter);
}