Mercurial > repos > IBBoard.WarFoundry.GUI.GTK
changeset 51:dafbd432ca23
Re #60: Add UI to add/remove/edit weapons in GTK
* Start to implement Add functionality using a new abstraction concept that keeps the UI dumb and keeps the logic in a cross-toolkit controller
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 21 Aug 2010 20:00:03 +0000 |
parents | d2f4fcc28254 |
children | 4bad8cb3f889 |
files | FrmAddEquipment.cs IBBoard.WarFoundry.GUI.GTK.csproj IBBoard.WarFoundry.GUI.GTK.sln UIControl/AddEquipmentUIControl.cs UIControl/Interfaces/IAddEquipmentUI.cs Widgets/UnitDisplayWidget.cs gtk-gui/IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget.cs gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment.cs gtk-gui/gui.stetic |
diffstat | 9 files changed, 356 insertions(+), 38 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FrmAddEquipment.cs Sat Aug 21 20:00:03 2010 +0000 @@ -0,0 +1,39 @@ +// This file (FrmAddEquipment.cs) is a part of the IBBoard.WarFoundry.GUI.GTK project and is copyright 2010 IBBoard +// +// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. +using System; +using IBBoard.WarFoundry.GUI.GTK.UIControl.Interfaces; +using IBBoard.WarFoundry.API.Objects; +namespace IBBoard.WarFoundry.GUI.GTK +{ + public partial class FrmAddEquipment : Gtk.Dialog, IAddEquipmentUI + { + public FrmAddEquipment() + { + this.Build(); + } + + public event SingleArgMethodInvoker<UnitEquipmentItem> UnitEquipmentItemChoiceChanged; + + public void SetUnitEquipmentItems(UnitEquipmentItem[] items) + { + throw new NotImplementedException(); + } + + public void SetUnitEquipmentLimits(bool isRatioLimit, double minPercent, double maxPercent, int minNumber, int maxNumber) + { + throw new NotImplementedException(); + } + + public void SetUnitEquipmentLimitsEnabled(bool isEnabled) + { + throw new NotImplementedException(); + } + + public void ShowControl() + { + throw new NotImplementedException(); + } + } +} +
--- a/IBBoard.WarFoundry.GUI.GTK.csproj Sun Aug 15 16:02:49 2010 +0000 +++ b/IBBoard.WarFoundry.GUI.GTK.csproj Sat Aug 21 20:00:03 2010 +0000 @@ -50,6 +50,10 @@ <Compile Include="gtk-gui\IBBoard.WarFoundry.GTK.FrmNewArmy.cs" /> <Compile Include="gtk-gui\IBBoard.WarFoundry.GTK.FrmNewUnit.cs" /> <Compile Include="gtk-gui\IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget.cs" /> + <Compile Include="UIControl\AddEquipmentUIControl.cs" /> + <Compile Include="UIControl\Interfaces\IAddEquipmentUI.cs" /> + <Compile Include="FrmAddEquipment.cs" /> + <Compile Include="gtk-gui\IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment.cs" /> </ItemGroup> <ItemGroup> <Content Include="App.png" /> @@ -103,4 +107,8 @@ <LogicalName>App.ico</LogicalName> </EmbeddedResource> </ItemGroup> + <ItemGroup> + <Folder Include="UIControl\" /> + <Folder Include="UIControl\Interfaces\" /> + </ItemGroup> </Project> \ No newline at end of file
--- a/IBBoard.WarFoundry.GUI.GTK.sln Sun Aug 15 16:02:49 2010 +0000 +++ b/IBBoard.WarFoundry.GUI.GTK.sln Sat Aug 21 20:00:03 2010 +0000 @@ -19,6 +19,10 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IBBoard.Tests", "..\IBBoard.Tests\IBBoard.Tests.csproj", "{4160F7B6-4CFA-41FC-B5D7-5C9AE06FEBA7}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IBBoard.NUnit", "..\IBBoard.NUnit\IBBoard.NUnit.csproj", "{C52AFD32-B869-4E14-AACE-2846AD2CC742}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IBBoard.NUnit.Tests", "..\IBBoard.NUnit.Tests\IBBoard.NUnit.Tests.csproj", "{2025A316-8377-4454-807C-3C4ED02DF4D5}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|x86 = Debug|x86 @@ -33,6 +37,10 @@ {182E4A7C-7CFB-4337-A9AD-AB2DCA054A53}.Debug|x86.Build.0 = Debug|Any CPU {182E4A7C-7CFB-4337-A9AD-AB2DCA054A53}.Release|x86.ActiveCfg = Release|Any CPU {182E4A7C-7CFB-4337-A9AD-AB2DCA054A53}.Release|x86.Build.0 = Release|Any CPU + {2025A316-8377-4454-807C-3C4ED02DF4D5}.Debug|x86.ActiveCfg = Debug|Any CPU + {2025A316-8377-4454-807C-3C4ED02DF4D5}.Debug|x86.Build.0 = Debug|Any CPU + {2025A316-8377-4454-807C-3C4ED02DF4D5}.Release|x86.ActiveCfg = Release|Any CPU + {2025A316-8377-4454-807C-3C4ED02DF4D5}.Release|x86.Build.0 = Release|Any CPU {3BBDF326-7128-406C-85DF-EF049633E602}.Debug|x86.ActiveCfg = Debug|Any CPU {3BBDF326-7128-406C-85DF-EF049633E602}.Debug|x86.Build.0 = Debug|Any CPU {3BBDF326-7128-406C-85DF-EF049633E602}.Release|x86.ActiveCfg = Release|Any CPU @@ -61,6 +69,10 @@ {B20E808D-878E-4F6D-B1E3-84A9A49905CB}.Debug|x86.Build.0 = Debug|Any CPU {B20E808D-878E-4F6D-B1E3-84A9A49905CB}.Release|x86.ActiveCfg = Release|Any CPU {B20E808D-878E-4F6D-B1E3-84A9A49905CB}.Release|x86.Build.0 = Release|Any CPU + {C52AFD32-B869-4E14-AACE-2846AD2CC742}.Debug|x86.ActiveCfg = Debug|x86 + {C52AFD32-B869-4E14-AACE-2846AD2CC742}.Debug|x86.Build.0 = Debug|x86 + {C52AFD32-B869-4E14-AACE-2846AD2CC742}.Release|x86.ActiveCfg = Release|x86 + {C52AFD32-B869-4E14-AACE-2846AD2CC742}.Release|x86.Build.0 = Release|x86 EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution StartupItem = IBBoard.WarFoundry.GUI.GTK.csproj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/UIControl/AddEquipmentUIControl.cs Sat Aug 21 20:00:03 2010 +0000 @@ -0,0 +1,64 @@ +// This file (AddEquipmentUI.cs) is a part of the IBBoard.WarFoundry.GUI.GTK project and is copyright 2010 IBBoard +// +// // The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. +using System; +using IBBoard.Commands; +using IBBoard.WarFoundry.API.Objects; +using IBBoard.WarFoundry.API.Util; +using IBBoard.WarFoundry.GUI.GTK.UIControl.Interfaces; +namespace IBBoard.WarFoundry.GUI.GTK.UIControl +{ + public class AddEquipmentUIControl + { + private Unit unit; + private CommandStack commandStack; + private IAddEquipmentUI ui; + + public AddEquipmentUIControl(Unit unit, CommandStack commandStack) + { + this.unit = unit; + this.commandStack = commandStack; + SetupUI(); + } + + private void SetupUI() + { + CreateEquipmentUI(); + UnitEquipmentItem[] items = Arrays.Subtract(UnitEquipmentUtil.GetAllowedEquipmentItems(unit), unit.GetEquipment()); + ui.SetUnitEquipmentItems(items); + ui.UnitEquipmentItemChoiceChanged += HandleUiUnitEquipmentItemChoiceChanged; + } + + //TODO Make abstract + protected void CreateEquipmentUI() + { + ui = new FrmAddEquipment(); + } + + private void HandleUiUnitEquipmentItemChoiceChanged(UnitEquipmentItem equip) + { + bool equipIsRatioLimit = UnitEquipmentUtil.IsEquipmentRatioLimited(unit, equip); + double maxPercent = RoundPercentage(UnitEquipmentUtil.GetMaxEquipmentPercentage(unit, equip)); + maxPercent = Math.Max(0, maxPercent); + double minPercent = RoundPercentage(UnitEquipmentUtil.GetMinEquipmentPercentage(unit, equip)); + minPercent = Math.Max(0, minPercent); + int maxNumber = UnitEquipmentUtil.GetMaxEquipmentCount(unit, equip); + maxNumber = Math.Max(0, maxNumber); + int minNumber = UnitEquipmentUtil.GetMinEquipmentCount(unit, equip); + minNumber = Math.Max(0, minNumber); + + } + + private double RoundPercentage(double percent) + { + return Math.Round(percent, 1); + } + + //TODO Make abstract + public void Show() + { + ((FrmAddEquipment)ui).ShowNow(); + } + } +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/UIControl/Interfaces/IAddEquipmentUI.cs Sat Aug 21 20:00:03 2010 +0000 @@ -0,0 +1,62 @@ +// This file (IAddEquipmentUI.cs) is a part of the IBBoard.WarFoundry.GUI.GTK project and is copyright 2010 IBBoard +// +// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license. +using System; +using IBBoard.WarFoundry.API.Objects; +namespace IBBoard.WarFoundry.GUI.GTK.UIControl.Interfaces +{ + /// <summary> + /// The interface that UI components should implement to represent "Add Equipment" dialogs or system equivalents (e.g. console areas or HTML fragments) + /// </summary> + public interface IAddEquipmentUI + { + /// <summary> + /// Should be fired when unit equipment item choice changes. + /// </summary> + event SingleArgMethodInvoker<UnitEquipmentItem> UnitEquipmentItemChoiceChanged; + + + + /// <summary> + /// Sets the equipment items that should be displayed on the form + /// </summary> + /// <param name='items'> + /// The equipment items that should be displayed on the form + /// </param> + void SetUnitEquipmentItems(UnitEquipmentItem[] items); + + /// <summary> + /// Sets the limits for the currently selected equipment item + /// </summary> + /// <param name='isRatioLimit'> + /// <code>True</code> if the current limit is a ratio limit, else <code>false</code> for absolute limits + /// </param> + /// <param name='minPercent'> + /// The minimum limit as a percentage + /// </param> + /// <param name='maxPercent'> + /// The maximum limit as a percentage + /// </param> + /// <param name='minNumber'> + /// The minimum number as an absolute figure + /// </param> + /// <param name='maxNumber'> + /// The maximum number as an absolute figure + /// </param> + void SetUnitEquipmentLimits(bool isRatioLimit, double minPercent, double maxPercent, int minNumber, int maxNumber); + + /// <summary> + /// Sets whether the unit equipment limit UI components should be enabled and able to accept input. + /// </summary> + /// <param name='isEnabled'> + /// <code>True</code> if the UI components should accept input, else <code>false</code> + /// </param> + void SetUnitEquipmentLimitsEnabled(bool isEnabled); + + /// <summary> + /// Shows the control and awaits a user action (close or okay) + /// </summary> + void ShowControl(); + } +} +
--- a/Widgets/UnitDisplayWidget.cs Sun Aug 15 16:02:49 2010 +0000 +++ b/Widgets/UnitDisplayWidget.cs Sat Aug 21 20:00:03 2010 +0000 @@ -9,6 +9,7 @@ using IBBoard.WarFoundry.API; using IBBoard.WarFoundry.API.Objects; using IBBoard.WarFoundry.API.Commands; +using IBBoard.WarFoundry.GUI.GTK.UIControl; namespace IBBoard.WarFoundry.GTK.Widgets { @@ -107,7 +108,7 @@ [GLib.ConnectBefore ()] protected virtual void OnUnitSizeKeyPress (object o, Gtk.KeyPressEventArgs args) { - if (args.Event.Key == Gdk.Key.Return) + if (args.Event.Key == Gdk.Key.Return || args.Event.Key == Gdk.Key.KP_Enter) { SetNewUnitSize(); } @@ -138,11 +139,23 @@ private void SetNewUnitName() { - if (unitName.Text!=unit.Name) + if (unitName.Text != unit.Name) { SetNameCommand cmd = new SetNameCommand(unit, unitName.Text); stack.Execute(cmd); } } + + private void OnBttnAddEquipmentActivated(object sender, System.EventArgs e) + { + Console.WriteLine("Add button clicked"); + AddEquipment(); + } + + private void AddEquipment() + { + AddEquipmentUIControl addEquipment = new AddEquipmentUIControl(unit, stack); + addEquipment.Show(); + } } }
--- a/gtk-gui/IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget.cs Sun Aug 15 16:02:49 2010 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget.cs Sat Aug 21 20:00:03 2010 +0000 @@ -34,13 +34,13 @@ private global::Gtk.VBox vbox3; - private global::Gtk.Button bttnAddOptional; + private global::Gtk.Button bttnAddEquipment; - private global::Gtk.Button bttnEditOptional; + private global::Gtk.Button bttnEditEquipment; - private global::Gtk.Button bttnReplace; + private global::Gtk.Button bttnReplaceEquipment; - private global::Gtk.Button bttnRemove; + private global::Gtk.Button bttnRemoveEquipment; protected virtual void Build() { @@ -162,46 +162,46 @@ this.vbox3.Name = "vbox3"; this.vbox3.Spacing = 6; // Container child vbox3.Gtk.Box+BoxChild - this.bttnAddOptional = new global::Gtk.Button(); - this.bttnAddOptional.CanFocus = true; - this.bttnAddOptional.Name = "bttnAddOptional"; - this.bttnAddOptional.UseUnderline = true; - this.bttnAddOptional.Label = global::Mono.Unix.Catalog.GetString("Add"); - this.vbox3.Add(this.bttnAddOptional); - global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnAddOptional])); + 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 w13 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnAddEquipment])); w13.Position = 0; w13.Expand = false; w13.Fill = false; // Container child vbox3.Gtk.Box+BoxChild - this.bttnEditOptional = new global::Gtk.Button(); - this.bttnEditOptional.CanFocus = true; - this.bttnEditOptional.Name = "bttnEditOptional"; - this.bttnEditOptional.UseUnderline = true; - this.bttnEditOptional.Label = global::Mono.Unix.Catalog.GetString("Edit"); - this.vbox3.Add(this.bttnEditOptional); - global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnEditOptional])); + this.bttnEditEquipment = new global::Gtk.Button(); + 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 w14 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnEditEquipment])); w14.Position = 1; w14.Expand = false; w14.Fill = false; // Container child vbox3.Gtk.Box+BoxChild - this.bttnReplace = new global::Gtk.Button(); - this.bttnReplace.CanFocus = true; - this.bttnReplace.Name = "bttnReplace"; - this.bttnReplace.UseUnderline = true; - this.bttnReplace.Label = global::Mono.Unix.Catalog.GetString("Replace"); - this.vbox3.Add(this.bttnReplace); - global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnReplace])); + this.bttnReplaceEquipment = new global::Gtk.Button(); + 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 w15 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnReplaceEquipment])); w15.Position = 2; w15.Expand = false; w15.Fill = false; // Container child vbox3.Gtk.Box+BoxChild - this.bttnRemove = new global::Gtk.Button(); - this.bttnRemove.CanFocus = true; - this.bttnRemove.Name = "bttnRemove"; - this.bttnRemove.UseUnderline = true; - this.bttnRemove.Label = global::Mono.Unix.Catalog.GetString("Remove"); - this.vbox3.Add(this.bttnRemove); - global::Gtk.Box.BoxChild w16 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnRemove])); + this.bttnRemoveEquipment = new global::Gtk.Button(); + 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 w16 = ((global::Gtk.Box.BoxChild)(this.vbox3[this.bttnRemoveEquipment])); w16.Position = 3; w16.Expand = false; w16.Fill = false; @@ -226,6 +226,7 @@ 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.Activated += new global::System.EventHandler(this.OnBttnAddEquipmentActivated); } } }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment.cs Sat Aug 21 20:00:03 2010 +0000 @@ -0,0 +1,61 @@ + +// This file has been generated by the GUI designer. Do not modify. +namespace IBBoard.WarFoundry.GUI.GTK +{ + public partial class FrmAddEquipment + { + private global::Gtk.Button buttonCancel; + + private global::Gtk.Button buttonOk; + + protected virtual void Build() + { + global::Stetic.Gui.Initialize(this); + // Widget IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment + this.Name = "IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment"; + this.WindowPosition = ((global::Gtk.WindowPosition)(4)); + // Internal child IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment.VBox + global::Gtk.VBox w1 = this.VBox; + w1.Name = "dialog1_VBox"; + w1.BorderWidth = ((uint)(2)); + // Internal child IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment.ActionArea + global::Gtk.HButtonBox w2 = this.ActionArea; + w2.Name = "dialog1_ActionArea"; + w2.Spacing = 10; + w2.BorderWidth = ((uint)(5)); + w2.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); + // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild + this.buttonCancel = new global::Gtk.Button(); + this.buttonCancel.CanDefault = true; + this.buttonCancel.CanFocus = true; + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.UseStock = true; + this.buttonCancel.UseUnderline = true; + this.buttonCancel.Label = "gtk-cancel"; + this.AddActionWidget(this.buttonCancel, -6); + global::Gtk.ButtonBox.ButtonBoxChild w3 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w2[this.buttonCancel])); + w3.Expand = false; + w3.Fill = false; + // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild + this.buttonOk = new global::Gtk.Button(); + this.buttonOk.CanDefault = true; + this.buttonOk.CanFocus = true; + this.buttonOk.Name = "buttonOk"; + this.buttonOk.UseStock = true; + this.buttonOk.UseUnderline = true; + this.buttonOk.Label = "gtk-ok"; + this.AddActionWidget(this.buttonOk, -5); + global::Gtk.ButtonBox.ButtonBoxChild w4 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w2[this.buttonOk])); + w4.Position = 1; + w4.Expand = false; + w4.Fill = false; + if ((this.Child != null)) + { + this.Child.ShowAll(); + } + this.DefaultWidth = 400; + this.DefaultHeight = 300; + this.Show(); + } + } +}
--- a/gtk-gui/gui.stetic Sun Aug 15 16:02:49 2010 +0000 +++ b/gtk-gui/gui.stetic Sat Aug 21 20:00:03 2010 +0000 @@ -868,12 +868,13 @@ <property name="MemberName" /> <property name="Spacing">6</property> <child> - <widget class="Gtk.Button" id="bttnAddOptional"> + <widget class="Gtk.Button" id="bttnAddEquipment"> <property name="MemberName" /> <property name="CanFocus">True</property> <property name="Type">TextOnly</property> <property name="Label" translatable="yes">Add</property> <property name="UseUnderline">True</property> + <signal name="Activated" handler="OnBttnAddEquipmentActivated" /> </widget> <packing> <property name="Position">0</property> @@ -883,7 +884,7 @@ </packing> </child> <child> - <widget class="Gtk.Button" id="bttnEditOptional"> + <widget class="Gtk.Button" id="bttnEditEquipment"> <property name="MemberName" /> <property name="CanFocus">True</property> <property name="Type">TextOnly</property> @@ -898,7 +899,7 @@ </packing> </child> <child> - <widget class="Gtk.Button" id="bttnReplace"> + <widget class="Gtk.Button" id="bttnReplaceEquipment"> <property name="MemberName" /> <property name="CanFocus">True</property> <property name="Type">TextOnly</property> @@ -913,7 +914,7 @@ </packing> </child> <child> - <widget class="Gtk.Button" id="bttnRemove"> + <widget class="Gtk.Button" id="bttnRemoveEquipment"> <property name="MemberName" /> <property name="CanFocus">True</property> <property name="Type">TextOnly</property> @@ -956,4 +957,61 @@ </widget> </child> </widget> + <widget class="Gtk.Dialog" id="IBBoard.WarFoundry.GUI.GTK.FrmAddEquipment" design-size="400 300"> + <property name="MemberName" /> + <property name="WindowPosition">CenterOnParent</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="BorderWidth">2</property> + <child> + <placeholder /> + </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> </stetic-interface> \ No newline at end of file