[Mono-bugs] [Bug 657478] .netifiying Mouse Events

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Dec 7 01:56:37 EST 2010


https://bugzilla.novell.com/show_bug.cgi?id=657478

https://bugzilla.novell.com/show_bug.cgi?id=657478#c1


James Clancey <jclancey at resdat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |miguel at novell.com

--- Comment #1 from James Clancey <jclancey at resdat.com> 2010-12-07 06:56:36 UTC ---
I have thought of a work around. Its not preferred since its just another layer
of abstraction. But it will work.

public class ViewMouseEvents : NSView
{
    public virtual void FireMouseDown (NSEvent theEvent){}
    public override void MouseDown (NSEvent theEvent)
        {
            FireMouseDown(theEvent);
            base.MouseDown (theEvent);
        }
}

public class View : ViewMouseEvents
{
    public event EventHandler MouseDown;
    public override void FireMouseDown (NSEvent theEvent)
        {
            PointF point =
this.ConvertPointfromView(theEvent.LocationInWindow,null);
            if (this.MouseDown != null)
                this.MouseDown (this, new MouseEventArgs (MouseButtons.Left,
theEvent.ClickCount, (int)point.X, (int)point.Y, 0));
        }
}

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list