void Delete(object obj, EventArgs e) { Gtk.Editable focus = Focus; if (focus != null) { focus.DeleteSelection(); } else { WidgetDesigner wd = SteticMain.CurrentDesigner; if (wd != null && wd.Selection != null) { wd.DeleteSelection(); } } }
void EditShown(object obj, EventArgs args) { Gtk.Editable focus = Focus; if (focus != null) { int selStart, selEnd; bool hasSelection, editable; hasSelection = focus.GetSelectionBounds(out selStart, out selEnd); editable = focus.IsEditable; UpdateEdit(hasSelection && editable, hasSelection, editable); } else { UpdateEdit(); } }
void Paste(object obj, EventArgs e) { Gtk.Editable focus = Focus; if (focus != null) { focus.PasteClipboard(); } else { WidgetDesigner wd = SteticMain.CurrentDesigner; if (wd != null) { wd.PasteToSelection(); } } }