Changeset - 45b588f61ac8
[Not reviewed]
Jason Maltzen (jmaltzen) - 9 years ago 2015-11-19 04:26:22
jason.maltzen@unsanctioned.net
Add a button to flush all reagents from the simulator.
3 files changed with 229 insertions and 188 deletions:
0 comments (0 inline, 0 general)
SimulatorWindow.cs
Show inline comments
 
/*
 
 * Copyright (c) 2010, Tess Snider
 

 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 
 of this software and associated documentation files (the "Software"), to deal
 
 in the Software without restriction, including without limitation the rights
 
 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 
 copies of the Software, and to permit persons to whom the Software is
 
 furnished to do so, subject to the following conditions:
 

 
 The above copyright notice and this permission notice shall be included in
 
 all copies or substantial portions of the Software.
 

 
 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 
 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 
 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 
 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 
 THE SOFTWARE.
 
*/
 

 
using System;
 
using System.Collections.Generic;
 

 
namespace DesertPaintLab
 
{
 
	public partial class SimulatorWindow : Gtk.Window
 
	{
 
		PlayerProfile profile;
 
		Gtk.ListStore recipeData = new Gtk.ListStore(typeof(string), typeof(int));
 

 
		public SimulatorWindow(PlayerProfile profile) : base(Gtk.WindowType.Toplevel)
 
		{
 
			this.profile = profile;
 
			this.Build ();
 
			
 
			Gtk.TreeViewColumn reagentColumn = new Gtk.TreeViewColumn();
 
			Gtk.CellRendererText reagentColumnCell = new Gtk.CellRendererText();
 
			reagentColumn.PackStart(reagentColumnCell, true);		
 
			reagentColumn.Title = "Ingredient";
 
			
 
			reagentListView.AppendColumn(reagentColumn);
 
			reagentColumn.AddAttribute(reagentColumnCell, "text", 0);
 
			
 
			reagentListView.Model = ReagentManager.NameListModel;
 
			
 
			Gtk.TreeViewColumn additiveColumn = new Gtk.TreeViewColumn();
 
			Gtk.CellRendererText additiveColumnCell = new Gtk.CellRendererText();
 
			additiveColumn.PackStart(additiveColumnCell, true);		
 
			additiveColumn.Title = "Ingredient";
 
			
 
			recipeView.AppendColumn(additiveColumn);
 
			additiveColumn.AddAttribute(additiveColumnCell, "text", 0);
 
			
 
			Gtk.TreeViewColumn qtyColumn = new Gtk.TreeViewColumn();
 
			Gtk.CellRendererText qtyColumnCell = new Gtk.CellRendererText();
 
			qtyColumnCell.Editable = true;
 
			qtyColumnCell.Edited += OnQtyEdited;
 
			qtyColumn.PackStart(qtyColumnCell, true);		
 
			qtyColumn.Title = "Qty";
 
			
 
			recipeView.AppendColumn(qtyColumn);
 
			qtyColumn.AddAttribute(qtyColumnCell, "text", 1);
 
			
 
			recipeView.Model = recipeData;
 
			
 
			recipeData.RowChanged += OnRecipeChanged;
 
			recipeData.RowDeleted += OnRecipeChanged;
 
			recipeData.RowInserted += OnRecipeChanged;
 
			recipeData.RowsReordered += OnRecipeChanged;
 
			
 
		}
 
		
 
		protected virtual void OnAddReagent(object sender, System.EventArgs e)
 
		{
 
			Gtk.TreeModel model;
 
			Gtk.TreeIter iter;
 

 
			Gtk.TreeSelection selection = reagentListView.Selection;
 
			if ((selection != null) && selection.GetSelected(out model, out iter))
 
			{					
 
				recipeData.AppendValues(model.GetValue(iter, 0).ToString(), 1);	
 
				
 
				recipeData.IterNthChild(out iter, recipeView.Children.Length - 1);
 
				
 
				selection = recipeView.Selection;
 
				selection.SelectIter(iter);
 
			} 
 
		}	
 
		
 
		protected void OnQtyEdited(object sender, Gtk.EditedArgs args)
 
        {
 
			Gtk.TreeIter iter;
 
			recipeData.GetIter(out iter, new Gtk.TreePath(args.Path));
 
			
 
			int oldValue = (int)recipeData.GetValue(iter, 1);
 
			
 
            try
 
            {
 
                recipeData.SetValue(iter, 1, int.Parse(args.NewText));
 
				UpdateRecipeColor();
 
            }
 
            catch (Exception)
 
            {
 
            	recipeData.SetValue(iter, 1, oldValue);
 
			}
 
        }	
 
	
 
		protected void OnRecipeChanged(object sender, GLib.SignalArgs args)
 
	    {
 
			UpdateRecipeColor();
 
	    }	
 

 
		void UpdateRecipeColor()
 
		{
 
			if (recipeView.Children.Length == 0)
 
			{
 
				paintSwatch.Clear();
 
			}
 
			
 
			Reaction reaction;
 
			Gtk.TreeIter iter;
 
			string reagentName;
 
			int qty;
 
			PaintColor color = null;
 
			Reagent reagent = null;
 
			
 
			int baseRedSum = 0;
 
			int baseGreenSum = 0;
 
			int baseBlueSum = 0;
 
			
 
			int reactRedSum = 0;
 
			int reactGreenSum = 0;
 
			int reactBlueSum = 0;
 
			
 
			int pigmentCount = 0;
 
			
 
			SortedDictionary<string,bool> reagentSet = new SortedDictionary<string,bool>();
 
			List<Reagent> reagents = new List<Reagent>();
 
			
 
			recipeData.GetIterFirst(out iter);
 
			
 
			do
 
			{
 
   				reagentName = (string) recipeData.GetValue(iter, 0);
 
				
 
				if (reagentName == null)
 
				{
 
					continue;	
 
				}
 
				
 
				qty = (int)recipeData.GetValue(iter, 1);
 
				reagent = ReagentManager.GetReagent(reagentName);
 
				if (!reagent.IsCatalyst)
 
				{
 
					color = reagent.Color;
 
					baseRedSum += qty * color.Red;
 
					baseGreenSum += qty * color.Green;
 
					baseBlueSum += qty * color.Blue;
 
					pigmentCount += qty;
 
				}
 
				if (!reagentSet.ContainsKey(reagentName) && reagentSet.Count <= 4)
 
				{
 
					reagentSet[reagentName] = true;
 
					// Run reactions.
 
					foreach (Reagent otherReagent in reagents)
 
					{
 
						reaction = profile.FindReaction(otherReagent, reagent);
 
						if (reaction != null)
 
						{
 
							reactRedSum += reaction.Red;
 
							reactGreenSum += reaction.Green;
 
							reactBlueSum += reaction.Blue;
 
						}
 
					}
 
					reagents.Add(reagent);
 
				}
 
				
 
			}
 
			while (recipeData.IterNext(ref iter));
 
			
 
			paintSwatch.Color = new PaintColor(
 
				CalculateColor(baseRedSum, pigmentCount, reactRedSum),
 
			    CalculateColor(baseGreenSum, pigmentCount, reactGreenSum),
 
				CalculateColor(baseBlueSum,  pigmentCount, reactBlueSum));	
 
		}
 
		
 
