Search Results for

    Show / Hide Table of Contents

    Class DragHelper<T, U>

    Base class for drag and drop operation helpers.

    Inheritance
    System.Object
    FlaxEditor.GUI.Drag.DragHelper
    DragHelper<T, U>
    DragActors<U>
    DragActorType<U>
    DragAssets<U>
    DragControlType<U>
    DragItems<U>
    DragNames<U>
    DragScriptItems<U>
    DragScripts<U>
    Namespace: FlaxEditor.GUI.Drag
    Assembly: FlaxEngine.CSharp.dll
    Syntax
    public abstract class DragHelper<T, U> : DragHelper where U : DragEventArgs
    Type Parameters
    T

    Type of the objects to collect from drag data.

    U

    Type of the drag-drop event.

    Constructors

    DragHelper(Func<T, Boolean>)

    Creates a new DragHelper

    Declaration
    protected DragHelper(Func<T, bool> validateFunction)
    Parameters
    System.Func<T, System.Boolean> validateFunction

    The validation function

    Fields

    Objects

    The objects gathered.

    Declaration
    public readonly List<T> Objects
    Field Value
    System.Collections.Generic.List<T>

    Properties

    Effect

    Gets the current drag effect.

    Declaration
    public override DragDropEffect Effect { get; }
    Property Value
    DragDropEffect

    Overrides
    FlaxEditor.GUI.Drag.DragHelper.Effect

    HasValidDrag

    Gets a value indicating whether this instance has valid drag data.

    Declaration
    public sealed override bool HasValidDrag { get; }
    Property Value
    System.Boolean

    Overrides
    FlaxEditor.GUI.Drag.DragHelper.HasValidDrag

    ValidateFunction

    The validation function

    Declaration
    protected Func<T, bool> ValidateFunction { get; set; }
    Property Value
    System.Func<T, System.Boolean>

    Methods

    DragDrop(U, IEnumerable<T>)

    Handler drag drop event.

    Declaration
    public virtual void DragDrop(U dragEventArgs, IEnumerable<T> item)
    Parameters
    U dragEventArgs

    The drag event arguments.

    System.Collections.Generic.IEnumerable<T> item

    The item.

    FromDragData(DragData)

    Tries to parse the drag data.

    Declaration
    public abstract IEnumerable<T> FromDragData(DragData data)
    Parameters
    DragData data

    The data.

    Returns
    System.Collections.Generic.IEnumerable<T>

    Gathered objects or empty IEnumerable if cannot get any valid.

    InvalidDrag()

    Invalids the drag data.

    Declaration
    public void InvalidDrag()

    OnDragDrop()

    Called when drag drops.

    Declaration
    public sealed override void OnDragDrop()
    Overrides
    FlaxEditor.GUI.Drag.DragHelper.OnDragDrop()

    OnDragDrop(DragEventArgs)

    Called when drag drops.

    Declaration
    public sealed override void OnDragDrop(DragEventArgs dragEventArgs)
    Parameters
    DragEventArgs dragEventArgs

    Arguments

    Overrides
    FlaxEditor.GUI.Drag.DragHelper.OnDragDrop(FlaxEditor.GUI.Drag.DragEventArgs)

    OnDragEnter(DragData)

    Called when drag enters.

    Declaration
    public sealed override bool OnDragEnter(DragData data)
    Parameters
    DragData data

    The data.

    Returns
    System.Boolean

    True if drag event is valid and can be performed, otherwise false.

    Overrides
    FlaxEditor.GUI.Drag.DragHelper.OnDragEnter(FlaxEngine.GUI.DragData)

    OnDragLeave()

    Called when drag leaves.

    Declaration
    public override void OnDragLeave()
    Overrides
    FlaxEditor.GUI.Drag.DragHelper.OnDragLeave()

    ToDragData(T)

    Gets the drag data.

    Declaration
    public abstract DragData ToDragData(T item)
    Parameters
    T item

    An item.

    Returns
    DragData

    The data.

    ToDragData(IEnumerable<T>)

    Gets the drag data.

    Declaration
    public abstract DragData ToDragData(IEnumerable<T> items)
    Parameters
    System.Collections.Generic.IEnumerable<T> items

    The items.

    Returns
    DragData

    The data.

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat