Przeglądaj źródła

start UnitEditor

mikymod 11 lat temu
rodzic
commit
be35fb5567

+ 20 - 0
tools/gui/UnitEditor/UnitEditor.sln

@@ -0,0 +1,20 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitEditor", "UnitEditor\UnitEditor.csproj", "{5F034BDB-0B44-4ED5-A95A-72BF1701F05C}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|x86 = Debug|x86
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{5F034BDB-0B44-4ED5-A95A-72BF1701F05C}.Debug|x86.ActiveCfg = Debug|x86
+		{5F034BDB-0B44-4ED5-A95A-72BF1701F05C}.Debug|x86.Build.0 = Debug|x86
+		{5F034BDB-0B44-4ED5-A95A-72BF1701F05C}.Release|x86.ActiveCfg = Release|x86
+		{5F034BDB-0B44-4ED5-A95A-72BF1701F05C}.Release|x86.Build.0 = Release|x86
+	EndGlobalSection
+	GlobalSection(MonoDevelopProperties) = preSolution
+		StartupItem = UnitEditor\UnitEditor.csproj
+	EndGlobalSection
+EndGlobal

+ 54 - 0
tools/gui/UnitEditor/UnitEditor/MainMenu.cs

@@ -0,0 +1,54 @@
+using System;
+using Gtk;
+
+namespace UnitEditor
+{
+	[System.ComponentModel.ToolboxItem (true)]
+	public partial class MainMenu : Gtk.EventBox
+	{
+		public MenuBar instance;
+
+		public MainMenu ()
+		{
+			instance = new MenuBar ();
+
+			Menu file_menu = new Menu ();
+
+			MenuItem file_item = new MenuItem("File");
+			file_item.Submenu = file_menu;
+
+			MenuItem exit_item = new MenuItem("Exit");
+			exit_item.Activated += new EventHandler (file_chooser_cb);
+			file_menu.Append (exit_item);
+
+			instance.Append (file_item);
+
+			ShowAll ();
+		}
+
+		static void exit_cb (object o, EventArgs args)
+		{
+			Application.Quit ();
+		}
+
+		static void file_chooser_cb(object sender, System.EventArgs e)
+		{
+			Gtk.FileChooserDialog fc = new Gtk.FileChooserDialog("Open file", null, FileChooserAction.Open);
+			fc.AddButton(Stock.Cancel, ResponseType.Cancel);
+			fc.AddButton(Stock.Open, ResponseType.Ok);
+			fc.Filter = new FileFilter();
+			fc.Filter.AddPattern("*.unit");
+			fc.Filter.AddPattern("*.material");
+			fc.Filter.AddPattern("*.physics");
+
+			if (fc.Run() == (int)ResponseType.Ok)
+			{
+				Console.WriteLine(fc.Filename);
+			}
+
+			//Don't forget to call Destroy() or the FileChooserDialog window won't get closed.
+			fc.Destroy();
+		}
+	}
+}
+

+ 32 - 0
tools/gui/UnitEditor/UnitEditor/MainWindow.cs

@@ -0,0 +1,32 @@
+using System;
+using System.Collections.Generic;
+using Gtk;
+
+public partial class MainWindow: Gtk.Window
+{
+	public MainWindow () : base (Gtk.WindowType.Toplevel)
+	{
+		Build ();
+
+		VBox box = new VBox (false, 2);
+
+		UnitEditor.MainMenu mb = new UnitEditor.MainMenu ();
+		box.PackStart(mb.instance, false, false, 0);
+
+		List<UnitEditor.Renderable> renderables = new List<UnitEditor.Renderable> ();
+		renderables.Add (new UnitEditor.Renderable ("a", "b", "c", true));
+
+		UnitEditor.RenderablesList renderables_list = new UnitEditor.RenderablesList (renderables);
+		box.PackStart(renderables_list, false, false, 0);
+
+		Add (box);
+
+		ShowAll ();
+	}
+
+	protected void OnDeleteEvent (object sender, DeleteEventArgs a)
+	{
+		Application.Quit ();
+		a.RetVal = true;
+	}
+}

+ 18 - 0
tools/gui/UnitEditor/UnitEditor/Program.cs

@@ -0,0 +1,18 @@
+using System;
+using Gtk;
+
+namespace UnitEditor
+{
+	class MainClass
+	{
+		public static void Main (string[] args)
+		{
+			Application.Init ();
+			MainWindow win = new MainWindow ();
+
+			win.ShowAll ();
+			Application.Run ();
+		}
+	}
+
+}

+ 22 - 0
tools/gui/UnitEditor/UnitEditor/Properties/AssemblyInfo.cs

