Created
December 12, 2016 16:14
-
-
Save chamons/a21ae35b13b9d5e0c4787571f8478cf4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using AppKit; | |
using Foundation; | |
namespace Cursor_test | |
{ | |
[Register ("MyBox")] | |
public class MyBox : NSBox | |
{ | |
public MyBox (IntPtr handle) : base(handle) | |
{ | |
} | |
public override void ViewDidMoveToWindow () | |
{ | |
base.ViewDidMoveToWindow (); | |
AddTrackingRect (VisibleRect(), this, IntPtr.Zero, false); | |
} | |
public override void MouseMoved (NSEvent theEvent) | |
{ | |
base.MouseMoved (theEvent); | |
} | |
public override void ResetCursorRects() | |
{ | |
AddCursorRect(VisibleRect(), NSCursor.CrosshairCursor); | |
//base.ResetCursorRects(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment