Libraries.Interface.Events.DragAndDropEvent Documentation

Inherits from: Libraries.Language.Object

Variables Table

VariablesDescription
integer DROPPED
integer DRAGGED_OFF_DESTINATION
integer DRAGGED_ONTO_DESTINATION
integer DRAGGING_CONTINUED
integer DRAGGING_BEGAN
integer eventTypeThe x coordinate (in screen coordinates) where the drag event originated from.

Actions Documentation

Compare(Libraries.Language.Object object)

This action compares two object hash codes and returns an integer. The result is larger if this hash code is larger than the object passed as a parameter, smaller, or equal. In this case, -1 means smaller, 0 means equal, and 1 means larger. This action was changed in Quorum 7 to return an integer, instead of a CompareResult object, because the previous implementation was causing efficiency issues.

Parameters

Return

integer: The Compare result, Smaller, Equal, or Larger.

Example

Object o
Object t
integer result = o:Compare(t) //1 (larger), 0 (equal), or -1 (smaller)

Equals(Libraries.Language.Object object)

This action determines if two objects are equal based on their hash code values.

Parameters

Return

boolean: True if the hash codes are equal and false if they are not equal.

Example

use Libraries.Language.Object
use Libraries.Language.Types.Text
Object o
Text t
boolean result = o:Equals(t)

GetDestination()

This action returns the Item that is underneath the cursor. In applications where you are dragging and dropping an Item into a container, for example, this would be the container the source Item is being dropped into.

Return

Libraries.Interface.Item:

GetHashCode()

This action gets the hash code for an object.

Return

integer: The integer hash code of the object.

Example

Object o
integer hash = o:GetHashCode()

GetMovementX()

This action returns how much the x coordinate of the cursor has changed during the last frame of animation. The returned value is in screen coordinates.

Return

integer:

GetMovementY()

This action returns how much the y coordinate of the cursor has changed during the last frame of animation. The returned value is in screen coordinates.

Return

integer:

GetSource()

This action returns the Item that is being dragged.

Return

Libraries.Interface.Item:

GetStartX()

This action returns the x coordinate where this drag event began. The returned value is in screen coordinates.

Return

integer:

GetStartY()

This action returns the y coordinate where this drag event began. The returned value is in screen coordinates.

Return

integer:

GetX()

This action returns the current x coordinate of the cursor while it is dragging. The returned value is in screen coordinates.

Return

integer:

GetY()

This action returns the current y coordinate of the cursor while it is dragging. The returned value is in screen coordinates.

Return

integer:

Set(integer eventType, integer startX, integer startY, integer currentX, integer currentY, integer movementX, integer movementY, Libraries.Interface.Item sourceItem, Libraries.Interface.Item destinationItem)

This action sets the values of the event. This is done internally by the system when events are created, and most users will never need to call this action directly.

Parameters