view Translatable/TranslatableWindow.cs @ 34:ef1cf7814a6b

* Add ATK# as a dependency, which seems to be necessary as of openSUSE 11.4 (may be Mono 2.10, may be newer GTK#) no-open-ticket
author IBBoard <dev@ibboard.co.uk>
date Sun, 03 Apr 2011 13:11:00 +0000
parents 3da8cf449717
children
line wrap: on
line source

//  This file (TranslatableWindow.cs) is a part of the IBBoard.GtkSharp project and is copyright 2010 IBBoard
// 
// // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU LGPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.

using System;
using Gtk;
using IBBoard.Lang;

namespace IBBoard.GtkSharp.Translatable
{
	public abstract class TranslatableWindow : Window, ITranslatable
	{
		public TranslatableWindow(IntPtr ptr) : base(ptr)
		{
			//Do nothing extra
		}

		public TranslatableWindow(Gtk.WindowType windowType) : base(windowType)
		{
			//Do nothing extra
		}

		public TranslatableWindow(string windowTitle) : base(windowTitle)
		{
			//Do nothing extra
		}

		protected virtual void Translate()
		{
			ControlTranslator.TranslateWidget(this);
		}

		public string Text
		{
			get
			{
				return Title;
			}
			set
			{
				Title = value;
			}
		}
	}
}