Merge branch 'master' of github.com:alcexhim/UniversalEditor

This commit is contained in:
Michael Becker 2014-06-30 07:13:09 -04:00
commit 2c550d747f
8 changed files with 437 additions and 420 deletions

View File

@ -1,7 +1,7 @@
using System;
using Gtk;
namespace UniversalEditor.Environments.GTK
namespace UniversalEditor.Engines.GTK
{
public class GTKEngine : UniversalEditor.UserInterface.Engine
{
@ -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();

View File

@ -3,191 +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)
void menuItem_Activated (object sender, EventArgs e)
{
menuItem = new Gtk.SeparatorMenuItem();
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;
}
if (menuItem != null)
protected void OnDeleteEvent (object sender, DeleteEventArgs a)
{
if (parentMenu == null)
{
menubar1.Append(menuItem);
}
else
{
parentMenu.Append(menuItem);
}
Application.Quit ();
a.RetVal = true;
}
}
private Menu CreateCommandItemSubmenu(Command cmd)
{
Menu menu = new Menu();
if (Engine.CurrentEngine.MainMenu.EnableTearoff && cmd.EnableTearoff)
protected override bool OnFocusInEvent (Gdk.EventFocus evnt)
{
menu.Append(new TearoffMenuItem());
Engine.CurrentEngine.LastWindow = this;
return base.OnFocusInEvent(evnt);
}
foreach (CommandItem item in cmd.Items)
{
CreateCommandItem(item, menu);
}
return menu;
}
#region IHostApplicationWindow implementation
public event EventHandler WindowClosed;
protected void OnDeleteEvent (object sender, DeleteEventArgs a)
{
Application.Quit ();
a.RetVal = true;
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
}
}

View File

@ -59,9 +59,9 @@
<ItemGroup>
<Compile Include="gtk-gui\generated.cs" />
<Compile Include="MainWindow.cs" />
<Compile Include="gtk-gui\MainWindow.cs" />
<Compile Include="AssemblyInfo.cs" />
<Compile Include="GTKEngine.cs" />
<Compile Include="gtk-gui\UniversalEditor.Engines.GTK.MainWindow.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup>

View File

@ -1,209 +0,0 @@
// 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;
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 ()
{
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 ("<ui><menubar name='menubar1'/></ui>");
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 ("<ui><toolbar name='toolbar1'/></ui>");
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 ();
}
this.DefaultWidth = 400;
this.DefaultHeight = 299;
this.Show ();
this.DeleteEvent += new global::Gtk.DeleteEventHandler (this.OnDeleteEvent);
}
}

View File

@ -0,0 +1,211 @@
// This file has been generated by the GUI designer. Do not modify.
namespace UniversalEditor.Engines.GTK
{
public partial class MainWindow
{
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 ("<ui><menubar name='menubar1'/></ui>");
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 ("<ui><toolbar name='toolbar1'/></ui>");
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);
}
}
}

View File

@ -8,7 +8,7 @@
<widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<widget-library name="../../../../../Output/Debug/UniversalEditor.Environments.GTK.dll" internal="true" />
</import>
<widget class="Gtk.Window" id="MainWindow" design-size="400 299">
<widget class="Gtk.Window" id="UniversalEditor.Engines.GTK.MainWindow" design-size="400 299">
<action-group name="Default">
<action id="FileAction">
<property name="Type">Action</property>
@ -116,7 +116,7 @@
</packing>
</child>
<child>
<widget class="Gtk.Notebook" id="notebook1">
<widget class="Gtk.Notebook" id="tbsTabs">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="CurrentPage">-1</property>

View File

@ -653,6 +653,11 @@ namespace UniversalEditor.UserInterface
threadLoader.Start();
ShowSplashScreen();
while (threadLoader.ThreadState == System.Threading.ThreadState.Running)
{
System.Threading.Thread.Sleep (500);
}
}
protected virtual void InitializeInternal()
{

View File

@ -1,38 +0,0 @@
<Properties>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.Workbench ActiveDocument="Libraries/UniversalEditor.UserInterface/Engine.cs">
<Files>
<File FileName="Environments/GTK/Engines/UniversalEditor.Environments.GTK/GTKEngine.cs" Line="6" Column="62" />
<File FileName="Libraries/UniversalEditor.UserInterface/Engine.cs" Line="327" Column="4" />
</Files>
<Pads>
<Pad Id="ProjectPad">
<State expanded="True">
<Node name="Applications" expanded="True">
<Node name="UniversalEditor.Bootstrapper" expanded="True" />
</Node>
<Node name="Environments" expanded="True">
<Node name="GTK" expanded="True">
<Node name="UniversalEditor.Environments.GTK" expanded="True" />
</Node>
</Node>
<Node name="Libraries" expanded="True">
<Node name="UniversalEditor.Core" expanded="True">
<Node name="Accessors" expanded="True" />
</Node>
<Node name="UniversalEditor.UserInterface" expanded="True">
<Node name="Engine.cs" selected="True" />
</Node>
</Node>
</State>
</Pad>
<Pad Id="ClassPad">
<State expanded="True" selected="True" />
</Pad>
</Pads>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
</Properties>