Author: mkrueger
Date: 2008-02-03 07:30:38 -0500 (Sun, 03 Feb 2008)
New Revision: 94677

Added:
   
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/ISplittable.cs
Modified:
   trunk/monodevelop/main/src/core/MonoDevelop.Ide/ChangeLog
   trunk/monodevelop/main/src/core/MonoDevelop.Ide/Makefile.am
   
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/WindowCommands.cs
   
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ViewCommandHandlers.cs
   trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.addin.xml
   trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.mdp
Log:
* MonoDevelop.Ide.Gui.Content/ISplittable.cs,
  MonoDevelop.Ide.Commands/WindowCommands.cs,
  MonoDevelop.Ide.addin.xml,
  MonoDevelop.Ide.Gui/ViewCommandHandlers.cs: Added splitting
  infrastructure.

Modified: trunk/monodevelop/main/src/core/MonoDevelop.Ide/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/core/MonoDevelop.Ide/ChangeLog   2008-02-03 
12:21:17 UTC (rev 94676)
+++ trunk/monodevelop/main/src/core/MonoDevelop.Ide/ChangeLog   2008-02-03 
12:30:38 UTC (rev 94677)
@@ -1,5 +1,12 @@
 2008-02-03  Mike Krüger <[EMAIL PROTECTED]> 
 
+       * MonoDevelop.Ide.Gui.Content/ISplittable.cs,
+         MonoDevelop.Ide.Commands/WindowCommands.cs, MonoDevelop.Ide.addin.xml,
+         MonoDevelop.Ide.Gui/ViewCommandHandlers.cs: Added splitting
+         infrastructure.
+
+2008-02-03  Mike Krüger <[EMAIL PROTECTED]> 
+
        * MonoDevelop.Dom.Parser, MonoDevelop.Dom.Parser/AbstractParser.cs,
          MonoDevelop.Dom.Parser/ProjectParserService.cs,
          MonoDevelop.Dom.Parser/IParser.cs, 
MonoDevelop.Dom.Parser/ProjectDom.cs,

Modified: trunk/monodevelop/main/src/core/MonoDevelop.Ide/Makefile.am
===================================================================
--- trunk/monodevelop/main/src/core/MonoDevelop.Ide/Makefile.am 2008-02-03 
12:21:17 UTC (rev 94676)
+++ trunk/monodevelop/main/src/core/MonoDevelop.Ide/Makefile.am 2008-02-03 
12:30:38 UTC (rev 94677)
@@ -151,6 +151,7 @@
        MonoDevelop.Ide.Gui.Content/IParsableContent.cs \
        MonoDevelop.Ide.Gui.Content/IPositionable.cs \
        MonoDevelop.Ide.Gui.Content/IPrintable.cs \
+       MonoDevelop.Ide.Gui.Content/ISplittable.cs \
        MonoDevelop.Ide.Gui.Content/ITextBuffer.cs \
        MonoDevelop.Ide.Gui.Content/IViewHistory.cs \
        MonoDevelop.Ide.Gui.Content/TextEditorExtension.cs \

Modified: 
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/WindowCommands.cs
===================================================================
--- 
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/WindowCommands.cs
  2008-02-03 12:21:17 UTC (rev 94676)
+++ 
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Commands/WindowCommands.cs
  2008-02-03 12:30:38 UTC (rev 94677)
@@ -32,7 +32,10 @@
        {
                NextWindow,
                PrevWindow,
-               OpenWindowList
+               OpenWindowList,
+               SplitWindowVertically,
+               SplitWindowHorizontally,
+               UnsplitWindow,
        }
        
        internal class NextWindowHandler: CommandHandler

Modified: 
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ViewCommandHandlers.cs
===================================================================
--- 
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ViewCommandHandlers.cs
  2008-02-03 12:21:17 UTC (rev 94676)
+++ 
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui/ViewCommandHandlers.cs
  2008-02-03 12:30:38 UTC (rev 94677)
@@ -583,7 +583,7 @@
                [CommandUpdateHandler (SearchCommands.PrevBookmark)]
                [CommandUpdateHandler (SearchCommands.NextBookmark)]
                [CommandUpdateHandler (SearchCommands.ClearBookmarks)]
-               protected void OnUpdateBookmarkCommands (CommandInfo info)
+               protected void UpdateBookmarkCommands (CommandInfo info)
                {
                        info.Enabled = GetContent <IBookmarkBuffer> () != null;
                }
@@ -622,5 +622,49 @@
                }
 #endregion
                
