Index: branches/Mainform refactoring/HeuristicLab.MainForm/3.2/HeuristicLab.MainForm-3.2.csproj
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm/3.2/HeuristicLab.MainForm-3.2.csproj	(revision 2420)
+++ branches/Mainform refactoring/HeuristicLab.MainForm/3.2/HeuristicLab.MainForm-3.2.csproj	(revision 2426)
@@ -71,5 +71,4 @@
     </Reference>
     <Reference Include="System.Drawing" />
-    <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xml.Linq">
       <RequiredTargetFramework>3.5</RequiredTargetFramework>
@@ -82,59 +81,15 @@
   </ItemGroup>
   <ItemGroup>
-    <Compile Include="SingleDocumentMainForm.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="SingleDocumentMainForm.Designer.cs">
-      <DependentUpon>SingleDocumentMainForm.cs</DependentUpon>
-    </Compile>
+    <Compile Include="Interfaces\IMenuItem.cs" />
+    <Compile Include="Interfaces\IToolBarItem.cs" />
+    <Compile Include="MainFormManager.cs" />
+    <Compile Include="MenuItemBase.cs" />
+    <Compile Include="ToolBarItemBase.cs" />
+    <Compile Include="HeuristicLabMainFormPlugin.cs" />
+    <Compile Include="Interfaces\IMainForm.cs" />
     <Compile Include="Interfaces\IUserInterfaceItem.cs" />
-    <Compile Include="MultipleDocumentMainForm.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="MultipleDocumentMainForm.Designer.cs">
-      <DependentUpon>MultipleDocumentMainForm.cs</DependentUpon>
-    </Compile>
-    <Compile Include="ToolStripMenuItemBase.cs" />
-    <Compile Include="ToolStripButtonItemBase.cs" />
-    <Compile Include="ToolStripItemBase.cs" />
-    <Compile Include="DockingMainForm.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="DockingMainForm.Designer.cs">
-      <DependentUpon>DockingMainForm.cs</DependentUpon>
-    </Compile>
-    <Compile Include="MainFormBase.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="MainFormBase.Designer.cs">
-      <DependentUpon>MainFormBase.cs</DependentUpon>
-    </Compile>
-    <Compile Include="HeuristicLabMainFormPlugin.cs" />
-    <Compile Include="Interfaces\IAction.cs" />
-    <Compile Include="Interfaces\IMainForm.cs" />
-    <Compile Include="Interfaces\IToolStripMenuItem.cs" />
-    <Compile Include="Interfaces\IToolStripButtonItem.cs" />
-    <Compile Include="Interfaces\IToolStripItem.cs" />
     <Compile Include="Interfaces\IView.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="UserInterfaceItemBase.cs" />
-    <Compile Include="ViewBase.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="ViewBase.Designer.cs">
-      <DependentUpon>ViewBase.cs</DependentUpon>
-    </Compile>
-    <Compile Include="DockForm.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="DockForm.Designer.cs">
-      <DependentUpon>DockForm.cs</DependentUpon>
-    </Compile>
-    <Compile Include="DocumentForm.cs">
-      <SubType>Form</SubType>
-    </Compile>
-    <Compile Include="DocumentForm.Designer.cs">
-      <DependentUpon>DocumentForm.cs</DependentUpon>
-    </Compile>
   </ItemGroup>
   <ItemGroup>
@@ -143,34 +98,8 @@
       <Name>HeuristicLab.PluginInfrastructure</Name>
     </ProjectReference>
-    <ProjectReference Include="..\..\WinFormsUI\WinFormsUI.csproj">
-      <Project>{C75532C4-765B-418E-B09B-46D36B2ABDB1}</Project>
-      <Name>WinFormsUI</Name>
-    </ProjectReference>
   </ItemGroup>
   <ItemGroup>
     <None Include="HeuristicLab.snk" />
     <None Include="Properties\AssemblyInfo.frame" />
