public override void DraggingSessionEnded(NSTableView tableView, NSDraggingSession draggingSession, PointF endedAtScreenPoint, NSDragOperation operation)
 {
     if (DraggingSessionEndedAction != null)
     {
         DraggingSessionEndedAction(tableView, draggingSession, endedAtScreenPoint, operation);
     }
 }
 public override void DraggingSessionWillBegin(NSTableView tableView, NSDraggingSession draggingSession, PointF willBeginAtScreenPoint, NSIndexSet rowIndexes)
 {
     if (DraggingSessionWillBeginAction != null)
     {
         DraggingSessionWillBeginAction(tableView, draggingSession, willBeginAtScreenPoint, rowIndexes);
     }
 }
示例#3
0
        internal override DragDropEffects StartDrag(IntPtr handle, object data, DragDropEffects allowedEffects)
        {
            if (LastMouseDown != null && ObjCRuntime.Runtime.GetNSObject(handle) is MonoView view)
            {
                if (Grab.Hwnd != IntPtr.Zero)
                {
                    UngrabWindow(Grab.Hwnd);
                }

                var items = CreateDraggingItems(view, DraggedData = data);
                if (items != null && items.Length != 0)
                {
                    DraggingAllowedEffects = allowedEffects;
                    DraggingEffects        = DragDropEffects.None;
                    try
                    {
                        draggingSession = view.BeginDraggingSession(items, LastMouseDown, draggingSource);
                        DoEvents();
                    }
                    finally
                    {
                        draggingSession = null;
                    }
                    return(DraggingEffects);
                }
            }

            return(DragDropEffects.None);
        }
示例#4
0
        public NSDragOperation DraggingSessionSourceOperationMask(NSDraggingSession session, NSDraggingContext context)
        {
            if (context == NSDraggingContext.WithinApplication)
            {
                return(NSDragOperation.Private);
            }

            return(NSDragOperation.None);
        }
示例#5
0
            public new void DraggingSessionEnded(NSTableView tableView, NSDraggingSession draggingSession, CGPoint endedAtScreenPoint, NSDragOperation operation)
            {
                var h = Handler;

                if (h == null)
                {
                    return;
                }

                if (h.CustomSelectedRows != null)
                {
                    h.CustomSelectedRows = null;
                    h.Callback.OnSelectionChanged(h.Widget, EventArgs.Empty);
                }
            }
            /// <inheritdoc/>
            public override void DraggingSessionWillBegin(NSTableView tableView, NSDraggingSession draggingSession, CGPoint willBeginAtScreenPoint, NSIndexSet rowIndexes)
            {
                DebugDragDrop("**** ROMLIST DRAG WILL BEGIN");
                ////var viewModel = tableView.GetInheritedValue(IFakeDependencyObjectHelpers.DataContextPropertyName) as RomListViewModel;
                var draggedItems = new List <ProgramDescriptionViewModel>();
                var items        = RomListData.ArrangedObjects();

                foreach (var index in rowIndexes)
                {
                    draggedItems.Add(items[(int)index] as ProgramDescriptionViewModel);
                }
                if (draggedItems.Any())
                {
                    var pasteboard = draggingSession.DraggingPasteboard;
                    DragDropHelpers.PreparePasteboard(pasteboard, ProgramDescriptionViewModel.DragDataFormat, new NSDataWrapper(draggedItems));
                }
            }
示例#7
0
 public NSDragOperation DraggingSessionSourceOperationMask(NSDraggingSession session, IntPtr context)
 {
     return(AllowedOperation);
 }
示例#8
0
 public NSDragOperation DraggingSessionSourceOperationMask(NSDraggingSession session, IntPtr context)
 {
     return(Handler?.DragInfo?.AllowedOperation ?? NSDragOperation.None);
 }
示例#9
0
 public virtual NSDragOperation DraggingSourceOperationMaskForDraggingContext(NSDraggingSession session, NSDraggingContext context)
 {
     return(NSDragOperation.Copy);
 }
示例#10
0
 public void DraggingSessionMoved(NSDraggingSession session, CGPoint screenPoint)
 {
     ToPoint(screenPoint).Do(_callbacks.OnMoved);
 }
示例#11
0
 public override void DraggingSessionWillBegin(NSTableView tableView, NSDraggingSession draggingSession, PointF willBeginAtScreenPoint, NSIndexSet rowIndexes)
 {
 }
示例#12
0
 public override void DraggingSessionEnded(NSTableView tableView, NSDraggingSession draggingSession, PointF endedAtScreenPoint, NSDragOperation operation)
 {
 }
示例#13
0
 public override void DraggingSessionEnded(NSTableView tableView, NSDraggingSession draggingSession, CGPoint endedAtScreenPoint, NSDragOperation operation)
 {
     this.isDragging = false;
     //this.uiTableViewController.UpdateShowHideRefresh (false);
 }
示例#14
0
 public override void DraggingSessionWillBegin(NSTableView tableView, NSDraggingSession draggingSession, CGPoint willBeginAtScreenPoint, NSIndexSet rowIndexes)
 {
     this.isDragging = true;
 }
示例#15
0
 public void DraggingSessionEnded(NSDraggingSession session, CGPoint screenPoint, NSDragOperation operation)
 {
     _callbacks.OnReleased();
 }
示例#16
0
 public void DraggingSessionWillBegin(NSDraggingSession session, CGPoint screenPoint)
 {
 }
 /// <inheritdoc/>
 public override void DraggingSessionEnded(NSTableView tableView, NSDraggingSession draggingSession, CGPoint endedAtScreenPoint, NSDragOperation operation)
 {
     DebugDragDrop("**** ROMLIST DRAG ENDED");
     DragDropHelpers.FinishedWithPasteboard(draggingSession.DraggingPasteboard);
 }