Files @ 71732f305328
Branch filter:

Location: ATITD-Tools/Desert-Paint-Lab/gtk-gui/DesertPaintLab.SimulatorWindow.cs - annotation

jmaltzen
Pre-allocate a bunch of map entries, given that we know there are a fixed set of colors. Use fixed arrays in places where maps/sets were excessive. Switch away from using Gtk.Application.Invoke, which leaks a bunch of memory.
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8
45b588f61ac8

// 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);
		}
	}
}