[Mono-dev] Stubs for several methods in WIndows.Forms

Leszek Ciesielski skolima at gmail.com
Mon May 7 11:25:36 EDT 2007


Hi,

I am again playing with getting evemon to work on mono, this is a next
set of stubs for missing methods.

Regards,

Leszek

-- 
MS-DOS user since 5.0
Windows user since 3.11
Linux user since kernel 2.4
Novell Netware user since 2.2
WARCRAFT user since 1.0
-------------- next part --------------
Index: System.Windows.Forms/Button.cs
===================================================================
--- System.Windows.Forms/Button.cs	(wersja 76823)
+++ System.Windows.Forms/Button.cs	(kopia robocza)
@@ -85,6 +85,15 @@
 		#endregion	// Internal methods
 
 		#region Public Instance Properties
+#if NET_2_0
+		[LocalizableAttribute(true)]
+		[MonoNotSupported ("Does nothing and return bogus values.")]
+		public AutoSizeMode AutoSizeMode {
+			get { return AutoSizeMode.GrowOnly; }
+			set {}
+		}
+#endif
+
 		[DefaultValue(DialogResult.None)]
 		public virtual DialogResult DialogResult {		// IButtonControl
 			get {
Index: System.Windows.Forms/GroupBox.cs
===================================================================
--- System.Windows.Forms/GroupBox.cs	(wersja 76823)
+++ System.Windows.Forms/GroupBox.cs	(kopia robocza)
@@ -143,6 +143,15 @@
 			get { return base.AllowDrop;  }
 			set { base.AllowDrop = value; }
 		}
+		
+#if NET_2_0
+		[LocalizableAttribute(true)]
+		[MonoNotSupported ("Does nothing and returns bogus values.")]
+		public AutoSizeMode AutoSizeMode {
+			get { return AutoSizeMode.GrowOnly; }
+			set {}
+		}
+#endif
 
 		protected override CreateParams CreateParams {
 			get { return base.CreateParams; }
Index: System.Windows.Forms/Control.cs
===================================================================
--- System.Windows.Forms/Control.cs	(wersja 76823)
+++ System.Windows.Forms/Control.cs	(kopia robocza)
@@ -3408,6 +3408,12 @@
 			else
 				return DragDropEffects.None;
 		}
+#if NET_2_0
+		[MonoNotSupported ("This does nothing")]
+		public void DrawToBitmap (Bitmap bitmap, Rectangle targetBounds)
+		{
+		}
+#endif
 
 		[EditorBrowsable(EditorBrowsableState.Advanced)]
 		public object EndInvoke (IAsyncResult async_result) {
Index: System.Windows.Forms/PrintDialog.cs
===================================================================
--- System.Windows.Forms/PrintDialog.cs	(wersja 76823)
+++ System.Windows.Forms/PrintDialog.cs	(kopia robocza)
@@ -46,6 +46,7 @@
 		PrintDocument document;
 #if NET_2_0
 		bool allow_current_page;
+		bool useEXDialog;
 #endif
 		bool allow_print_to_file;
 		bool allow_selection;
@@ -222,6 +223,14 @@
 				ShowHelpButton ();
 			}
 		}
+		
+#if NET_2_0
+		[MonoNotSupported ("Does nothing.")]
+		public bool UseEXDialog {
+			get { return useEXDialog; }
+			set { useEXDialog = value; }
+		}
+#endif
 
 		protected override bool RunDialog (IntPtr hwnd)
 		{
Index: System.Windows.Forms/ButtonBase.cs
===================================================================
--- System.Windows.Forms/ButtonBase.cs	(wersja 76823)
+++ System.Windows.Forms/ButtonBase.cs	(kopia robocza)
@@ -755,5 +755,15 @@
 		}
 #endif
 		#endregion
+		
+		#region .NET 2.0 Public Instance Properties
+#if NET_2_0
+		[MonoLimitation ("Delegates to parent.")]
+		public override Size GetPreferredSize (Size proposedSize)
+		{
+			return base.GetPreferredSize (proposedSize);
+		}
+#endif
+		#endregion
 	}
 }
Index: System.Windows.Forms/ChangeLog
===================================================================
--- System.Windows.Forms/ChangeLog	(wersja 76823)
+++ System.Windows.Forms/ChangeLog	(kopia robocza)
@@ -1,3 +1,19 @@
+2007-05-07 Leszek Ciesielski <skolima at gmail.com>
+
+	* Button.cs:
+	* GroupBox.cs:
+	* Control.cs:
+	* PrintDialog.cs:
+	* ButtonBase.cs:
+	* Panel.cs:
+	* Form.cs:
+	* UserControl.cs:
+	* ToolTip.cs:
+	* TreeNode.cs:
+	* ListViewItem.cs:
+	* ListView.cs:
+	* TreeView.cs: Added stubs for some of the missing methods.
+
 2007-05-07  Rolf Bjarne Kvinge <RKvinge at novell.com> 
 
 	* XplatUIWin32.cs: Changed Win32CreateWindow to take enums instead of
Index: System.Windows.Forms/Panel.cs
===================================================================
--- System.Windows.Forms/Panel.cs	(wersja 76823)
+++ System.Windows.Forms/Panel.cs	(kopia robocza)
@@ -78,7 +78,15 @@
 				base.Text = value;
 				Refresh ();
 			}
+		}		
+#if NET_2_0
+		[LocalizableAttribute(true)]
+		[MonoNotSupported ("Does nothing and return bogus values.")]
+		public virtual AutoSizeMode AutoSizeMode {
+			get { return AutoSizeMode.GrowOnly; }
+			set {}
 		}
