view gtk-gui/IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget.cs @ 61:e7ad676a7344

Re #60: Add UI to add/remove/edit weapons in GTK * Add events to track equipment amount and amount changing * Select most appropriate equipment type by default * Add methods an implementation for enabling/disabling Okay button
author IBBoard <dev@ibboard.co.uk>
date Sun, 29 Aug 2010 15:09:34 +0000
parents 04c0f6a7625c
children e3fe48c4d794
line wrap: on
line source


// This file has been generated by the GUI designer. Do not modify.
namespace IBBoard.WarFoundry.GTK.Widgets
{
	public partial class UnitDisplayWidget
	{
		private global::Gtk.VBox vbox1;

		private global::Gtk.HBox hbox1;

		private global::Gtk.Entry unitName;

		private global::Gtk.SpinButton unitSize;

		private global::Gtk.ScrolledWindow GtkScrolledWindow;

		private global::Gtk.NodeView unitStats;

		private global::Gtk.HSeparator hseparator1;

		private global::Gtk.HBox hbox2;

		private global::Gtk.Table table1;

		private global::Gtk.Label equipmentLabel;

		private global::Gtk.ScrolledWindow GtkScrolledWindow2;

		private global::Gtk.NodeView equipmentList;

		private global::Gtk.ScrolledWindow GtkScrolledWindow3;

		private global::Gtk.TextView notesView;

		private global::Gtk.Label lblNotes;

		private global::Gtk.VBox vbox3;

		private global::Gtk.Button bttnAddEquipment;

		private global::Gtk.Button bttnEditEquipment;

		private global::Gtk.Button bttnReplaceEquipment;

		private global::Gtk.Button bttnRemoveEquipment;

