mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-05-17 03:12:15 +00:00
* glib/Object.cs : Added public Handle property. It would be nice if I could make the RawObject public for get and protected for set, but that doesn't appear to be possible with C# properties. * gtk/Container.cs : New class with 2 of the 3 props and the Add/Remove methods only implemented. * gtk/Widget.cs : Added SizeRequest prop which is a combination of HeightRequest and SizeRequest. Embrace and extend gtk... * gtk/Window.cs : Derive from newly added Container subclass. * sample/ButtonApp.cs : Simple tire-kicking app. svn path=/trunk/gtk-sharp/; revision=1112
42 lines
826 B
C#
Executable file
42 lines
826 B
C#
Executable file
// ButtonApp.cs - Gtk.Button class Test implementation
|
|
//
|
|
// Author: Mike Kestner <mkestner@speakeasy.net>
|
|
//
|
|
// (c) 2001 Mike Kestner
|
|
|
|
namespace GtkSamples {
|
|
|
|
using Gtk;
|
|
using System;
|
|
using System.Drawing;
|
|
|
|
public class ButtonApp {
|
|
|
|
public static int Main (string[] args)
|
|
{
|
|
Application.Init (ref args);
|
|
Window win = new Window ("Button Tester");
|
|
win.DeleteEvent += new EventHandler (Window_Delete);
|
|
Button btn = new Button ();
|
|
btn.Clicked += new EventHandler (btn_click);
|
|
btn.SizeRequest = new Size (32, 24);
|
|
btn.Show ();
|
|
win.Add (btn);
|
|
win.Show ();
|
|
Application.Run ();
|
|
return 0;
|
|
}
|
|
|
|
static void btn_click (object obj, EventArgs args)
|
|
{
|
|
Console.WriteLine ("Button Clicked");
|
|
}
|
|
|
|
static void Window_Delete (object obj, EventArgs args)
|
|
{
|
|
Application.Quit ();
|
|
}
|
|
|
|
}
|
|
}
|