|
|
|
@ -19,7 +19,7 @@ namespace Avalonia.Input |
|
|
|
return null; |
|
|
|
} |
|
|
|
|
|
|
|
private DragDropEffects RaiseDragEvent(Interactive target, IInputRoot inputRoot, Point point, RoutedEvent<DragEventArgs> routedEvent, DragDropEffects operation, IDataObject data, InputModifiers modifiers) |
|
|
|
private DragDropEffects RaiseDragEvent(Interactive target, IInputRoot inputRoot, Point point, RoutedEvent<DragEventArgs> routedEvent, DragDropEffects operation, IDataObject data, KeyModifiers modifiers) |
|
|
|
{ |
|
|
|
if (target == null) |
|
|
|
return DragDropEffects.None; |
|
|
|
@ -38,13 +38,13 @@ namespace Avalonia.Input |
|
|
|
return args.DragEffects; |
|
|
|
} |
|
|
|
|
|
|
|
private DragDropEffects DragEnter(IInputRoot inputRoot, Point point, IDataObject data, DragDropEffects effects, InputModifiers modifiers) |
|
|
|
private DragDropEffects DragEnter(IInputRoot inputRoot, Point point, IDataObject data, DragDropEffects effects, KeyModifiers modifiers) |
|
|
|
{ |
|
|
|
_lastTarget = GetTarget(inputRoot, point); |
|
|
|
return RaiseDragEvent(_lastTarget, inputRoot, point, DragDrop.DragEnterEvent, effects, data, modifiers); |
|
|
|
} |
|
|
|
|
|
|
|
private DragDropEffects DragOver(IInputRoot inputRoot, Point point, IDataObject data, DragDropEffects effects, InputModifiers modifiers) |
|
|
|
private DragDropEffects DragOver(IInputRoot inputRoot, Point point, IDataObject data, DragDropEffects effects, KeyModifiers modifiers) |
|
|
|
{ |
|
|
|
var target = GetTarget(inputRoot, point); |
|
|
|
|
|
|
|
@ -77,7 +77,7 @@ namespace Avalonia.Input |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private DragDropEffects Drop(IInputRoot inputRoot, Point point, IDataObject data, DragDropEffects effects, InputModifiers modifiers) |
|
|
|
private DragDropEffects Drop(IInputRoot inputRoot, Point point, IDataObject data, DragDropEffects effects, KeyModifiers modifiers) |
|
|
|
{ |
|
|
|
try |
|
|
|
{ |
|
|
|
@ -100,16 +100,16 @@ namespace Avalonia.Input |
|
|
|
switch (e.Type) |
|
|
|
{ |
|
|
|
case RawDragEventType.DragEnter: |
|
|
|
e.Effects = DragEnter(e.Root, e.Location, e.Data, e.Effects, e.Modifiers); |
|
|
|
e.Effects = DragEnter(e.Root, e.Location, e.Data, e.Effects, e.KeyModifiers); |
|
|
|
break; |
|
|
|
case RawDragEventType.DragOver: |
|
|
|
e.Effects = DragOver(e.Root, e.Location, e.Data, e.Effects, e.Modifiers); |
|
|
|
e.Effects = DragOver(e.Root, e.Location, e.Data, e.Effects, e.KeyModifiers); |
|
|
|
break; |
|
|
|
case RawDragEventType.DragLeave: |
|
|
|
DragLeave(e.Root); |
|
|
|
break; |
|
|
|
case RawDragEventType.Drop: |
|
|
|
e.Effects = Drop(e.Root, e.Location, e.Data, e.Effects, e.Modifiers); |
|
|
|
e.Effects = Drop(e.Root, e.Location, e.Data, e.Effects, e.KeyModifiers); |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
|