+#endif
 		#endregion	// Public Instance Properties
 
 		#region Protected Instance Properties
Index: System.Windows.Forms/Form.cs
===================================================================
--- System.Windows.Forms/Form.cs	(wersja 76823)
+++ System.Windows.Forms/Form.cs	(kopia robocza)
@@ -443,6 +443,15 @@
 				base.AutoScroll = value;
 			}
 		}
+		
+#if NET_2_0
+		[LocalizableAttribute(true)]
+		[MonoNotSupported ("Does nothing and return bogus values.")]
+		public AutoSizeMode AutoSizeMode {
+			get { return AutoSizeMode.GrowOnly; }
+			set {}
+		}
+#endif
 
 		public override Color BackColor {
 			get {
Index: System.Windows.Forms/UserControl.cs
===================================================================
--- System.Windows.Forms/UserControl.cs	(wersja 76823)
+++ System.Windows.Forms/UserControl.cs	(kopia robocza)
@@ -48,6 +48,14 @@
 		#endregion	// Public Constructors
 
 		#region Public Instance Properties
+#if NET_2_0
+		[LocalizableAttribute(true)]
+		[MonoNotSupported ("Does nothing and returns bogus values.")]
+		public AutoSizeMode AutoSizeMode {
+			get { return AutoSizeMode.GrowOnly; }
+			set {}
+		}
+#endif
 		protected override Size DefaultSize {
 			get {
 				return new Size(150, 150);
Index: System.Windows.Forms/ToolTip.cs
===================================================================
--- System.Windows.Forms/ToolTip.cs	(wersja 76823)
+++ System.Windows.Forms/ToolTip.cs	(kopia robocza)
@@ -60,6 +60,7 @@
 		private bool stripAmpersands;
 		private bool useAnimation;
 		private bool useFading;
+		private Object tag;
 #endif
 
 		#endregion	// Local variables
@@ -338,6 +339,13 @@
 			get { return useFading; }
 			set { useFading = value; }
 		}
+		
+		[LocalizableAttribute(false)] 
+		[BindableAttribute(true)]
+		public Object Tag {
+			get { return tag; }
+			set { tag = value; }
+		}
 #endif
 
 		#endregion	// Public Instance Properties
Index: System.Windows.Forms/TreeNode.cs
===================================================================
--- System.Windows.Forms/TreeNode.cs	(wersja 76823)
+++ System.Windows.Forms/TreeNode.cs	(kopia robocza)
@@ -61,6 +61,7 @@
 		
 #if NET_2_0
 		private string name = string.Empty;
+		private string toolTipText = string.Empty;
 #endif
 		#endregion	// Fields
 
@@ -612,6 +613,14 @@
 				return walk.TreeView;
 			}
 		}
+#if NET_2_0
+		[MonoNotSupported ("Does nothing.")]
+		[LocalizableAttribute(false)]
+		public string ToolTipText {
+			get { return toolTipText; }
+			set { toolTipText = value; }
+		}
+#endif
 
 #if NET_2_0
 		[Browsable (false)]
Index: System.Windows.Forms/ListViewItem.cs
===================================================================
--- System.Windows.Forms/ListViewItem.cs	(wersja 76823)
+++ System.Windows.Forms/ListViewItem.cs	(kopia robocza)
@@ -51,6 +51,7 @@
 		private string name = String.Empty;
 		private string image_key = String.Empty;
 		int index;			// cached index for VirtualMode
+		private string toolTipText = String.Empty;
 #endif
 		Rectangle bounds;
 		Rectangle checkbox_rect;	// calculated by CalcListViewItem method
@@ -498,6 +499,14 @@
 				Invalidate ();
 			}
 		}
+		
+#if NET_2_0
+		[MonoNotSupported ("Does nothing.")]
+		public string ToolTipText {
+			get { return toolTipText; }
+			set { toolTipText = value; }
+		}
+#endif
 
 		[DefaultValue (true)]
 		public bool UseItemStyleForSubItems {
Index: System.Windows.Forms/ListView.cs
===================================================================
--- System.Windows.Forms/ListView.cs	(wersja 76823)
+++ System.Windows.Forms/ListView.cs	(kopia robocza)
@@ -75,6 +75,7 @@
 		private readonly ListViewGroupCollection groups;
 		private bool owner_draw;
 		private bool show_groups = true;
+		private bool showItemToolTips;
 #endif
 		private bool label_edit;
 		private bool label_wrap = true;
@@ -629,6 +630,12 @@
 				}
 			}
 		}
+		
+		[MonoNotSupported ("Does nothing.")]
+		public bool ShowItemToolTips {
+			get { return showItemToolTips; }
+			set { showItemToolTips = value;}
+		}
 
 		[LocalizableAttribute (true)]
 		[MergableProperty (false)]
Index: System.Windows.Forms/TreeView.cs
===================================================================
--- System.Windows.Forms/TreeView.cs	(wersja 76823)
+++ System.Windows.Forms/TreeView.cs	(kopia robocza)
@@ -62,6 +62,7 @@
 #if NET_2_0
 		private string image_key;
 		private string selected_image_key;
+		private bool showNodeToolTips;
 #endif
 		private bool full_row_select;
 		private bool hot_tracking;
@@ -429,6 +430,14 @@
 			rect.Width += 2;
 			return rect;
 		}
+		
+#if NET_2_0
+		[MonoNotSupported ("Does nothing.")]
+		public bool ShowNodeToolTips {
+			get { return showNodeToolTips; }
+			set { showNodeToolTips = value; }
+		}
+#endif
 
 		[DefaultValue(true)]
 		public bool ShowLines {


More information about the Mono-devel-list mailing list