Contents Up Previous Next

wxDropTarget

Overview

This class represents a target for a drag and drop operation.

Derived from

wxObject

Include files

<wx/dnd.h>

See also

Drag and drop overview, wxDropSource, wxTextDropTarget, wxFileDropTarget

Members

wxDropTarget::wxDropTarget
wxDropTarget::~wxDropTarget
wxDropTarget::GetFormatCount
wxDropTarget::GetFormat
wxDropTarget::OnEnter
wxDropTarget::OnDrop
wxDropTarget::OnLeave


wxDropTarget::wxDropTarget

wxDropTarget()

Constructor.


wxDropTarget::~wxDropTarget

~wxDropTarget()

Destructor.


wxDropTarget::GetFormatCount

virtual size_t GetFormatCount() const

Override this to indicate how many formats you support.


wxDropTarget::GetFormat

virtual wxDataFormat GetFormat(size_t n) const

Override this to indicate what kind of data you support.


wxDropTarget::OnEnter

virtual void OnEnter()

Called when the mouse enters the drop target.


wxDropTarget::OnDrop

virtual bool OnDrop(long x, long y, const void* data, size_t size)

Called when the user drops a data object on the target. Return FALSE to veto the operation.

Parameters

x

y

data

size

Return value

Return TRUE to accept the data, FALSE to veto the operation.


wxDropTarget::OnLeave

virtual void OnLeave()

Called when the mouse leaves the drop target.