| Version: 3.1.5

Public Member Functions | List of all members
wxFileDropTarget Class Referenceabstract
Class List by Category » Clipboard and Drag & Drop

`#include </home/Hamis/wxwidgets-3.1/wxWidgets3.1-3.1.5-1.i686/src/wxWidgets-3.1.5/interface/wx/dnd.h>`

Inheritance diagram for wxFileDropTarget:
[legend]

## Detailed Description

This is a drop target which accepts files (dragged from File Manager or Explorer).

##

Library: wxCore

<>< =''>:</>&;&;< =''>\ </></>

See also
  Drag and Drop Overview, wxDropSource, wxDropTarget, wxTextDropTarget

## Public Member Functions
| wxFileDropTarget ()
| Constructor. More...
virtual bool | OnDrop (wxCoord x, wxCoord y)
| See wxDropTarget::OnDrop(). More...
virtual bool | OnDropFiles (wxCoord x, wxCoord y, const wxArrayString &filenames)=0
| Override this function to receive dropped files. More...
Public Member Functions inherited from wxDropTarget
| wxDropTarget (wxDataObject *data=NULL)
| Constructor. More...
virtual | ~wxDropTarget ()
| Destructor. More...
virtual bool | GetData ()
| This method may only be called from within OnData(). More...
virtual wxDragResult | OnData (wxCoord x, wxCoord y, wxDragResult defResult)=0
| Called after OnDrop() returns true. More...
virtual wxDragResult | OnDragOver (wxCoord x, wxCoord y, wxDragResult defResult)
| Called when the mouse is being dragged over the drop target. More...
virtual wxDragResult | OnEnter (wxCoord x, wxCoord y, wxDragResult defResult)
| Called when the mouse enters the drop target. More...
virtual void | OnLeave ()
| Called when the mouse leaves the drop target. More...
wxDataObject * | GetDataObject () const
| Returns the data wxDataObject associated with the drop target. More...
void | SetDataObject (wxDataObject *data)
| Sets the data wxDataObject associated with the drop target and deletes any previously associated data object. More...
void | SetDefaultAction (wxDragResult action)
| Sets the default action for drag and drop. More...
wxDragResult | GetDefaultAction ()
| Returns default action for drag and drop or wxDragNone if this not specified. More...

## Constructor & Destructor Documentation

## ◆ wxFileDropTarget()

wxFileDropTarget::wxFileDropTarget | ( |  | ) |

Constructor.

## Member Function Documentation

## ◆ OnDrop()

virtual bool wxFileDropTarget::OnDrop | ( | wxCoord | x,
|  | wxCoord | y
| ) |  |
| virtual

See wxDropTarget::OnDrop().

This function is implemented appropriately for files, and calls OnDropFiles().

Reimplemented from wxDropTarget.

## ◆ OnDropFiles()

virtual bool wxFileDropTarget::OnDropFiles | ( | wxCoord | x,
|  | wxCoord | y,
|  | const wxArrayString & | filenames
| ) |  |
| pure virtual

Override this function to receive dropped files.

Parameters

  x | The x coordinate of the mouse.
  y | The y coordinate of the mouse.
  filenames | An array of filenames.

Return true to accept the data, or false to veto the operation.