namespace TACO { using Gtk; using System; using TACO.Widgets; class MainWindow : Gtk.Window { private Gtk.VBox mMainVBox; private PartsNotebook mPartsNotebook; private Canvas mCanvas; public MainWindow() : base("The Amazing Contraption") { SetDefaultSize(1024, 768); mMainVBox = new Gtk.VBox(false, 0); mMainVBox.Show(); Add(mMainVBox); Gtk.HBox hbox = new Gtk.HBox(false, 0); hbox.Show(); mMainVBox.PackStart(hbox, true, true, 0); mPartsNotebook = new PartsNotebook(); mPartsNotebook.Show(); hbox.PackStart(mPartsNotebook, false, false, 0); mCanvas = new Canvas(); mCanvas.Show(); hbox.PackStart(mCanvas, true, true, 0); CanvasElement part = new Thingies.BowlingBall("foo"); part.MoveTo(10, 10); part.Visible = true; mCanvas.Add(part); } } }