public override void KeyDown(NSEvent theEvent) { if (!MacEventView.KeyDown(Widget, theEvent)) { base.KeyDown(theEvent); } }
static void TriggerKeyDown(IntPtr sender, IntPtr sel, IntPtr e) { var obj = Runtime.GetNSObject(sender); var handler = (MacView <T, W>)((IMacControl)obj).Handler; var theEvent = new NSEvent(e); if (!MacEventView.KeyDown(handler.Widget, theEvent)) { Messaging.void_objc_msgSendSuper_IntPtr(obj.SuperHandle, sel, e); } }
public override void KeyDown(NSEvent theEvent) { var macControl = WeakDelegate as IMacControl; if (macControl != null) { var macViewHandler = macControl.WeakHandler.Target as IMacViewHandler; if (macViewHandler != null && MacEventView.KeyDown(macViewHandler.Widget, theEvent)) { return; } } base.KeyDown(theEvent); }
static void TriggerKeyDown(IntPtr sender, IntPtr sel, IntPtr e) { var obj = Runtime.GetNSObject(sender); var handler = GetHandler(obj) as IMacViewHandler; if (handler != null) { var theEvent = Messaging.GetNSObject <NSEvent>(e); if (!MacEventView.KeyDown(handler.Widget, theEvent)) { Messaging.void_objc_msgSendSuper_IntPtr(obj.SuperHandle, sel, e); } } }