2001-09-16 23:15:56 +00:00
|
|
|
// GTK.Widget.cs - GTK Widget class implementation
|
|
|
|
//
|
|
|
|
// Author: Mike Kestner <mkestner@speakeasy.net>
|
|
|
|
//
|
|
|
|
// (c) 2001 Mike Kestner
|
|
|
|
|
2001-09-19 02:04:57 +00:00
|
|
|
namespace Gtk {
|
2001-09-16 23:15:56 +00:00
|
|
|
|
2001-09-21 14:03:17 +00:00
|
|
|
using System;
|
2001-10-04 20:59:48 +00:00
|
|
|
using System.Collections;
|
2001-09-21 14:03:17 +00:00
|
|
|
using System.Runtime.InteropServices;
|
2001-09-27 17:17:33 +00:00
|
|
|
using GLib;
|
2001-09-21 14:03:17 +00:00
|
|
|
using Gdk;
|
2001-09-16 23:15:56 +00:00
|
|
|
|
2001-09-27 17:17:33 +00:00
|
|
|
|
2001-09-25 15:56:50 +00:00
|
|
|
public class Widget : Object {
|
2001-09-27 17:17:33 +00:00
|
|
|
|
|
|
|
private static readonly string DelEvName = "delete-event";
|
|
|
|
|
2001-10-04 20:59:48 +00:00
|
|
|
private Hashtable Signals = new Hashtable ();
|
|
|
|
|
2001-09-27 17:17:33 +00:00
|
|
|
public event EventHandler DeleteEvent {
|
|
|
|
add {
|
|
|
|
if (Events [DelEvName] == null)
|
2001-10-04 20:59:48 +00:00
|
|
|
Signals [DelEvName] = new SimpleEvent (
|
|
|
|
this, RawObject,
|
|
|
|
DelEvName, value);
|
2001-09-27 17:17:33 +00:00
|
|
|
|
|
|
|
Events.AddHandler(DelEvName, value);
|
2001-09-18 03:57:16 +00:00
|
|
|
}
|
2001-09-27 17:17:33 +00:00
|
|
|
remove {
|
|
|
|
Events.RemoveHandler(DelEvName, value);
|
|
|
|
if (Events [DelEvName] == null)
|
2001-10-04 20:59:48 +00:00
|
|
|
Signals.Remove (DelEvName);
|
2001-09-16 23:15:56 +00:00
|
|
|
}
|
2001-09-21 14:03:17 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Show Method
|
|
|
|
/// </summary>
|
|
|
|
///
|
|
|
|
/// <remarks>
|
|
|
|
/// Makes the Widget visible on the display.
|
|
|
|
/// </remarks>
|
|
|
|
|
2001-09-27 17:17:33 +00:00
|
|
|
[DllImport("gtk-1.3.dll")]
|
2001-09-21 14:03:17 +00:00
|
|
|
static extern void gtk_widget_show (IntPtr obj);
|
|
|
|
|
|
|
|
public void Show ()
|
|
|
|
{
|
|
|
|
gtk_widget_show (RawObject);
|
|
|
|
}
|
|
|
|
}
|
2001-09-16 23:15:56 +00:00
|
|
|
}
|