.\" This is a wxWidgets manpage page generated from the XML docs .TH wxDropTarget 3wx 2005-02-15 "wxWidgets" "wxWidgets class documentation" .SH NAME wxDropTarget \- Drop target class .SH DESCRIPTION This class represents a target for a drag and drop operation. A wxDataObject can be associated with it and by default, this object will be filled with the data from the drag source, if the data formats supported by the data object match the drag source data format. There are various virtual handler functions defined in this class which may be overridden to give visual feedback or react in a more fine-tuned way, e.g. by not accepting data on the whole window area, but only a small portion of it. The normal sequence of calls is OnEnter , possibly many times OnDragOver , OnDrop and finally OnData . See Drag and drop overview and wxDataObject overview for more information. .SH "PARENTS" .SH "INCLUDE FILES" wx/dnd.h .SH MEMBERS .SS wxDropTarget (wxDataObject* data = NULL) Constructor. data is the data to be associated with the drop target. .SS ~wxDropTarget () Destructor. Deletes the associated data object, if any. .SS virtual void GetData () This method may only be called from within OnData . By default, this method copies the data from the drop source to the wxDataObject associated with this drop target, calling its wxDataObject::SetData method. .SS virtual wxDragResult OnData (wxCoord xwxCoord ywxDragResult def) Called after OnDrop returns true. By default this will usually GetData and will return the suggested default value def . .SS virtual bool OnDrop (wxCoord xwxCoord y) Called when the user drops a data object on the target. Return false to veto the operation. .SS virtual wxDragResult OnEnter (wxCoord xwxCoord ywxDragResult def) Called when the mouse enters the drop target. By default, this calls OnDragOver . .SS virtual wxDragResult OnDragOver (wxCoord xwxCoord ywxDragResult def) Called when the mouse is being dragged over the drop target. By default, this calls functions return the suggested return value def . .SS virtual void OnLeave () Called when the mouse leaves the drop target. .SS void SetDataObject (wxDataObject* data) Sets the data wxDataObject associated with the drop target and deletes any previously associated data object. .SH "SEE ALSO" wxDropSource wxTextDropTarget wxFileDropTarget , wxDataFormat wxDataObject .SH "AUTHORS" Documentation content by Julian Smart, Robert Roebling, Vadim Zeitlin, Robin Dunn, et al Conversion to manpage format by Arnout Engelen (http://bzzt.net), bugreports welcome.