		byte CalculateColor(int baseSum, int pigmentCount, int reactSum)
 
		{
 
			return (byte)Math.Max(Math.Min(Math.Round((((float)baseSum / (float)pigmentCount) + (float)reactSum)), 255), 0);
 
		}
 

 
		protected virtual void OnIncrementReagent (object sender, System.EventArgs e)
 
		{
 
			Gtk.TreeModel model;
 
			Gtk.TreeIter iter;
 

 
			Gtk.TreeSelection selection = recipeView.Selection;
 
			if ((selection != null) && selection.GetSelected(out model, out iter))
 
			{
 
				int oldValue = (int)recipeData.GetValue(iter, 1);
 
				recipeData.SetValue(iter, 1, oldValue + 1);
 
			}
 
			
 
		}
 
		
 
		protected virtual void OnDecrementReagent (object sender, System.EventArgs e)
 
		{
 
			Gtk.TreeModel model;
 
			Gtk.TreeIter iter;
 

 
			Gtk.TreeSelection selection = recipeView.Selection;
 
			if ((selection != null) && selection.GetSelected(out model, out iter))
 
			{
 
				int oldValue = (int)recipeData.GetValue(iter, 1);
 
				if (oldValue == 1)
 
				{
 
					recipeData.Remove(ref iter);
 
				}
 
				else
 
				{
 
					recipeData.SetValue(iter, 1, oldValue - 1);
 
				}
 
			}			
 
			
 
		}
 

 
        protected virtual void OnFlushReagents (object sender, System.EventArgs e)
 
        {
 
            recipeData.Clear();
 
        }
 
	}
 
}
...
 
\ No newline at end of file
gtk-gui/DesertPaintLab.SimulatorWindow.cs
Show inline comments
 

 
// This file has been generated by the GUI designer. Do not modify.
 
namespace DesertPaintLab
 
{
 
	public partial class SimulatorWindow
 
	{
 
		private global::Gtk.HBox hbox1;
 
		
 
		private global::Gtk.ScrolledWindow GtkScrolledWindow;
 
		
 
		private global::Gtk.TreeView reagentListView;
 
		
 
		private global::Gtk.VBox vbox162;
 
		
 
		private global::Gtk.Alignment alignment1;
 
		
 
		private global::Gtk.Button addReagentButton;
 
		
 
		private global::Gtk.Image addReagentButtonImage;
 
		
 
		private global::Gtk.Alignment alignment3;
 
		
 
		private global::Gtk.ScrolledWindow GtkScrolledWindow1;
 
		
 
		private global::Gtk.TreeView recipeView;
 
		
 
		private global::Gtk.VBox vbox3;
 
		
 
		private global::Gtk.Alignment alignment2;
 
		
 
		private global::Gtk.Button button65;
 
		
 
		private global::Gtk.Image image1;
 
		
 
		private global::Gtk.Button button66;
 
		
 
		private global::Gtk.Image image2;
 
		
 
		private global::Gtk.Alignment alignment4;
 
		
 
		private global::DesertPaintLab.PaintSwatch paintSwatch;
 

 
		protected virtual void Build ()
 
