Synced
ImGuiWidget.DragDropSource
Section titled “ImGuiWidget.DragDropSource”
- Publishes a lazily created unmanaged drag payload for the most recently submitted item.
Required contracts
Section titled “Required contracts”API: engine
Project: Inno.Editor.ImGui
Declaration
Section titled “Declaration”public bool Inno.Editor.ImGui.ImGuiWidget.ImGuiWidget.DragDropSource<TPayload>(string payloadType, System.Func<TPayload> payloadFactory, System.Action? drawPreview = null, bool allowHoldToOpenOthers = true) where TPayload : unmanagedType parameters
Section titled “Type parameters”Type parameter TPayload: Unmanaged payload type.
Parameters
Section titled “Parameters”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.
Returns
Section titled “Returns”true while the item is an active drag source.
Exceptions
Section titled “Exceptions”Exception T:System.ArgumentException: Thrown when payloadType is empty or whitespace.
Exception T:System.ArgumentNullException: Thrown when payloadFactory is null.