diff options
-rw-r--r-- | Xamarin.PropertyEditing.Mac/Controls/Custom/FocusableBooleanButton.cs | 22 | ||||
-rw-r--r-- | Xamarin.PropertyEditing.Mac/Controls/Custom/ProxyResponderButton.cs | 26 |
2 files changed, 26 insertions, 22 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/FocusableBooleanButton.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/FocusableBooleanButton.cs index bf43bb5..8548985 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/FocusableBooleanButton.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/FocusableBooleanButton.cs @@ -3,28 +3,6 @@ using AppKit; namespace Xamarin.PropertyEditing.Mac { - internal class ProxyResponderButton : NSButton - { - public RowProxyResponder ProxyResponder { get; set; } - - public override void KeyDown (NSEvent theEvent) - { - switch (theEvent.KeyCode) { - case (int)NSKey.Tab: - if (ProxyResponder != null) { - if (theEvent.ModifierFlags.HasFlag(NSEventModifierMask.ShiftKeyMask)) { - ProxyResponder.PreviousResponder (); - } else { - ProxyResponder.NextResponder (); - } - return; - } - break; - } - base.KeyDown (theEvent); - } - } - internal class FocusableBooleanButton : ProxyResponderButton { public override bool CanBecomeKeyView { get { return Enabled; } } diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/ProxyResponderButton.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/ProxyResponderButton.cs new file mode 100644 index 0000000..8182fbb --- /dev/null +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/ProxyResponderButton.cs @@ -0,0 +1,26 @@ +using AppKit; + +namespace Xamarin.PropertyEditing.Mac +{ + internal class ProxyResponderButton : NSButton + { + public RowProxyResponder ProxyResponder { get; set; } + + public override void KeyDown (NSEvent theEvent) + { + switch (theEvent.KeyCode) { + case (int)NSKey.Tab: + if (ProxyResponder != null) { + if (theEvent.ModifierFlags.HasFlag(NSEventModifierMask.ShiftKeyMask)) { + ProxyResponder.PreviousResponder (); + } else { + ProxyResponder.NextResponder (); + } + return; + } + break; + } + base.KeyDown (theEvent); + } + } +} |