1999-01-13 09:23:31 -05:00
|
|
|
\section{\class{wxDropSource}}\label{wxdropsource}
|
|
|
|
|
|
|
|
\overview{Overview}{wxdndoverview}
|
|
|
|
|
|
|
|
This class represents a source for a drag and drop operation.
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
|
|
|
\helpref{wxObject}{wxobject}
|
|
|
|
|
1999-02-15 15:41:29 -05:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/dnd.h>
|
|
|
|
|
1999-01-13 09:23:31 -05:00
|
|
|
\wxheading{Types}
|
|
|
|
|
|
|
|
\index{wxDragResult}wxDragResult is defined as follows:
|
|
|
|
|
|
|
|
{\small\begin{verbatim}
|
|
|
|
enum wxDragResult
|
|
|
|
{
|
|
|
|
wxDragError, // error prevented the d&d operation from completing
|
|
|
|
wxDragNone, // drag target didn't accept the data
|
|
|
|
wxDragCopy, // the data was successfully copied
|
|
|
|
wxDragMove, // the data was successfully moved
|
|
|
|
wxDragCancel // the operation was cancelled by user (not an error)
|
|
|
|
};
|
|
|
|
\end{verbatim}%
|
|
|
|
}
|
|
|
|
|
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{Drag and drop overview}{wxdndoverview}, \helpref{wxDropTarget}{wxdroptarget},
|
|
|
|
\helpref{wxTextDropTarget}{wxtextdroptarget}, \helpref{wxFileDropTarget}{wxfiledroptarget}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxDropSource::wxDropSource}\label{wxdropsourcewxdropsource}
|
|
|
|
|
1999-01-24 18:56:51 -05:00
|
|
|
\func{}{wxDropSource}{\param{wxWindow*}{ win = NULL}}
|
1999-01-13 09:23:31 -05:00
|
|
|
|
|
|
|
Default/wxGTK-specific constructor. If you use the default constructor you must
|
|
|
|
call \helpref{wxDropSource::SetData}{wxdropsourcesetdata} later.
|
|
|
|
|
1999-01-14 20:12:01 -05:00
|
|
|
{\it win} is required by wxGTK and therefore should always be set.
|
1999-01-13 09:23:31 -05:00
|
|
|
|
|
|
|
\membersection{wxDropSource::\destruct{wxDropSource}}\label{wxdropsourcedtor}
|
|
|
|
|
|
|
|
\func{virtual }{\destruct{wxDropSource}}{\void}
|
|
|
|
|
|
|
|
\membersection{wxDropSource::SetData}\label{wxdropsourcesetdata}
|
|
|
|
|
1999-01-24 18:56:51 -05:00
|
|
|
\func{void}{SetData}{\param{wxDataObject\&}{ data}}
|
1999-01-13 09:23:31 -05:00
|
|
|
|
|
|
|
Sets the data \helpref{data object}{wxdataobject} associated with the drop source.
|
|
|
|
|
|
|
|
\membersection{wxDropSource::DoDragDrop}\label{wxdropsourcedodragdrop}
|
|
|
|
|
1999-11-01 13:20:39 -05:00
|
|
|
\func{virtual wxDragResult}{DoDragDrop}{\param{bool }{allowMove = FALSE}}
|
1999-01-13 09:23:31 -05:00
|
|
|
|
|
|
|
Do it (call this in response to a mouse button press, for example).
|
|
|
|
|
1999-11-01 13:20:39 -05:00
|
|
|
If {\bf allowMove} is FALSE, data can only be copied.
|
1999-01-13 09:23:31 -05:00
|
|
|
|
|
|
|
\membersection{wxDropSource::GiveFeedback}\label{wxdropsourcegivefeedback}
|
|
|
|
|
1999-11-01 13:20:39 -05:00
|
|
|
\func{virtual bool}{GiveFeedback}{\param{wxDragResult }{effect}, \param{bool }{scrolling}}
|
1999-01-13 09:23:31 -05:00
|
|
|
|
|
|
|
Overridable: you may give some custom UI feedback during the drag and drop operation
|
|
|
|
in this function. It is called on each mouse move, so your implementation must not be too
|
|
|
|
slow.
|
|
|
|
|
|
|
|
\wxheading{Parameters}
|
|
|
|
|
1999-11-01 13:20:39 -05:00
|
|
|
\docparam{effect}{The effect to implement. One of wxDragCopy, wxDragMove and wxDragNone. }
|
1999-01-13 09:23:31 -05:00
|
|
|
|
1999-11-01 13:20:39 -05:00
|
|
|
\docparam{scrolling}{TRUE if the window is scrolling. MSW only. }
|
1999-01-13 09:23:31 -05:00
|
|
|
|
|
|
|
\wxheading{Return value}
|
|
|
|
|
|
|
|
Return FALSE if you want default feedback, or TRUE if you implement your own
|
1999-11-01 13:20:39 -05:00
|
|
|
feedback. The return values is ignored under GTK.
|
1999-01-13 09:23:31 -05:00
|
|
|
|