scaffold.libs_as.feathers.dragDrop.IDropTarget.as Maven / Gradle / Ivy
/*
Feathers
Copyright 2012-2015 Bowler Hat LLC. All Rights Reserved.
This program is free software. You can redistribute and/or modify it in
accordance with the terms of the accompanying license agreement.
*/
package feathers.dragDrop
{
import starling.events.Event;
/**
* Dispatched when the touch enters the drop target's bounds. Call
* acceptDrag()
on the drag and drop manager to allow
* the drag to the be dropped on the target.
*
* The properties of the event object have the following values:
*
* Property Value
* bubbles
false
* currentTarget
The Object that defines the
* event listener that handles the event. For example, if you use
* myButton.addEventListener()
to register an event listener,
* myButton is the value of the currentTarget
.
* data
Same as the dragData property.
* dragData
The feathers.dragDrop.DragData
* instance associated with this drag.
* isDropped
false
* localX
The x location, in pixels, of the
* current action, in the local coordinate system of the IDropTarget
.
* localY
The y location, in pixels, of the
* current action, in the local coordinate system of the IDropTarget
.
* target
The Object that dispatched the event;
* it is not always the Object listening for the event. Use the
* currentTarget
property to always access the Object
* listening for the event.
*
*
* @eventType feathers.events.DragDropEvent.DRAG_ENTER
*/
[Event(name="dragEnter",type="feathers.events.DragDropEvent")]
/**
* Dispatched when the touch moves within the drop target's bounds.
*
* The properties of the event object have the following values:
*
* Property Value
* bubbles
false
* currentTarget
The Object that defines the
* event listener that handles the event. For example, if you use
* myButton.addEventListener()
to register an event listener,
* myButton is the value of the currentTarget
.
* data
Same as the dragData property.
* dragData
The feathers.dragDrop.DragData
* instance associated with this drag.
* isDropped
false
* localX
The x location, in pixels, of the
* current action, in the local coordinate system of the IDropTarget
.
* localY
The y location, in pixels, of the
* current action, in the local coordinate system of the IDropTarget
.
* target
The Object that dispatched the event;
* it is not always the Object listening for the event. Use the
* currentTarget
property to always access the Object
* listening for the event.
*
*
* @eventType feathers.events.DragDropEvent.DRAG_MOVE
*/
[Event(name="dragMove",type="feathers.events.DragDropEvent")]
/**
* Dispatched when the touch exits the drop target's bounds or when
* the drag is cancelled while the touch is within the drop target's
* bounds. Will not be dispatched if the drop target hasn't
* accepted the drag.
*
* The properties of the event object have the following values:
*
* Property Value
* bubbles
false
* currentTarget
The Object that defines the
* event listener that handles the event. For example, if you use
* myButton.addEventListener()
to register an event listener,
* myButton is the value of the currentTarget
.
* data
Same as the dragData property.
* dragData
The feathers.dragDrop.DragData
* instance associated with this drag.
* isDropped
false
* localX
The x location, in pixels, of the
* current action, in the local coordinate system of the IDropTarget
.
* localY
The y location, in pixels, of the
* current action, in the local coordinate system of the IDropTarget
.
* target
The Object that dispatched the event;
* it is not always the Object listening for the event. Use the
* currentTarget
property to always access the Object
* listening for the event.
*
*
* @eventType feathers.events.DragDropEvent.DRAG_EXIT
*/
[Event(name="dragExit",type="feathers.events.DragDropEvent")]
/**
* Dispatched when an accepted drag is dropped on the target. Will
* not be dispatched if the drop target hasn't accepted the
* drag.
*
* The properties of the event object have the following values:
*
* Property Value
* bubbles
false
* currentTarget
The Object that defines the
* event listener that handles the event. For example, if you use
* myButton.addEventListener()
to register an event listener,
* myButton is the value of the currentTarget
.
* data
Same as the dragData property.
* dragData
The feathers.dragDrop.DragData
* instance associated with this drag.
* isDropped
true
* localX
The x location, in pixels, of the
* current action, in the local coordinate system of the IDropTarget
.
* localY
The y location, in pixels, of the
* current action, in the local coordinate system of the IDropTarget
.
* target
The Object that dispatched the event;
* it is not always the Object listening for the event. Use the
* currentTarget
property to always access the Object
* listening for the event.
*
*
* @eventType feathers.events.DragDropEvent.DRAG_DROP
*/
[Event(name="dragDrop",type="feathers.events.DragDropEvent")]
/**
* A display object that can accept data dropped by the drag and drop
* manager.
*
* @see DragDropManager
*/
public interface IDropTarget
{
function dispatchEvent(event:Event):void;
function dispatchEventWith(type:String, bubbles:Boolean = false, data:Object = null):void;
}
}