2004-02-07 Andreas Nahr <ClassDevelopment@A-SoftTech.com>
authorAndreas N <andreas@mono-cvs.ximian.com>
Sat, 7 Feb 2004 19:19:52 +0000 (19:19 -0000)
committerAndreas N <andreas@mono-cvs.ximian.com>
Sat, 7 Feb 2004 19:19:52 +0000 (19:19 -0000)
* SRDescriptionAttribute.cs: Added and implemented
* ToolboxBitmapAttribute.cs: Implemented a few members
* SystemIcons.cs: Stubbed
* StringFormat.cs: Implemented method
* Region.cs: Added Todo, fixed attribute
* Size.cs: Added attribute
* SizeF.cs: Added attribute
* RectangleF.cs: Added attributes
* Rectangle.cs: Added attributes
* PointF.cs: Added attribute
* Point.cs: Added attribute

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

12 files changed:
mcs/class/System.Drawing/System.Drawing/ChangeLog
mcs/class/System.Drawing/System.Drawing/Point.cs
mcs/class/System.Drawing/System.Drawing/PointF.cs
mcs/class/System.Drawing/System.Drawing/Rectangle.cs
mcs/class/System.Drawing/System.Drawing/RectangleF.cs
mcs/class/System.Drawing/System.Drawing/Region.cs
mcs/class/System.Drawing/System.Drawing/SRDescriptionAttribute.cs [new file with mode: 0644]
mcs/class/System.Drawing/System.Drawing/Size.cs
mcs/class/System.Drawing/System.Drawing/SizeF.cs
mcs/class/System.Drawing/System.Drawing/StringFormat.cs
mcs/class/System.Drawing/System.Drawing/SystemIcons.cs
mcs/class/System.Drawing/System.Drawing/ToolboxBitmapAttribute.cs

index f6043c31ad3e6872fbea04cbfe4475af334976dc..63fe0942222cfaacd675a5a49feda231976d1a9f 100644 (file)
@@ -1,3 +1,17 @@
+2004-02-07  Andreas Nahr <ClassDevelopment@A-SoftTech.com>
+
+       * SRDescriptionAttribute.cs: Added and implemented
+       * ToolboxBitmapAttribute.cs: Implemented a few members
+       * SystemIcons.cs: Stubbed
+       * StringFormat.cs: Implemented method
+       * Region.cs: Added Todo, fixed attribute
+       * Size.cs: Added attribute
+       * SizeF.cs: Added attribute
+       * RectangleF.cs: Added attributes
+       * Rectangle.cs: Added attributes
+       * PointF.cs: Added attribute
+       * Point.cs: Added attribute
+
 2004-02-06  Ravindra  <rkumar@novell.com>
 
        * Brush.cs: Renamed GetException method to CheckStatus
