Files
@ 71732f305328
Branch filter:
Location: ATITD-Tools/Desert-Paint-Lab/gtk-gui/DesertPaintLab.SimulatorWindow.cs
71732f305328
8.2 KiB
text/x-csharp
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 |
// 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);
}
}
}
|