Events used by the DragDropManager.

Available since

1.3.0

.

See also:

Static variables

@:value("dragComplete")staticinlineread onlyDRAG_COMPLETE:EventType<DragDropEvent> = "dragComplete"

The DragDropEvent.DRAG_COMPLETE event type is dispatched by an IDragSource when a drag completes. This event is always dispatched — even when there was no successful drop. See the dropped property to determine if the drop was successful.

Available since

1.3.0

.

See also:

@:value("dragDrop")staticinlineread onlyDRAG_DROP:EventType<DragDropEvent> = "dragDrop"

The DragDropEvent.DRAG_DROP event type is dispatched by an IDropTarget when a drop occurs.

Available since

1.3.0

.

See also:

@:value("dragEnter")staticinlineread onlyDRAG_ENTER:EventType<DragDropEvent> = "dragEnter"

The DragDropEvent.DRAG_ENTER event type is dispatched by an IDropTarget when the mouse or a touch enters the target's bounds during a drag action.

Available since

1.3.0

.

See also:

@:value("dragExit")staticinlineread onlyDRAG_EXIT:EventType<DragDropEvent> = "dragExit"

The DragDropEvent.DRAG_EXIT event type is dispatched by an IDropTarget when the mouse or a touch exits the target's bounds during a drag action.

Available since

1.3.0

.

See also:

@:value("dragMove")staticinlineread onlyDRAG_MOVE:EventType<DragDropEvent> = "dragMove"

The DragDropEvent.DRAG_MOVE event type is dispatched by an IDropTarget when the mouse or a touch moves within the target's bounds during a drag action. A DRAG_ENTER event is always dispatched before any DRAG_MOVE events are dispatched.

Available since

1.3.0

.

See also:

@:value("dragStart")staticinlineread onlyDRAG_START:EventType<DragDropEvent> = "dragStart"

The DragDropEvent.DRAG_START event type is dispatched by an IDragSource when it a drag is started.

Available since

1.3.0

.

See also:

Static methods

@:value({ dragSource : null, localY : null, localX : null })staticdispatch(dispatcher:IEventDispatcher, type:String, dragData:DragData, dropped:Bool, ?localX:Float, ?localY:Float, ?dragSource:IDragSource):Bool

Dispatches a pooled event with the specified properties.

DragDropEvent.dispatch(component, DragDropEvent.DRAG_START, dragData, false, null, null, component);
Available since

1.3.0

.

Constructor

@:value({ dragSource : null, localY : null, localX : null })new(type:String, dragData:DragData, dropped:Bool, ?localX:Float, ?localY:Float, ?dragSource:IDragSource)

Creates a new DragDropEvent object with the given arguments.

Available since

1.3.0

.

See also:

Variables

read onlydragData:DragData

The DragData associated with the current drag.

Available since

1.3.0

.

read onlydragSource:IDragSource

The display object where the current drag originated.

Available since

1.3.0

.

read onlydropped:Bool

Indicates if a drop has occurred. Can be true of the event's type is DragDropEvent.DRAG_DROP only. For all other types, it will be false.

Available since

1.3.0

.

read onlylocalX:Null<Float>

The local x position of the current drop target, or null if there is no current drop target.

Available since

1.3.0

.

read onlylocalY:Null<Float>

The local y position of the current drop target, or null if there is no current drop target.

Available since

1.3.0

.

Methods

acceptDrag(target:IDropTarget):Void

May be called for an IDropTarget after the DragDropEvent.DRAG_ENTER event is dispatched and before the DragDropEvent.DRAG_EXIT event is dispatched. If called at any other time, an exception is thrown.

Available since

1.3.0

.