SmartTableCellDrag.h

The one cell drag a table has going: the cell it started on, and the cell it's over.

Source/SmartTables/Public/SmartTableCellDrag.h

One cell drag on a table: the cell it started on, and the cell the pointer is over now.

Both rows are row ids, so the marking stays on its rows through a sort, and through rows arriving or leaving, in the middle of a drag.

SetTarget, ClearTarget and End give back whether the marking changed. The table tells the cells on screen only when it did.

Struct
FSmartTableCellDrag
Members
11

Public functions 7

IsActive
bool IsActive() const

Whether a drag is out at all.

RoleOf
ESmartTableCellDragRole RoleOf( FName RowId, FName ColumnId ) const

What this cell is to the drag.

The source wins a tie. A drag back onto the cell it started on is a press that slipped a few pixels, and marking that cell as a target promises a move that never comes.

A row id of None has no role. It would otherwise match a source that is not set.

Begin
void Begin( FName RowId, FName ColumnId )

Starts a drag on this cell, over any drag that was out.

SetTarget
bool SetTarget( FName RowId, FName ColumnId )

Puts the target on this cell.

Returns false while no drag is out, and when the target is this cell already. Neither of those changes the marking of any cell.

ClearTarget
bool ClearTarget( FName RowId, FName ColumnId )

Takes the target off this cell, and off no other.

Slate raises the enter of the new cell before the leave of the old one. A clear with no check would drop the target the pointer has just moved onto.

Returns false unless the target is this cell.

End
bool End()

Ends the drag. Returns false when nothing was marked.

Reset
void Reset()

Public variables 4

SourceRowId
FName SourceRowId

The row the drag started on, or None while no drag is out.

SourceColumnId
FName SourceColumnId
TargetRowId
FName TargetRowId

The row of the cell the pointer is over, or None when there is none.

TargetColumnId
FName TargetColumnId

Next: SmartTableColumnSelection.h