Libraries.Interface.Events.DragAndDropEvent Documentation

Inherits from: Libraries.Language.Object

Summary

Variable Summary Table

VariablesDescription
integer DRAGGED_ONTO_DESTINATION
integer eventType
integer DRAGGING_CONTINUED
integer DRAGGED_OFF_DESTINATION
integer DRAGGING_BEGAN
integer DROPPED

Actions Summary Table

ActionsDescription
Compare(Libraries.Language.Object object)This action compares two object hash codes and returns an integer.
Equals(Libraries.Language.Object object)This action determines if two objects are equal based on their hash code values.
GetDestination()This action returns the Item that is underneath the cursor.
GetHashCode()This action gets the hash code for an object.
GetMovementX()This action returns how much the x coordinate of the cursor has changed during the last frame of animation.
GetMovementY()This action returns how much the y coordinate of the cursor has changed during the last frame of animation.
GetSource()This action returns the Item that is being dragged.
GetStartX()This action returns the x coordinate where this drag event began.
GetStartY()This action returns the y coordinate where this drag event began.
GetX()This action returns the current x coordinate of the cursor while it is dragging.
GetY()This action returns the current y coordinate of the cursor while it is dragging.
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.

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.

Example Code

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

Parameters

Return

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

Equals(Libraries.Language.Object object)

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

Example Code

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

Parameters

Return

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

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.

Example Code

Object o
        integer hash = o:GetHashCode()

Return

integer: The integer hash code of the object.

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