Interface IDragDropManager
A service to handle external drag and drop from WinAPI.
Assembly: Dalamud.dll
View Source
public interface IDragDropManager
Properties
ServiceAvailable
Gets a value indicating whether Drag and Drop functionality is available at all.
View Source
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
bool IsDragging { get; }
Files
Gets the list of files currently being dragged from an external application over any of the games viewports.
View Source
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
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
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
void CreateImGuiSource(string label, Func<IDragDropManager, bool> validityCheck)
Parameters
Type | Name | Description |
---|---|---|
System.String | label | The label used for the drag and drop payload. |
System.Func<Dalamud.Interface.DragDrop.IDragDropManager,System.Boolean> | validityCheck | A 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
void CreateImGuiSource(string label, Func<IDragDropManager, bool> validityCheck, Func<IDragDropManager, bool> tooltipBuilder)
Parameters
Type | Name | Description |
---|---|---|
System.String | label | The label used for the drag and drop payload. |
System.Func<Dalamud.Interface.DragDrop.IDragDropManager,System.Boolean> | validityCheck | A 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> | tooltipBuilder | Executes 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
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
Type | Name | Description |
---|---|---|
System.String | label | The label used for the drag and drop payload. |
System.Collections.Generic.IReadOnlyList<System.String> | files | On success, contains the list of file paths dropped onto the target. |
System.Collections.Generic.IReadOnlyList<System.String> | directories | On success, contains the list of directory paths dropped onto the target. |