// Gtk.Container.cs - GtkContainer class wrapper implementation // // Author: Mike Kestner // // (c) 2001 Mike Kestner namespace Gtk { using System; using System.Runtime.InteropServices; /// /// Container Class /// /// /// /// Abstract class which provides the capability to embed a /// widget within its boundaries. /// public abstract class Container : Widget { /// /// BorderWidth Property /// /// /// /// The Width, in pixels, of the border around the /// Container. /// public int BorderWidth { get { int val; GetProperty ("border-width", out val); return val; } set { SetProperty ("border-width", value); } } // FIXME: Implement Child property. /// /// ResizeMode Property /// /// /// /// Indicates the resizing policy for the Container. /// public ResizeMode ResizeMode { get { int val; GetProperty ("border-width", out val); return (ResizeMode) val; } set { SetProperty ("border-width", (int) value); } } /// /// Add Method /// /// /// /// Adds a child Widget to the Container. /// [DllImport("gtk-1.3.dll", CharSet=CharSet.Ansi, CallingConvention=CallingConvention.Cdecl)] static extern void gtk_container_add (IntPtr obj, IntPtr child); public void Add (Widget child) { gtk_container_add (Handle, child.Handle); } /// /// Remove Method /// /// /// /// Remove a child Widget from the Container. /// [DllImport("gtk-1.3.dll", CharSet=CharSet.Ansi, CallingConvention=CallingConvention.Cdecl)] static extern void gtk_container_remove (IntPtr obj, IntPtr child); public void Remove (Widget child) { gtk_container_remove (Handle, child.Handle); } } }