2002-05-02 Mike Kestner <mkestner@speakeasy.net>
* generator/ObjectGen.cs : Add support for .custom files. * gtk/Window.custom : clean up build * sample/HelloWorld.cs : Use the customizations. * sample/ButtonApp.cs : Use the customizations. svn path=/trunk/gtk-sharp/; revision=4237
This commit is contained in:
parent
cd73a17587
commit
9d0184d61c
5 changed files with 20 additions and 21 deletions
|
@ -1,3 +1,10 @@
|
|||
2002-05-02 Mike Kestner <mkestner@speakeasy.net>
|
||||
|
||||
* generator/ObjectGen.cs : Add support for .custom files.
|
||||
* gtk/Window.custom : clean up build
|
||||
* sample/HelloWorld.cs : Use the customizations.
|
||||
* sample/ButtonApp.cs : Use the customizations.
|
||||
|
||||
2002-05-02 Mike Kestner <mkestner@speakeasy.net>
|
||||
|
||||
* README : Describe the new make procedure.
|
||||
|
|
|
@ -145,6 +145,14 @@ namespace GtkSharp.Generation {
|
|||
}
|
||||
}
|
||||
|
||||
string custom = ".." + sep + ns.ToLower() + sep + Name + ".custom";
|
||||
if (File.Exists(custom)) {
|
||||
FileStream custstream = new FileStream (custom, FileMode.Open, FileAccess.Read);
|
||||
StreamReader sr = new StreamReader (custstream);
|
||||
sw.WriteLine (sr.ReadToEnd ());
|
||||
sr.Close ();
|
||||
}
|
||||
|
||||
sw.WriteLine ("\t}");
|
||||
sw.WriteLine ();
|
||||
sw.WriteLine ("}");
|
||||
|
|
|
@ -7,19 +7,6 @@
|
|||
// This code is inserted after the automatically generated code.
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Window Constructor
|
||||
/// </summary>
|
||||
///
|
||||
/// <remarks>
|
||||
/// Constructs a new Window of type TopLevel.
|
||||
/// </remarks>
|
||||
|
||||
public Window ()
|
||||
{
|
||||
RawObject = gtk_window_new ((int)WindowType.Toplevel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Window Constructor
|
||||
/// </summary>
|
||||
|
@ -29,7 +16,7 @@
|
|||
/// specified Title.
|
||||
/// </remarks>
|
||||
|
||||
public Window (String title) : this ()
|
||||
public Window (String title) : this (WindowType.Toplevel)
|
||||
{
|
||||
this.Title = title;
|
||||
}
|
||||
|
|
|
@ -9,16 +9,15 @@ namespace GtkSamples {
|
|||
using Gtk;
|
||||
using GtkSharp;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
public class ButtonApp {
|
||||
|
||||
public static int Main (string[] args)
|
||||
{
|
||||
Application.Init ();
|
||||
Window win = new Window (WindowType.Toplevel);
|
||||
win.Title = "Button Tester";
|
||||
win.DefaultHeight = 120;
|
||||
win.DefaultWidth = 160;
|
||||
Window win = new Window ("Button Tester");
|
||||
win.DefaultSize = new Size (200, 150);
|
||||
win.DeleteEvent += new EventHandler (Window_Delete);
|
||||
Button btn = new Button ("Click Me");
|
||||
btn.Clicked += new EventHandler (btn_click);
|
||||
|
|
|
@ -10,15 +10,13 @@ namespace GtkSamples {
|
|||
using Gdk;
|
||||
using GtkSharp;
|
||||
using System;
|
||||
using System.Drawing;
|
||||
|
||||
public class HelloWorld {
|
||||
|
||||
public static int Main (string[] args)
|
||||
{
|
||||
Application.Init ();
|
||||
Gtk.Window win = new Gtk.Window (Gtk.WindowType.Toplevel);
|
||||
win.Title = "Gtk# Hello World";
|
||||
Gtk.Window win = new Gtk.Window ("Gtk# Hello World");
|
||||
win.DeleteEvent += new EventHandler (Window_Delete);
|
||||
win.ShowAll ();
|
||||
Application.Run ();
|
||||
|
|
Loading…
Reference in a new issue