[Mono-list] s.w.f.-gtk patch. Adds size and name properties

Joel Basson jstrike@mweb.co.za
07 Feb 2003 16:51:11 +0200


--=-9Xu2LxjK7igM6P6hNKqn
Content-Type: text/plain
Content-Transfer-Encoding: 7bit





--=-9Xu2LxjK7igM6P6hNKqn
Content-Disposition: attachment; filename=file.diff
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; name=file.diff; charset=UTF-8

? System.Windows.Forms.dll
? file.diff
? gtk_test.cs
Index: Control.cs
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /mono/mcs/class/System.Windows.Forms/Gtk/Control.cs,v
retrieving revision 1.4
diff -u -r1.4 Control.cs
--- Control.cs	9 Jan 2003 22:25:56 -0000	1.4
+++ Control.cs	7 Feb 2003 14:45:38 -0000
@@ -19,10 +19,11 @@
 	public class Control : Component {
 		internal Widget widget;
 		Control parent;
-		string text;
+		string text, name;
+		Size size;
 		int left, top, width, height;
 		ControlCollection controls;
-		Point location =3D new Point (0, 0);
+		Point location =3D new System.Drawing.Point (0, 0);
 		Gtk.Layout layout =3D null;
 		AnchorStyles anchor =3D AnchorStyles.Top|AnchorStyles.Left;
 	=09
@@ -135,11 +136,12 @@
 		}
=20
 		public Control (string text, int left, int top, int width, int height)
-		{
+		{		=09
 		}
=20
 		public Control (Control parent, string text, int left, int top, int widt=
h, int height)
 		{
+		=09
 		}
=20
 		internal Widget Widget {
@@ -174,7 +176,30 @@
 			if (TextChanged !=3D null)
 			 TextChanged (this, e);
 		}
-	=09
+
+
+		public virtual string Name {=0D
+           		 get {=0D
+                     	  	return name;=09=0D
+              		 }=0D
+        =20=0D
+         		 set {=20
+				name =3D value;
+			 	Widget.Name =3D value;
+			 }=0D
+          	}
+	=09
+		public Size Size {
+			get {=20
+				return size;
+			}
+			set {
+				size =3D value;
+				Widget.SetSizeRequest (value.Width,value.Height);
+			}
+		}
+
+
 		public void Show ()
 		{
 			Widget.Show ();
@@ -231,6 +256,7 @@
 			if (ControlRemoved !=3D null)
 				ControlRemoved (this, e);
 		}
+
=20
 		public Point Location {
 			get { return location; }
Index: ProgressBar.cs
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /mono/mcs/class/System.Windows.Forms/Gtk/ProgressBar.cs,v
retrieving revision 1.1
diff -u -r1.1 ProgressBar.cs
--- ProgressBar.cs	8 Aug 2002 01:53:30 -0000	1.1
+++ ProgressBar.cs	7 Feb 2003 14:45:38 -0000
@@ -85,7 +85,7 @@
=20=0D
 		[MonoTODO]=0D
 		protected override Size DefaultSize {=0D
-			get { throw new NotImplementedException (); }=0D
+			get { throw new NotImplementedException (); }	=09
 		}=0D
 	=09=0D
 		[MonoTODO]=0D
Index: TextBoxBase.cs
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /mono/mcs/class/System.Windows.Forms/Gtk/TextBoxBase.cs,v
retrieving revision 1.1
diff -u -r1.1 TextBoxBase.cs
--- TextBoxBase.cs	8 Aug 2002 01:53:30 -0000	1.1
+++ TextBoxBase.cs	7 Feb 2003 14:45:44 -0000
@@ -56,7 +56,7 @@
 				throw new NotImplementedException ();=0D
 			}=0D
 			set=0D
-			{=0D
+			{
 				throw new NotImplementedException ();=0D
 			}=0D
 		}=0D
@@ -201,8 +201,8 @@
 			get=0D
 			{=0D
 				String selection =3D "";=0D
-				Gtk.TextIter start;=0D
-				Gtk.TextIter end;=0D
+				Gtk.TextIter start =3D new Gtk.TextIter ();=0D
+				Gtk.TextIter end =3D new Gtk.TextIter ();=0D
 	=09=0D
 				if (TextBuffer.GetSelectionBounds(ref start, ref end))=0D
 					selection =3D TextBuffer.GetText(start, end, true);=0D
Index: makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /mono/mcs/class/System.Windows.Forms/Gtk/makefile,v
retrieving revision 1.3
diff -u -r1.3 makefile
--- makefile	30 Jun 2002 21:21:55 -0000	1.3
+++ makefile	7 Feb 2003 14:45:44 -0000
@@ -1,5 +1,5 @@
 CSC=3Dmcs
-SWFF=3D-r gtk-sharp -r glib-sharp -r System.Drawing=20
+SWFF=3D-r gdk-sharp -r gtk-sharp -r glib-sharp -r System.Drawing=20
=20
 SOURCES =3D \
 	AnchorStyles.cs		\
@@ -15,7 +15,12 @@
 	IButtonControl.cs	\
 	IContainerControl.cs	\
 	Label.cs		\
-	ScrollableControl.cs
+	ScrollableControl.cs	\
+	TextBoxBase.cs		\
+	TextBox.cs		\
+	ScrollBars.cs		\
+	ProgressBar.cs		\
+	HorizontalAlignment.cs
=20
 all: demo.exe
=20

--=-9Xu2LxjK7igM6P6hNKqn--