From 5bf922da0b0512c4286e48e3046c6e7e25b3b2a1 Mon Sep 17 00:00:00 2001 From: alcexhim Date: Sat, 28 Jun 2014 21:19:36 -0400 Subject: [PATCH 1/8] Sleep the main thread while initialization executes (this may freeze splash screen, needs further testing) --- CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs b/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs index 98ea39bb..9c984bda 100644 --- a/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs +++ b/CSharp/Libraries/UniversalEditor.UserInterface/Engine.cs @@ -645,6 +645,11 @@ namespace UniversalEditor.UserInterface threadLoader.Start(); ShowSplashScreen(); + + while (threadLoader.ThreadState == System.Threading.ThreadState.Running) + { + System.Threading.Thread.Sleep (500); + } } protected virtual void InitializeInternal() { From adfd43180e7b9fce31b81cb6ccc1016012a0ee77 Mon Sep 17 00:00:00 2001 From: alcexhim Date: Sat, 28 Jun 2014 21:20:19 -0400 Subject: [PATCH 2/8] Removed userprefs (MonoDevelop) from Git repository --- CSharp/UniversalEditor.GTK.userprefs | 38 ---------------------------- 1 file changed, 38 deletions(-) delete mode 100644 CSharp/UniversalEditor.GTK.userprefs diff --git a/CSharp/UniversalEditor.GTK.userprefs b/CSharp/UniversalEditor.GTK.userprefs deleted file mode 100644 index ab7894a4..00000000 --- a/CSharp/UniversalEditor.GTK.userprefs +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 317cdc5c21ddee8e891ed35bb2e33d6b2df1ad53 Mon Sep 17 00:00:00 2001 From: alcexhim Date: Sat, 28 Jun 2014 21:25:12 -0400 Subject: [PATCH 3/8] Implement ExitApplication() for GTK engine --- .../Engines/UniversalEditor.Environments.GTK/GTKEngine.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/GTKEngine.cs b/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/GTKEngine.cs index d1510fff..8a4516a0 100644 --- a/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/GTKEngine.cs +++ b/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/GTKEngine.cs @@ -16,6 +16,11 @@ namespace UniversalEditor.Environments.GTK Application.Run (); } + public override void ExitApplication () + { + Application.Quit (); + } + protected override UniversalEditor.UserInterface.IHostApplicationWindow OpenWindowInternal (params string[] FileNames) { MainWindow mw = new MainWindow(); From 84653cbf40633eea3332fbb2a1e2f43e251f8690 Mon Sep 17 00:00:00 2001 From: alcexhim Date: Sat, 28 Jun 2014 21:25:27 -0400 Subject: [PATCH 4/8] Finish implementing CommandBars for GTK engine --- .../UniversalEditor.Environments.GTK/MainWindow.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/MainWindow.cs b/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/MainWindow.cs index b2aaf106..16935115 100644 --- a/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/MainWindow.cs +++ b/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/MainWindow.cs @@ -44,6 +44,8 @@ public partial class MainWindow: Gtk.Window, IHostApplicationWindow { menuItem = new Gtk.SeparatorMenuItem(); } + menuItem.Data.Add ("CommandItem", item); + menuItem.Activated += menuItem_Activated; if (menuItem != null) { @@ -57,6 +59,18 @@ public partial class MainWindow: Gtk.Window, IHostApplicationWindow } } } + + void menuItem_Activated (object sender, EventArgs e) + { + Gtk.MenuItem mi = (sender as Gtk.MenuItem); + CommandItem ci = (mi.Data["CommandItem"] as CommandItem); + if (ci is CommandReferenceCommandItem) + { + CommandReferenceCommandItem crci = (ci as CommandReferenceCommandItem); + Command cmd = Engine.CurrentEngine.Commands[crci.CommandID]; + cmd.Execute (); + } + } private Menu CreateCommandItemSubmenu(Command cmd) { Menu menu = new Menu(); From b74ad5c21401a05f6e69faafae6771380bb320da Mon Sep 17 00:00:00 2001 From: alcexhim Date: Sat, 28 Jun 2014 22:49:51 -0400 Subject: [PATCH 5/8] Updated namespace --- .../GTK/Engines/UniversalEditor.Environments.GTK/GTKEngine.cs | 2 +- ...{MainWindow.cs => UniversalEditor.Engines.GTK.MainWindow.cs} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/gtk-gui/{MainWindow.cs => UniversalEditor.Engines.GTK.MainWindow.cs} (100%) diff --git a/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/GTKEngine.cs b/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/GTKEngine.cs index 8a4516a0..43e50dd7 100644 --- a/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/GTKEngine.cs +++ b/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/GTKEngine.cs @@ -1,7 +1,7 @@ using System; using Gtk; -namespace UniversalEditor.Environments.GTK +namespace UniversalEditor.Engines.GTK { public class GTKEngine : UniversalEditor.UserInterface.Engine { diff --git a/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/gtk-gui/MainWindow.cs b/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/gtk-gui/UniversalEditor.Engines.GTK.MainWindow.cs similarity index 100% rename from CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/gtk-gui/MainWindow.cs rename to CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/gtk-gui/UniversalEditor.Engines.GTK.MainWindow.cs From 270097c844a6bfc5aed9fcb6812bf7981e2ac876 Mon Sep 17 00:00:00 2001 From: alcexhim Date: Sat, 28 Jun 2014 22:50:13 -0400 Subject: [PATCH 6/8] Updated namespace --- .../MainWindow.cs | 409 ++++++++++-------- 1 file changed, 219 insertions(+), 190 deletions(-) diff --git a/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/MainWindow.cs b/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/MainWindow.cs index 16935115..cd310d11 100644 --- a/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/MainWindow.cs +++ b/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/MainWindow.cs @@ -3,205 +3,234 @@ using Gtk; using UniversalEditor.UserInterface; -public partial class MainWindow: Gtk.Window, IHostApplicationWindow -{ - public MainWindow (): base (Gtk.WindowType.Toplevel) - { - Build (); - InitializeMenuBar(); - } - - private void InitializeMenuBar() - { - foreach (CommandItem item in Engine.CurrentEngine.MainMenu.Items) +namespace UniversalEditor.Engines.GTK +{ + public partial class MainWindow: Gtk.Window, IHostApplicationWindow + { + public MainWindow (): base (Gtk.WindowType.Toplevel) { - CreateCommandItem(item, null); + Build (); + InitializeMenuBar(); } - menubar1.ShowAll (); - } - private void CreateCommandItem(CommandItem item, Menu parentMenu) - { - Gtk.MenuItem menuItem = null; - if (item is CommandReferenceCommandItem) + private void InitializeMenuBar() { - CommandReferenceCommandItem crci = (item as CommandReferenceCommandItem); - Command cmd = Engine.CurrentEngine.Commands[crci.CommandID]; - if (cmd == null) + foreach (CommandItem item in Engine.CurrentEngine.MainMenu.Items) { - HostApplication.Messages.Add(HostApplicationMessageSeverity.Warning, "The command '" + crci.CommandID + "' was not found"); - return; + CreateCommandItem(item, null); } + menubar1.ShowAll (); + } + private void CreateCommandItem(CommandItem item, Menu parentMenu) + { + Gtk.MenuItem menuItem = null; - menuItem = new Gtk.MenuItem(cmd.Title); - if (cmd.Items.Count > 0) + if (item is CommandReferenceCommandItem) { - Menu submenu = CreateCommandItemSubmenu(cmd); - menuItem.Submenu = submenu; + CommandReferenceCommandItem crci = (item as CommandReferenceCommandItem); + Command cmd = Engine.CurrentEngine.Commands[crci.CommandID]; + if (cmd == null) + { + HostApplication.Messages.Add(HostApplicationMessageSeverity.Warning, "The command '" + crci.CommandID + "' was not found"); + return; + } + + menuItem = new Gtk.MenuItem(cmd.Title); + if (cmd.Items.Count > 0) + { + Menu submenu = CreateCommandItemSubmenu(cmd); + menuItem.Submenu = submenu; + } + } + else if (item is SeparatorCommandItem) + { + menuItem = new Gtk.SeparatorMenuItem(); + } + menuItem.Data.Add ("CommandItem", item); + menuItem.Activated += menuItem_Activated; + + if (menuItem != null) + { + if (parentMenu == null) + { + menubar1.Append(menuItem); + } + else + { + parentMenu.Append(menuItem); + } } } - else if (item is SeparatorCommandItem) - { - menuItem = new Gtk.SeparatorMenuItem(); - } - menuItem.Data.Add ("CommandItem", item); - menuItem.Activated += menuItem_Activated; - - if (menuItem != null) - { - if (parentMenu == null) - { - menubar1.Append(menuItem); - } - else - { - parentMenu.Append(menuItem); - } - } - } - - void menuItem_Activated (object sender, EventArgs e) - { - Gtk.MenuItem mi = (sender as Gtk.MenuItem); - CommandItem ci = (mi.Data["CommandItem"] as CommandItem); - if (ci is CommandReferenceCommandItem) - { - CommandReferenceCommandItem crci = (ci as CommandReferenceCommandItem); - Command cmd = Engine.CurrentEngine.Commands[crci.CommandID]; - cmd.Execute (); - } - } - private Menu CreateCommandItemSubmenu(Command cmd) - { - Menu menu = new Menu(); - if (Engine.CurrentEngine.MainMenu.EnableTearoff && cmd.EnableTearoff) - { - menu.Append(new TearoffMenuItem()); - } - foreach (CommandItem item in cmd.Items) - { - CreateCommandItem(item, menu); - } - return menu; - } - protected void OnDeleteEvent (object sender, DeleteEventArgs a) - { - Application.Quit (); - a.RetVal = true; + void menuItem_Activated (object sender, EventArgs e) + { + Gtk.MenuItem mi = (sender as Gtk.MenuItem); + CommandItem ci = (mi.Data["CommandItem"] as CommandItem); + if (ci is CommandReferenceCommandItem) + { + CommandReferenceCommandItem crci = (ci as CommandReferenceCommandItem); + Command cmd = Engine.CurrentEngine.Commands[crci.CommandID]; + cmd.Execute (); + } + } + private Menu CreateCommandItemSubmenu(Command cmd) + { + Menu menu = new Menu(); + if (Engine.CurrentEngine.MainMenu.EnableTearoff && cmd.EnableTearoff) + { + menu.Append(new TearoffMenuItem()); + } + foreach (CommandItem item in cmd.Items) + { + CreateCommandItem(item, menu); + } + return menu; + } + + protected void OnDeleteEvent (object sender, DeleteEventArgs a) + { + Application.Quit (); + a.RetVal = true; + } + + protected override bool OnFocusInEvent (Gdk.EventFocus evnt) + { + Engine.CurrentEngine.LastWindow = this; + return base.OnFocusInEvent(evnt); + } + + #region IHostApplicationWindow implementation + public event EventHandler WindowClosed; + + public void NewFile () + { + throw new System.NotImplementedException (); + } + + public void NewProject (bool combineObjects) + { + throw new System.NotImplementedException (); + } + + public void OpenFile () + { + FileChooserDialog dlg = new FileChooserDialog("Open File", this, FileChooserAction.Open, "Open", Gtk.ResponseType.Ok, "Cancel", Gtk.ResponseType.Cancel); + ResponseType result = (ResponseType) dlg.Run (); + + if (result != ResponseType.Ok) return; + + OpenFile (dlg.Filenames); + } + + public void OpenFile (params string[] FileNames) + { + foreach (string FileName in FileNames) + { + OpenFileInternal(FileName); + } + } + + private void OpenFileInternal(string FileName) + { + + + ObjectModelReference[] omrs = UniversalEditor.Common.Reflection.GetAvailableObjectModels(FileName); + ObjectModel om = (omrs[0].Create ()); + + FileAccessor fa = new FileAccessor(FileName); + + Document doc = new Document(om, df, fa); + } + + public void OpenProject (bool combineObjects) + { + throw new System.NotImplementedException (); + } + + public void OpenProject (string FileName, bool combineObjects) + { + throw new System.NotImplementedException (); + } + + public void SaveFile () + { + throw new System.NotImplementedException (); + } + + public void SaveFileAs () + { + throw new System.NotImplementedException (); + } + + public void SaveFileAs (string FileName, UniversalEditor.DataFormat df) + { + throw new System.NotImplementedException (); + } + + public void SaveProject () + { + throw new System.NotImplementedException (); + } + + public void SaveProjectAs () + { + throw new System.NotImplementedException (); + } + + public void SaveProjectAs (string FileName, UniversalEditor.DataFormat df) + { + throw new System.NotImplementedException (); + } + + public void SaveAll () + { + throw new System.NotImplementedException (); + } + + public void CloseFile () + { + throw new System.NotImplementedException (); + } + + public void CloseWindow () + { + throw new System.NotImplementedException (); + } + + public bool ShowOptionsDialog () + { + throw new System.NotImplementedException (); + } + + public void ToggleMenuItemEnabled (string menuItemName, bool enabled) + { + throw new System.NotImplementedException (); + } + + public void RefreshCommand (object nativeCommandObject) + { + throw new System.NotImplementedException (); + } + + public void UpdateStatus (string statusText) + { + throw new System.NotImplementedException (); + } + + public void UpdateProgress (bool visible) + { + throw new System.NotImplementedException (); + } + + public void UpdateProgress (int minimum, int maximium, int value) + { + throw new System.NotImplementedException (); + } + + public void ActivateWindow () + { + throw new System.NotImplementedException (); + } + #endregion } - - #region IHostApplicationWindow implementation - public event EventHandler WindowClosed; - - public void NewFile () - { - throw new System.NotImplementedException (); - } - - public void NewProject (bool combineObjects) - { - throw new System.NotImplementedException (); - } - - public void OpenFile () - { - throw new System.NotImplementedException (); - } - - public void OpenFile (params string[] FileNames) - { - throw new System.NotImplementedException (); - } - - public void OpenProject (bool combineObjects) - { - throw new System.NotImplementedException (); - } - - public void OpenProject (string FileName, bool combineObjects) - { - throw new System.NotImplementedException (); - } - - public void SaveFile () - { - throw new System.NotImplementedException (); - } - - public void SaveFileAs () - { - throw new System.NotImplementedException (); - } - - public void SaveFileAs (string FileName, UniversalEditor.DataFormat df) - { - throw new System.NotImplementedException (); - } - - public void SaveProject () - { - throw new System.NotImplementedException (); - } - - public void SaveProjectAs () - { - throw new System.NotImplementedException (); - } - - public void SaveProjectAs (string FileName, UniversalEditor.DataFormat df) - { - throw new System.NotImplementedException (); - } - - public void SaveAll () - { - throw new System.NotImplementedException (); - } - - public void CloseFile () - { - throw new System.NotImplementedException (); - } - - public void CloseWindow () - { - throw new System.NotImplementedException (); - } - - public bool ShowOptionsDialog () - { - throw new System.NotImplementedException (); - } - - public void ToggleMenuItemEnabled (string menuItemName, bool enabled) - { - throw new System.NotImplementedException (); - } - - public void RefreshCommand (object nativeCommandObject) - { - throw new System.NotImplementedException (); - } - - public void UpdateStatus (string statusText) - { - throw new System.NotImplementedException (); - } - - public void UpdateProgress (bool visible) - { - throw new System.NotImplementedException (); - } - - public void UpdateProgress (int minimum, int maximium, int value) - { - throw new System.NotImplementedException (); - } - - public void ActivateWindow () - { - throw new System.NotImplementedException (); - } - #endregion -} +} \ No newline at end of file From 5776bfe987282c3646dcd399f55dc168eb540234 Mon Sep 17 00:00:00 2001 From: alcexhim Date: Sat, 28 Jun 2014 22:50:46 -0400 Subject: [PATCH 7/8] Updated namespace --- .../UniversalEditor.Engines.GTK.MainWindow.cs | 406 +++++++++--------- 1 file changed, 204 insertions(+), 202 deletions(-) diff --git a/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/gtk-gui/UniversalEditor.Engines.GTK.MainWindow.cs b/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/gtk-gui/UniversalEditor.Engines.GTK.MainWindow.cs index 27727a31..f8bad287 100644 --- a/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/gtk-gui/UniversalEditor.Engines.GTK.MainWindow.cs +++ b/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/gtk-gui/UniversalEditor.Engines.GTK.MainWindow.cs @@ -1,209 +1,211 @@ // This file has been generated by the GUI designer. Do not modify. - -public partial class MainWindow +namespace UniversalEditor.Engines.GTK { - private global::Gtk.UIManager UIManager; - private global::Gtk.Action FileAction; - private global::Gtk.Action FileNew; - private global::Gtk.Action FileNewDocument; - private global::Gtk.Action FileNewProject; - private global::Gtk.Action FileOpen; - private global::Gtk.Action FileOpenDocument; - private global::Gtk.Action FileOpenProject; - private global::Gtk.Action CloseAction; - private global::Gtk.Action DocumentAction; - private global::Gtk.Action ProjectAction; - private global::Gtk.Action WindowAction; - private global::Gtk.Action quitAction; - private global::Gtk.Action EditAction; - private global::Gtk.Action CutAction; - private global::Gtk.VBox vbox1; - private global::Gtk.MenuBar menubar1; - private global::Gtk.Toolbar toolbar1; - private global::Gtk.Notebook notebook1; - private global::Gtk.Statusbar statusbar1; - private global::Gtk.Label lblStatus; - - protected virtual void Build () + public partial class MainWindow { - 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.FileNew = new global::Gtk.Action ( - "FileNew", - global::Mono.Unix.Catalog.GetString("_New"), - null, - null - ); - this.FileNew.ShortLabel = global::Mono.Unix.Catalog.GetString ("_New"); - w1.Add (this.FileNew, null); - this.FileNewDocument = new global::Gtk.Action ( - "FileNewDocument", - global::Mono.Unix.Catalog.GetString("_Document..."), - null, - null - ); - this.FileNewDocument.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Document..."); - w1.Add (this.FileNewDocument, null); - this.FileNewProject = new global::Gtk.Action ( - "FileNewProject", - global::Mono.Unix.Catalog.GetString("_Project..."), - null, - null - ); - this.FileNewProject.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Project..."); - w1.Add (this.FileNewProject, null); - this.FileOpen = new global::Gtk.Action ( - "FileOpen", - global::Mono.Unix.Catalog.GetString("_Open"), - null, - null - ); - this.FileOpen.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Open"); - w1.Add (this.FileOpen, null); - this.FileOpenDocument = new global::Gtk.Action ( - "FileOpenDocument", - global::Mono.Unix.Catalog.GetString("_Document..."), - null, - null - ); - this.FileOpenDocument.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Document..."); - w1.Add (this.FileOpenDocument, null); - this.FileOpenProject = new global::Gtk.Action ( - "FileOpenProject", - global::Mono.Unix.Catalog.GetString("_Project..."), - null, - null - ); - this.FileOpenProject.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Project..."); - w1.Add (this.FileOpenProject, null); - this.CloseAction = new global::Gtk.Action ( - "CloseAction", - global::Mono.Unix.Catalog.GetString("_Close"), - null, - null - ); - this.CloseAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Close"); - w1.Add (this.CloseAction, null); - this.DocumentAction = new global::Gtk.Action ( - "DocumentAction", - global::Mono.Unix.Catalog.GetString("_Document"), - null, - null - ); - this.DocumentAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Document"); - w1.Add (this.DocumentAction, null); - this.ProjectAction = new global::Gtk.Action ( - "ProjectAction", - global::Mono.Unix.Catalog.GetString("_Project"), - null, - null - ); - this.ProjectAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Project"); - w1.Add (this.ProjectAction, null); - this.WindowAction = new global::Gtk.Action ( - "WindowAction", - global::Mono.Unix.Catalog.GetString("_Window"), - null, - null - ); - this.WindowAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Window"); - w1.Add (this.WindowAction, null); - this.quitAction = new global::Gtk.Action ( - "quitAction", - global::Mono.Unix.Catalog.GetString("_Quit"), - null, - "gtk-quit" - ); - this.quitAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Quit"); - w1.Add (this.quitAction, null); - this.EditAction = new global::Gtk.Action ( - "EditAction", - global::Mono.Unix.Catalog.GetString("_Edit"), - null, - null - ); - this.EditAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Edit"); - w1.Add (this.EditAction, null); - this.CutAction = new global::Gtk.Action ( - "CutAction", - global::Mono.Unix.Catalog.GetString("Cu_t"), - null, - null - ); - this.CutAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Cu_t"); - w1.Add (this.CutAction, null); - this.UIManager.InsertActionGroup (w1, 0); - this.AddAccelGroup (this.UIManager.AccelGroup); - this.Name = "MainWindow"; - this.Title = global::Mono.Unix.Catalog.GetString ("Universal Editor"); - this.WindowPosition = ((global::Gtk.WindowPosition)(4)); - // Container child MainWindow.Gtk.Container+ContainerChild - this.vbox1 = new global::Gtk.VBox (); - this.vbox1.Name = "vbox1"; - this.vbox1.Spacing = 6; - // Container child vbox1.Gtk.Box+BoxChild - this.UIManager.AddUiFromString (""); - this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget ("/menubar1"))); - this.menubar1.Name = "menubar1"; - this.vbox1.Add (this.menubar1); - global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.menubar1])); - w2.Position = 0; - w2.Expand = false; - w2.Fill = false; - // Container child vbox1.Gtk.Box+BoxChild - this.UIManager.AddUiFromString (""); - this.toolbar1 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar1"))); - this.toolbar1.Name = "toolbar1"; - this.toolbar1.ShowArrow = false; - this.vbox1.Add (this.toolbar1); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.toolbar1])); - w3.Position = 1; - w3.Expand = false; - w3.Fill = false; - // Container child vbox1.Gtk.Box+BoxChild - this.notebook1 = new global::Gtk.Notebook (); - this.notebook1.CanFocus = true; - this.notebook1.Name = "notebook1"; - this.notebook1.CurrentPage = -1; - this.vbox1.Add (this.notebook1); - global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.notebook1])); - w4.Position = 2; - // Container child vbox1.Gtk.Box+BoxChild - this.statusbar1 = new global::Gtk.Statusbar (); - this.statusbar1.Name = "statusbar1"; - this.statusbar1.Spacing = 6; - this.statusbar1.HasResizeGrip = false; - // Container child statusbar1.Gtk.Box+BoxChild - this.lblStatus = new global::Gtk.Label (); - this.lblStatus.Name = "lblStatus"; - this.lblStatus.Xalign = 0F; - this.lblStatus.LabelProp = global::Mono.Unix.Catalog.GetString ("Ready"); - this.statusbar1.Add (this.lblStatus); - global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.statusbar1 [this.lblStatus])); - w5.Position = 0; - this.vbox1.Add (this.statusbar1); - global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.statusbar1])); - w6.Position = 3; - w6.Expand = false; - w6.Fill = false; - this.Add (this.vbox1); - if ((this.Child != null)) { - this.Child.ShowAll (); + private global::Gtk.UIManager UIManager; + private global::Gtk.Action FileAction; + private global::Gtk.Action FileNew; + private global::Gtk.Action FileNewDocument; + private global::Gtk.Action FileNewProject; + private global::Gtk.Action FileOpen; + private global::Gtk.Action FileOpenDocument; + private global::Gtk.Action FileOpenProject; + private global::Gtk.Action CloseAction; + private global::Gtk.Action DocumentAction; + private global::Gtk.Action ProjectAction; + private global::Gtk.Action WindowAction; + private global::Gtk.Action quitAction; + private global::Gtk.Action EditAction; + private global::Gtk.Action CutAction; + private global::Gtk.VBox vbox1; + private global::Gtk.MenuBar menubar1; + private global::Gtk.Toolbar toolbar1; + private global::Gtk.Notebook tbsTabs; + private global::Gtk.Statusbar statusbar1; + private global::Gtk.Label lblStatus; + + protected virtual void Build () + { + global::Stetic.Gui.Initialize (this); + // Widget UniversalEditor.Engines.GTK.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.FileNew = new global::Gtk.Action ( + "FileNew", + global::Mono.Unix.Catalog.GetString("_New"), + null, + null + ); + this.FileNew.ShortLabel = global::Mono.Unix.Catalog.GetString ("_New"); + w1.Add (this.FileNew, null); + this.FileNewDocument = new global::Gtk.Action ( + "FileNewDocument", + global::Mono.Unix.Catalog.GetString("_Document..."), + null, + null + ); + this.FileNewDocument.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Document..."); + w1.Add (this.FileNewDocument, null); + this.FileNewProject = new global::Gtk.Action ( + "FileNewProject", + global::Mono.Unix.Catalog.GetString("_Project..."), + null, + null + ); + this.FileNewProject.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Project..."); + w1.Add (this.FileNewProject, null); + this.FileOpen = new global::Gtk.Action ( + "FileOpen", + global::Mono.Unix.Catalog.GetString("_Open"), + null, + null + ); + this.FileOpen.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Open"); + w1.Add (this.FileOpen, null); + this.FileOpenDocument = new global::Gtk.Action ( + "FileOpenDocument", + global::Mono.Unix.Catalog.GetString("_Document..."), + null, + null + ); + this.FileOpenDocument.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Document..."); + w1.Add (this.FileOpenDocument, null); + this.FileOpenProject = new global::Gtk.Action ( + "FileOpenProject", + global::Mono.Unix.Catalog.GetString("_Project..."), + null, + null + ); + this.FileOpenProject.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Project..."); + w1.Add (this.FileOpenProject, null); + this.CloseAction = new global::Gtk.Action ( + "CloseAction", + global::Mono.Unix.Catalog.GetString("_Close"), + null, + null + ); + this.CloseAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Close"); + w1.Add (this.CloseAction, null); + this.DocumentAction = new global::Gtk.Action ( + "DocumentAction", + global::Mono.Unix.Catalog.GetString("_Document"), + null, + null + ); + this.DocumentAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Document"); + w1.Add (this.DocumentAction, null); + this.ProjectAction = new global::Gtk.Action ( + "ProjectAction", + global::Mono.Unix.Catalog.GetString("_Project"), + null, + null + ); + this.ProjectAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Project"); + w1.Add (this.ProjectAction, null); + this.WindowAction = new global::Gtk.Action ( + "WindowAction", + global::Mono.Unix.Catalog.GetString("_Window"), + null, + null + ); + this.WindowAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Window"); + w1.Add (this.WindowAction, null); + this.quitAction = new global::Gtk.Action ( + "quitAction", + global::Mono.Unix.Catalog.GetString("_Quit"), + null, + "gtk-quit" + ); + this.quitAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Quit"); + w1.Add (this.quitAction, null); + this.EditAction = new global::Gtk.Action ( + "EditAction", + global::Mono.Unix.Catalog.GetString("_Edit"), + null, + null + ); + this.EditAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("_Edit"); + w1.Add (this.EditAction, null); + this.CutAction = new global::Gtk.Action ( + "CutAction", + global::Mono.Unix.Catalog.GetString("Cu_t"), + null, + null + ); + this.CutAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Cu_t"); + w1.Add (this.CutAction, null); + this.UIManager.InsertActionGroup (w1, 0); + this.AddAccelGroup (this.UIManager.AccelGroup); + this.Name = "UniversalEditor.Engines.GTK.MainWindow"; + this.Title = global::Mono.Unix.Catalog.GetString ("Universal Editor"); + this.WindowPosition = ((global::Gtk.WindowPosition)(4)); + // Container child UniversalEditor.Engines.GTK.MainWindow.Gtk.Container+ContainerChild + this.vbox1 = new global::Gtk.VBox (); + this.vbox1.Name = "vbox1"; + this.vbox1.Spacing = 6; + // Container child vbox1.Gtk.Box+BoxChild + this.UIManager.AddUiFromString (""); + this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget ("/menubar1"))); + this.menubar1.Name = "menubar1"; + this.vbox1.Add (this.menubar1); + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.menubar1])); + w2.Position = 0; + w2.Expand = false; + w2.Fill = false; + // Container child vbox1.Gtk.Box+BoxChild + this.UIManager.AddUiFromString (""); + this.toolbar1 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar1"))); + this.toolbar1.Name = "toolbar1"; + this.toolbar1.ShowArrow = false; + this.vbox1.Add (this.toolbar1); + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.toolbar1])); + w3.Position = 1; + w3.Expand = false; + w3.Fill = false; + // Container child vbox1.Gtk.Box+BoxChild + this.tbsTabs = new global::Gtk.Notebook (); + this.tbsTabs.CanFocus = true; + this.tbsTabs.Name = "tbsTabs"; + this.tbsTabs.CurrentPage = -1; + this.vbox1.Add (this.tbsTabs); + global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.tbsTabs])); + w4.Position = 2; + // Container child vbox1.Gtk.Box+BoxChild + this.statusbar1 = new global::Gtk.Statusbar (); + this.statusbar1.Name = "statusbar1"; + this.statusbar1.Spacing = 6; + this.statusbar1.HasResizeGrip = false; + // Container child statusbar1.Gtk.Box+BoxChild + this.lblStatus = new global::Gtk.Label (); + this.lblStatus.Name = "lblStatus"; + this.lblStatus.Xalign = 0F; + this.lblStatus.LabelProp = global::Mono.Unix.Catalog.GetString ("Ready"); + this.statusbar1.Add (this.lblStatus); + global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.statusbar1 [this.lblStatus])); + w5.Position = 0; + this.vbox1.Add (this.statusbar1); + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.statusbar1])); + w6.Position = 3; + w6.Expand = false; + w6.Fill = false; + this.Add (this.vbox1); + if ((this.Child != null)) { + this.Child.ShowAll (); + } + this.DefaultWidth = 400; + this.DefaultHeight = 299; + this.Show (); + this.DeleteEvent += new global::Gtk.DeleteEventHandler (this.OnDeleteEvent); } - this.DefaultWidth = 400; - this.DefaultHeight = 299; - this.Show (); - this.DeleteEvent += new global::Gtk.DeleteEventHandler (this.OnDeleteEvent); } } From 16c3049080d01eed8a05ce9764d34983bef76416 Mon Sep 17 00:00:00 2001 From: alcexhim Date: Sat, 28 Jun 2014 22:51:17 -0400 Subject: [PATCH 8/8] Updated namespace --- .../UniversalEditor.Environments.GTK.csproj | 2 +- .../UniversalEditor.Environments.GTK/gtk-gui/gui.stetic | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/UniversalEditor.Environments.GTK.csproj b/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/UniversalEditor.Environments.GTK.csproj index b1f1ed46..743274da 100644 --- a/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/UniversalEditor.Environments.GTK.csproj +++ b/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/UniversalEditor.Environments.GTK.csproj @@ -59,9 +59,9 @@ - + diff --git a/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/gtk-gui/gui.stetic b/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/gtk-gui/gui.stetic index 61cf9407..2f9ef263 100644 --- a/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/gtk-gui/gui.stetic +++ b/CSharp/Environments/GTK/Engines/UniversalEditor.Environments.GTK/gtk-gui/gui.stetic @@ -8,7 +8,7 @@ - + Action @@ -116,7 +116,7 @@ - + True -1