@@ -0,0 +1,22 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+// Information about this assembly is defined by the following attributes.
+// Change them to the values specific to your project.
+[assembly: AssemblyTitle ("UnitEditor")]
+[assembly: AssemblyDescription ("")]
+[assembly: AssemblyConfiguration ("")]
+[assembly: AssemblyCompany ("")]
+[assembly: AssemblyProduct ("")]
+[assembly: AssemblyCopyright ("mikymod")]
+[assembly: AssemblyTrademark ("")]
+[assembly: AssemblyCulture ("")]
+// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
+// The form "{Major}.{Minor}.*" will automatically update the build and revision,
+// and "{Major}.{Minor}.{Build}.*" will update just the revision.
+[assembly: AssemblyVersion ("1.0.*")]
+// The following attributes are used to specify the signing key for the assembly,
+// if desired. See the Mono documentation for more information about signing.
+//[assembly: AssemblyDelaySign(false)]
+//[assembly: AssemblyKeyFile("")]
+

+ 152 - 0
tools/gui/UnitEditor/UnitEditor/RenderablesList.cs

@@ -0,0 +1,152 @@
+using System;
+using System.Collections.Generic;
+using Gtk;
+
+namespace UnitEditor
+{
+
+	[System.ComponentModel.ToolboxItem (true)]
+	public partial class RenderablesList : Gtk.EventBox
+	{
+		private ListStore renderablesStore;
+		private List<Renderable> renderables;
+
+		public RenderablesList (List<Renderable> renderables)
+		{
+			this.renderables = new List<Renderable> (renderables);
+			this.renderablesStore = new ListStore (typeof (string), typeof (string), typeof(string), typeof(bool));
+
+			// Create our TreeView
+			TreeView tree = new TreeView ();
+
+			// Add our tree to the window
+			this.Add (tree);
+
+			// Create a column for the artist name
+			TreeViewColumn nodeColumn = new TreeViewColumn ();
+			nodeColumn.Title = "Node";
+			nodeColumn.Alignment = 0.5f;
+
+			// Create a column for the song title
+			TreeViewColumn typeColumn = new TreeViewColumn ();
+			typeColumn.Title = "Type";
+			typeColumn.Alignment = 0.5f;
+
+			// Create a column for the artist name
+			TreeViewColumn resourceColumn = new TreeViewColumn ();
+			resourceColumn.Title = "Resource";
+			resourceColumn.Alignment = 0.5f;
+
+			// Create a column for the song title
+			TreeViewColumn visibleColumn = new TreeViewColumn ();
+			visibleColumn.Title = "Visible";
+			visibleColumn.Alignment = 0.5f;
+
+			// Assign the model to the TreeView
+			tree.Model = renderablesStore;
+
+			// Create the text cell that will display the node and add cell to the column
+			CellRendererText nodeCell = new CellRendererText ();
+			nodeCell.Editable = true;
+			nodeCell.Edited += delegate (object o, EditedArgs e) { 
+				TreePath path = new TreePath (e.Path);
+				TreeIter iter;
+				renderablesStore.GetIter (out iter, path);
+				int i = path.Indices[0];
+
+				Renderable r = renderables[i];
+				r.node = e.NewText;
+				renderablesStore.SetValue (iter, 0, r.node);
+				Console.WriteLine("node:{0}, type:{1}, resource:{2}, visible:{3}", r.node, r.type, r.resource, r.visible);
+			};
+			nodeColumn.PackStart (nodeCell, true);
+
+			CellRendererText typeCell = new CellRendererText ();
+			typeCell.Editable = true;
+			typeCell.Edited += delegate (object o, EditedArgs e) { 
+				TreePath path = new TreePath (e.Path);
+				TreeIter iter;
+				renderablesStore.GetIter (out iter, path);
+				int i = path.Indices[0];
+
+				Renderable r = renderables[i];
+				r.type = e.NewText;
+				renderablesStore.SetValue (iter, 1, r.type);
+				Console.WriteLine("node:{0}, type:{1}, resource:{2}, visible:{3}", r.node, r.type, r.resource, r.visible);
+			};
+			typeColumn.PackStart (typeCell, true);
+
+			CellRendererText resourceCell = new CellRendererText ();
+			resourceCell.Editable = true;
+			resourceCell.Edited += delegate (object o, EditedArgs e) { 
+				TreePath path = new TreePath (e.Path);
+				TreeIter iter;
+				renderablesStore.GetIter (out iter, path);
+				int i = path.Indices[0];
+
+				Renderable r = renderables[i];
+				r.resource = e.NewText;
+				renderablesStore.SetValue (iter, 2, r.resource);
+				Console.WriteLine("node:{0}, type:{1}, resource:{2}, visible:{3}", r.node, r.type, r.resource, r.visible);
+			};
+			resourceColumn.PackStart (resourceCell, true);
+
+			CellRendererToggle visibleCell = new CellRendererToggle ();
+			visibleCell.Activatable = true;
+			visibleCell.Toggled += delegate (object o, ToggledArgs e) {
+				TreePath path = new TreePath (e.Path);
+				TreeIter iter;
+				renderablesStore.GetIter (out iter, path);
+				int i = path.Indices[0];
+
+				Renderable r = renderables[i];
+				bool old = (bool) renderablesStore.GetValue(iter, 3);
+				r.visible = !old;
+				renderablesStore.SetValue(iter, 3, !old);
+				Console.WriteLine("node:{0}, type:{1}, resource:{2}, visible:{3}", r.node, r.type, r.resource, r.visible);					
+			};
+			visibleColumn.PackStart (visibleCell, true);
+
+			// Add the columns to the TreeView
+			nodeColumn.AddAttribute (nodeCell, "text", 0);
+			typeColumn.AddAttribute (typeCell, "text", 1);
+			resourceColumn.AddAttribute (resourceCell, "text", 2);
+			visibleColumn.AddAttribute (visibleCell, "active", 3);
+			tree.AppendColumn (nodeColumn);
+			tree.AppendColumn (typeColumn);
+			tree.AppendColumn (resourceColumn);
+			tree.AppendColumn (visibleColumn);
+
+			create_model ();
+
+			// Show the window and everything on it
+			ShowAll ();
+		}
+
+		void create_model()
+		{
+			foreach (Renderable renderable in this.renderables.ToArray())
+			{
+				add_renderable(renderable);
+			}
+		}
+
+		public void add_renderable (Renderable r)
+		{
+			this.renderables.Add (r);
+			this.renderablesStore.AppendValues (r.node, r.type, r.resource, r.visible);
+		}
+
+
+		static void delete_event (object obj, DeleteEventArgs args)
+		{
+			Application.Quit();
+		}
+
+		static void exitbutton_event (object obj, ButtonPressEventArgs args)
+		{
+			Application.Quit();
+		}
+	}
+}
+

