class EditorWindowDropTarget

Inherits: IScriptExportable

Drop target associated with a particular editor window.

Drop target window and bounds will be updated if the parent window is re-docked or moved around the screen.

Public

Constructors

EditorWindowDropTarget

EditorWindowDropTarget(const SPtr<IEditorWindow> &parentWindow, const GUIPhysicalArea &area)

Methods

~EditorWindowDropTarget

~EditorWindowDropTarget() noexcept

GetFileList

const Vector<Path> &GetFileList() const

Returns a list of files received by the drop target.

Only valid after a drop of FileList type has been triggered.

SetArea

void SetArea(const GUIPhysicalArea &area)

Updates the area of the drop target, relative to the parent editor window.

GetAbsoluteDropTargetArea

GUIPhysicalArea GetAbsoluteDropTargetArea() const

Returns the bounds of the drop target, relative to the screen origin.

This depends of set bounds using SetBounds() and the current position and size of the parent editor window.

Destroy

void Destroy()

Makes the drop target inactive.

Fields

OnDragOver

Event<void (i32, i32)> OnDragOver

Triggered when a pointer is being dragged over the drop area.

Provides window coordinates of the pointer position.

OnDrop

Event<void (i32, i32)> OnDrop

Triggered when the user completes a drop while pointer is over the drop area.

Provides window coordinates of the pointer position.

OnEnter

Event<void (i32, i32)> OnEnter

Triggered when a pointer enters the drop area.

Provides window coordinates of the pointer position.

OnLeave

Event<void ()> OnLeave

Triggered when a pointer leaves the drop area.

Private

Methods

SetDropTarget

void SetDropTarget(const SPtr<RenderWindow> &parentWindow, const GUIPhysicalArea &area)

Creates an internal native drop target over the specified window.

Any previous drop target is overwritten.

parentWindow
Window the drop target is located on.
area
Area of the drop target, relative to the parent window.

DoOnWindowParentTabGroupChanged

void DoOnWindowParentTabGroupChanged(EditorWindowTabGroup *parentTabGroup)

Triggered when editor window parent tab group changes.

This might mean we need to re-create the drop target as the parent render window might have changed.

DoOnWidgetResized

void DoOnWidgetResized(const GUIPhysicalSize &size)

Triggered when the parent editor window is resized.

DoOnWidgetMoved

void DoOnWidgetMoved(const GUIPhysicalPoint &point)

Triggered when the parent editor window is moved.

Fields

mLowLevelDropTarget

SPtr<DropTarget> mLowLevelDropTarget

mParentWindowArea

GUIPhysicalArea mParentWindowArea

mRelativeDropTargetArea

GUIPhysicalArea mRelativeDropTargetArea

mWindowParentTabGroupChangedConnection

HEvent mWindowParentTabGroupChangedConnection

mParentWindowMovedConnection

HEvent mParentWindowMovedConnection

mParentWindowResizedConnection

HEvent mParentWindowResizedConnection

mDropTargetEnterConnection

HEvent mDropTargetEnterConnection

mDropTargetMoveConnection

HEvent mDropTargetMoveConnection

mDropTargetLeaveConnection

HEvent mDropTargetLeaveConnection

mDropTargetDroppedConnection

HEvent mDropTargetDroppedConnection