class
DropTarget
Drop targets allow you to register a certain portion of a window as a drop target that accepts certain drop types from the OS (platform) specific drag and drop system.
Accepted drop types are provided by the OS and include things like file and item dragging.
You will receive events with the specified drop area as long as it is active.
Public
Methods
~DropTarget
SetArea
Sets the drop target area, in local window coordinates.
GetArea
Returns the drop target area, in local window coordinates.
GetDropType
Gets the type of drop that this drop target is looking for.
Only valid after a drop has been triggered.
GetFileList
Returns a list of files received by the drop target.
Only valid after a drop of FileList type has been triggered.
staticCreate
Creates a new drop target.
Any drop events that happen on the specified window's drop area will be reported through the target's events.
- window
- Window to which the drop target will be attached to.
- area
- Area, relative to the window, in which the drop events are allowed.
Returns: Newly created drop target.
Fields
OnDragOver
Triggered when a pointer is being dragged over the drop area.
Provides window coordinates of the pointer position.
OnDrop
Triggered when the user completes a drop while pointer is over the drop area.
Provides window coordinates of the pointer position.
OnEnter
Triggered when a pointer enters the drop area.
Provides window coordinates of the pointer position.
Internal
Methods
ClearInternal
Clears all internal values.
SetFileListInternal
Sets the file list and marks the drop event as FileList.
SetActiveInternal
Marks the drop area as inactive or active.
IsInsideInternal
Checks is the specified position within the current drop area.
Position should be in window local coordinates.
IsActiveInternal
Returns true if the drop target is active.
GetOwnerWindowInternal
Returns a render window this drop target is attached to.