void HandleTextInput (object sender, TextInputEventArgs e) { text += e.Text; e.Handled = true; QueueDraw (); }
void HandleImCommitEvent(object o, Gtk.CommitArgs args) { if (String.IsNullOrEmpty (args.Str)) return; var pargs = new TextInputEventArgs (args.Str); ApplicationContext.InvokeUserCode (delegate { EventSink.OnTextInput (pargs); }); if (pargs.Handled) args.RetVal = true; }
void HandleTextInserted(object o, Gtk.TextInsertedArgs args) { if (String.IsNullOrEmpty (args.GetText ())) return; var pargs = new TextInputEventArgs (args.GetText ()); ApplicationContext.InvokeUserCode (delegate { EventSink.OnTextInput (pargs); }); if (pargs.Handled) ((GLib.Object)o).StopSignal ("insert-text"); }
void HandleTextInputKeyPressEvent(object o, Gtk.KeyPressEventArgs args) { if (IMContext != null) IMContext.FilterKeypress (args.Event); // new lines are not triggered by im, handle them here if (args.Event.Key == Gdk.Key.Return || args.Event.Key == Gdk.Key.ISO_Enter || args.Event.Key == Gdk.Key.KP_Enter) { var pargs = new TextInputEventArgs (Environment.NewLine); ApplicationContext.InvokeUserCode (delegate { EventSink.OnTextInput (pargs); }); } }
internal void HandleTextInput(object sender, TextInputEventArgs args) { base.OnTextInput(args); InsertText(args.Text); editor.ResetCaretState(); args.Handled = true; }