index b517f17534cfe02953e61adfdb73893332e9a5ad..1230252e80e4d4dbb13fb1a1bdff6363b71206bb 100644 (file)
@@ -244,6 +244,7 @@ namespace System.Drawing {
                ///     Indicates if both X and Y are zero.
                /// </remarks>
                
+               [Browsable (false)]
                public bool IsEmpty {
                        get {
                                return ((x == 0) && (y == 0));
index 53a96deff402a4f66bb5bdcbf438091118a3af06..d041d26191c288f299416260ae2647343941f9c0 100644 (file)
@@ -9,6 +9,7 @@
 
 using System;
 using System.Runtime.InteropServices;
+using System.ComponentModel;
 
 namespace System.Drawing {
        
@@ -121,6 +122,7 @@ namespace System.Drawing {
                ///     Indicates if both X and Y are zero.
                /// </remarks>
                
+               [Browsable (false)]
                public bool IsEmpty {
                        get {
                                return ((cx == 0.0) && (cy == 0.0));
index 4af6820f7d2dda2185226be864e4bb5f07c2d70e..ae2392c88a613f8ac7145a2359d0895bfe37243c 100644 (file)
@@ -298,6 +298,7 @@ namespace System.Drawing {
                ///     Read only.
                /// </remarks>
                
+               [Browsable (false)]
                public int Bottom {
                        get {
                                return y + height;
@@ -329,6 +330,7 @@ namespace System.Drawing {
                ///     Indicates if the width or height are zero. Read only.
                /// </remarks>
                
+               [Browsable (false)]
                public bool IsEmpty {
                        get {
                                return ((width == 0) || (height == 0));
@@ -344,6 +346,7 @@ namespace System.Drawing {
                ///     Read only.
                /// </remarks>
                
+               [Browsable (false)]
                public int Left {
                        get {
                                return X;
@@ -358,6 +361,7 @@ namespace System.Drawing {
                ///     The Location of the top-left corner of the Rectangle.
                /// </remarks>
                
+               [Browsable (false)]
                public Point Location {
                        get {
                                return new Point (x, y);
@@ -377,6 +381,7 @@ namespace System.Drawing {
                ///     Read only.
                /// </remarks>
                
+               [Browsable (false)]
                public int Right {
                        get {
                                return X + Width;
@@ -391,6 +396,7 @@ namespace System.Drawing {
                ///     The Size of the Rectangle.
                /// </remarks>
                
+               [Browsable (false)]
                public Size Size {
                        get {
                                return new Size (Width, Height);
@@ -410,6 +416,7 @@ namespace System.Drawing {
                ///     Read only.
                /// </remarks>
                
+               [Browsable (false)]
                public int Top {
                        get {
                                return y;
index cebcc3de470b63ece9c0450454bc57bfa38fb552..9182bd92a322dbdd64b0fa6820eb9ff14fca1772 100644 (file)
@@ -8,6 +8,7 @@
 //
 
 using System;
+using System.ComponentModel;
 
 namespace System.Drawing {
        
@@ -236,6 +237,7 @@ namespace System.Drawing {
                ///     Read only.
                /// </remarks>
                
+               [Browsable (false)]
                public float Bottom {
                        get {
                                return Y + Height;
@@ -267,6 +269,7 @@ namespace System.Drawing {
                ///     Indicates if the width or height are zero. Read only.
                /// </remarks>
                
+               [Browsable (false)]
                public bool IsEmpty {
                        get {
                                return ((sz.Width == 0) || (sz.Height == 0));
@@ -282,6 +285,7 @@ namespace System.Drawing {
                ///     Read only.
                /// </remarks>
                
+               [Browsable (false)]
                public float Left {
                        get {
                                return X;
@@ -296,6 +300,7 @@ namespace System.Drawing {
                ///     The Location of the top-left corner of the RectangleF.
                /// </remarks>
                
+               [Browsable (false)]
                public PointF Location {
                        get {
                                return loc;
@@ -314,6 +319,7 @@ namespace System.Drawing {
                ///     Read only.
                /// </remarks>
                
+               [Browsable (false)]
                public float Right {
                        get {
                                return X + Width;
@@ -328,6 +334,7 @@ namespace System.Drawing {
                ///     The Size of the RectangleF.
                /// </remarks>
                
+               [Browsable (false)]
                public SizeF Size {
                        get {
                                return sz;
@@ -346,6 +353,7 @@ namespace System.Drawing {
                ///     Read only.
                /// </remarks>
                
+               [Browsable (false)]
                public float Top {
                        get {
                                return Y;
index 7b9e17c5bfce40b2e29431a2d24f63ab4cad92fa..f19b29d77fd7cb24d3e10090018cabca9a90fb0d 100644 (file)
@@ -13,6 +13,7 @@ using System.Runtime.InteropServices;
 namespace System.Drawing
 {
        [ComVisible(false)]
+       [MonoTODO ("Not implemented")]
        public sealed class Region : MarshalByRefObject, IDisposable
        {
                public Region()
@@ -256,7 +257,6 @@ namespace System.Drawing
                }
                
                
-               [ComVisible(false)]
                public Region Clone()
                {
                        return this;
diff --git a/mcs/class/System.Drawing/System.Drawing/SRDescriptionAttribute.cs b/mcs/class/System.Drawing/System.Drawing/SRDescriptionAttribute.cs
new file mode 100644 (file)
index 0000000..b14ded4
--- /dev/null
@@ -0,0 +1,35 @@
+//
+// System.Drawing.SRDescriptionAttribute.cs
+//
+// Authors:
+//   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
+//
+// (C) 2004 Andreas Nahr
+//
+
+using System;
+using System.ComponentModel;
+
+namespace System.Drawing
+{
+       [AttributeUsage(AttributeTargets.All)]
+       internal class SRDescriptionAttribute : DescriptionAttribute
+       {
+               private bool isReplaced = false;
+
+               public SRDescriptionAttribute (string description)
+                       : base (description)
+               {
+               }
+
+               public override string Description {
+                       get {
+                               if (!isReplaced) {
+                                       isReplaced = true;
+                                       DescriptionValue = Locale.GetText (DescriptionValue);
+                               }
+                               return DescriptionValue;
+                       }
+               }
+       }
+}
index 338141463705aae4d59724ac36d59213a5e5c989..a98b7dcbbd1184bf74add60c016ec676e4e41301 100644 (file)
@@ -229,6 +229,7 @@ namespace System.Drawing {
                ///     Indicates if both Width and Height are zero.
                /// </remarks>
                
+               [Browsable (false)]
                public bool IsEmpty {
                        get {
                                return ((width == 0) && (height == 0));
index 2e35c0b68ac1b2352b76ba12b602f5681924dcbb..366be66d3f946e63cecaa5606e41de4447507243 100644 (file)
@@ -9,6 +9,7 @@
 
 using System;
 using System.Runtime.InteropServices;
+using System.ComponentModel;
 
 namespace System.Drawing {
 
@@ -166,6 +167,7 @@ namespace System.Drawing {
                ///     Indicates if both Width and Height are zero.
                /// </remarks>
                
+               [Browsable (false)]
                public bool IsEmpty {
                        get {
                                return ((wd == 0.0) && (ht == 0.0));
index 14e8a8222ffebf8bda0cfc55bdfe2fe351b60bdf..5f573638657a79a0de613f39c241f1034146b0fb 100644 (file)
@@ -4,15 +4,13 @@
 // Authors:\r
 //   Dennis Hayes (dennish@Raytek.com)\r
 //   Miguel de Icaza (miguel@ximian.com)\r
-//      Jordi Mas i Hernandez (jordi@ximian.com)\r
+//   Jordi Mas i Hernandez (jordi@ximian.com)\r
 //\r
 // (C) 2002 Ximian, Inc\r
 // (C) 2003 Novell, Inc.\r
 //\r
 using System;\r
 using System.Drawing.Text;\r
-using System.IO;// temp\r
-\r
 \r
 namespace System.Drawing\r
 {\r
@@ -168,8 +166,14 @@ namespace System.Drawing
                }\r
 \r
                [MonoTODO]\r
-               public object Clone () {\r
+               public object Clone ()
+               {\r
                        throw new NotImplementedException ();\r
+               }
+
+               public override string ToString ()
+               {
+                       return "[StringFormat, FormatFlags=" + this.FormatFlags.ToString() + "]";
                }\r
                \r
                internal IntPtr NativeObject{            \r
index 5d671a46e58e5c062b2fab8b053bfd5b58cafad7..a2170584dfcd87e6e6f328a86fbbb564b1d0b273 100644 (file)
@@ -1,22 +1,38 @@
 //\r
 // System.Drawing.SystemIcons.cs\r
 //\r
-// Author:\r
-//   Dennis Hayes (dennish@Raytek.com)\r
+// Authors:\r
+//   Dennis Hayes (dennish@Raytek.com)
+//   Andreas Nahr (ClassDevelopment@A-SoftTech.com)\r
 //\r
 // (C) 2002 Ximian, Inc\r
-//\r
+//
+\r
 using System;\r
 \r
 namespace System.Drawing\r
-{\r
-       /// <summary>\r
-       /// Summary description for SystemIcons.\r
-       /// </summary>\r
+{
+       [MonoTODO ("not implemented")]\r
        public sealed class SystemIcons\r
        {\r
                private SystemIcons()\r
                {\r
+               }
+
+               public static Icon Application { get { return LoadIcon();} }
+               public static Icon Asterisk { get { return LoadIcon();} }
+               public static Icon Error { get { return LoadIcon();} }
+               public static Icon Exclamation { get { return LoadIcon();} }
+               public static Icon Hand { get { return LoadIcon();} }
+               public static Icon Information { get { return LoadIcon();} }
+               public static Icon Question { get { return LoadIcon();} }
+               public static Icon Warning { get { return LoadIcon();} }
+               public static Icon WinLogo { get { return LoadIcon();} }
+
+               [MonoTODO]
+               private static Icon LoadIcon ()
+               {
+                       return null;
                }\r
        }\r
 }\r
index 1e0ba66c7f10130f7e2b9f0b71f7c607bd18557f..8a1d6dbbdc4333d1d444d090764d07d7ddef1c9b 100644 (file)
@@ -1,40 +1,96 @@
 //\r
 // System.Drawing.ToolboxBitmapAttribute.cs\r
 //\r
-// Author:\r
-//   Dennis Hayes (dennish@Raytek.com)\r
+// Authors:\r
+//   Dennis Hayes (dennish@Raytek.com)
+//   Andreas Nahr (ClassDevelopment@A-SoftTech.com)\r
 //\r
 // (C) 2002 Ximian, Inc\r
-//\r
+//
+\r
 using System;\r
 \r
 namespace System.Drawing\r
 {\r
-       /// <summary>\r
-       /// Summary description for ToolboxBitmapAttribute.\r
-       /// </summary>\r
        [AttributeUsage (AttributeTargets.Class)]\r
        public class ToolboxBitmapAttribute : Attribute\r
-       {\r
-               public ToolboxBitmapAttribute(string imageFile)\r
+       {
+               private Image smallImage;
+               private Image bigImage;
+               public static readonly ToolboxBitmapAttribute Default = new ToolboxBitmapAttribute();
+
+               private ToolboxBitmapAttribute ()
+               {
+               }
+
+               [MonoTODO ("implement")]\r
+               public ToolboxBitmapAttribute (string imageFile)\r
                {\r
                        //\r
                        // TODO: Add constructor logic here\r
                        //\r
                }\r
-               \r
-               public ToolboxBitmapAttribute(Type t)\r
+               
+               [MonoTODO ("implement")]\r
+               public ToolboxBitmapAttribute (Type t)\r
                {\r
                        //\r
                        // TODO: Add constructor logic here\r
                        //\r
                }\r
-               \r
-               public ToolboxBitmapAttribute(Type t, string name)\r
+               
+               [MonoTODO ("implement")]\r
+               public ToolboxBitmapAttribute (Type t, string name)\r
                {\r
                        //\r
                        // TODO: Add constructor logic here\r
                        //\r
+               }
+
+               public override bool Equals (object value)
+               {
+                       if (!(value is ToolboxBitmapAttribute))
+                               return false;
+                       if (value == this)
+                               return true;
+                       return ((ToolboxBitmapAttribute) value).smallImage == this.smallImage;
+               }
+
+               public override int GetHashCode ()
+               {
+                       return (smallImage.GetHashCode () ^ bigImage.GetHashCode ());
+               }
+
+               public Image GetImage (object component)
+               {
+                       return GetImage (component.GetType(), null, false);
+               }
+
+               public Image GetImage (object component, bool large)
+               {
+                       return GetImage (component.GetType(), null, large);
+               }
+
+               public Image GetImage (Type type)
+               {
+                       return GetImage (type, null, false);
+               }
+
+               public Image GetImage (Type type, bool large)
+               {
+                       return GetImage (type, null, large);
+               }
+
+               [MonoTODO ("implement")]
+               public Image GetImage (Type type, string imgName, bool large)
+               {
+                       return null;
+               }
+
+               [MonoTODO ("implement")]
+               public static Image GetImageFromResource (Type t, string imageName, bool large)
+               {
+                       return null;
                }\r
        }\r
 }\r