2007-10-02 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Tue, 2 Oct 2007 12:42:35 +0000 (12:42 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Tue, 2 Oct 2007 12:42:35 +0000 (12:42 -0000)
* System.Design.dll.sources : more .NET 2.0 types.

* CodeDomLocalizationProvider.cs, CodeDomLocalizationModel.cs :
  new files.
* CodeDomSerializerException.cs, CodeDomSerializerBase.cs,
  TypeCodeDomSerializer.cs : cosmetic 2.0 API fixes.

* Adorner.cs, Behavior.cs, BehaviorDragDropEventArgs.cs,
  BehaviorDragDropEventHandler.cs, BehaviorService.cs,
  BehaviorServiceAdornerCollection.cs,
  BehaviorServiceAdornerCollectionEnumerator.cs,
  ComponentGlyph.cs, ControlBodyGlyph.cs, Glyph.cs,
  GlyphCollection.cs, GlyphSelectionType.cs, SnapLine.cs,
  SnapLinePriority.cs, SnapLineType.cs : new files.

* ControlDesigner.cs : added BehaviorService.

svn path=/trunk/mcs/; revision=86741

26 files changed:
mcs/class/System.Design/ChangeLog
mcs/class/System.Design/System.ComponentModel.Design.Serialization/Changelog
mcs/class/System.Design/System.ComponentModel.Design.Serialization/CodeDomLocalizationModel.cs [new file with mode: 0644]
mcs/class/System.Design/System.ComponentModel.Design.Serialization/CodeDomLocalizationProvider.cs [new file with mode: 0644]
mcs/class/System.Design/System.ComponentModel.Design.Serialization/CodeDomSerializerBase.cs
mcs/class/System.Design/System.ComponentModel.Design.Serialization/CodeDomSerializerException.cs
mcs/class/System.Design/System.ComponentModel.Design.Serialization/TypeCodeDomSerializer.cs
mcs/class/System.Design/System.Design.dll.sources
mcs/class/System.Design/System.Windows.Forms.Design.Behavior/Adorner.cs [new file with mode: 0644]
mcs/class/System.Design/System.Windows.Forms.Design.Behavior/Behavior.cs [new file with mode: 0644]
mcs/class/System.Design/System.Windows.Forms.Design.Behavior/BehaviorDragDropEventArgs.cs [new file with mode: 0644]
mcs/class/System.Design/System.Windows.Forms.Design.Behavior/BehaviorDragDropEventHandler.cs [new file with mode: 0644]
mcs/class/System.Design/System.Windows.Forms.Design.Behavior/BehaviorService.cs [new file with mode: 0644]
mcs/class/System.Design/System.Windows.Forms.Design.Behavior/BehaviorServiceAdornerCollection.cs [new file with mode: 0644]
mcs/class/System.Design/System.Windows.Forms.Design.Behavior/BehaviorServiceAdornerCollectionEnumerator.cs [new file with mode: 0644]
mcs/class/System.Design/System.Windows.Forms.Design.Behavior/ChangeLog [new file with mode: 0755]
mcs/class/System.Design/System.Windows.Forms.Design.Behavior/ComponentGlyph.cs [new file with mode: 0644]
mcs/class/System.Design/System.Windows.Forms.Design.Behavior/ControlBodyGlyph.cs [new file with mode: 0644]
mcs/class/System.Design/System.Windows.Forms.Design.Behavior/Glyph.cs [new file with mode: 0644]
mcs/class/System.Design/System.Windows.Forms.Design.Behavior/GlyphCollection.cs [new file with mode: 0644]
mcs/class/System.Design/System.Windows.Forms.Design.Behavior/GlyphSelectionType.cs [new file with mode: 0644]
mcs/class/System.Design/System.Windows.Forms.Design.Behavior/SnapLine.cs [new file with mode: 0644]
mcs/class/System.Design/System.Windows.Forms.Design.Behavior/SnapLinePriority.cs [new file with mode: 0644]
mcs/class/System.Design/System.Windows.Forms.Design.Behavior/SnapLineType.cs [new file with mode: 0644]
mcs/class/System.Design/System.Windows.Forms.Design/ChangeLog
mcs/class/System.Design/System.Windows.Forms.Design/ControlDesigner.cs

index 04ab8765380173997a95706dc48f56ce9dcd67b6..da6d0d6129256b91a98bafceec8f321933ca3757 100644 (file)
@@ -1,3 +1,7 @@
+2007-10-02  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * System.Design.dll.sources : more .NET 2.0 types.
+
 2007-10-02  Atsushi Enomoto  <atsushi@ximian.com>
 
        * Makefile : added -r:System.Xml.dll
index b3f34efd2d15fe255de5fd83aa10524c42f7f1d3..aeaf74291260628098629d533d69a9e653dfe1e0 100644 (file)
@@ -1,3 +1,10 @@
+2007-10-02  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * CodeDomLocalizationProvider.cs, CodeDomLocalizationModel.cs :
+         new files.
+       * CodeDomSerializerException.cs, CodeDomSerializerBase.cs,
+         TypeCodeDomSerializer.cs : cosmetic 2.0 API fixes.
+
 2007-09-24  Ivan N. Zlatev  <contact@i-nz.net>
        
        * DesignerSerializationManager.cs: fix when SerializationComplete 
diff --git a/mcs/class/System.Design/System.ComponentModel.Design.Serialization/CodeDomLocalizationModel.cs b/mcs/class/System.Design/System.ComponentModel.Design.Serialization/CodeDomLocalizationModel.cs
new file mode 100644 (file)
index 0000000..bacb093
--- /dev/null
@@ -0,0 +1,48 @@
+//
+// System.ComponentModel.Design.Serialization.CodeDomLocalizationModel
+//
+// Author:
+//     Atsushi Enomoto (atsushi@ximian.com)
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+//
+// 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.
+//
+
+#if NET_2_0
+
+using System.Drawing;
+using System.Drawing.Design;
+using System.Drawing.Drawing2D;
+using System.Security.Permissions;
+
+namespace System.ComponentModel.Design.Serialization
+{
+       public enum CodeDomLocalizationModel
+       {
+               None,
+               PropertyAssignment,
+               PropertyReflection
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Design/System.ComponentModel.Design.Serialization/CodeDomLocalizationProvider.cs b/mcs/class/System.Design/System.ComponentModel.Design.Serialization/CodeDomLocalizationProvider.cs
new file mode 100644 (file)
index 0000000..59f4bb4
--- /dev/null
@@ -0,0 +1,70 @@
+//
+// System.ComponentModel.Design.Serialization.CodeDomLocalizationProvider
+//
+// Author:
+//     Atsushi Enomoto (atsushi@ximian.com)
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+//
+// 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.
+//
+
+#if NET_2_0
+
+using System.CodeDom;
+using System.CodeDom.Compiler;
+using System.ComponentModel;
+using System.Globalization;
+using System.Security.Permissions;
+
+namespace System.ComponentModel.Design.Serialization
+{
+       public sealed class CodeDomLocalizationProvider : IDisposable, IDesignerSerializationProvider
+       {
+               [MonoTODO]
+               public CodeDomLocalizationProvider (IServiceProvider provider, CodeDomLocalizationModel model)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public CodeDomLocalizationProvider (IServiceProvider provider, CodeDomLocalizationModel model, CultureInfo [] supportedCultures)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Dispose ()
+               {
+               }
+
+               [MonoTODO]
+               object IDesignerSerializationProvider.GetSerializer (IDesignerSerializationManager manager, 
+                                                                    object currentSerializer, Type objectType,
+                                                                    Type serializerType)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+
+#endif
index 7e3c00051a31414b727fbaea25fbebf6609f640a..de8645de22b98a7ea53208b115ed65f007fce757 100644 (file)
@@ -39,6 +39,7 @@ using System.CodeDom;
 
 namespace System.ComponentModel.Design.Serialization
 {
+       [EditorBrowsable (EditorBrowsableState.Never)]
        public abstract class CodeDomSerializerBase
        {
 
index 7b673a355746c5f26cb81a5df47ee2fe59189eed..b2e8069283241967546923abb23263b2bb74ea57 100644 (file)
@@ -31,6 +31,9 @@ using System.Runtime.Serialization;
 
 namespace System.ComponentModel.Design.Serialization {
 
+#if NET_2_0
+[Serializable]
+#endif
 public class CodeDomSerializerException : SystemException
 {
        private CodeLinePragma linePragma;
@@ -52,6 +55,20 @@ public class CodeDomSerializerException : SystemException
                throw new NotImplementedException ();
        }
 
+#if NET_2_0
+       [MonoTODO]
+       public CodeDomSerializerException (string message, IDesignerSerializationManager manager)
+       {
+               throw new NotImplementedException ();
+       }
+
+       [MonoTODO]
+       public CodeDomSerializerException (Exception ex, IDesignerSerializationManager manager)
+       {
+               throw new NotImplementedException ();
+       }
+#endif
+
        [MonoTODO]
        public override void GetObjectData (SerializationInfo info, StreamingContext context)
        {
index 745ee824031a1b9bc6fcd887a8a8cc245fcd3ffe..6dd139ddec56103a1ede6050759859ae564814b1 100644 (file)
@@ -38,7 +38,7 @@ using System.CodeDom;
 
 namespace System.ComponentModel.Design.Serialization
 {
-       public class TypeCodeDomSerializer : CodeDomSerializer
+       public class TypeCodeDomSerializer : CodeDomSerializerBase
        {
 
                public TypeCodeDomSerializer ()
index 22406a98394e40e902d8cc612e9526265115bcca..6cc9bb078858fa86a9fc7c9c22aa0b5ccc3325bd 100755 (executable)
@@ -78,6 +78,8 @@ System.ComponentModel.Design/UndoEngine.cs
 System.ComponentModel.Design.Serialization/BasicDesignerLoader.cs
 System.ComponentModel.Design.Serialization/CodeDomComponentSerializationService.cs
 System.ComponentModel.Design.Serialization/CodeDomDesignerLoader.cs
+System.ComponentModel.Design.Serialization/CodeDomLocalizationModel.cs
+System.ComponentModel.Design.Serialization/CodeDomLocalizationProvider.cs
 System.ComponentModel.Design.Serialization/CodeDomSerializationProvider.cs
 System.ComponentModel.Design.Serialization/CodeDomSerializer.cs
 System.ComponentModel.Design.Serialization/CodeDomSerializerBase.cs
@@ -257,3 +259,18 @@ System.Windows.Forms.Design/StringCollectionEditor.cs
 System.Windows.Forms.Design/TabPageCollectionEditor.cs
 System.Windows.Forms.Design/UISelectionService.cs
 System.Windows.Forms.Design/WndProcRouter.cs
+System.Windows.Forms.Design.Behavior/Adorner.cs
+System.Windows.Forms.Design.Behavior/Behavior.cs
+System.Windows.Forms.Design.Behavior/BehaviorDragDropEventArgs.cs
+System.Windows.Forms.Design.Behavior/BehaviorDragDropEventHandler.cs
+System.Windows.Forms.Design.Behavior/BehaviorService.cs
+System.Windows.Forms.Design.Behavior/BehaviorServiceAdornerCollection.cs
+System.Windows.Forms.Design.Behavior/BehaviorServiceAdornerCollectionEnumerator.cs
+System.Windows.Forms.Design.Behavior/ComponentGlyph.cs
+System.Windows.Forms.Design.Behavior/ControlBodyGlyph.cs
+System.Windows.Forms.Design.Behavior/Glyph.cs
+System.Windows.Forms.Design.Behavior/GlyphCollection.cs
+System.Windows.Forms.Design.Behavior/GlyphSelectionType.cs
+System.Windows.Forms.Design.Behavior/SnapLine.cs
+System.Windows.Forms.Design.Behavior/SnapLinePriority.cs
+System.Windows.Forms.Design.Behavior/SnapLineType.cs
diff --git a/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/Adorner.cs b/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/Adorner.cs
new file mode 100644 (file)
index 0000000..334a3a9
--- /dev/null
@@ -0,0 +1,82 @@
+//
+// System.Windows.Forms.Design.Behavior.Adorner
+//
+// Author:
+//     Atsushi Enomoto (atsushi@ximian.com)
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+//
+// 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.
+//
+
+#if NET_2_0
+
+using System.Drawing;
+using System.Drawing.Design;
+using System.Drawing.Drawing2D;
+
+namespace System.Windows.Forms.Design.Behavior
+{
+       public sealed class Adorner
+       {
+               public Adorner ()
+               {
+               }
+
+               [MonoTODO]
+               public void Invalidate ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Invalidate (Rectangle rectangle)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Invalidate (Region region)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public BehaviorService BehaviorService {
+                       get { throw new NotImplementedException (); }
+                       set { throw new NotImplementedException (); }
+               }
+
+               [MonoTODO]
+               public bool Enabled {
+                       get { throw new NotImplementedException (); }
+                       set { throw new NotImplementedException (); }
+               }
+
+               [MonoTODO]
+               public GlyphCollection Glyphs {
+                       get { throw new NotImplementedException (); }
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/Behavior.cs b/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/Behavior.cs
new file mode 100644 (file)
index 0000000..f3fa0d7
--- /dev/null
@@ -0,0 +1,156 @@
+//
+// System.Windows.Forms.Design.Behavior.Behavior
+//
+// Author:
+//     Atsushi Enomoto (atsushi@ximian.com)
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+//
+// 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.
+//
+
+#if NET_2_0
+
+using System.ComponentModel.Design;
+using System.Drawing;
+using System.Drawing.Design;
+using System.Drawing.Drawing2D;
+
+namespace System.Windows.Forms.Design.Behavior
+{
+       public abstract class Behavior
+       {
+               [MonoTODO]
+               protected Behavior ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               protected Behavior (bool callParentBehavior, BehaviorService behaviorService)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public virtual Cursor Cursor {
+                       get { throw new NotImplementedException (); }
+               }
+
+               [MonoTODO]
+               public virtual bool DisableAllCommands {
+                       get { throw new NotImplementedException (); }
+               }
+
+               [MonoTODO]
+               public virtual MenuCommand FindCommand (CommandID commandId)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public virtual void OnDragDrop (Glyph g, DragEventArgs e)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public virtual void OnDragEnter (Glyph g, DragEventArgs e)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public virtual void OnDragLeave (Glyph g, EventArgs e)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public virtual void OnDragOver (Glyph g, DragEventArgs e)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public virtual void OnGiveFeedback (Glyph g, GiveFeedbackEventArgs e)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public virtual void OnLoseCapture (Glyph g, EventArgs e)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public virtual bool OnMouseDoubleClick (Glyph g, MouseButtons button, Point mouseLoc)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public virtual bool OnMouseDown (Glyph g, MouseButtons button, Point mouseLoc)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public virtual bool OnMouseEnter (Glyph g)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public virtual bool OnMouseHover (Glyph g, Point mouseLoc)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public virtual bool OnMouseLeave (Glyph g)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public virtual bool OnMouseMove (Glyph g, MouseButtons button, Point mouseLoc)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public virtual bool OnMouseUp (Glyph g, MouseButtons button)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public virtual void OnQueryContinueDrag (Glyph g, QueryContinueDragEventArgs e)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/BehaviorDragDropEventArgs.cs b/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/BehaviorDragDropEventArgs.cs
new file mode 100644 (file)
index 0000000..941a435
--- /dev/null
@@ -0,0 +1,51 @@
+//
+// System.Windows.Forms.Design.Behavior.BehaviorDragDropEventArgs
+//
+// Author:
+//     Atsushi Enomoto (atsushi@ximian.com)
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+//
+// 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.
+//
+
+#if NET_2_0
+using System.Collections;
+
+namespace System.Windows.Forms.Design.Behavior
+{
+       public class BehaviorDragDropEventArgs : EventArgs
+       {
+               ICollection components;
+
+               public BehaviorDragDropEventArgs (ICollection dragComponents)
+               {
+                       this.components = dragComponents;
+               }
+
+               public ICollection DragComponents {
+                       get { return components; }
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/BehaviorDragDropEventHandler.cs b/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/BehaviorDragDropEventHandler.cs
new file mode 100644 (file)
index 0000000..5a15c47
--- /dev/null
@@ -0,0 +1,38 @@
+//
+// System.Windows.Forms.Design.Behavior.BehaviorDragDropEventHandler
+//
+// Author:
+//     Atsushi Enomoto (atsushi@ximian.com)
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+//
+// 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.
+//
+
+#if NET_2_0
+
+namespace System.Windows.Forms.Design.Behavior
+{
+       public delegate void BehaviorDragDropEventHandler (object sender, BehaviorDragDropEventArgs e);
+}
+
+#endif
diff --git a/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/BehaviorService.cs b/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/BehaviorService.cs
new file mode 100644 (file)
index 0000000..4f1cf66
--- /dev/null
@@ -0,0 +1,155 @@
+//
+// System.Windows.Forms.Design.Behavior.BehaviorService
+//
+// Author:
+//     Atsushi Enomoto (atsushi@ximian.com)
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+//
+// 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.
+//
+
+#if NET_2_0
+
+using System.Drawing;
+using System.Drawing.Drawing2D;
+
+namespace System.Windows.Forms.Design.Behavior
+{
+       public sealed class BehaviorService : IDisposable
+       {
+               internal BehaviorService ()
+               {
+               }
+
+               public event BehaviorDragDropEventHandler BeginDrag;
+               public event BehaviorDragDropEventHandler EndDrag;
+               public event EventHandler Synchronize;
+
+               [MonoTODO]
+               public BehaviorServiceAdornerCollection Adorners {
+                       get { throw new NotImplementedException (); }
+               }
+
+               [MonoTODO]
+               public Graphics AdornerWindowGraphics {
+                       get { throw new NotImplementedException (); }
+               }
+
+               [MonoTODO]
+               public Behavior CurrentBehavior {
+                       get { throw new NotImplementedException (); }
+               }
+
+               [MonoTODO]
+               public Point AdornerWindowPointToScreen (Point p)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public Point AdornerWindowToScreen ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public Rectangle ControlRectInAdornerWindow (Control c)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public Point ControlToAdornerWindow (Control c)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Dispose ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public Behavior GetNextBehavior (Behavior behavior)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Invalidate ()
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Invalidate (Rectangle rect)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void Invalidate (Region r)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public Point MapAdornerWindowPoint (IntPtr handle, Point pt)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public Behavior PopBehavior (Behavior behavior)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void PushBehavior (Behavior behavior)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void PushCaptureBehavior (Behavior behavior)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public Point ScreenToAdornerWindow (Point p)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public void SyncSelection ()
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/BehaviorServiceAdornerCollection.cs b/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/BehaviorServiceAdornerCollection.cs
new file mode 100644 (file)
index 0000000..9590c19
--- /dev/null
@@ -0,0 +1,129 @@
+//
+// System.Windows.Forms.Design.Behavior.BehaviorServiceAdornerCollection
+//
+// Author:
+//     Atsushi Enomoto (atsushi@ximian.com)
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+//
+// 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.
+//
+
+#if NET_2_0
+
+using System.Collections;
+
+namespace System.Windows.Forms.Design.Behavior
+{
+       public sealed class BehaviorServiceAdornerCollection : CollectionBase
+       {
+               int state;
+
+               public BehaviorServiceAdornerCollection (BehaviorService behaviorService)
+                       : this (behaviorService.Adorners)
+               {
+               }
+
+               public BehaviorServiceAdornerCollection (Adorner [] value)
+               {
+                       if (value == null)
+                               throw new ArgumentNullException ("value");
+                       InnerList.AddRange (value);
+               }
+
+               public BehaviorServiceAdornerCollection (BehaviorServiceAdornerCollection value)
+               {
+                       if (value == null)
+                               throw new ArgumentNullException ("value");
+                       InnerList.AddRange (value);
+               }
+
+               internal int State {
+                       get { return state; }
+               }
+
+               public Adorner this [int index] {
+                       get { return (Adorner) InnerList [index]; }
+                       set {
+                               if (value == null)
+                                       throw new ArgumentNullException ("value");
+                               InnerList [index] = value;
+                       }
+               }
+
+               public int Add (Adorner value)
+               {
+                       state++;
+                       return InnerList.Add (value);
+               }
+
+               public void AddRange (Adorner [] value)
+               {
+                       state++;
+                       if (value == null)
+                               throw new ArgumentNullException ("value");
+                       InnerList.AddRange (value);
+               }
+
+               public void AddRange (BehaviorServiceAdornerCollection value)
+               {
+                       state++;
+                       if (value == null)
+                               throw new ArgumentNullException ("value");
+                       InnerList.AddRange (value);
+               }
+
+               public bool Contains (Adorner value)
+               {
+                       return InnerList.Contains (value);
+               }
+
+               public void CopyTo (Adorner [] array, int index)
+               {
+                       InnerList.CopyTo (array, index);
+               }
+
+               public int IndexOf (Adorner value)
+               {
+                       return InnerList.IndexOf (value);
+               }
+
+               public BehaviorServiceAdornerCollectionEnumerator GetEnumerator ()
+               {
+                       return new BehaviorServiceAdornerCollectionEnumerator (this);
+               }
+
+               public void Insert (int index, Adorner value)
+               {
+                       state++;
+                       InnerList.Insert (index, value);
+               }
+
+               public void Remove (Adorner value)
+               {
+                       state++;
+                       InnerList.Remove (value);
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/BehaviorServiceAdornerCollectionEnumerator.cs b/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/BehaviorServiceAdornerCollectionEnumerator.cs
new file mode 100644 (file)
index 0000000..4709f0f
--- /dev/null
@@ -0,0 +1,91 @@
+//
+// System.Windows.Forms.Design.Behavior.BehaviorServiceAdornerCollectionEnumerator
+//
+// Author:
+//     Atsushi Enomoto (atsushi@ximian.com)
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+//
+// 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.
+//
+
+#if NET_2_0
+
+using System.Collections;
+
+namespace System.Windows.Forms.Design.Behavior
+{
+       public class BehaviorServiceAdornerCollectionEnumerator : IEnumerator
+       {
+               BehaviorServiceAdornerCollection mappings;
+               int index, state;
+
+               public BehaviorServiceAdornerCollectionEnumerator (BehaviorServiceAdornerCollection mappings)
+               {
+                       if (mappings == null)
+                               throw new ArgumentNullException ("mappings");
+                       this.mappings = mappings;
+
+                       Reset ();
+               }
+
+               public Adorner Current {
+                       get { return index < 0 ? null : mappings [index]; }
+               }
+
+               void CheckState ()
+               {
+                       if (mappings.State != state)
+                               throw new InvalidOperationException ("Collection has changed");
+               }
+
+               public bool MoveNext ()
+               {
+                       CheckState ();
+                       if (index++ < mappings.Count)
+                               return true;
+                       index--;
+                       return false;
+               }
+
+               public void Reset ()
+               {
+                       index = -1;
+               }
+
+               object IEnumerator.Current {
+                       get { return Current; }
+               }
+
+               bool IEnumerator.MoveNext ()
+               {
+                       return MoveNext ();
+               }
+
+               void IEnumerator.Reset ()
+               {
+                       Reset ();
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/ChangeLog b/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/ChangeLog
new file mode 100755 (executable)
index 0000000..e6f0672
--- /dev/null
@@ -0,0 +1,10 @@
+2007-10-02  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * Adorner.cs, Behavior.cs, BehaviorDragDropEventArgs.cs,
+         BehaviorDragDropEventHandler.cs, BehaviorService.cs,
+         BehaviorServiceAdornerCollection.cs,
+         BehaviorServiceAdornerCollectionEnumerator.cs,
+         ComponentGlyph.cs, ControlBodyGlyph.cs, Glyph.cs,
+         GlyphCollection.cs, GlyphSelectionType.cs, SnapLine.cs,
+         SnapLinePriority.cs, SnapLineType.cs : new files.
+
diff --git a/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/ComponentGlyph.cs b/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/ComponentGlyph.cs
new file mode 100644 (file)
index 0000000..a9db47c
--- /dev/null
@@ -0,0 +1,74 @@
+//
+// System.Windows.Forms.Design.Behavior.ComponentGlyph
+//
+// Author:
+//     Atsushi Enomoto (atsushi@ximian.com)
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+//
+// 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.
+//
+
+#if NET_2_0
+
+using System.ComponentModel;
+using System.Drawing;
+using System.Drawing.Design;
+using System.Drawing.Drawing2D;
+
+namespace System.Windows.Forms.Design.Behavior
+{
+       public class ComponentGlyph : Glyph
+       {
+               IComponent component;
+
+               public ComponentGlyph (IComponent relatedComponent)
+                       : this (relatedComponent, null)
+               {
+               }
+
+               public ComponentGlyph (IComponent relatedComponent, Behavior behavior)
+                       : base (behavior)
+               {
+                       this.component = relatedComponent;
+               }
+
+               [MonoTODO]
+               public IComponent RelatedComponent {
+                       get { return component; }
+               }
+
+               [MonoTODO]
+               public override Cursor GetHitTest (Point p)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override void Paint (PaintEventArgs pe)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/ControlBodyGlyph.cs b/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/ControlBodyGlyph.cs
new file mode 100644 (file)
index 0000000..0f17445
--- /dev/null
@@ -0,0 +1,71 @@
+//
+// System.Windows.Forms.Design.Behavior.ControlBodyGlyph
+//
+// Author:
+//     Atsushi Enomoto (atsushi@ximian.com)
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+//
+// 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.
+//
+
+#if NET_2_0
+
+using System.ComponentModel;
+using System.Drawing;
+using System.Drawing.Design;
+using System.Drawing.Drawing2D;
+
+namespace System.Windows.Forms.Design.Behavior
+{
+       public class ControlBodyGlyph : ComponentGlyph
+       {
+               Rectangle bounds;
+
+               [MonoTODO]
+               public ControlBodyGlyph (Rectangle bounds, Cursor cursor, IComponent relatedComponent, Behavior behavior)
+                       : base (relatedComponent, behavior)
+               {
+                       this.bounds = bounds;
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public ControlBodyGlyph (Rectangle bounds, Cursor cursor, IComponent relatedComponent, ControlDesigner designer)
+                       : this (bounds, cursor, relatedComponent, designer.BehaviorService.CurrentBehavior)
+               {
+               }
+
+               [MonoTODO]
+               public override Rectangle Bounds {
+                       get { return bounds; }
+               }
+
+               [MonoTODO]
+               public override Cursor GetHitTest (Point p)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/Glyph.cs b/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/Glyph.cs
new file mode 100644 (file)
index 0000000..85e90a6
--- /dev/null
@@ -0,0 +1,71 @@
+//
+// System.Windows.Forms.Design.Behavior.Glyph
+//
+// Author:
+//     Atsushi Enomoto (atsushi@ximian.com)
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+//
+// 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.
+//
+
+#if NET_2_0
+
+using System.Drawing;
+using System.Drawing.Design;
+using System.Drawing.Drawing2D;
+
+namespace System.Windows.Forms.Design.Behavior
+{
+       public abstract class Glyph
+       {
+               Behavior behavior;
+
+               [MonoTODO]
+               protected Glyph (Behavior behavior)
+               {
+                       SetBehavior (behavior);
+               }
+
+               [MonoTODO]
+               public virtual Behavior Behavior {
+                       get { return behavior; }
+               }
+
+               [MonoTODO]
+               public virtual Rectangle Bounds {
+                       get { throw new NotImplementedException (); }
+               }
+
+               public abstract Cursor GetHitTest (Point p);
+
+               public abstract void Paint (PaintEventArgs pe);
+
+               [MonoTODO]
+               protected void SetBehavior (Behavior behavior)
+               {
+                       throw new NotImplementedException ();
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/GlyphCollection.cs b/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/GlyphCollection.cs
new file mode 100644 (file)
index 0000000..59e0ccb
--- /dev/null
@@ -0,0 +1,112 @@
+//
+// System.Windows.Forms.Design.Behavior.GlyphCollection
+//
+// Author:
+//     Atsushi Enomoto (atsushi@ximian.com)
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+//
+// 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.
+//
+
+#if NET_2_0
+
+using System.Collections;
+
+namespace System.Windows.Forms.Design.Behavior
+{
+       public class GlyphCollection : CollectionBase
+       {
+               public GlyphCollection ()
+               {
+               }
+
+               public GlyphCollection (Glyph [] value)
+               {
+                       if (value == null)
+                               throw new ArgumentNullException ("value");
+                       InnerList.AddRange (value);
+               }
+
+               public GlyphCollection (GlyphCollection value)
+               {
+                       if (value == null)
+                               throw new ArgumentNullException ("value");
+                       InnerList.AddRange (value);
+               }
+
+               public Glyph this [int index] {
+                       get { return (Glyph) InnerList [index]; }
+                       set {
+                               if (value == null)
+                                       throw new ArgumentNullException ("value");
+                               InnerList [index] = value;
+                       }
+               }
+
+               public int Add (Glyph value)
+               {
+                       return InnerList.Add (value);
+               }
+
+               public void AddRange (Glyph [] value)
+               {
+                       if (value == null)
+                               throw new ArgumentNullException ("value");
+                       InnerList.AddRange (value);
+               }
+
+               public void AddRange (GlyphCollection value)
+               {
+                       if (value == null)
+                               throw new ArgumentNullException ("value");
+                       InnerList.AddRange (value);
+               }
+
+               public bool Contains (Glyph value)
+               {
+                       return InnerList.Contains (value);
+               }
+
+               public void CopyTo (Glyph [] array, int index)
+               {
+                       InnerList.CopyTo (array, index);
+               }
+
+               public int IndexOf (Glyph value)
+               {
+                       return InnerList.IndexOf (value);
+               }
+
+               public void Insert (int index, Glyph value)
+               {
+                       InnerList.Insert (index, value);
+               }
+
+               public void Remove (Glyph value)
+               {
+                       InnerList.Remove (value);
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/GlyphSelectionType.cs b/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/GlyphSelectionType.cs
new file mode 100644 (file)
index 0000000..b96ecc7
--- /dev/null
@@ -0,0 +1,43 @@
+//
+// System.Windows.Forms.Design.Behavior.GlyphSelectionType
+//
+// Author:
+//     Atsushi Enomoto (atsushi@ximian.com)
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+//
+// 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.
+//
+
+#if NET_2_0
+
+namespace System.Windows.Forms.Design.Behavior
+{
+       public enum GlyphSelectionType
+       {
+               NotSelected,
+               Selected,
+               SelectedPrimary
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/SnapLine.cs b/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/SnapLine.cs
new file mode 100644 (file)
index 0000000..415fcff
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// System.Windows.Forms.Design.Behavior.SnapLine
+//
+// Author:
+//     Atsushi Enomoto (atsushi@ximian.com)
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+//
+// 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.
+//
+
+#if NET_2_0
+
+
+namespace System.Windows.Forms.Design.Behavior
+{
+       public sealed class SnapLine
+       {
+               [MonoTODO]
+               public static bool ShouldSnap (SnapLine line1, SnapLine line2)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               SnapLineType type;
+               int offset;
+               string filter;
+               SnapLinePriority priority;
+
+               [MonoTODO]
+               public SnapLine (SnapLineType type, int offset)
+                       : this (type, offset, null)
+               {
+               }
+
+               [MonoTODO]
+               public SnapLine (SnapLineType type, int offset, string filter)
+                       : this (type, offset, filter, default (SnapLinePriority))
+               {
+               }
+
+               [MonoTODO]
+               public SnapLine (SnapLineType type, int offset, SnapLinePriority priority)
+                       : this (type, offset, null, priority)
+               {
+               }
+
+               [MonoTODO]
+               public SnapLine (SnapLineType type, int offset, string filter, SnapLinePriority priority)
+               {
+                       this.type =type;
+                       this.offset = offset;
+                       this.filter = filter;
+                       this.priority = priority;
+               }
+
+               public string Filter {
+                       get { return filter; }
+               }
+
+               public bool IsHorizontal {
+                       get {
+                               switch (SnapLineType) {
+                               case SnapLineType.Top:
+                               case SnapLineType.Bottom:
+                               case SnapLineType.Horizontal:
+                               case SnapLineType.Baseline:
+                                       return true;
+                               default:
+                                       return false;
+                               }
+                       }
+               }
+
+               public bool IsVertical {
+                       get {
+                               switch (SnapLineType) {
+                               case SnapLineType.Left:
+                               case SnapLineType.Right:
+                               case SnapLineType.Vertical:
+                                       return true;
+                               default:
+                                       return false;
+                               }
+                       }
+               }
+
+               public int Offset {
+                       get { return offset; }
+               }
+
+               public SnapLinePriority Priority {
+                       get { return priority; }
+               }
+
+               public SnapLineType SnapLineType {
+                       get { return type; }
+               }
+
+               [MonoTODO]
+               public void AdjustOffset (int adjustment)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               [MonoTODO]
+               public override string ToString ()
+               {
+                       return base.ToString ();
+               }
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/SnapLinePriority.cs b/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/SnapLinePriority.cs
new file mode 100644 (file)
index 0000000..9021d0d
--- /dev/null
@@ -0,0 +1,44 @@
+//
+// System.Windows.Forms.Design.Behavior.SnapLinePriority
+//
+// Author:
+//     Atsushi Enomoto (atsushi@ximian.com)
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+//
+// 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.
+//
+
+#if NET_2_0
+
+namespace System.Windows.Forms.Design.Behavior
+{
+       public enum SnapLinePriority
+       {
+               Low = 1,
+               Medium,
+               High,
+               Always
+       }
+}
+
+#endif
diff --git a/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/SnapLineType.cs b/mcs/class/System.Design/System.Windows.Forms.Design.Behavior/SnapLineType.cs
new file mode 100644 (file)
index 0000000..23f4312
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// System.Windows.Forms.Design.Behavior.SnapLineType
+//
+// Author:
+//     Atsushi Enomoto (atsushi@ximian.com)
+//
+// Copyright (C) 2007 Novell, Inc.
+//
+
+//
+// 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.
+//
+
+#if NET_2_0
+
+namespace System.Windows.Forms.Design.Behavior
+{
+       public enum SnapLineType
+       {
+               Top,
+               Bottom,
+               Left,
+               Right,
+               Horizontal,
+               Vertical,
+               Baseline
+       }
+}
+
+#endif
index 26315ace114049a0d85237a3465c75e45479ed48..5691bf7aab777d0f61aff6bdb0d225f3b413f249 100644 (file)
@@ -1,3 +1,7 @@
+2007-10-02  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * ControlDesigner.cs : added BehaviorService.
+
 2007-09-15  Ivan N. Zlatev  <contact@i-nz.net>
 
        * ParentControlDesigner.cs: Binary compatibility fixes.
index 8608b06a972faad4ddcb9e3613e67158927f9d51..501e4296ca8cafd9a05da21f17fcc08588161f53 100644 (file)
@@ -35,8 +35,9 @@ using System.Windows.Forms;
 using System.Drawing;
 using System.Drawing.Design;
 using System.Collections;
-
-
+#if NET_2_0
+using System.Windows.Forms.Design.Behavior;
+#endif
 
 namespace System.Windows.Forms.Design
 {
@@ -110,6 +111,12 @@ namespace System.Windows.Forms.Design
 #region Properties and Fields - AccessabilityObject Left
                protected static readonly Point InvalidPoint = new Point (int.MinValue, int.MinValue);
 
+#if NET_2_0
+               protected internal BehaviorService BehaviorService {
+                       get { throw new NotImplementedException (); }
+               }
+#endif
+
                public virtual Control Control {
                        get { return (Control) base.Component; }
                }