-  </ItemGroup>
-  <ItemGroup>
-    <EmbeddedResource Include="SingleDocumentMainForm.resx">
-      <DependentUpon>SingleDocumentMainForm.cs</DependentUpon>
-    </EmbeddedResource>
-    <EmbeddedResource Include="DockingMainForm.resx">
-      <DependentUpon>DockingMainForm.cs</DependentUpon>
-    </EmbeddedResource>
-    <EmbeddedResource Include="MainFormBase.resx">
-      <DependentUpon>MainFormBase.cs</DependentUpon>
-    </EmbeddedResource>
-    <EmbeddedResource Include="DockForm.resx">
-      <DependentUpon>DockForm.cs</DependentUpon>
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
-    <EmbeddedResource Include="MultipleDocumentMainForm.resx">
-      <DependentUpon>MultipleDocumentMainForm.cs</DependentUpon>
-    </EmbeddedResource>
-    <EmbeddedResource Include="DocumentForm.resx">
-      <DependentUpon>DocumentForm.cs</DependentUpon>
-      <SubType>Designer</SubType>
-    </EmbeddedResource>
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Index: branches/Mainform refactoring/HeuristicLab.MainForm/3.2/Interfaces/IMainForm.cs
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm/3.2/Interfaces/IMainForm.cs	(revision 2420)
+++ branches/Mainform refactoring/HeuristicLab.MainForm/3.2/Interfaces/IMainForm.cs	(revision 2426)
@@ -25,17 +25,12 @@
 using System.Text;
 using System.Drawing;
