Skip to content
API referenceDevelopmentEditor scriptingEngine ccf7d03f
Synced
  • Publishes a lazily created unmanaged drag payload for the most recently submitted item.

API: scripting
Project: Inno.Editor.ImGui
Scope: Editor

public bool InnoEditor.ImGui.ImGuiWidget.DragDropSource<TPayload>(string payloadType, System.Func<TPayload> payloadFactory, System.Action? drawPreview = null, bool allowHoldToOpenOthers = true) where TPayload : struct

Type parameter TPayload: Unmanaged payload type.

Parameter payloadType: Stable ImGui payload type identifier.

Parameter payloadFactory: Creates the payload only after dragging starts.

Parameter drawPreview: Optional preview drawing callback.

Parameter allowHoldToOpenOthers: Whether hovering over another openable control may open it after the native drag-hold delay.

true while the item is an active drag source.

Exception T:System.ArgumentException: Thrown when payloadType is empty or whitespace.

Exception T:System.ArgumentNullException: Thrown when payloadFactory is null.