Class DragNames<U>
Helper class for handling generic items names drag and drop.
Namespace: FlaxEditor.GUI.Drag
Assembly: FlaxEngine.CSharp.dll
Syntax
public class DragNames<U> : DragHelper<string, U> where U : DragEventArgs
Type Parameters
U
|
Constructors
DragNames(String, Func<String, Boolean>)
Creates a new DragHelper
Declaration
public DragNames(string prefix, Func<string, bool> validateFunction)
Parameters
System.String
prefix
The drag data prefix. |
System.Func<System.String, System.Boolean>
validateFunction
The validation function. |
Properties
DragPrefix
Gets the drag data prefix.
Declaration
public string DragPrefix { get; }
Property Value
System.String
|
Methods
FromDragData(DragData)
Tries to parse the drag data to extract generic items names collection.
Declaration
public override IEnumerable<string> FromDragData(DragData data)
Parameters
DragData
data
The data. |
Returns
System.Collections.Generic.IEnumerable<System.String>
Gathered objects or empty array if cannot get any valid. |
Overrides
FlaxEditor.GUI.Drag.DragHelper<System.String, U>.FromDragData(FlaxEngine.GUI.DragData)
GetDragData(String, IEnumerable<String>)
Gets the drag data.
Declaration
public static DragData GetDragData(string dragPrefix, IEnumerable<string> names)
Parameters
System.String
dragPrefix
The drag dat prefix. |
System.Collections.Generic.IEnumerable<System.String>
names
The names. |
Returns
DragData
The data. |
GetDragData(String, String)
Gets the drag data.
Declaration
public static DragData GetDragData(string dragPrefix, string name)
Parameters
System.String
dragPrefix
The drag dat prefix. |
System.String
name
The name. |
Returns
DragData
The data. |
ToDragData(IEnumerable<String>)
Gets the drag data.
Declaration
public override DragData ToDragData(IEnumerable<string> tracks)
Parameters
System.Collections.Generic.IEnumerable<System.String>
tracks
|
Returns
DragData
The data. |
Overrides
FlaxEditor.GUI.Drag.DragHelper<System.String, U>.ToDragData(System.Collections.Generic.IEnumerable<System.String>)
ToDragData(String)
Gets the drag data.
Declaration
public override DragData ToDragData(string track)
Parameters
System.String
track
|
Returns
DragData
The data. |
Overrides
FlaxEditor.GUI.Drag.DragHelper<System.String, U>.ToDragData(System.String)