		{
 
			global::Stetic.Gui.Initialize (this);
 
			// Widget DesertPaintLab.SimulatorWindow
 
			this.Name = "DesertPaintLab.SimulatorWindow";
 
			this.Title = "Simulator";
 
			this.WindowPosition = ((global::Gtk.WindowPosition)(4));
 
			// Container child DesertPaintLab.SimulatorWindow.Gtk.Container+ContainerChild
 
			this.hbox1 = new global::Gtk.HBox ();
 
			this.hbox1.Name = "hbox1";
 
			this.hbox1.Spacing = 6;
 
			this.hbox1.BorderWidth = ((uint)(12));
 
			// Container child hbox1.Gtk.Box+BoxChild
 
			this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
 
			this.GtkScrolledWindow.Name = "GtkScrolledWindow";
 
			this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
 
			// Container child GtkScrolledWindow.Gtk.Container+ContainerChild
 
			this.reagentListView = new global::Gtk.TreeView ();
 
			this.reagentListView.CanFocus = true;
 
			this.reagentListView.Name = "reagentListView";
 
			this.GtkScrolledWindow.Add (this.reagentListView);
 
			this.hbox1.Add (this.GtkScrolledWindow);
 
			global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.GtkScrolledWindow]));
 
			w2.Position = 0;
 
			// Container child hbox1.Gtk.Box+BoxChild
 
			this.vbox162 = new global::Gtk.VBox ();
 
			this.vbox162.Name = "vbox162";
 
			this.vbox162.Spacing = 6;
 
			// Container child vbox162.Gtk.Box+BoxChild
 
			this.alignment1 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
 
			this.alignment1.Name = "alignment1";
 
			this.vbox162.Add (this.alignment1);
 
			global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox162 [this.alignment1]));
 
			w3.Position = 0;
 
			// Container child vbox162.Gtk.Box+BoxChild
 
			this.addReagentButton = new global::Gtk.Button ();
 
			this.addReagentButton.CanFocus = true;
 
			this.addReagentButton.Name = "addReagentButton";
 
			// Container child addReagentButton.Gtk.Container+ContainerChild
 
			this.addReagentButtonImage = new global::Gtk.Image ();
 
			this.addReagentButtonImage.Name = "addReagentButtonImage";
 
			this.addReagentButtonImage.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-go-forward", global::Gtk.IconSize.Menu);
 
			this.addReagentButton.Add (this.addReagentButtonImage);
 
			this.vbox162.Add (this.addReagentButton);
 
			global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox162 [this.addReagentButton]));
 
			w5.Position = 1;
 
			w5.Expand = false;
 
			w5.Fill = false;
 
			// Container child vbox162.Gtk.Box+BoxChild
 
			this.alignment3 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
 
			this.alignment3.Name = "alignment3";
 
			this.vbox162.Add (this.alignment3);
 
			global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox162 [this.alignment3]));
 
			w6.Position = 2;
 
			this.hbox1.Add (this.vbox162);
 
			global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox162]));
 
			w7.Position = 1;
 
			w7.Expand = false;
 
			w7.Fill = false;
 
			// Container child hbox1.Gtk.Box+BoxChild
 
			this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow ();
 
			this.GtkScrolledWindow1.WidthRequest = 0;
 
			this.GtkScrolledWindow1.Name = "GtkScrolledWindow1";
 
			this.GtkScrolledWindow1.ShadowType = ((global::Gtk.ShadowType)(1));
 
			// Container child GtkScrolledWindow1.Gtk.Container+ContainerChild
 
			this.recipeView = new global::Gtk.TreeView ();
 
			this.recipeView.CanFocus = true;
 
			this.recipeView.Name = "recipeView";
 
			this.recipeView.EnableSearch = false;
 
			this.recipeView.Reorderable = true;
 
			this.GtkScrolledWindow1.Add (this.recipeView);
 
			this.hbox1.Add (this.GtkScrolledWindow1);
 
			global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.GtkScrolledWindow1]));
 
			w9.Position = 2;
 
			// Container child hbox1.Gtk.Box+BoxChild
 
			this.vbox3 = new global::Gtk.VBox ();
 
			this.vbox3.Name = "vbox3";
 
			this.vbox3.Spacing = 6;
 
			// Container child vbox3.Gtk.Box+BoxChild
 
			this.alignment2 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
 
			this.alignment2.Name = "alignment2";
 
			this.vbox3.Add (this.alignment2);
 
			global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.alignment2]));
 
			w10.Position = 0;
 
			// Container child vbox3.Gtk.Box+BoxChild
 
			this.button65 = new global::Gtk.Button ();
 
			this.button65.CanFocus = true;
 
			this.button65.Name = "button65";
 
			// Container child button65.Gtk.Container+ContainerChild
 
			this.image1 = new global::Gtk.Image ();
 
			this.image1.Name = "image1";
 
			this.image1.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-add", global::Gtk.IconSize.Menu);
 
			this.button65.Add (this.image1);
 
			this.vbox3.Add (this.button65);
 
			global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.button65]));
 
			w12.Position = 1;
 
			w12.Expand = false;
 
			w12.Fill = false;
 
			// Container child vbox3.Gtk.Box+BoxChild
 
			this.button66 = new global::Gtk.Button ();
 
			this.button66.CanFocus = true;
 
			this.button66.Name = "button66";
 
			// Container child button66.Gtk.Container+ContainerChild
 
			this.image2 = new global::Gtk.Image ();
 
			this.image2.Name = "image2";
 
			this.image2.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-remove", global::Gtk.IconSize.Menu);
 
			this.button66.Add (this.image2);
 
			this.vbox3.Add (this.button66);
 
			global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.button66]));
 
			w14.Position = 2;
 
			w14.Expand = false;
 
			w14.Fill = false;
 
			// Container child vbox3.Gtk.Box+BoxChild
 
			this.alignment4 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
 
			this.alignment4.Name = "alignment4";
 
			this.vbox3.Add (this.alignment4);
 
			global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.alignment4]));
 
			w15.Position = 3;
 
			this.hbox1.Add (this.vbox3);
 
			global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox3]));
 
			w16.Position = 3;
 
			w16.Expand = false;
 
			w16.Fill = false;
 
			// Container child hbox1.Gtk.Box+BoxChild
 
			this.paintSwatch = new global::DesertPaintLab.PaintSwatch ();
 
			this.paintSwatch.WidthRequest = 200;
 
			this.paintSwatch.Events = ((global::Gdk.EventMask)(256));
 
			this.paintSwatch.Name = "paintSwatch";
 
			this.hbox1.Add (this.paintSwatch);
 
			global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.paintSwatch]));
 
			w17.Position = 4;
 
			this.Add (this.hbox1);
 
			if ((this.Child != null)) {
 
				this.Child.ShowAll ();
 
			}
 
			this.DefaultWidth = 804;
 
			this.DefaultHeight = 390;
 
			this.Show ();
 
			this.addReagentButton.Clicked += new global::System.EventHandler (this.OnAddReagent);
 
			this.button65.Clicked += new global::System.EventHandler (this.OnIncrementReagent);
 
			this.button66.Clicked += new global::System.EventHandler (this.OnDecrementReagent);
 
		}
 
	}
 
}
 

	
 
// This file has been generated by the GUI designer. Do not modify.
 
namespace DesertPaintLab
 
{
 
	public partial class SimulatorWindow
 
	{
 
		private global::Gtk.HBox hbox1;
 
		
 
		private global::Gtk.ScrolledWindow GtkScrolledWindow;
 
		
 
		private global::Gtk.TreeView reagentListView;
 
		
 
		private global::Gtk.VBox vbox162;
 
		
 
		private global::Gtk.Alignment alignment1;
 
		
 
		private global::Gtk.Button addReagentButton;
 
		
 
		private global::Gtk.Image addReagentButtonImage;
 
		
 
		private global::Gtk.Alignment alignment3;
 
		
 
		private global::Gtk.ScrolledWindow GtkScrolledWindow1;
 
		
 
		private global::Gtk.TreeView recipeView;
 
		
 
		private global::Gtk.VBox vbox3;
 
		
 
		private global::Gtk.Alignment alignment2;
 
		
 
		private global::Gtk.Button button65;
 
		
 
		private global::Gtk.Image image1;
 
		
 
		private global::Gtk.Button button66;
 
		
 
		private global::Gtk.Image image2;
 
		
 
		private global::Gtk.Button button67;
 
		
 
		private global::Gtk.Image image3;
 
		
 