+#region Splitting
+               [CommandUpdateHandler (WindowCommands.SplitWindowHorizontally)]
+               protected void UpdateSplitWindowHorizontally (CommandInfo info)
+               {
+                       ISplittable split = GetContent <ISplittable> ();
+                       info.Enabled = split != null && 
split.EnableSplitHorizontally;
+               }
+               [CommandHandler (WindowCommands.SplitWindowHorizontally)]
+               public void SplitWindowHorizontally ()
+               {
+                       ISplittable split = GetContent <ISplittable> ();
+                       Debug.Assert (split != null);
+                       split.SplitHorizontally ();
+               }
+
+               [CommandUpdateHandler (WindowCommands.SplitWindowVertically)]
+               protected void UpdateSplitWindowVertically (CommandInfo info)
+               {
+                       ISplittable split = GetContent <ISplittable> ();
+                       info.Enabled = split != null && 
split.EnableSplitVertically;
+               }
+               [CommandHandler (WindowCommands.SplitWindowVertically)]
+               public void SplitWindowVertically ()
+               {
+                       ISplittable split = GetContent <ISplittable> ();
+                       Debug.Assert (split != null);
+                       split.SplitVertically ();
+               }
+
+               [CommandUpdateHandler (WindowCommands.UnsplitWindow)]
+               protected void UpdateUnsplitWindow (CommandInfo info)
+               {
+                       ISplittable split = GetContent <ISplittable> ();
+                       info.Enabled = split != null && split.EnableUnsplit;
+               }
+               [CommandHandler (WindowCommands.UnsplitWindow)]
+               public void UnsplitWindow ()
+               {
+                       ISplittable split = GetContent <ISplittable> ();
+                       Debug.Assert (split != null);
+                       split.Unsplit ();
+               }
+#endregion
+               
        }
 }

Added: 
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/ISplittable.cs
===================================================================
--- 
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/ISplittable.cs
  2008-02-03 12:21:17 UTC (rev 94676)
+++ 
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Content/ISplittable.cs
  2008-02-03 12:30:38 UTC (rev 94677)
@@ -0,0 +1,49 @@
+//
+// ISplittable.cs
+//
+// Author:
+//   Mike Krüger <[EMAIL PROTECTED]>
+//
+// Copyright (C) 2008 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+
+namespace MonoDevelop.Ide
+{
+       public interface ISplittable
+       {
+               bool EnableSplitHorizontally {
+                       get;
+               }
+               bool EnableSplitVertically {
+                       get;
+               }
+               bool EnableUnsplit {
+                       get;
+               }
+               
+               void SplitHorizontally ();
+               void SplitVertically ();
+               void Unsplit ();
+       }
+}

Modified: 
trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.addin.xml
===================================================================
--- trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.addin.xml   
2008-02-03 12:21:17 UTC (rev 94676)
+++ trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.addin.xml   
2008-02-03 12:30:38 UTC (rev 94677)
@@ -666,6 +666,13 @@
                                defaultHandler = 
"MonoDevelop.Ide.Commands.OpenWindowListHandler"
                                type="radio|array"
                                _label = "Window List" />
+
+               <Command id = 
"MonoDevelop.Ide.Commands.WindowCommands.SplitWindowVertically"
+                               _label = "Split _vertically" />
+               <Command id = 
"MonoDevelop.Ide.Commands.WindowCommands.SplitWindowHorizontally"
+                               _label = "Split _horizontally" />
+               <Command id = 
"MonoDevelop.Ide.Commands.WindowCommands.UnsplitWindow"
+                               _label = "_Unsplit" />
                </Category>
                                
                <!-- HelpCommands -->
@@ -1350,6 +1357,10 @@
                        <CommandItem id = 
"MonoDevelop.Ide.Commands.WindowCommands.PrevWindow" />
                        <SeparatorItem id ="NxtPrvSeparator" /> 
                        <CommandItem id = 
"MonoDevelop.Ide.Commands.FileCommands.CloseAllFiles" />
+                       <SeparatorItem id ="SplitSeparator" /> 
+                       <CommandItem id = 
"MonoDevelop.Ide.Commands.WindowCommands.SplitWindowVertically" />
+                       <CommandItem id = 
"MonoDevelop.Ide.Commands.WindowCommands.SplitWindowHorizontally" />
+                       <CommandItem id = 
"MonoDevelop.Ide.Commands.WindowCommands.UnsplitWindow" />
                        <SeparatorItem id = "contentSep" />
                        <CommandItem id = 
"MonoDevelop.Ide.Commands.WindowCommands.OpenWindowList" />
                </ItemSet> 

Modified: trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.mdp
===================================================================
--- trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.mdp 
2008-02-03 12:21:17 UTC (rev 94676)
+++ trunk/monodevelop/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.mdp 
2008-02-03 12:30:38 UTC (rev 94677)
@@ -374,6 +374,7 @@
     <File name="MonoDevelop.Dom.Parser/ProjectParserService.cs" subtype="Code" 
buildaction="Compile" />
     <File name="MonoDevelop.Dom.Parser/IParser.cs" subtype="Code" 
buildaction="Compile" />
     <File name="MonoDevelop.Dom.Parser/AbstractParser.cs" subtype="Code" 
buildaction="Compile" />
+    <File name="MonoDevelop.Ide.Gui.Content/ISplittable.cs" subtype="Code" 
buildaction="Compile" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="False" refto="System, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to