From 659a0ccfc020abb0b7032a113112d52a31ce2abf Mon Sep 17 00:00:00 2001 From: sr55 Date: Thu, 28 Aug 2014 11:00:41 +0000 Subject: WinGui: Update the Gong WPF Drag/Drop library. This fixes a few issues with the moving/ordering of Audio/Subtitle and Queue items. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6379 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../WPFDragDrop/GongSolutions.Wpf.DragDrop.XML | 108 ++++++++++++++++----- .../WPFDragDrop/GongSolutions.Wpf.DragDrop.dll | Bin 50176 -> 54272 bytes .../WPFDragDrop/GongSolutions.Wpf.DragDrop.pdb | Bin 89600 -> 95744 bytes win/CS/libraries/WPFDragDrop/notes.txt | 2 + 4 files changed, 87 insertions(+), 23 deletions(-) diff --git a/win/CS/libraries/WPFDragDrop/GongSolutions.Wpf.DragDrop.XML b/win/CS/libraries/WPFDragDrop/GongSolutions.Wpf.DragDrop.XML index e46d7093d..c05cddd5c 100644 --- a/win/CS/libraries/WPFDragDrop/GongSolutions.Wpf.DragDrop.XML +++ b/win/CS/libraries/WPFDragDrop/GongSolutions.Wpf.DragDrop.XML @@ -20,9 +20,10 @@ To allow a drag to be started, the property on - should be set to a value other than . + should be set to a value other than . + Notifies the drag handler that a drop has occurred. @@ -32,6 +33,11 @@ Information about the drop. + + + Notifies the drag handler that a drag has been aborted. + + Interface implemented by Drop Handlers. @@ -61,6 +67,38 @@ Information about the drop. + + + DragMouseAnchorPoint defines the horizontal and vertical proportion at which the pointer will anchor on the DragAdorner. + + + + + Gets the drag handler from the drag info or from the sender, if the drag info is null + + the drag info object + the sender from an event, e.g. mouse down, mouse move + + + + + Gets the drop handler from the drop info or from the sender, if the drop info is null + + the drop info object + the sender from an event, e.g. drag over + + + + + Holds information about a the source of a drag drop operation. + + + + The class holds all of the framework's information about the source + of a drag. It is used by to determine whether a drag + can start, and what the dragged data should be. + + Gets or sets the drag data. @@ -104,6 +142,11 @@ If the control that initated the drag is unbound or not an ItemsControl, this will be null. + + + Gets the position from where the item was dragged. + + Gets the object that a dragged item is bound to. @@ -138,23 +181,17 @@ will hold a ListBoxItem. + + + Gets the FlowDirection of the current drag source. + + Gets the which is used by the drag and drop operation. Set it to a custom instance if custom drag and drop behavior is needed. - - - Holds information about a the source of a drag drop operation. - - - - The class holds all of the framework's information about the source - of a drag. It is used by to determine whether a drag - can start, and what the dragged data should be. - - Initializes a new instance of the DragInfo class. @@ -211,6 +248,12 @@ If the control that initated the drag is unbound or not an ItemsControl, this will be null. + + + Gets the position from where the item was dragged. + + The index of the source. + Gets the object that a dragged item is bound to. @@ -245,12 +288,28 @@ will hold a ListBoxItem. + + + Gets the FlowDirection of the current drag source. + + Gets the which is used by the drag and drop operation. Set it to a custom instance if custom drag and drop behavior is needed. + + + Holds information about a the target of a drag drop operation. + + + + The class holds all of the framework's information about the current + target of a drag. It is used by method to determine whether + the current drop target is valid, and by to perform the drop. + + Gets the drag data. @@ -371,17 +430,6 @@ Indicates if the drop info should be handled by itself (useful for child elements) - - - Holds information about a the target of a drag drop operation. - - - - The class holds all of the framework's information about the current - target of a drag. It is used by method to determine whether - the current drop target is valid, and by to perform the drop. - - Initializes a new instance of the DropInfo class. @@ -528,5 +576,19 @@ The size of the icon The image to be displayed + + + thx to @osicka from issue #84 + + e.g. original source is part of a popup (e.g. ComboBox drop down), the hit test needs to be done on the original source. + Because the popup is not attached to the visual tree of the sender. + This function test this by looping back from the original source to the sender and if it didn't end up at the sender stopped the drag. + + + + + find the visual ancestor by type and go through the visual tree until the given itemsControl will be found + + diff --git a/win/CS/libraries/WPFDragDrop/GongSolutions.Wpf.DragDrop.dll b/win/CS/libraries/WPFDragDrop/GongSolutions.Wpf.DragDrop.dll index 395aac56d..bf2d85e9f 100644 Binary files a/win/CS/libraries/WPFDragDrop/GongSolutions.Wpf.DragDrop.dll and b/win/CS/libraries/WPFDragDrop/GongSolutions.Wpf.DragDrop.dll differ diff --git a/win/CS/libraries/WPFDragDrop/GongSolutions.Wpf.DragDrop.pdb b/win/CS/libraries/WPFDragDrop/GongSolutions.Wpf.DragDrop.pdb index 5b01a61e8..121c34de7 100644 Binary files a/win/CS/libraries/WPFDragDrop/GongSolutions.Wpf.DragDrop.pdb and b/win/CS/libraries/WPFDragDrop/GongSolutions.Wpf.DragDrop.pdb differ diff --git a/win/CS/libraries/WPFDragDrop/notes.txt b/win/CS/libraries/WPFDragDrop/notes.txt index 4d3071ad0..a40a2f0c6 100644 --- a/win/CS/libraries/WPFDragDrop/notes.txt +++ b/win/CS/libraries/WPFDragDrop/notes.txt @@ -1 +1,3 @@ https://github.com/punker76/gong-wpf-dragdrop + +[New BSD License](http://opensource.org/licenses/BSD-3-Clause) -- cgit v1.2.3