Control.setDragForwarding

Forwards the handling of this control's drag and drop to target control. Forwarding can be implemented in the target control similar to the methods getDragData, canDropData, and dropData but with two differences: 1. The function name must be suffixed with _fw 2. The function must take an extra argument that is the control doing the forwarding

More...
struct Control
@nogc nothrow
void
setDragForwarding

Detailed Description

# ThisControl.gd extends Control func _ready(): set_drag_forwarding(target_control)

# TargetControl.gd extends Control func can_drop_data_fw(position, data, from_control): return true

func drop_data_fw(position, data, from_control): my_handle_data(data)

func get_drag_data_fw(position, from_control): set_drag_preview(my_preview) return my_data()

Meta