Skip to main content

Interface IDragDropManager

A service to handle external drag and drop from WinAPI.

Assembly: Dalamud.dll
View Source
Declaration
public interface IDragDropManager

Properties

ServiceAvailable

Gets a value indicating whether Drag and Drop functionality is available at all.

View Source
Declaration
bool ServiceAvailable { get; }

IsDragging

Gets a value indicating whether anything is being dragged from an external application and over any of the games viewports.

View Source
Declaration
bool IsDragging { get; }

Files

Gets the list of files currently being dragged from an external application over any of the games viewports.

View Source
Declaration
IReadOnlyList<string> Files { get; }

Extensions

Gets the set of file types by extension currently being dragged from an external application over any of the games viewports.

View Source
Declaration
IReadOnlySet<string> Extensions { get; }

Directories

Gets the list of directories currently being dragged from an external application over any of the games viewports.

View Source
Declaration
IReadOnlyList<string> Directories { get; }

Methods

CreateImGuiSource(string, Func<IDragDropManager, bool>)

Create an ImGui drag and drop source that is active only if anything is being dragged from an external source.

View Source
Declaration
void CreateImGuiSource(string label, Func<IDragDropManager, bool> validityCheck)
Parameters
TypeNameDescription
System.StringlabelThe label used for the drag and drop payload.
System.Func<Dalamud.Interface.DragDrop.IDragDropManager,System.Boolean>validityCheckA function returning whether the current status is relevant for this source. Checked before creating the source but only if something is being dragged.

CreateImGuiSource(string, Func<IDragDropManager, bool>, Func<IDragDropManager, bool>)

Create an ImGui drag and drop source that is active only if anything is being dragged from an external source.

View Source
Declaration
void CreateImGuiSource(string label, Func<IDragDropManager, bool> validityCheck, Func<IDragDropManager, bool> tooltipBuilder)
Parameters
TypeNameDescription
System.StringlabelThe label used for the drag and drop payload.
System.Func<Dalamud.Interface.DragDrop.IDragDropManager,System.Boolean>validityCheckA function returning whether the current status is relevant for this source. Checked before creating the source but only if something is being dragged.
System.Func<Dalamud.Interface.DragDrop.IDragDropManager,System.Boolean>tooltipBuilderExecutes ImGui functions to build a tooltip. Should return true if it creates any tooltip and false otherwise. If multiple sources are active, only the first non-empty tooltip type drawn in a frame will be used.

CreateImGuiTarget(string, out IReadOnlyList<string>, out IReadOnlyList<string>)

Create an ImGui drag and drop target on the last ImGui object.

View Source
Declaration
bool CreateImGuiTarget(string label, out IReadOnlyList<string> files, out IReadOnlyList<string> directories)
Returns

System.Boolean: True if items were dropped onto the target this frame, false otherwise.

Parameters
TypeNameDescription
System.StringlabelThe label used for the drag and drop payload.
System.Collections.Generic.IReadOnlyList<System.String>filesOn success, contains the list of file paths dropped onto the target.
System.Collections.Generic.IReadOnlyList<System.String>directoriesOn success, contains the list of directory paths dropped onto the target.