コード例 #1
0
ファイル: RawDragEvent.cs プロジェクト: zymITsky/Avalonia
 public RawDragEvent(IDragDropDevice inputDevice, RawDragEventType type,
                     IInputRoot root, Point location, IDataObject data, DragDropEffects effects, RawInputModifiers modifiers)
     : base(inputDevice, 0, root)
 {
     Type      = type;
     Location  = location;
     Data      = data;
     Effects   = effects;
     Modifiers = (InputModifiers)modifiers;
 }
コード例 #2
0
 public RawDragEvent(IDragDropDevice inputDevice, RawDragEventType type,
                     IInputElement inputRoot, Point location, IDataObject data, DragDropEffects effects)
     : base(inputDevice, 0)
 {
     Type      = type;
     InputRoot = inputRoot;
     Location  = location;
     Data      = data;
     Effects   = effects;
 }
コード例 #3
0
        public RawDragEvent(IDragDropDevice inputDevice, RawDragEventType type,
                            IInputRoot root, Point location, IDataObject data, DragDropEffects effects, RawInputModifiers modifiers)
            : base(inputDevice, 0, root)
        {
            Type         = type;
            Location     = location;
            Data         = data;
            Effects      = effects;
            KeyModifiers = modifiers.ToKeyModifiers();
#pragma warning disable CS0618 // Type or member is obsolete
            Modifiers = (InputModifiers)modifiers;
#pragma warning restore CS0618 // Type or member is obsolete
        }
コード例 #4
0
            private NSDragOperation SendRawDragEvent(NSDraggingInfo sender, RawDragEventType type)
            {
                Action <RawInputEventArgs> input      = _tl.Input;
                IDragDropDevice            dragDevice = _tl._dragDevice;
                IInputRoot root = _tl?.InputRoot;

                if (root == null || dragDevice == null || input == null)
                {
                    return(NSDragOperation.None);
                }

                var          dragOp = DraggingInfo.ConvertDragOperation(sender.DraggingSourceOperationMask);
                DraggingInfo info   = new DraggingInfo(sender);
                var          pt     = TranslateLocalPoint(info.Location);
                var          args   = new RawDragEvent(dragDevice, type, root, pt, info, dragOp);

                input(args);
                return(DraggingInfo.ConvertDragOperation(args.Effects));
            }
コード例 #5
0
 public InProcessDragSource()
 {
     _inputManager = AvaloniaLocator.Current.GetService <IInputManager>();
     _dragDrop     = AvaloniaLocator.Current.GetService <IDragDropDevice>();
 }
コード例 #6
0
 public OleDropTarget(ITopLevelImpl tl, IInputElement target)
 {
     _dragDevice = AvaloniaLocator.Current.GetService <IDragDropDevice>();
     _tl         = tl;
     _target     = target;
 }