public static Paste ( IProject project, Gtk seldata ) : |
||
project | IProject | |
seldata | Gtk | |
return |
static void ClipboardPaste(Gtk.Clipboard clipboard, Gtk.SelectionData seldata) { Stetic.Wrapper.Container parent = Stetic.Wrapper.Container.LookupParent(target); if (parent == null) { return; } Stetic.Wrapper.Widget wrapper = WidgetUtils.Paste(parent.Project, seldata); if (wrapper == null) { return; } parent.PasteChild(target, wrapper.Wrapped); target = null; }
static void FaultDragDataReceived(object obj, Gtk.DragDataReceivedArgs args) { Stetic.Wrapper.Widget dropped = null; Stetic.Wrapper.Widget faultOwner = Stetic.Wrapper.Widget.Lookup((Gtk.Widget)obj); if (faultOwner != null) { dropped = WidgetUtils.Paste(faultOwner.Project, args.SelectionData); } Gtk.Drag.Finish(args.Context, dropped != null, dropped != null, args.Time); if (dropped != null) { Gtk.Widget targetWidget = (Gtk.Widget)obj; int px = args.X + targetWidget.Allocation.X; int py = args.Y + targetWidget.Allocation.Y; FaultDrop(dropped, px, py, targetWidget); } }