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>
|
2002-05-02 Mike Kestner <mkestner@speakeasy.net>
|
||||||
|
|
||||||
* README : Describe the new make procedure.
|
* 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 ("\t}");
|
||||||
sw.WriteLine ();
|
sw.WriteLine ();
|
||||||
sw.WriteLine ("}");
|
sw.WriteLine ("}");
|
||||||
|
|
|
@ -7,19 +7,6 @@
|
||||||
// This code is inserted after the automatically generated code.
|
// 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>
|
/// <summary>
|
||||||
/// Window Constructor
|
/// Window Constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -29,7 +16,7 @@
|
||||||
/// specified Title.
|
/// specified Title.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
|
|
||||||
public Window (String title) : this ()
|
public Window (String title) : this (WindowType.Toplevel)
|
||||||
{
|
{
|
||||||
this.Title = title;
|
this.Title = title;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,16 +9,15 @@ namespace GtkSamples {
|
||||||
using Gtk;
|
using Gtk;
|
||||||
using GtkSharp;
|
using GtkSharp;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Drawing;
|
||||||
|
|
||||||
public class ButtonApp {
|
public class ButtonApp {
|
||||||
|
|
||||||
public static int Main (string[] args)
|
public static int Main (string[] args)
|
||||||
{
|
{
|
||||||
Application.Init ();
|
Application.Init ();
|
||||||
Window win = new Window (WindowType.Toplevel);
|
Window win = new Window ("Button Tester");
|
||||||
win.Title = "Button Tester";
|
win.DefaultSize = new Size (200, 150);
|
||||||
win.DefaultHeight = 120;
|
|
||||||
win.DefaultWidth = 160;
|
|
||||||
win.DeleteEvent += new EventHandler (Window_Delete);
|
win.DeleteEvent += new EventHandler (Window_Delete);
|
||||||
Button btn = new Button ("Click Me");
|
Button btn = new Button ("Click Me");
|
||||||
btn.Clicked += new EventHandler (btn_click);
|
btn.Clicked += new EventHandler (btn_click);
|
||||||
|
|
|
@ -10,15 +10,13 @@ namespace GtkSamples {
|
||||||
using Gdk;
|
using Gdk;
|
||||||
using GtkSharp;
|
using GtkSharp;
|
||||||
using System;
|
using System;
|
||||||
using System.Drawing;
|
|
||||||
|
|
||||||
public class HelloWorld {
|
public class HelloWorld {
|
||||||
|
|
||||||
public static int Main (string[] args)
|
public static int Main (string[] args)
|
||||||
{
|
{
|
||||||
Application.Init ();
|
Application.Init ();
|
||||||
Gtk.Window win = new Gtk.Window (Gtk.WindowType.Toplevel);
|
Gtk.Window win = new Gtk.Window ("Gtk# Hello World");
|
||||||
win.Title = "Gtk# Hello World";
|
|
||||||
win.DeleteEvent += new EventHandler (Window_Delete);
|
win.DeleteEvent += new EventHandler (Window_Delete);
|
||||||
win.ShowAll ();
|
win.ShowAll ();
|
||||||
Application.Run ();
|
Application.Run ();
|
||||||
|
|
Loading…
Reference in a new issue