SmartTableCellDragDropOp.h
What travels between two cells during a drag.
Where a cell drag started, in a shape a model reads.
The plugin moves nothing on a drop. What a drop means is a fact about the data, the same as a sort: SortRows says, and the model reorders.
By the time a drop lands, the cell the drag began on may already be drawing another row. Nothing can work that out afterwards. This is filled in as the drag starts, before any of it can move.
- Class
- USmartTableCellDragDropOp
- Extends
- UDragDropOperation
- Members
- 9
Public functions 2
Both ends of a drag, and the only place the marking on the cells comes off.
A cell that takes a drop says so itself. A release over nothing reaches no cell at all, and without these the source cell would keep its drag marking until the next drag started.
FUMGDragDropOp::OnDrop picks between the two by whether anything took the drop, and calls exactly one of them. Both go through EndCellDrag on the table.
Private functions 2
Releases every Smart Table Cell in this widget and under it, at any depth.
The visual is read off the payload and never handed in. Drop and DragCancelled are both BlueprintNativeEvents, and an override of either may build a visual of its own with a cell somewhere in it. Walking whatever DefaultDragVisual holds catches those as well.
Public variables 5
The row the drag began on, in natural space, as it stands when the drop lands.
Filled in as the drag starts, and found again by SourceRowId as the drop lands. Rows can arrive and leave while a drag is out, and a sort gives no row a new number. A drop whose source row left is reported to nobody.
The same row by the id its model gives it. None leaves SourceRow as the drag began, for a payload an override built with no id.
The column the drag began in.
The item under the source cell, when there is one.
Null wherever the model keeps no item for a row. The row and the column above are the real name for the source, and this is only a short cut. Strong on purpose: a drag can outlive the refresh that recycled the cell it began on.
The table the drag began in. Weak, so a drop arriving after that table has gone reads as null and never as a dangling pointer.
Next: SmartTableCellDrag.h