		protected virtual void Build()
		{
			global::Stetic.Gui.Initialize(this);
			// Widget IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget
			global::Stetic.BinContainer.Attach(this);
			this.Name = "IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget";
			// Container child IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget.Gtk.Container+ContainerChild
			this.vbox1 = new global::Gtk.VBox();
			this.vbox1.Name = "vbox1";
			this.vbox1.Spacing = 6;
			// Container child vbox1.Gtk.Box+BoxChild
			this.hbox1 = new global::Gtk.HBox();
			this.hbox1.Name = "hbox1";
			this.hbox1.Spacing = 6;
			// Container child hbox1.Gtk.Box+BoxChild
			this.unitName = new global::Gtk.Entry();
			this.unitName.CanFocus = true;
			this.unitName.Name = "unitName";
			this.unitName.IsEditable = true;
			this.unitName.InvisibleChar = '•';
			this.hbox1.Add(this.unitName);
			global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.unitName]));
			w1.Position = 0;
			// Container child hbox1.Gtk.Box+BoxChild
			this.unitSize = new global::Gtk.SpinButton(0, 100, 1);
			this.unitSize.CanFocus = true;
			this.unitSize.Name = "unitSize";
			this.unitSize.Adjustment.PageIncrement = 10;
			this.unitSize.ClimbRate = 1;
			this.unitSize.Numeric = true;
			this.hbox1.Add(this.unitSize);
			global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.unitSize]));
			w2.Position = 1;
			w2.Expand = false;
			w2.Fill = false;
			this.vbox1.Add(this.hbox1);
			global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
			w3.Position = 0;
			w3.Expand = false;
			w3.Fill = false;
			// Container child vbox1.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.unitStats = new global::Gtk.NodeView();
			this.unitStats.HeightRequest = 75;
			this.unitStats.CanFocus = true;
			this.unitStats.Name = "unitStats";
			this.GtkScrolledWindow.Add(this.unitStats);
			this.vbox1.Add(this.GtkScrolledWindow);
			global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.GtkScrolledWindow]));
			w5.Position = 1;
			// Container child vbox1.Gtk.Box+BoxChild
			this.hseparator1 = new global::Gtk.HSeparator();
			this.hseparator1.Name = "hseparator1";
			this.vbox1.Add(this.hseparator1);
			global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hseparator1]));
			w6.Position = 2;
			w6.Expand = false;
			w6.Fill = false;
			// Container child vbox1.Gtk.Box+BoxChild
			this.hbox2 = new global::Gtk.HBox();
			this.hbox2.Name = "hbox2";
			this.hbox2.Spacing = 6;
			// Container child hbox2.Gtk.Box+BoxChild
			this.table1 = new global::Gtk.Table(((uint)(2)), ((uint)(2)), false);
			this.table1.Name = "table1";
			this.table1.RowSpacing = ((uint)(6));
			this.table1.ColumnSpacing = ((uint)(6));
			// Container child table1.Gtk.Table+TableChild
			this.equipmentLabel = new global::Gtk.Label();
			this.equipmentLabel.Name = "equipmentLabel";
			this.equipmentLabel.LabelProp = global::Mono.Unix.Catalog.GetString("equipment:");
			this.table1.Add(this.equipmentLabel);
			global::Gtk.Table.TableChild w7 = ((global::Gtk.Table.TableChild)(this.table1[this.equipmentLabel]));
			w7.XOptions = ((global::Gtk.AttachOptions)(4));
			w7.YOptions = ((global::Gtk.AttachOptions)(4));
			// Container child table1.Gtk.Table+TableChild
			this.GtkScrolledWindow2 = new global::Gtk.ScrolledWindow();
			this.GtkScrolledWindow2.Name = "GtkScrolledWindow2";
			this.GtkScrolledWindow2.ShadowType = ((global::Gtk.ShadowType)(1));
			// Container child GtkScrolledWindow2.Gtk.Container+ContainerChild
			this.equipmentList = new global::Gtk.NodeView();
			this.equipmentList.CanFocus = true;
			this.equipmentList.Name = "equipmentList";
			this.equipmentList.HeadersVisible = false;
			this.GtkScrolledWindow2.Add(this.equipmentList);
			this.table1.Add(this.GtkScrolledWindow2);
			global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow2]));
			w9.LeftAttach = ((uint)(1));
			w9.RightAttach = ((uint)(2));
			w9.YOptions = ((global::Gtk.AttachOptions)(4));
			// Container child table1.Gtk.Table+TableChild
			this.GtkScrolledWindow3 = new global::Gtk.ScrolledWindow();
			this.GtkScrolledWindow3.Name = "GtkScrolledWindow3";
			this.GtkScrolledWindow3.ShadowType = ((global::Gtk.ShadowType)(1));
			// Container child GtkScrolledWindow3.Gtk.Container+ContainerChild
			this.notesView = new global::Gtk.TextView();
			this.notesView.CanFocus = true;
			this.notesView.Name = "notesView";
			this.notesView.Editable = false;
			this.GtkScrolledWindow3.Add(this.notesView);
			this.table1.Add(this.GtkScrolledWindow3);
			global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow3]));
			w11.TopAttach = ((uint)(1));
			w11.BottomAttach = ((uint)(2));
			w11.LeftAttach = ((uint)(1));
			w11.RightAttach = ((uint)(2));
			w11.YOptions = ((global::Gtk.AttachOptions)(4));
			// Container child table1.Gtk.Table+TableChild
			this.lblNotes = new global::Gtk.Label();
			this.lblNotes.Name = "lblNotes";
			this.lblNotes.LabelProp = global::Mono.Unix.Catalog.GetString("notes:");
			this.table1.Add(this.lblNotes);
			global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table1[this.lblNotes]));
			w12.TopAttach = ((uint)(1));
			w12.BottomAttach = ((uint)(2));
			w12.XOptions = ((global::Gtk.AttachOptions)(4));
			w12.YOptions = ((global::Gtk.AttachOptions)(4));
			this.hbox2.Add(this.table1);
			global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.table1]));
			w13.Position = 0;
			// Container child hbox2.Gtk.Box+BoxChild
			this.vbox3 = new global::Gtk.VBox();
			this.vbox3.Name = "vbox3";
			this.vbox3.Spacing = 6;
			// Container child vbox3.Gtk.Box+BoxChild
			this.bttnAddEquipment = new global::Gtk.Button();
			this.bttnAddEquipment.CanFocus = true;
			this.bttnAddEquipment.Name = "bttnAddEquipment";
			this.bttnAddEquipment.UseUnderline = true;
			this.bttnAddEquipment.Label = global::Mono.Unix.Catalog.GetString("Add");
			this.vbox3.Add(this.bttnAddEquipment);
			global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnAddEquipment]));
			w14.Position = 0;
			w14.Expand = false;
			w14.Fill = false;
			// Container child vbox3.Gtk.Box+BoxChild
			this.bttnEditEquipment = new global::Gtk.Button();
			this.bttnEditEquipment.Sensitive = false;
			this.bttnEditEquipment.CanFocus = true;
			this.bttnEditEquipment.Name = "bttnEditEquipment";
			this.bttnEditEquipment.UseUnderline = true;
			this.bttnEditEquipment.Label = global::Mono.Unix.Catalog.GetString("Edit");
			this.vbox3.Add(this.bttnEditEquipment);
			global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnEditEquipment]));
			w15.Position = 1;
			w15.Expand = false;
			w15.Fill = false;
			// Container child vbox3.Gtk.Box+BoxChild
			this.bttnReplaceEquipment = new global::Gtk.Button();
			this.bttnReplaceEquipment.Sensitive = false;
			this.bttnReplaceEquipment.CanFocus = true;
			this.bttnReplaceEquipment.Name = "bttnReplaceEquipment";
			this.bttnReplaceEquipment.UseUnderline = true;
			this.bttnReplaceEquipment.Label = global::Mono.Unix.Catalog.GetString("Replace");
			this.vbox3.Add(this.bttnReplaceEquipment);
			global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnReplaceEquipment]));
			w16.Position = 2;
			w16.Expand = false;
			w16.Fill = false;
			// Container child vbox3.Gtk.Box+BoxChild
			this.bttnRemoveEquipment = new global::Gtk.Button();
			this.bttnRemoveEquipment.Sensitive = false;
			this.bttnRemoveEquipment.CanFocus = true;
			this.bttnRemoveEquipment.Name = "bttnRemoveEquipment";
			this.bttnRemoveEquipment.UseUnderline = true;
			this.bttnRemoveEquipment.Label = global::Mono.Unix.Catalog.GetString("Remove");
			this.vbox3.Add(this.bttnRemoveEquipment);
			global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnRemoveEquipment]));
			w17.Position = 3;
			w17.Expand = false;
			w17.Fill = false;
			this.hbox2.Add(this.vbox3);
			global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.vbox3]));
			w18.Position = 1;
			w18.Expand = false;
			w18.Fill = false;
			this.vbox1.Add(this.hbox2);
			global::Gtk.Box.BoxChild w19 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox2]));
			w19.Position = 3;
			w19.Expand = false;
			w19.Fill = false;
			this.Add(this.vbox1);
			if ((this.Child != null))
			{
				this.Child.ShowAll();
			}
			this.Show();
			this.unitName.FocusOutEvent += new global::Gtk.FocusOutEventHandler(this.OnUnitNameFocusOut);
			this.unitName.KeyPressEvent += new global::Gtk.KeyPressEventHandler(this.OnUnitNameKeyPress);
			this.unitSize.FocusOutEvent += new global::Gtk.FocusOutEventHandler(this.OnUnitSizeFocusOut);
			this.unitSize.KeyPressEvent += new global::Gtk.KeyPressEventHandler(this.OnUnitSizeKeyPress);
			this.bttnAddEquipment.Clicked += new global::System.EventHandler(this.OnBttnAddEquipmentClicked);
			this.bttnRemoveEquipment.Clicked += new global::System.EventHandler(this.HandleRemoveButtonActivated);
		}
	}
}