using System;
using System.Diagnostics;
using Gtk;
using Sexy;
public class SexySpellEntryTest
{
private static readonly string LIBSEXY_URL = "http://osiris.chipx86.com/svn/osiris-misc/trunk/libsexy/";
public static void Main()
{
Application.Init();
Window window = new Window("Sexy URL Label Test");
window.SetDefaultSize(200, 200);
window.BorderWidth = 12;
window.Destroyed += delegate(object o, EventArgs args) {
Application.Quit();
};
VBox box = new VBox(false, 0);
ScrolledWindow swin = new ScrolledWindow(null, null);
box.PackStart(swin, true, true, 0);
swin.SetPolicy(PolicyType.Automatic, PolicyType.Automatic);
swin.ShadowType = ShadowType.None;
UrlLabel url_label = new UrlLabel();
swin.AddWithViewport(url_label);
(swin.Child as Viewport).ShadowType = ShadowType.None;
url_label.LineWrap = true;
url_label.Selectable = true;
url_label.Xalign = 0.0f;
url_label.Yalign = 0.0f;
url_label.Markup = String.Format("This is a sample SexyUrlLabel. For the latest version, please " +
"the SVN repository. For a great " +
"page about mornings and what you can do with them, see " +
"DestroyMornings.com.", LIBSEXY_URL);
url_label.UrlActivated += delegate(object o, UrlActivatedArgs args) {
Console.WriteLine("Executing {0}", args.Url);
Process.Start("gnome-open", args.Url);
};
window.Add(box);
window.ShowAll();
Application.Run();
}
}