+ 21 - 0
tools/gui/UnitEditor/UnitEditor/Types.cs

@@ -0,0 +1,21 @@
+namespace UnitEditor
+{
+
+//------------------------------------------------------------------------------
+public class Renderable
+{
+	public Renderable(string node, string type, string resource, bool visible)
+	{
+		this.node = node;
+		this.type = type;
+		this.resource = resource;
+		this.visible = visible;
+	}
+
+	public string node { set; get; }
+	public string type { set; get; }
+	public string resource { set; get; }
+	public bool visible { set; get; }
+}
+
+} // namespace UnitEditor

+ 77 - 0
tools/gui/UnitEditor/UnitEditor/UnitEditor.csproj

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">x86</Platform>
+    <ProductVersion>10.0.0</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{5F034BDB-0B44-4ED5-A95A-72BF1701F05C}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>UnitEditor</RootNamespace>
+    <AssemblyName>UnitEditor</AssemblyName>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG;</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <PlatformTarget>x86</PlatformTarget>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <DebugType>full</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <ConsolePause>false</ConsolePause>
+    <PlatformTarget>x86</PlatformTarget>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="gtk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+      <SpecificVersion>False</SpecificVersion>
+    </Reference>
+    <Reference Include="gdk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+      <SpecificVersion>False</SpecificVersion>
+    </Reference>
+    <Reference Include="glib-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+      <SpecificVersion>False</SpecificVersion>
+    </Reference>
+    <Reference Include="glade-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+      <SpecificVersion>False</SpecificVersion>
+    </Reference>
+    <Reference Include="pango-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+      <SpecificVersion>False</SpecificVersion>
+    </Reference>
+    <Reference Include="atk-sharp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
+      <SpecificVersion>False</SpecificVersion>
+    </Reference>
+    <Reference Include="Mono.Posix" />
+    <Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=c7439020c8fedf87">
+      <Private>False</Private>
+      <Package>monodevelop</Package>
+    </Reference>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="gtk-gui\gui.stetic">
+      <LogicalName>gui.stetic</LogicalName>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="gtk-gui\generated.cs" />
+    <Compile Include="MainWindow.cs" />
+    <Compile Include="gtk-gui\MainWindow.cs" />
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="RenderablesList.cs" />
+    <Compile Include="gtk-gui\UnitEditor.RenderablesList.cs" />
+    <Compile Include="Types.cs" />
+    <Compile Include="MainMenu.cs" />
+    <Compile Include="gtk-gui\UnitEditor.MainMenu.cs" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+</Project>

