Exemplo n.º 1
0
		public FontBuildWindow (FontService fontService) : 
				base(Gtk.WindowType.Toplevel)
		{
			this.Build ();

			this.dftUtil = new DftUtil ();
			this.fontService = fontService;

			this.fileSaveWidget.SelectMultiple = false;

			using (FileFilter filter = new FileFilter()) {
				filter.Name = "DGLE2 Bitmap Fonts";
				filter.AddMimeType ("font/dft");
				filter.AddPattern ("*.dft");
				this.fileSaveWidget.AddFilter (filter);
			}

			using (FileFilter filter = new FileFilter()) {
				filter.Name = "All";
				filter.AddPattern ("*.*");
				this.fileSaveWidget.AddFilter (filter);
			}

			this.fileSaveWidget.CurrentName = 
				String.Format(@"{0}_{1}", fontService.Family.Name, fontService.Size);

			tablePreviewBuf = this.dftUtil.BuildImage (fontService);
			this.drawingarea3.SetSizeRequest (tablePreviewBuf.Width, tablePreviewBuf.Height);
			this.eWidth.Text = tablePreviewBuf.Width.ToString();
			this.eHeight.Text = tablePreviewBuf.Height.ToString();
			
			this.DeleteEvent += HandleDeleteEvent;
			this.drawingarea3.ExposeEvent += DrawPreviewFontTable;

			this.btnCancel.Clicked += delegate (object sender, EventArgs e) {
				this.Destroy();
			};

			this.btnSave.Clicked += HandleSave;
		}
Exemplo n.º 2
0
 public FontPreviewWidget()
 {
     this.dftUtil = new DftUtil ();
 }
Exemplo n.º 3
0
 public FontPreviewWidget()
 {
     this.DftUtil = new DftUtil();
 }