public void DragStart(DragStartData data) { if (data.Data == null) throw new ArgumentNullException ("data"); DataObject dataObj = data.Data.ToDataObject(); if (data.ImageBackend != null) { AdornedWindow = GetParentWindow (); AdornedWindow.AllowDrop = true; var e = (UIElement)AdornedWindow.Content; Adorner = new ImageAdorner (e, data.ImageBackend); AdornedLayer = AdornerLayer.GetAdornerLayer (e); AdornedLayer.Add (Adorner); AdornedWindow.DragOver += AdornedWindowOnDragOver; } Widget.Dispatcher.BeginInvoke ((Action)(() => { var effect = DragDrop.DoDragDrop (Widget, dataObj, data.DragAction.ToWpfDropEffect ()); OnDragFinished (this, new DragFinishedEventArgs (effect == DragDropEffects.Move)); if (Adorner != null) { AdornedLayer.Remove (Adorner); AdornedLayer = null; Adorner = null; AdornedWindow.AllowDrop = false; AdornedWindow.DragOver -= AdornedWindowOnDragOver; AdornedWindow = null; } })); }
internal void DragStart(DragStartData sdata) { Backend.DragStart (sdata); }
public void DragStart(DragStartData sdata) { AllocEventBox (); Gdk.DragAction action = ConvertDragAction (sdata.DragAction); DragDropInfo.CurrentDragData = sdata.Data; EventsRootWidget.DragBegin += HandleDragBegin; if (sdata.ImageBackend != null) { var img = ((GtkImage)sdata.ImageBackend).ToPixbuf (ApplicationContext, Widget); IconInitializer.Init (EventsRootWidget, img, sdata.HotX, sdata.HotY); } Gtk.Drag.Begin (EventsRootWidget, Util.BuildTargetTable (sdata.Data.DataTypes), action, 1, Gtk.Global.CurrentEvent ?? new Gdk.Event (IntPtr.Zero)); }
public void DragStart(DragStartData data) { throw new NotImplementedException (); }
public void DragStart(DragStartData sdata) { Gdk.DragAction action = ConvertDragAction (sdata.DragAction); DragDropInfo.CurrentDragData = sdata.Data; Widget.DragBegin += HandleDragBegin; if (sdata.ImageBackend != null) IconInitializer.Init (Widget, (Gdk.Pixbuf) sdata.ImageBackend, sdata.HotX, sdata.HotY); Gtk.Drag.Begin (Widget, Util.BuildTargetTable (sdata.Data.DataTypes), action, 1, Gtk.Global.CurrentEvent); }
void IWidgetBackend.DragStart (DragStartData data) { BackendHost.Backend.DragStart (data); }
void IWidgetBackend.DragStart(DragStartData data) { BackendHost.Backend.DragStart(data); }
public void DragStart(DragStartData data) { if (data.Data == null) throw new ArgumentNullException ("data"); DataObject dataObj = data.Data.ToDataObject(); Widget.Dispatcher.BeginInvoke ( (Func<DependencyObject, object, DragDropEffects, DragDropEffects>)DragDrop.DoDragDrop, Widget, dataObj, data.DragAction.ToWpfDropEffect () ); }