2007-03-22 Miguel de Icaza <miguel@novell.com>
authorMiguel de Icaza <miguel@gnome.org>
Thu, 22 Mar 2007 23:54:42 +0000 (23:54 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Thu, 22 Mar 2007 23:54:42 +0000 (23:54 -0000)
* SystemInformation.cs (MouseWheelScrollDelta): Expose this
property, its only implemented for Win32, on X11 it defaults to
some hardcoded value.

* ToolStripItem.cs (AllowDrop): Add property

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

mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/SystemInformation.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItem.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIDriver.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs

index 6660eb02a6b184e26db840d52c290fceeab828b8..da2fc79d61495e2e883c29d76ae6fd4875d7ba38 100644 (file)
@@ -1,3 +1,11 @@
+2007-03-22  Miguel de Icaza  <miguel@novell.com>
+
+       * SystemInformation.cs (MouseWheelScrollDelta): Expose this
+       property, its only implemented for Win32, on X11 it defaults to
+       some hardcoded value.
+
+       * ToolStripItem.cs (AllowDrop): Add property
+
 2007-03-22  Mike Kestner  <mkestner@novell.com>
 
        * ListView.cs : in FullRowSelect Details mode, only enable box
index 2bbc46da2324b0d4b6c548008325e99a91515683..7192915ce3848aa65b387ced1f06ba6666a78b80 100644 (file)
@@ -313,6 +313,12 @@ namespace System.Windows.Forms
                                return XplatUI.MouseHoverTime;
                        }
                }
+
+               public static int MouseWheelScrollDelta {
+                       get {
+                               return XplatUI.MouseWheelScrollDelta;
+                       }
+               }
 #endif
 
                public static bool MousePresent {
index ad4a52112b8cad90c6dd8cc86121e2916666c306..4eb55828b10496fa14bf1d1417085d4f5455a2dc 100644 (file)
@@ -42,6 +42,7 @@ namespace System.Windows.Forms
                #region Private Variables
                private AccessibleObject accessibility_object;
                private string accessible_default_action_description;
+               private bool allow_drop;
                private ToolStripItemAlignment alignment;
                private AnchorStyles anchor;
                private bool auto_size;
@@ -208,6 +209,17 @@ namespace System.Windows.Forms
                        }
                }
 
+               [MonoTODO]
+               public virtual bool AllowDrop {
+                       get {
+                               return this.allow_drop;
+                       }
+                       
+                       set {
+                               this.allow_drop = value;
+                       }
+               }
+               
                [Browsable (false)]
                [DefaultValue (AnchorStyles.Top | AnchorStyles.Left)]
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
index 82054ea45b21c45e57bb1f42f4313f20358fb759..3165ff27689444cbf9192fa11820bdee2ee513a2 100644 (file)
@@ -235,6 +235,12 @@ namespace System.Windows.Forms {
                        }
                }
 
+               static public int MouseWheelScrollDelta {
+                       get {
+                               return driver.MouseWheelScrollDelta;
+                       }
+               }
+               
                static public bool MouseWheelPresent {
                        get {
                                return driver.MouseWheelPresent;
index 1fec41fbe738f9d43f3754032c042364696273c0..694e0ed14a4f0f6198556abcf3044032f62738dc 100644 (file)
@@ -80,6 +80,12 @@ namespace System.Windows.Forms {
                        }
                }
 
+               internal virtual int MouseWheelScrollDelta {
+                       get {
+                               return 120;
+                       }
+               }
+               
                internal virtual Point MousePosition {
                        get {
                                return Point.Empty;
index f020f6731d5aacf9b6a42b54ae7e6088a6534d7f..d84c82a051fa51e8a254ca2d985e0ccc2af72e46 100644 (file)
@@ -151,6 +151,7 @@ namespace System.Windows.Forms {
                        SPI_GETMOUSEHOVERWIDTH  = 0x0062,
                        SPI_GETMOUSEHOVERHEIGHT = 0x0064,
                        SPI_GETMOUSEHOVERTIME   = 0x0066,
+                       SPI_GETWHEELSCROLLLINES = 0x0068
                }
 
                internal enum WindowPlacementFlags {
@@ -1027,6 +1028,14 @@ namespace System.Windows.Forms {
                        }
                }
 
+               internal override int MouseWheelScrollDelta {
+                       get {
+                               int delta = 120;
+                               Win32SystemParametersInfo(SPIAction.SPI_GETWHEELSCROLLLINES, 0, ref delta, 0);
+                               return delta;
+                       }
+               }
+               
                internal override int HorizontalScrollBarHeight {
                        get {
                                return scroll_height;