From 3642123c0d3e12dad307cb98922ef9fd84a695df Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Thu, 22 Mar 2007 23:54:42 +0000 Subject: [PATCH] 2007-03-22 Miguel de Icaza * 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 --- .../System.Windows.Forms/ChangeLog | 8 ++++++++ .../System.Windows.Forms/SystemInformation.cs | 6 ++++++ .../System.Windows.Forms/ToolStripItem.cs | 12 ++++++++++++ .../System.Windows.Forms/XplatUI.cs | 6 ++++++ .../System.Windows.Forms/XplatUIDriver.cs | 6 ++++++ .../System.Windows.Forms/XplatUIWin32.cs | 9 +++++++++ 6 files changed, 47 insertions(+) diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog index 6660eb02a6b..da2fc79d614 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog @@ -1,3 +1,11 @@ +2007-03-22 Miguel de Icaza + + * 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 * ListView.cs : in FullRowSelect Details mode, only enable box diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SystemInformation.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SystemInformation.cs index 2bbc46da232..7192915ce38 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SystemInformation.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SystemInformation.cs @@ -313,6 +313,12 @@ namespace System.Windows.Forms return XplatUI.MouseHoverTime; } } + + public static int MouseWheelScrollDelta { + get { + return XplatUI.MouseWheelScrollDelta; + } + } #endif public static bool MousePresent { diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItem.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItem.cs index ad4a52112b8..4eb55828b10 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItem.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItem.cs @@ -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)] diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs index 82054ea45b2..3165ff27689 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs @@ -235,6 +235,12 @@ namespace System.Windows.Forms { } } + static public int MouseWheelScrollDelta { + get { + return driver.MouseWheelScrollDelta; + } + } + static public bool MouseWheelPresent { get { return driver.MouseWheelPresent; diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIDriver.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIDriver.cs index 1fec41fbe73..694e0ed14a4 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIDriver.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIDriver.cs @@ -80,6 +80,12 @@ namespace System.Windows.Forms { } } + internal virtual int MouseWheelScrollDelta { + get { + return 120; + } + } + internal virtual Point MousePosition { get { return Point.Empty; diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs index f020f6731d5..d84c82a051f 100644 --- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs +++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIWin32.cs @@ -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; -- 2.25.1