Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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