Class DragItems<U>
Helper class for handling FlaxEditor.Content.ContentItem drag and drop.
Inheritance
System.Object
FlaxEditor.GUI.Drag.DragHelper
DragHelper<FlaxEditor.Content.ContentItem, U>
DragItems<U>
Namespace: FlaxEditor.GUI.Drag
Assembly: FlaxEngine.CSharp.dll
Syntax
public class DragItems<U> : DragHelper<ContentItem, U> where U : DragEventArgs
Type Parameters
U
|
Constructors
DragItems(Func<ContentItem, Boolean>)
Creates a new DragHelper
Declaration
public DragItems(Func<ContentItem, bool> validateFunction)
Parameters
System.Func<FlaxEditor.Content.ContentItem, System.Boolean>
validateFunction
The validation function |
Fields
DragPrefix
The default prefix for drag data used for FlaxEditor.Content.ContentItem.
Declaration
public const string DragPrefix = "ASSET!?"
Field Value
System.String
|
Methods
FromDragData(DragData)
Tries to parse the drag data.
Declaration
public override IEnumerable<ContentItem> FromDragData(DragData data)
Parameters
DragData
data
The data. |
Returns
System.Collections.Generic.IEnumerable<FlaxEditor.Content.ContentItem>
Gathered objects or empty IEnumerable if cannot get any valid. |
Overrides
FlaxEditor.GUI.Drag.DragHelper<FlaxEditor.Content.ContentItem, U>.FromDragData(FlaxEngine.GUI.DragData)
GetDragData(ContentItem)
Gets the drag data.
Declaration
public static DragDataText GetDragData(ContentItem item)
Parameters
FlaxEditor.Content.ContentItem
item
The item. |
Returns
DragDataText
The data. |
GetDragData(IEnumerable<ContentItem>)
Gets the drag data.
Declaration
public static DragData GetDragData(IEnumerable<ContentItem> items)
Parameters
System.Collections.Generic.IEnumerable<FlaxEditor.Content.ContentItem>
items
The items. |
Returns
DragData
The data. |
GetDragData(String)
Gets the drag data.
Declaration
public static DragData GetDragData(string path)
Parameters
System.String
path
The path. |
Returns
DragData
The data. |
ToDragData(ContentItem)
Gets the drag data.
Declaration
public override DragData ToDragData(ContentItem item)
Parameters
FlaxEditor.Content.ContentItem
item
|
Returns
DragData
The data. |
Overrides
FlaxEditor.GUI.Drag.DragHelper<FlaxEditor.Content.ContentItem, U>.ToDragData(FlaxEditor.Content.ContentItem)
ToDragData(IEnumerable<ContentItem>)
Gets the drag data.
Declaration
public override DragData ToDragData(IEnumerable<ContentItem> items)
Parameters
System.Collections.Generic.IEnumerable<FlaxEditor.Content.ContentItem>
items
|
Returns
DragData
The data. |
Overrides
FlaxEditor.GUI.Drag.DragHelper<FlaxEditor.Content.ContentItem, U>.ToDragData(System.Collections.Generic.IEnumerable<FlaxEditor.Content.ContentItem>)
ToDragData(String)
Gets the drag data for the given file.
Declaration
public DragData ToDragData(string path)
Parameters
System.String
path
The path. |
Returns
DragData
The data. |
Extension Methods
See Also
FlaxEditor.Content.ContentItem