		private global::Gtk.Alignment alignment4;
 
		
 
		private global::DesertPaintLab.PaintSwatch paintSwatch;
 

	
 
		protected virtual void Build ()
 
		{
 
			global::Stetic.Gui.Initialize (this);
 
			// Widget DesertPaintLab.SimulatorWindow
 
			this.Name = "DesertPaintLab.SimulatorWindow";
 
			this.Title = "Simulator";
 
			this.WindowPosition = ((global::Gtk.WindowPosition)(4));
 
			// Container child DesertPaintLab.SimulatorWindow.Gtk.Container+ContainerChild
 
			this.hbox1 = new global::Gtk.HBox ();
 
			this.hbox1.Name = "hbox1";
 
			this.hbox1.Spacing = 6;
 
			this.hbox1.BorderWidth = ((uint)(12));
 
			// Container child hbox1.Gtk.Box+BoxChild
 
			this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
 
			this.GtkScrolledWindow.Name = "GtkScrolledWindow";
 
			this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
 
			// Container child GtkScrolledWindow.Gtk.Container+ContainerChild
 
			this.reagentListView = new global::Gtk.TreeView ();
 
			this.reagentListView.CanFocus = true;
 
			this.reagentListView.Name = "reagentListView";
 
			this.GtkScrolledWindow.Add (this.reagentListView);
 
			this.hbox1.Add (this.GtkScrolledWindow);
 
			global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.GtkScrolledWindow]));
 
			w2.Position = 0;
 
			// Container child hbox1.Gtk.Box+BoxChild
 
			this.vbox162 = new global::Gtk.VBox ();
 
			this.vbox162.Name = "vbox162";
 
			this.vbox162.Spacing = 6;
 
			// Container child vbox162.Gtk.Box+BoxChild
 
			this.alignment1 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
 
			this.alignment1.Name = "alignment1";
 
			this.vbox162.Add (this.alignment1);
 
			global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox162 [this.alignment1]));
 
			w3.Position = 0;
 
			// Container child vbox162.Gtk.Box+BoxChild
 
			this.addReagentButton = new global::Gtk.Button ();
 
			this.addReagentButton.CanFocus = true;
 
			this.addReagentButton.Name = "addReagentButton";
 
			// Container child addReagentButton.Gtk.Container+ContainerChild
 
			this.addReagentButtonImage = new global::Gtk.Image ();
 
			this.addReagentButtonImage.Name = "addReagentButtonImage";
 
			this.addReagentButtonImage.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-go-forward", global::Gtk.IconSize.Menu);
 
			this.addReagentButton.Add (this.addReagentButtonImage);
 
			this.vbox162.Add (this.addReagentButton);
 
			global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox162 [this.addReagentButton]));
 
			w5.Position = 1;
 
			w5.Expand = false;
 
			w5.Fill = false;
 
			// Container child vbox162.Gtk.Box+BoxChild
 
			this.alignment3 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
 
			this.alignment3.Name = "alignment3";
 
			this.vbox162.Add (this.alignment3);
 
			global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox162 [this.alignment3]));
 
			w6.Position = 2;
 
			this.hbox1.Add (this.vbox162);
 
			global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox162]));
 
			w7.Position = 1;
 
			w7.Expand = false;
 
			w7.Fill = false;
 
			// Container child hbox1.Gtk.Box+BoxChild
 
			this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow ();
 
			this.GtkScrolledWindow1.Name = "GtkScrolledWindow1";
 
			this.GtkScrolledWindow1.ShadowType = ((global::Gtk.ShadowType)(1));
 
			// Container child GtkScrolledWindow1.Gtk.Container+ContainerChild
 
			this.recipeView = new global::Gtk.TreeView ();
 
			this.recipeView.CanFocus = true;
 
			this.recipeView.Name = "recipeView";
 
			this.recipeView.EnableSearch = false;
 
			this.recipeView.Reorderable = true;
 
			this.GtkScrolledWindow1.Add (this.recipeView);
 
			this.hbox1.Add (this.GtkScrolledWindow1);
 
			global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.GtkScrolledWindow1]));
 
			w9.Position = 2;
 
			// Container child hbox1.Gtk.Box+BoxChild
 
			this.vbox3 = new global::Gtk.VBox ();
 
			this.vbox3.Name = "vbox3";
 
			this.vbox3.Spacing = 6;
 
			// Container child vbox3.Gtk.Box+BoxChild
 
			this.alignment2 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
 
			this.alignment2.Name = "alignment2";
 
			this.vbox3.Add (this.alignment2);
 
			global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.alignment2]));
 
			w10.Position = 0;
 
			// Container child vbox3.Gtk.Box+BoxChild
 
			this.button65 = new global::Gtk.Button ();
 
			this.button65.CanFocus = true;
 
			this.button65.Name = "button65";
 
			// Container child button65.Gtk.Container+ContainerChild
 
			this.image1 = new global::Gtk.Image ();
 
			this.image1.Name = "image1";
 
			this.image1.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-add", global::Gtk.IconSize.Menu);
 
			this.button65.Add (this.image1);
 
			this.vbox3.Add (this.button65);
 
			global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.button65]));
 
			w12.Position = 1;
 
			w12.Expand = false;
 
			w12.Fill = false;
 
			// Container child vbox3.Gtk.Box+BoxChild
 
			this.button66 = new global::Gtk.Button ();
 
			this.button66.CanFocus = true;
 
			this.button66.Name = "button66";
 
			// Container child button66.Gtk.Container+ContainerChild
 
			this.image2 = new global::Gtk.Image ();
 
			this.image2.Name = "image2";
 
			this.image2.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-remove", global::Gtk.IconSize.Menu);
 
			this.button66.Add (this.image2);
 
			this.vbox3.Add (this.button66);
 
			global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.button66]));
 
			w14.Position = 2;
 
			w14.Expand = false;
 
			w14.Fill = false;
 
			// Container child vbox3.Gtk.Box+BoxChild
 
			this.button67 = new global::Gtk.Button ();
 
			this.button67.CanFocus = true;
 
			this.button67.Name = "button67";
 
			// Container child button67.Gtk.Container+ContainerChild
 
			this.image3 = new global::Gtk.Image ();
 
			this.image3.Name = "image3";
 
			this.image3.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-goto-first", global::Gtk.IconSize.Menu);
 
			this.button67.Add (this.image3);
 
			this.vbox3.Add (this.button67);
 
			global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.button67]));
 
			w16.Position = 3;
 
			w16.Expand = false;
 
			w16.Fill = false;
 
			// Container child vbox3.Gtk.Box+BoxChild
 
			this.alignment4 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
 
			this.alignment4.Name = "alignment4";
 
			this.vbox3.Add (this.alignment4);
 
			global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.alignment4]));
 
			w17.Position = 4;
 
			this.hbox1.Add (this.vbox3);
 
			global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox3]));
 
			w18.Position = 3;
 
			w18.Expand = false;
 
			w18.Fill = false;
 
			// Container child hbox1.Gtk.Box+BoxChild
 
			this.paintSwatch = new global::DesertPaintLab.PaintSwatch ();
 
			this.paintSwatch.WidthRequest = 200;
 
			this.paintSwatch.Events = ((global::Gdk.EventMask)(256));
 
			this.paintSwatch.Name = "paintSwatch";
 
			this.hbox1.Add (this.paintSwatch);
 
			global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.paintSwatch]));
 
			w19.Position = 4;
 
			this.Add (this.hbox1);
 
			if ((this.Child != null)) {
 
				this.Child.ShowAll ();
 
			}
 
			this.DefaultWidth = 804;
 
			this.DefaultHeight = 390;
 
			this.Show ();
 
			this.addReagentButton.Clicked += new global::System.EventHandler (this.OnAddReagent);
 
			this.button65.Clicked += new global::System.EventHandler (this.OnIncrementReagent);
 
			this.button66.Clicked += new global::System.EventHandler (this.OnDecrementReagent);
 
			this.button67.Clicked += new global::System.EventHandler (this.OnFlushReagents);
 
		}
 
	}
 
}
gtk-gui/gui.stetic
Show inline comments
...
 
