Beispiel #1
0
 public virtual void InitializeEvents(IVidgetEventSink eventsink)
 {
     EventSink = eventsink;
     Widget.ComposeEvents(EventSink);
 }
Beispiel #2
0
 public static void ComposeEvents(this Widget Widget, IVidgetEventSink EventSink)
 {
     Widget.GotFocus       += (s, e) => EventSink?.OnEvent(nameof(IVidget.GotFocus), new EventArgs());
     Widget.ButtonReleased += (s, e) => EventSink?.OnEvent(nameof(IVidget.ButtonReleased), e.ToLmk());
 }
Beispiel #3
0
 public void InitializeEvents(IVidgetEventSink eventSink)
 {
     EventSink = eventSink;
 }
Beispiel #4
0
 public void InitializeEvents(IVidgetEventSink eventSink)
 {
     EventSink = eventSink;
     Control.ComposeEvents(EventSink);
 }
Beispiel #5
0
 public static void ComposeEvents(this Control Control, IVidgetEventSink EventSink)
 {
     Control.GotFocus += (s, e) => EventSink?.OnEvent(nameof(IVidget.GotFocus), new EventArgs());
     Control.Enter    += (s, e) => EventSink?.OnEvent(nameof(IVidget.GotFocus), new EventArgs());
     Control.MouseUp  += (s, e) => EventSink?.OnEvent(nameof(IVidget.ButtonReleased), Converter.Convert(e));
 }
Beispiel #6
0
 public virtual void InitializeEvents(IVidgetEventSink eventsink)
 {
     this.EventSink    = eventsink;
     Control.GotFocus += (s, e) => EventSink?.OnEvent(nameof(IVidget.GotFocus), new EventArgs());
     Control.MouseUp  += (s, e) => EventSink?.OnEvent(nameof(IVidget.ButtonReleased), WpfConverter.ToXwtButtonArgs((Control)s, e).ToLmk());
 }
Beispiel #7
0
 public void InitializeEvents(IVidgetEventSink eventSink)
 {
     EventSink                  = eventSink;
     Widget.FocusInEvent       += (s, e) => EventSink?.OnEvent(nameof(IVidget.GotFocus), new EventArgs());
     Widget.ButtonReleaseEvent += (s, e) => EventSink?.OnEvent(nameof(IVidget.ButtonReleased), e.ToXwt((Gtk.Widget)s).ToLmk());
 }