db410e9497
fix some bugs in DemoEditableCells use more consistent tabs and spaces add a TODO of what is left use the using () pattern to dispose Dialogs automatically use args.RetVal when handling the DeleteEvent svn path=/trunk/gtk-sharp/; revision=32017
42 lines
797 B
C#
42 lines
797 B
C#
//
|
|
// DemoItemFactoryDemo.cs - port of item_factory from gtk-demo
|
|
//
|
|
// Author: Daniel Kornhauser <dkor@alum.mit.edu>
|
|
//
|
|
// Copyright (C) 2003, Ximian Inc.
|
|
|
|
/* Item Factory
|
|
*
|
|
* The GtkItemFactory object allows the easy creation of menus
|
|
* from an array of descriptions of menu items.
|
|
*/
|
|
|
|
// TODO: - unfinished
|
|
|
|
using System;
|
|
using System.IO;
|
|
|
|
using Gtk;
|
|
using Gdk;
|
|
|
|
namespace GtkDemo
|
|
{
|
|
public class DemoItemFactory : Gtk.Window
|
|
{
|
|
public DemoItemFactory () : base ("Demo Item Factory")
|
|
{
|
|
this.DeleteEvent += new DeleteEventHandler (WindowDelete);
|
|
Gtk.AccelGroup accelGroup = new Gtk.AccelGroup ();
|
|
//STUCK OUCH !!!!
|
|
|
|
this.ShowAll ();
|
|
}
|
|
|
|
private void WindowDelete (object o, DeleteEventArgs args)
|
|
{
|
|
this.Hide ();
|
|
this.Destroy ();
|
|
args.RetVal = true;
|
|
}
|
|
}
|
|
}
|