1fb3eae500
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
88 lines
2.4 KiB
TeX
88 lines
2.4 KiB
TeX
\section{\class{wxDropTarget}}\label{wxdroptarget}
|
|
|
|
\overview{Overview}{wxdndoverview}
|
|
|
|
This class represents a target for a drag and drop operation.
|
|
|
|
\wxheading{Derived from}
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
\wxheading{Include files}
|
|
|
|
<wx/dnd.h>
|
|
|
|
\wxheading{See also}
|
|
|
|
\helpref{Drag and drop overview}{wxdndoverview}, \helpref{wxDropSource}{wxdropsource},
|
|
\helpref{wxTextDropTarget}{wxtextdroptarget}, \helpref{wxFileDropTarget}{wxfiledroptarget}
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
\membersection{wxDropTarget::wxDropTarget}\label{wxdroptargetwxdroptarget}
|
|
|
|
\func{}{wxDropTarget}{\void}
|
|
|
|
Constructor.
|
|
|
|
\membersection{wxDropTarget::\destruct{wxDropTarget}}\label{wxdroptargetdtor}
|
|
|
|
\func{}{\destruct{wxDropTarget}}{\void}
|
|
|
|
Destructor.
|
|
|
|
\membersection{wxDropTarget::GetFormatCount}\label{wxdroptargetgetformatcount}
|
|
|
|
\constfunc{virtual size\_t}{GetFormatCount}{\void}
|
|
|
|
Override this to indicate how many formats you support.
|
|
|
|
\membersection{wxDropTarget::GetFormat}\label{wxdroptargetgetformat}
|
|
|
|
\constfunc{virtual wxDataFormat}{GetFormat}{\param{size\_t }{n}}
|
|
|
|
Override this to indicate what kind of data you support.
|
|
|
|
\membersection{wxDropTarget::OnData}\label{wxdroptargetondata}
|
|
|
|
\func{virtual wxDragResult}{OnData}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxDragResult}{ def}}
|
|
|
|
Called after OnDrop() returns TRUE: you will usually just call
|
|
GetData() from here and, probably, also refresh something to update the
|
|
new data and, finally, return the code indicating how did the operation
|
|
complete (returning default value in case of success and wxDragError on
|
|
failure is usually ok).
|
|
|
|
\membersection{wxDropTarget::OnDrop}\label{wxdroptargetondrop}
|
|
|
|
\func{virtual bool}{OnDrop}{\param{long }{x}, \param{long }{y}, \param{const void* }{data}, \param{size\_t }{size}}
|
|
|
|
Called when the user drops a data object on the target. Return FALSE to veto the operation.
|
|
|
|
\wxheading{Parameters}
|
|
|
|
\docparam{x}{The x coordinate of the mouse.}
|
|
|
|
\docparam{y}{The y coordinate of the mouse.}
|
|
|
|
\docparam{data}{The data being dropped.}
|
|
|
|
\docparam{size}{The size of the data being dropped.}
|
|
|
|
\wxheading{Return value}
|
|
|
|
Return TRUE to accept the data, FALSE to veto the operation.
|
|
|
|
\membersection{wxDropTarget::OnEnter}\label{wxdroptargetonenter}
|
|
|
|
\func{virtual void}{OnEnter}{\void}
|
|
|
|
Called when the mouse enters the drop target.
|
|
|
|
\membersection{wxDropTarget::OnLeave}\label{wxdroptargetonleave}
|
|
|
|
\func{virtual void}{OnLeave}{\void}
|
|
|
|
Called when the mouse leaves the drop target.
|
|
|