+ 31 - 0
tools/gui/UnitEditor/UnitEditor/gtk-gui/MainWindow.cs

@@ -0,0 +1,31 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+
+public partial class MainWindow
+{
+	private global::Gtk.UIManager UIManager;
+	private global::Gtk.Action FileAction;
+
+	protected virtual void Build ()
+	{
+		global::Stetic.Gui.Initialize (this);
+		// Widget MainWindow
+		this.UIManager = new global::Gtk.UIManager ();
+		global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup ("Default");
+		this.FileAction = new global::Gtk.Action ("FileAction", global::Mono.Unix.Catalog.GetString ("File"), null, null);
+		this.FileAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("File");
+		w1.Add (this.FileAction, null);
+		this.UIManager.InsertActionGroup (w1, 0);
+		this.AddAccelGroup (this.UIManager.AccelGroup);
+		this.Name = "MainWindow";
+		this.Title = global::Mono.Unix.Catalog.GetString ("MainWindow");
+		this.WindowPosition = ((global::Gtk.WindowPosition)(4));
+		if ((this.Child != null)) {
+			this.Child.ShowAll ();
+		}
+		this.DefaultWidth = 400;
+		this.DefaultHeight = 300;
+		this.Show ();
+		this.DeleteEvent += new global::Gtk.DeleteEventHandler (this.OnDeleteEvent);
+	}
+}

+ 19 - 0
tools/gui/UnitEditor/UnitEditor/gtk-gui/UnitEditor.MainMenu.cs

@@ -0,0 +1,19 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace UnitEditor
+{
+	public partial class MainMenu
+	{
+		protected virtual void Build ()
+		{
+			global::Stetic.Gui.Initialize (this);
+			// Widget UnitEditor.MainMenu
+			global::Stetic.BinContainer.Attach (this);
+			this.Name = "UnitEditor.MainMenu";
+			if ((this.Child != null)) {
+				this.Child.ShowAll ();
+			}
+			this.Hide ();
+		}
+	}
+}

+ 19 - 0
tools/gui/UnitEditor/UnitEditor/gtk-gui/UnitEditor.RenderablesList.cs

@@ -0,0 +1,19 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace UnitEditor
+{
+	public partial class RenderablesList
+	{
+		protected virtual void Build ()
+		{
+			global::Stetic.Gui.Initialize (this);
+			// Widget UnitEditor.RenderablesList
+			global::Stetic.BinContainer.Attach (this);
+			this.Name = "UnitEditor.RenderablesList";
+			if ((this.Child != null)) {
+				this.Child.ShowAll ();
+			}
+			this.Hide ();
+		}
+	}
+}

+ 81 - 0
tools/gui/UnitEditor/UnitEditor/gtk-gui/generated.cs

@@ -0,0 +1,81 @@
+
+// This file has been generated by the GUI designer. Do not modify.
+namespace Stetic
+{
+	internal class Gui
+	{
+		private static bool initialized;
+
+		internal static void Initialize (Gtk.Widget iconRenderer)
+		{
+			if ((Stetic.Gui.initialized == false)) {
+				Stetic.Gui.initialized = true;
+			}
+		}
+	}
+
+	internal class BinContainer
+	{
+		private Gtk.Widget child;
+		private Gtk.UIManager uimanager;
+
+		public static BinContainer Attach (Gtk.Bin bin)
+		{
+			BinContainer bc = new BinContainer ();
+			bin.SizeRequested += new Gtk.SizeRequestedHandler (bc.OnSizeRequested);
+			bin.SizeAllocated += new Gtk.SizeAllocatedHandler (bc.OnSizeAllocated);
+			bin.Added += new Gtk.AddedHandler (bc.OnAdded);
+			return bc;
+		}
+
+		private void OnSizeRequested (object sender, Gtk.SizeRequestedArgs args)
+		{
+			if ((this.child != null)) {
+				args.Requisition = this.child.SizeRequest ();
+			}
+		}
+
+		private void OnSizeAllocated (object sender, Gtk.SizeAllocatedArgs args)
+		{
+			if ((this.child != null)) {
+				this.child.Allocation = args.Allocation;
+			}
+		}
+
+		private void OnAdded (object sender, Gtk.AddedArgs args)
+		{
+			this.child = args.Widget;
+		}
+
+		public void SetUiManager (Gtk.UIManager uim)
+		{
+			this.uimanager = uim;
+			this.child.Realized += new System.EventHandler (this.OnRealized);
+		}
+
+		private void OnRealized (object sender, System.EventArgs args)
+		{
+			if ((this.uimanager != null)) {
+				Gtk.Widget w;
+				w = this.child.Toplevel;
+				if (((w != null) && typeof(Gtk.Window).IsInstanceOfType (w))) {
+					((Gtk.Window)(w)).AddAccelGroup (this.uimanager.AccelGroup);
+					this.uimanager = null;
+				}
+			}
+		}
+	}
+
+	internal class ActionGroups
+	{
+		public static Gtk.ActionGroup GetActionGroup (System.Type type)
+		{
+			return Stetic.ActionGroups.GetActionGroup (type.FullName);
+		}
+
+		public static Gtk.ActionGroup GetActionGroup (string name)
+		{
+			return null;
+		}
+	}
+}