@@ -418,639 +418,658 @@
 
      <widget class="Gtk.VBox" id="dialog1_VBox">
 
        <property name="MemberName" />
 
        <property name="BorderWidth">2</property>
 
        <child>
 
          <widget class="Gtk.Label" id="label2">
 
            <property name="MemberName" />
 
            <property name="LabelProp" translatable="yes">Since this is your first time using this program, you need a new profile.
 

	
 
You can either import an existing PracticalPaint reactions.txt file, or you can start a new profile from scratch.</property>
 
            <property name="Wrap">True</property>
 
          </widget>
 
          <packing>
 
            <property name="Position">0</property>
 
            <property name="AutoSize">False</property>
 
            <property name="Padding">5</property>
 
          </packing>
 
        </child>
 
      </widget>
 
    </child>
 
    <child internal-child="ActionArea">
 
      <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
 
        <property name="MemberName" />
 
        <property name="Spacing">10</property>
 
        <property name="BorderWidth">5</property>
 
        <property name="Size">3</property>
 
        <property name="LayoutStyle">End</property>
 
        <child>
 
          <widget class="Gtk.Button" id="buttonCancel">
 
            <property name="MemberName" />
 
            <property name="CanDefault">True</property>
 
            <property name="CanFocus">True</property>
 
            <property name="UseStock">True</property>
 
            <property name="Type">StockItem</property>
 
            <property name="StockId">gtk-cancel</property>
 
            <property name="ResponseId">-6</property>
 
            <property name="label">gtk-cancel</property>
 
          </widget>
 
          <packing>
 
            <property name="Expand">False</property>
 
            <property name="Fill">False</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <widget class="Gtk.Button" id="buttonImport">
 
            <property name="MemberName" />
 
            <property name="CanDefault">True</property>
 
            <property name="CanFocus">True</property>
 
            <property name="Type">TextOnly</property>
 
            <property name="Label" translatable="yes">Import reactions.txt</property>
 
            <property name="UseUnderline">True</property>
 
            <property name="ResponseId">-3</property>
 
          </widget>
 
          <packing>
 
            <property name="Position">1</property>
 
            <property name="Expand">False</property>
 
            <property name="Fill">False</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <widget class="Gtk.Button" id="buttonNew">
 
            <property name="MemberName" />
 
            <property name="CanFocus">True</property>
 
            <property name="Type">TextOnly</property>
 
            <property name="Label" translatable="yes">New Profile</property>
 
            <property name="UseUnderline">True</property>
 
            <property name="ResponseId">-5</property>
 
          </widget>
 
          <packing>
 
            <property name="Position">2</property>
 
            <property name="Expand">False</property>
 
            <property name="Fill">False</property>
 
          </packing>
 
        </child>
 
      </widget>
 
    </child>
 
  </widget>
 
  <widget class="Gtk.Dialog" id="DesertPaintLab.SelectProfileDialog" design-size="400 288">
 
    <property name="MemberName" />
 
    <property name="Title" translatable="yes">Open Profile</property>
 
    <property name="WindowPosition">CenterOnParent</property>
 
    <property name="Modal">True</property>
 
    <property name="BorderWidth">5</property>
 
    <property name="Buttons">3</property>
 
    <property name="HelpButton">False</property>
 
    <child internal-child="VBox">
 
      <widget class="Gtk.VBox" id="dialog1_VBox">
 
        <property name="MemberName" />
 
        <property name="Spacing">10</property>
 
        <property name="BorderWidth">2</property>
 
        <child>
 
          <widget class="Gtk.Label" id="label3">
 
            <property name="MemberName" />
 
            <property name="LabelProp" translatable="yes">Select the profile you would like to open:</property>
 
          </widget>
 
          <packing>
 
            <property name="Position">0</property>
 
            <property name="AutoSize">True</property>
 
            <property name="Expand">False</property>
 
            <property name="Fill">False</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <widget class="Gtk.TreeView" id="profileListView">
 
            <property name="MemberName" />
 
            <property name="CanFocus">True</property>
 
            <property name="EnableSearch">False</property>
 
            <signal name="CursorChanged" handler="OnCursorChanged" />
 
          </widget>
 
          <packing>
 
            <property name="Position">1</property>
 
            <property name="AutoSize">True</property>
 
          </packing>
 
        </child>
 
      </widget>
 
    </child>
 
    <child internal-child="ActionArea">
 
      <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
 
        <property name="MemberName" />
 
        <property name="Spacing">10</property>
 
        <property name="BorderWidth">5</property>
 
        <property name="Size">3</property>
 
        <property name="LayoutStyle">End</property>
 
        <child>
 
          <widget class="Gtk.Button" id="buttonCancel">
 
            <property name="MemberName" />
 
            <property name="CanDefault">True</property>
 
            <property name="CanFocus">True</property>
 
            <property name="UseStock">True</property>
 
            <property name="Type">StockItem</property>
 
            <property name="StockId">gtk-cancel</property>
 
            <property name="ResponseId">-6</property>
 
            <property name="label">gtk-cancel</property>
 
          </widget>
 
          <packing>
 
            <property name="Expand">False</property>
 
            <property name="Fill">False</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <widget class="Gtk.Button" id="button56">
 
            <property name="MemberName" />
 
            <property name="CanFocus">True</property>
 
            <property name="Type">TextOnly</property>
 
            <property name="Label" translatable="yes">New Profile</property>
 
            <property name="UseUnderline">True</property>
 
            <property name="ResponseId">-3</property>
 
          </widget>
 
          <packing>
 
            <property name="Position">1</property>
 
            <property name="Expand">False</property>
 
            <property name="Fill">False</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <widget class="Gtk.Button" id="buttonOk">
 
            <property name="MemberName" />
 
            <property name="CanDefault">True</property>
 
            <property name="CanFocus">True</property>
 
            <property name="UseStock">True</property>
 
            <property name="Type">StockItem</property>
 
            <property name="StockId">gtk-ok</property>
 
            <property name="ResponseId">-5</property>
 
            <property name="label">gtk-ok</property>
 
          </widget>
 
          <packing>
 
            <property name="Position">2</property>
 
            <property name="Expand">False</property>
 
            <property name="Fill">False</property>
 
          </packing>
 
        </child>
 
      </widget>
 
    </child>
 
  </widget>
 
  <widget class="Gtk.Dialog" id="DesertPaintLab.NewProfileDialog" design-size="318 177">
 
    <property name="MemberName" />
 
    <property name="Title" translatable="yes">New Profile</property>
 
    <property name="WindowPosition">CenterOnParent</property>
 
    <property name="BorderWidth">5</property>
 
    <property name="Buttons">2</property>
 
    <property name="HelpButton">False</property>
 
    <child internal-child="VBox">
 
      <widget class="Gtk.VBox" id="dialog1_VBox">
 
        <property name="MemberName" />
 
        <property name="Spacing">10</property>
 
        <property name="BorderWidth">9</property>
 
        <child>
 
          <widget class="Gtk.Label" id="label1">
 
            <property name="MemberName" />
 
            <property name="LabelProp" translatable="yes">Name your new profile:</property>
 
          </widget>
 
          <packing>
 
            <property name="Position">0</property>
 
            <property name="AutoSize">True</property>
 
            <property name="Expand">False</property>
 
            <property name="Fill">False</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <widget class="Gtk.Entry" id="profileNameEntry">
 
            <property name="MemberName" />
 
            <property name="CanFocus">True</property>
 
            <property name="IsEditable">True</property>
 
            <property name="InvisibleChar">●</property>
 
          </widget>
 
          <packing>
 
            <property name="Position">1</property>
 
            <property name="AutoSize">True</property>
 
            <property name="Expand">False</property>
 
            <property name="Fill">False</property>
 
          </packing>
 
        </child>
 
      </widget>
 
    </child>
 
    <child internal-child="ActionArea">
 
      <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
 
        <property name="MemberName" />
 
        <property name="Spacing">10</property>
 
        <property name="BorderWidth">5</property>
 
        <property name="Size">2</property>
 
        <property name="LayoutStyle">End</property>
 
        <child>
 
          <widget class="Gtk.Button" id="buttonCancel">
 
            <property name="MemberName" />
 
            <property name="CanDefault">True</property>
 
            <property name="CanFocus">True</property>
 
            <property name="UseStock">True</property>
 
            <property name="Type">StockItem</property>
 
            <property name="StockId">gtk-cancel</property>
 
            <property name="ResponseId">-6</property>
 
            <property name="label">gtk-cancel</property>
 
          </widget>
 
          <packing>
 
            <property name="Expand">False</property>
 
            <property name="Fill">False</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <widget class="Gtk.Button" id="buttonOk">
 
            <property name="MemberName" />
 
            <property name="CanDefault">True</property>
 
            <property name="CanFocus">True</property>
 
            <property name="UseStock">True</property>
 
            <property name="Type">StockItem</property>
 
            <property name="StockId">gtk-ok</property>
 
            <property name="ResponseId">-5</property>
 
            <property name="label">gtk-ok</property>
 
          </widget>
 
          <packing>
 
            <property name="Position">1</property>
 
            <property name="Expand">False</property>
 
            <property name="Fill">False</property>
 
          </packing>
 
        </child>
 
      </widget>
 
    </child>
 
  </widget>
 
  <widget class="Gtk.Bin" id="DesertPaintLab.PaintSwatch" design-size="245 235">
 
    <property name="MemberName" />
 
    <property name="Visible">False</property>
 
    <child>
 
      <widget class="Gtk.VBox" id="vbox1">
 
        <property name="MemberName" />
 
        <property name="Spacing">6</property>
 
        <child>
 
          <widget class="Gtk.Label" id="colorNameLabel">
 
            <property name="MemberName" />
 
            <property name="LabelProp" translatable="yes">Unknown</property>
 
          </widget>
 
          <packing>
 
            <property name="Position">0</property>
 
            <property name="AutoSize">True</property>
 
            <property name="Expand">False</property>
 
            <property name="Fill">False</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <widget class="Gtk.DrawingArea" id="colorBox">
 
            <property name="MemberName" />
 
          </widget>
 
          <packing>
 
            <property name="Position">1</property>
 
            <property name="AutoSize">True</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <widget class="Gtk.Label" id="rgbLabel">
 
            <property name="MemberName" />
 
            <property name="LabelProp" translatable="yes">???, ???, ???</property>
 
          </widget>
 
          <packing>
 
            <property name="Position">2</property>
 
            <property name="AutoSize">True</property>
 
            <property name="Expand">False</property>
 
            <property name="Fill">False</property>
 
          </packing>
 
        </child>
 
      </widget>
 
    </child>
 
  </widget>
 
  <widget class="Gtk.Window" id="DesertPaintLab.SimulatorWindow" design-size="804 390">
 
    <property name="MemberName" />
 
    <property name="Title" translatable="yes">Simulator</property>
 
    <property name="WindowPosition">CenterOnParent</property>
 
    <child>
 
      <widget class="Gtk.HBox" id="hbox1">
 
        <property name="MemberName" />
 
        <property name="Spacing">6</property>
 
        <property name="BorderWidth">12</property>
 
        <child>
 
          <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
 
            <property name="MemberName" />
 
            <property name="ShadowType">In</property>
 
            <child>
 
              <widget class="Gtk.TreeView" id="reagentListView">
 
                <property name="MemberName" />
 
                <property name="CanFocus">True</property>
 
                <property name="ShowScrollbars">True</property>
 
              </widget>
 
            </child>
 
          </widget>
 
          <packing>
 
            <property name="Position">0</property>
 
            <property name="AutoSize">True</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <widget class="Gtk.VBox" id="vbox162">
 
            <property name="MemberName" />
 
            <property name="Spacing">6</property>
 
            <child>
 
              <widget class="Gtk.Alignment" id="alignment1">
 
                <property name="MemberName" />
 
                <child>
 
                  <placeholder />
 
                </child>
 
              </widget>
 
              <packing>
 
                <property name="Position">0</property>
 
                <property name="AutoSize">True</property>
 
              </packing>
 
            </child>
 
            <child>
 
              <widget class="Gtk.Button" id="addReagentButton">
 
                <property name="MemberName" />
 
                <property name="CanFocus">True</property>
 
                <property name="Type">Custom</property>
 
                <signal name="Clicked" handler="OnAddReagent" />
 
                <child>
 
                  <widget class="Gtk.Image" id="addReagentButtonImage">
 
                    <property name="MemberName" />
 
                    <property name="Pixbuf">stock:gtk-go-forward Menu</property>
 
                  </widget>
 
                </child>
 
              </widget>
 
              <packing>
 
                <property name="Position">1</property>
 
                <property name="AutoSize">True</property>
 
                <property name="Expand">False</property>
 
                <property name="Fill">False</property>
 
              </packing>
 
            </child>
 
            <child>
 
              <widget class="Gtk.Alignment" id="alignment3">
 
                <property name="MemberName" />
 
                <child>
 
                  <placeholder />
 
                </child>
 
              </widget>
 
              <packing>
 
                <property name="Position">2</property>
 
                <property name="AutoSize">True</property>
 
              </packing>
 
            </child>
 
          </widget>
 
          <packing>
 
            <property name="Position">1</property>
 
            <property name="AutoSize">True</property>
 
            <property name="Expand">False</property>
 
            <property name="Fill">False</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
 
            <property name="MemberName" />
 
            <property name="WidthRequest">0</property>
 
            <property name="ShadowType">In</property>
 
            <child>
 
              <widget class="Gtk.TreeView" id="recipeView">
 
                <property name="MemberName" />
 
                <property name="CanFocus">True</property>
 
                <property name="ShowScrollbars">True</property>
 
                <property name="EnableSearch">False</property>
 
                <property name="Reorderable">True</property>
 
              </widget>
 
            </child>
 
          </widget>
 
          <packing>
 
            <property name="Position">2</property>
 
            <property name="AutoSize">True</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <widget class="Gtk.VBox" id="vbox3">
 
            <property name="MemberName" />
 
            <property name="Spacing">6</property>
 
            <child>
 
              <widget class="Gtk.Alignment" id="alignment2">
 
                <property name="MemberName" />
 
                <child>
 
                  <placeholder />
 
                </child>
 
              </widget>
 
              <packing>
 
                <property name="Position">0</property>
 
                <property name="AutoSize">True</property>
 
              </packing>
 
            </child>
 
            <child>
 
              <widget class="Gtk.Button" id="button65">
 
                <property name="MemberName" />
 
                <property name="CanFocus">True</property>
 
                <property name="Type">Custom</property>
 
                <signal name="Clicked" handler="OnIncrementReagent" />
 
                <child>
 
                  <widget class="Gtk.Image" id="image1">
 
                    <property name="MemberName" />
 
                    <property name="Pixbuf">stock:gtk-add Menu</property>
 
                  </widget>
 
                </child>
 
              </widget>
 
              <packing>
 
                <property name="Position">1</property>
 
                <property name="AutoSize">True</property>
 
                <property name="Expand">False</property>
 
                <property name="Fill">False</property>
 
              </packing>
 
            </child>
 
            <child>
 
              <widget class="Gtk.Button" id="button66">
 
                <property name="MemberName" />
 
                <property name="CanFocus">True</property>
 
                <property name="Type">Custom</property>
 
                <signal name="Clicked" handler="OnDecrementReagent" />
 
                <child>
 
                  <widget class="Gtk.Image" id="image2">
 
                    <property name="MemberName" />
 
                    <property name="Pixbuf">stock:gtk-remove Menu</property>
 
                  </widget>
 
                </child>
 
              </widget>
 
              <packing>
 
                <property name="Position">2</property>
 
                <property name="AutoSize">True</property>
 
                <property name="Expand">False</property>
 
                <property name="Fill">False</property>
 
              </packing>
 
            </child>
 
            <child>
 
              <widget class="Gtk.Button" id="button67">
 
                <property name="MemberName" />
 
                <property name="CanFocus">True</property>
 
                <property name="Type">Custom</property>
 
                <signal name="Clicked" handler="OnFlushReagents" />
 
                <child>
 
                  <widget class="Gtk.Image" id="image3">
 
                    <property name="MemberName" />
 
                    <property name="Pixbuf">stock:gtk-goto-first Menu</property>
 
                  </widget>
 
                </child>
 
              </widget>
 
              <packing>
 
                <property name="Position">3</property>
 
                <property name="AutoSize">True</property>
 
                <property name="Expand">False</property>
 
                <property name="Fill">False</property>
 
              </packing>
 
            </child>
 
            <child>
 
              <widget class="Gtk.Alignment" id="alignment4">
 
                <property name="MemberName" />
 
                <child>
 
                  <placeholder />
 
                </child>
 
              </widget>
 
              <packing>
 
                <property name="Position">3</property>
 
                <property name="Position">4</property>
 
                <property name="AutoSize">True</property>
 
              </packing>
 
            </child>
 
          </widget>
 
          <packing>
 
            <property name="Position">3</property>
 
            <property name="AutoSize">True</property>
 
            <property name="Expand">False</property>
 
            <property name="Fill">False</property>
 
          </packing>
 
        </child>
 
        <child>
 
          <widget class="DesertPaintLab.PaintSwatch" id="paintSwatch">
 
            <property name="MemberName" />
 
            <property name="WidthRequest">200</property>
 
            <property name="Events">ButtonPressMask</property>
 
          </widget>
 
          <packing>
 
            <property name="Position">4</property>
 
            <property name="AutoSize">False</property>
 
          </packing>
 
        </child>
 
      </widget>
 
    </child>
 
  </widget>
 
  <widget class="Gtk.Dialog" id="DesertPaintLab.ScreenCheckDialog" design-size="378 245">
 
    <property name="MemberName" />
 
    <property name="Title" translatable="yes">Screen Check</property>
 
    <property name="WindowPosition">CenterOnParent</property>
 
    <property name="Modal">True</property>
 
    <property name="BorderWidth">9</property>
 
    <property name="Buttons">1</property>
 
    <property name="HelpButton">False</property>
 
    <child internal-child="VBox">
 
      <widget class="Gtk.VBox" id="dialog1_VBox">
 
        <property name="MemberName" />
 
        <child>
 
          <widget class="Gtk.VBox" id="vbox2">
 
            <property name="MemberName" />
 
            <property name="Spacing">20</property>
 
            <property name="BorderWidth">20</property>
 
            <child>
 
              <widget class="Gtk.HBox" id="hbox1">
 
                <property name="MemberName" />
 
                <property name="Spacing">20</property>
 
                <property name="BorderWidth">10</property>
 
                <child>
 
                  <widget class="Gtk.Label" id="label1">
 
                    <property name="MemberName" />
 
                    <property name="LabelProp" translatable="yes">Screen Resolution</property>
 
                  </widget>
 
                  <packing>
 
                    <property name="Position">0</property>
 
                    <property name="AutoSize">True</property>
 
                    <property name="Expand">False</property>
 
                    <property name="Fill">False</property>
 
                  </packing>
 
                </child>
 
                <child>
 
                  <widget class="Gtk.Entry" id="screenWidthEntry">
 
                    <property name="MemberName" />
 
                    <property name="WidthRequest">50</property>
 
                    <property name="CanFocus">True</property>
 
                    <property name="IsEditable">True</property>
 
                    <property name="InvisibleChar">●</property>
 
                  </widget>
 
                  <packing>
 
                    <property name="Position">1</property>
 
                    <property name="AutoSize">True</property>
 
                  </packing>
 
                </child>
 
                <child>
 
                  <widget class="Gtk.Entry" id="screenHeightEntry">
 
                    <property name="MemberName" />
 
                    <property name="WidthRequest">50</property>
 
                    <property name="CanFocus">True</property>
 
                    <property name="IsEditable">True</property>
 
                    <property name="InvisibleChar">●</property>
 
                  </widget>
 
                  <packing>
 
                    <property name="Position">2</property>
 
                    <property name="AutoSize">True</property>
 
                  </packing>
 
                </child>
 
              </widget>
 
              <packing>
 
                <property name="Position">0</property>
 
                <property name="AutoSize">True</property>
 
                <property name="Expand">False</property>
 
                <property name="Fill">False</property>
 
              </packing>
 
            </child>
 
            <child>
 
              <widget class="Gtk.HBox" id="hbox2">
 
                <property name="MemberName" />
 
                <property name="Spacing">20</property>
 
                <property name="BorderWidth">10</property>
 
                <child>
 
                  <widget class="Gtk.Label" id="label2">
 
                    <property name="MemberName" />
 
                    <property name="LabelProp" translatable="yes">Game Pixel Width in Screen Pixels</property>
 
                  </widget>
 
                  <packing>
 
                    <property name="Position">0</property>
 
                    <property name="AutoSize">True</property>
 
                    <property name="Expand">False</property>
 
                    <property name="Fill">False</property>
 
                  </packing>
 
                </child>
 
                <child>
 
                  <widget class="Gtk.Entry" id="gamePixelWidthEntry">
 
                    <property name="MemberName" />
 
                    <property name="WidthRequest">50</property>
 
                    <property name="CanFocus">True</property>
 
                    <property name="IsEditable">True</property>
 
                    <property name="InvisibleChar">●</property>
 
                  </widget>
 
                  <packing>
 
                    <property name="Position">1</property>
 
                    <property name="AutoSize">False</property>
 
                    <property name="Expand">False</property>
 
                    <property name="Fill">False</property>
 
                  </packing>
 
                </child>
 
                <child>
 
                  <placeholder />
 
                </child>
 
              </widget>
 
              <packing>
 
                <property name="Position">1</property>
 
                <property name="AutoSize">True</property>
 
                <property name="Expand">False</property>
 
                <property name="Fill">False</property>
 
              </packing>
 
            </child>
 
            <child>
 
              <placeholder />
 
            </child>
 
          </widget>
 
          <packing>
 
            <property name="Position">0</property>
 
            <property name="AutoSize">True</property>
 
          </packing>
 
        </child>
 
      </widget>
 
    </child>
 
    <child internal-child="ActionArea">
 
      <widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
 
        <property name="MemberName" />
 
        <property name="Spacing">10</property>
 
        <property name="BorderWidth">5</property>
 
        <property name="Size">1</property>
 
        <property name="LayoutStyle">End</property>
 
        <child>
 
          <widget class="Gtk.Button" id="buttonOk">
 
            <property name="MemberName" />
 
            <property name="CanDefault">True</property>
 
            <property name="CanFocus">True</property>
 
            <property name="UseStock">True</property>
 
            <property name="Type">StockItem</property>
 
            <property name="StockId">gtk-ok</property>
 
            <property name="ResponseId">-5</property>
 
            <property name="label">gtk-ok</property>
 
          </widget>
 
          <packing>
 
            <property name="Expand">False</property>
 
            <property name="Fill">False</property>
 
          </packing>
 
        </child>
 
      </widget>
 
    </child>
 
  </widget>
 
</stetic-interface>
...
 
\ No newline at end of file
0 comments (0 inline, 0 general)