* gtk/glue/container.c (gtksharp_container_get_focus_child): New

glue method to get container->focus_child

        * gtk/Gtk.metadata: hide SetFocusChild

        * gtk/Container.custom (FocusChild): implement with both getter
        and setter

        * en/Gtk/Container.xml (FocusChild): Has a getter now too.
        (Added): Clarify that this only means "Gtk.Container.Add was
        called", and doesn't get fired when you call Gtk.Box.PackStart,
        etc

svn path=/trunk/gtk-sharp/; revision=36143
This commit is contained in:
Dan Winship 2004-11-15 17:47:16 +00:00
parent f096700a2d
commit acdb2f73da
6 changed files with 57 additions and 10 deletions

View file

@ -1,3 +1,13 @@
2004-11-15 Dan Winship <danw@novell.com>
* gtk/glue/container.c (gtksharp_container_get_focus_child): New
glue method to get container->focus_child
* gtk/Gtk.metadata: hide SetFocusChild
* gtk/Container.custom (FocusChild): implement with both getter
and setter
2004-11-15 Mike Kestner <mkestner@novell.com>
* gtk/Gtk.metadata : hide the Get/Set Color methods that are marked

View file

@ -1,3 +1,10 @@
2004-11-15 Dan Winship <danw@novell.com>
* en/Gtk/Container.xml (FocusChild): Has a getter now too.
(Added): Clarify that this only means "Gtk.Container.Add was
called", and doesn't get fired when you call Gtk.Box.PackStart,
etc
2004-11-15 Mike Kestner <mkestner@ximian.com>
* en/Gtk/ColorSelection.xml : remove newly hidden deprecated methods.

View file

@ -154,8 +154,8 @@
<summary>Sets a child property of a <see cref="T:Gtk.Widget" />.</summary>
<param name="child">a child of this <see cref="T:Gtk.Container" /></param>
<param name="property_name">the child property name</param>
<param name="value">the value to set <paramref name="property_name"/> to</param>
<remarks>You will not normally need to use this method; Gtk# automatically generates child property accessors for all <see cref="T:Gtk.Container"/> subclasses.</remarks>
<param name="value">the value to set <paramref name="property_name" /> to</param>
<remarks>You will not normally need to use this method; Gtk# automatically generates child property accessors for all <see cref="T:Gtk.Container" /> subclasses.</remarks>
</Docs>
</Member>
<Member MemberName="ChildGetProperty">
@ -172,8 +172,8 @@
<summary>Gets a child property of a <see cref="T:Gtk.Widget" />.</summary>
<param name="child">a child of this <see cref="T:Gtk.Container" /></param>
<param name="property_name">the child property name</param>
<param name="value">the value of the <paramref name="property_name"/> property of <paramref name="child"/></param>
<remarks>You will not normally need to use this method; Gtk# automatically generates child property accessors for all <see cref="T:Gtk.Container"/> subclasses.</remarks>
<param name="value">the value of the <paramref name="property_name" /> property of <paramref name="child" /></param>
<remarks>You will not normally need to use this method; Gtk# automatically generates child property accessors for all <see cref="T:Gtk.Container" /> subclasses.</remarks>
</Docs>
</Member>
<Member MemberName="PropagateExpose">
@ -281,7 +281,7 @@
</Docs>
</Member>
<Member MemberName="FocusChild">
<MemberSignature Language="C#" Value="public Gtk.Widget FocusChild { set; };" />
<MemberSignature Language="C#" Value="public Gtk.Widget FocusChild { set; get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Gtk.Widget</ReturnType>
@ -289,7 +289,7 @@
<Parameters>
</Parameters>
<Docs>
<summary>Moves the focus to a particular child widget.</summary>
<summary>Moves the focus to a particular child widget or finds the last-focused widget.</summary>
<param name="value">A <see cref="T:Gtk.Widget" />, a child of this container.</param>
<returns>an object of type <see cref="T:Gtk.Widget" /></returns>
<remarks />
@ -365,8 +365,8 @@
</ReturnValue>
<Parameters />
<Docs>
<summary>Fired when a child widget is added to the container.</summary>
<remarks />
<summary>Fired when a child widget is added to the container via <see cref="M:Gtk.Container.Add"/>.</summary>
<remarks>Note that this event is fired only when <see cref="M:Gtk.Container.Add"/> (or its C equivalent) is called. It is not a generic widget-added notification. For example, calling <see cref="M:Gtk.Box.PackStart"/> will not result in this event firing.</remarks>
</Docs>
</Member>
<Member MemberName="FocusChildSet">
@ -389,8 +389,8 @@
</ReturnValue>
<Parameters />
<Docs>
<summary>Fired when a child widget is removed from this container.</summary>
<remarks />
<summary>Fired when a child widget is removed from this container</summary>
<remarks>Note that this event is fired only when <see cref="M:Gtk.Container.Remove"/> (or its C equivalent) is called. If a <see cref="T:Gtk.Container"/> subclass defines additional methods for removing widgets, then calling those methods will not result in this event being fired.</remarks>
</Docs>
</Member>
<Member MemberName="ResizeChecked">

View file

@ -74,6 +74,27 @@ public Widget[] FocusChain {
}
[DllImport("gtksharpglue-2.0")]
static extern IntPtr gtksharp_container_get_focus_child(IntPtr raw);
[DllImport("libgtk-win32-2.0-0.dll")]
static extern void gtk_container_set_focus_child(IntPtr raw, IntPtr child);
public Gtk.Widget FocusChild {
get {
IntPtr raw_ret = gtksharp_container_get_focus_child (Handle);
Gtk.Widget ret;
if (raw_ret == IntPtr.Zero)
ret = null;
else
ret = (Gtk.Widget) GLib.Object.GetObject (raw_ret);
return ret;
}
set {
gtk_container_set_focus_child (Handle, value.Handle);
}
}
[DllImport("gtksharpglue-2.0")]
static extern void gtksharp_container_base_forall (IntPtr handle, bool include_internals, IntPtr cb, IntPtr data);

View file

@ -133,6 +133,7 @@
<attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='GetChildren']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='GetFocusChain']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='SetFocusChain']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkContainer']/method[@name='SetFocusChild']" name="hidden">1</attr>
<attr path="/api/namespace/object[@cname='GtkContainer']/signal[@name='Add']" name="name">Added</attr>
<attr path="/api/namespace/object[@cname='GtkContainer']/signal[@name='CheckResize']" name="name">ResizeChecked</attr>
<attr path="/api/namespace/object[@cname='GtkContainer']/signal[@name='Remove']" name="name">Removed</attr>

View file

@ -21,6 +21,14 @@
#include <gtk/gtkcontainer.h>
GtkWidget *gtksharp_container_get_focus_child (GtkContainer *container);
GtkWidget *
gtksharp_container_get_focus_child (GtkContainer *container)
{
return container->focus_child;
}
void gtksharp_container_base_forall (GtkContainer *container, gboolean include_internals, GtkCallback cb, gpointer data);
void