-using System.Windows.Forms;
 
 namespace HeuristicLab.MainForm {
   public interface IMainForm {
     string Title { get; set; }
-    string StatusStripText { get; set; }
-    bool StatusStripProgressBarVisible { get; set; }
-
-    Cursor Cursor { get; set; }
 
     IView ActiveView { get; }
     event EventHandler ActiveViewChanged;
-    event EventHandler MainFormChanged;
+    event EventHandler Changed;
     IEnumerable<IView> Views { get; }
 
Index: branches/Mainform refactoring/HeuristicLab.MainForm/3.2/Interfaces/IMenuItem.cs
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm/3.2/Interfaces/IMenuItem.cs	(revision 2426)
+++ branches/Mainform refactoring/HeuristicLab.MainForm/3.2/Interfaces/IMenuItem.cs	(revision 2426)
@@ -0,0 +1,32 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Drawing;
+
+namespace HeuristicLab.MainForm {
+  public interface IMenuItem : IUserInterfaceItem {
+    IEnumerable<string> Structure { get; }
+  }
+}
Index: branches/Mainform refactoring/HeuristicLab.MainForm/3.2/Interfaces/IToolBarItem.cs
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm/3.2/Interfaces/IToolBarItem.cs	(revision 2426)
+++ branches/Mainform refactoring/HeuristicLab.MainForm/3.2/Interfaces/IToolBarItem.cs	(revision 2426)
@@ -0,0 +1,31 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.MainForm {
+  public interface IToolBarItem : IUserInterfaceItem {
+    IEnumerable<string> Structure { get; }
+  }
+}
Index: branches/Mainform refactoring/HeuristicLab.MainForm/3.2/Interfaces/IUserInterfaceItem.cs
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm/3.2/Interfaces/IUserInterfaceItem.cs	(revision 2420)
+++ branches/Mainform refactoring/HeuristicLab.MainForm/3.2/Interfaces/IUserInterfaceItem.cs	(revision 2426)
@@ -24,8 +24,18 @@
 using System.Linq;
 using System.Text;
+using System.Drawing;
 
 namespace HeuristicLab.MainForm {
-  public interface IUserInterfaceItem : IAction {
+  public interface IUserInterfaceItem {
     string Name { get; }
+    int Position { get; }
+    Image Image { get; }
+    string ToolTipText { get; set; }
+
+    void Execute();
+
+    void ActiveViewChanged(object sender, EventArgs e);
+    void ViewChanged(object sender, EventArgs e);
+    void MainFormChanged(object sender, EventArgs e);
   }
 }
Index: branches/Mainform refactoring/HeuristicLab.MainForm/3.2/Interfaces/IView.cs
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm/3.2/Interfaces/IView.cs	(revision 2420)
+++ branches/Mainform refactoring/HeuristicLab.MainForm/3.2/Interfaces/IView.cs	(revision 2426)
@@ -23,5 +23,5 @@
 using System.Collections.Generic;
 using System.Text;
-using System.Windows.Forms;
+using System.ComponentModel;
 
 namespace HeuristicLab.MainForm {
@@ -29,7 +29,7 @@
     string Caption { get; set; }
     event EventHandler CaptionChanged;
-    event EventHandler StateChanged;
-    IMainForm MainForm { get; set; }
-    void FormClosing(object sender, FormClosingEventArgs e);
+    event EventHandler Changed;
+    void OnClosing(object sender, CancelEventArgs e);
+    void OnClosed(object sender, EventArgs e);
   }
 }
Index: branches/Mainform refactoring/HeuristicLab.MainForm/3.2/MainFormManager.cs
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm/3.2/MainFormManager.cs	(revision 2426)
+++ branches/Mainform refactoring/HeuristicLab.MainForm/3.2/MainFormManager.cs	(revision 2426)
@@ -0,0 +1,28 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.MainForm {
+  public class MainFormManager {
+    private MainFormManager() {
+      MainFormManager.mainform = null;
+    }
+
+    private static IMainForm mainform;
+    public static void RegisterMainForm(IMainForm mainform) {
+      if (MainFormManager.mainform == null)
+        MainFormManager.mainform = mainform;
+      else
+        throw new ArgumentException("A mainform was already associated with the mainform manager.");
+    }
+
+    public static IMainForm Instance {
+      get { return mainform; }
+    }
+
+    public static T GetInstance<T>() where T : IMainForm {
+      return (T)mainform;
+    }
+  }
+}
Index: branches/Mainform refactoring/HeuristicLab.MainForm/3.2/MenuItemBase.cs
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm/3.2/MenuItemBase.cs	(revision 2426)
+++ branches/Mainform refactoring/HeuristicLab.MainForm/3.2/MenuItemBase.cs	(revision 2426)
@@ -0,0 +1,12 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.MainForm {
+  public abstract class MenuItemBase : UserInterfaceItemBase, IMenuItem{
+    public virtual IEnumerable<string> Structure {
+      get { return Enumerable.Empty<string>(); }
+    }   
+  }
+}
Index: branches/Mainform refactoring/HeuristicLab.MainForm/3.2/ToolBarItemBase.cs
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm/3.2/ToolBarItemBase.cs	(revision 2426)
+++ branches/Mainform refactoring/HeuristicLab.MainForm/3.2/ToolBarItemBase.cs	(revision 2426)
@@ -0,0 +1,12 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace HeuristicLab.MainForm {
+  public abstract class ToolBarItemBase : UserInterfaceItemBase, IToolBarItem {
+    public virtual IEnumerable<string> Structure {
+      get { return Enumerable.Empty<string>(); }
+    }   
+  }
+}
Index: branches/Mainform refactoring/HeuristicLab.MainForm/3.2/UserInterfaceItemBase.cs
===================================================================
--- branches/Mainform refactoring/HeuristicLab.MainForm/3.2/UserInterfaceItemBase.cs	(revision 2420)
+++ branches/Mainform refactoring/HeuristicLab.MainForm/3.2/UserInterfaceItemBase.cs	(revision 2426)
@@ -27,9 +27,31 @@
 namespace HeuristicLab.MainForm {
   public abstract class UserInterfaceItemBase : IUserInterfaceItem{
+    protected UserInterfaceItemBase() {
+      this.toolTipText = string.Empty;
+    }
+
     public abstract string Name { get; }
+    public abstract int Position { get; }
 
-    #region IAction Members
-    public abstract void Execute(IMainForm mainform);
-    #endregion
+    public virtual System.Drawing.Image Image {
+      get { return null; }
+    }
+
+    protected string toolTipText;
+    public virtual string ToolTipText { 
+      get { return toolTipText; }
+      set { this.toolTipText = value; }
+    }
+
+    public abstract void Execute();
+
+    public virtual void ActiveViewChanged(object sender, EventArgs e) {
+    }
+
+    public virtual void ViewChanged(object sender, EventArgs e) {
+    }
+
+    public virtual void MainFormChanged(object sender, EventArgs e) {
+    }
   }
 }