+ 94 - 0
tools/gui/UnitEditor/UnitEditor/gtk-gui/gui.stetic

@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="utf-8"?>
+<stetic-interface>
+  <configuration>
+    <images-root-path>..</images-root-path>
+  </configuration>
+  <import>
+    <widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <widget-library name="../bin/Debug/UnitEditor.exe" internal="true" />
+  </import>
+  <widget class="Gtk.Window" id="MainWindow" design-size="400 300">
+    <action-group name="Default">
+      <action id="FileAction">
+        <property name="Type">Action</property>
+        <property name="Label" translatable="yes">File</property>
+        <property name="ShortLabel" translatable="yes">File</property>
+      </action>
+    </action-group>
+    <property name="MemberName" />
+    <property name="Title" translatable="yes">MainWindow</property>
+    <property name="WindowPosition">CenterOnParent</property>
+    <signal name="DeleteEvent" handler="OnDeleteEvent" />
+    <child>
+      <placeholder />
+    </child>
+  </widget>
+  <widget class="Gtk.Bin" id="UnitEditor.RenderablesList" design-size="300 300">
+    <property name="MemberName" />
+    <property name="Visible">False</property>
+    <child>
+      <placeholder />
+    </child>
+  </widget>
+  <widget class="Gtk.Bin" id="UnitEditor.MainMenu" design-size="672 37">
+    <action-group name="Default">
+      <action id="FileAction">
+        <property name="Type">Action</property>
+        <property name="Label" translatable="yes">File</property>
+        <property name="ShortLabel" translatable="yes">File</property>
+      </action>
+      <action id="EditAction">
+        <property name="Type">Action</property>
+        <property name="Label" translatable="yes">Edit</property>
+        <property name="ShortLabel" translatable="yes">Edit</property>
+      </action>
+      <action id="newAction">
+        <property name="Type">Action</property>
+        <property name="Label" translatable="yes">New</property>
+        <property name="ShortLabel" translatable="yes">New</property>
+        <property name="StockId">gtk-new</property>
+      </action>
+      <action id="openAction">
+        <property name="Type">Action</property>
+        <property name="Label" translatable="yes">Open</property>
+        <property name="ShortLabel" translatable="yes">Open</property>
+        <property name="StockId">gtk-open</property>
+      </action>
+      <action id="saveAction">
+        <property name="Type">Action</property>
+        <property name="Label" translatable="yes">Save</property>
+        <property name="ShortLabel" translatable="yes">Save</property>
+        <property name="StockId">gtk-save</property>
+      </action>
+      <action id="saveAsAction">
+        <property name="Type">Action</property>
+        <property name="Label" translatable="yes">Save as...</property>
+        <property name="ShortLabel" translatable="yes">Save as...</property>
+        <property name="StockId">gtk-save-as</property>
+      </action>
+      <action id="quitAction">
+        <property name="Type">Action</property>
+        <property name="Label" translatable="yes">Exit</property>
+        <property name="ShortLabel" translatable="yes">Exit</property>
+        <property name="StockId">gtk-quit</property>
+      </action>
+      <action id="FileAction1">
+        <property name="Type">Action</property>
+        <property name="Label" translatable="yes">File</property>
+        <property name="ShortLabel" translatable="yes">File</property>
+      </action>
+    </action-group>
+    <property name="MemberName" />
+    <property name="Visible">False</property>
+    <child>
+      <placeholder />
+    </child>
+  </widget>
+  <widget class="Gtk.Bin" id="UnitEditor.MainMenu" design-size="300 300">
+    <property name="MemberName" />
+    <property name="Visible">False</property>
+    <child>
+      <placeholder />
+    </child>
+  </widget>
+</stetic-interface>