// GTK.Window.cs - GTK Window class implementation // // Author: Mike Kestner // // (c) 2001 Mike Kestner namespace GTK { using System; using System.Drawing; using System.Runtime.InteropServices; public enum WindowType { TopLevel, Popup, } public class Window : Widget { /// /// Window Constructor /// /// /// /// Constructs a new Window of type TopLevel. /// [DllImport("gtk-1.3")] static extern IntPtr gtk_window_new (GTK.WindowType type); public Window () { obj = gtk_window_new (WindowType.TopLevel); base.PrepareEvents (); } /// /// Window Constructor /// /// /// /// Constructs a new Window of type TopLevel with the /// specified Title. /// public Window (String title) : this () { this.Title = title; } /* /// /// AllowGrow Property /// /// /// /// Indicates if the Window can be resized to larger than /// the default size. /// public bool AllowGrow { get {;} set {;} } /// /// AllowShrink Property /// /// /// /// Indicates if the Window can be resized to smaller than /// the default size. /// public bool AllowShrink { get {;} set {;} } /// /// DefaultSize Property /// /// /// /// The default Size of the Window in Screen Coordinates. /// public Size DefaultSize { get {;} set {;} } /// /// DestroyWithParent Property /// /// /// /// Indicates if the Window should be destroyed when any /// associated parent Windows are destroyed. /// public bool DestroyWithParent { get {;} set {;} } /// /// IsModal Property /// /// /// /// Indicates if the Window is Modal. If true, the input /// focus is grabbed by the Window and other Windows in /// the application will not accept input until the Window /// is closed. /// public bool IsModal { get {;} set {;} } */ /// /// Position Property /// /// /// /// The Position of the Window in Screen Coordinates. /// [DllImport("gtk-1.3")] static extern void gtk_window_set_position (IntPtr hnd, int x, int y); public Point Position { set { gtk_window_set_position ( obj, value.X, value.Y); } } /// /// Title Property /// /// /// /// The Title displayed in the Window's Title Bar. /// [DllImport("gtk-1.3")] static extern void gtk_window_set_title (IntPtr hnd, String title); public String Title { set { gtk_window_set_title (obj, value); } } } }