<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/954b8ae60391d18b87a604e7919c87c0c6ae208b..b3e51e0f0fea8747bfe4b2a9f9e0d184e4b0db38:/docs/latex/wx/dropsrc.tex?ds=sidebyside

diff --git a/docs/latex/wx/dropsrc.tex b/docs/latex/wx/dropsrc.tex
index 2fc43ea65b..6223ea5e88 100644
--- a/docs/latex/wx/dropsrc.tex
+++ b/docs/latex/wx/dropsrc.tex
@@ -1,12 +1,13 @@
 \section{\class{wxDropSource}}\label{wxdropsource}
 
-\overview{Overview}{wxdndoverview}
-
 This class represents a source for a drag and drop operation.
 
+See \helpref{Drag and drop overview}{wxdndoverview} and \helpref{wxDataObject overview}{wxdataobjectoverview} 
+for more information.
+
 \wxheading{Derived from}
 
-\helpref{wxObject}{wxobject}
+None
 
 \wxheading{Include files}
 
@@ -16,41 +17,51 @@ This class represents a source for a drag and drop operation.
 
 \index{wxDragResult}wxDragResult is defined as follows:
 
-{\small\begin{verbatim}
+\begin{verbatim}
 enum wxDragResult
-  {
+{
     wxDragError,    // error prevented the d&amp;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}%
-}
+};
+\end{verbatim}
 
 \wxheading{See also}
 
-\helpref{Drag and drop overview}{wxdndoverview}, \helpref{wxDropTarget}{wxdroptarget}, 
+\helpref{wxDropTarget}{wxdroptarget}, 
 \helpref{wxTextDropTarget}{wxtextdroptarget}, \helpref{wxFileDropTarget}{wxfiledroptarget}
 
 \latexignore{\rtfignore{\wxheading{Members}}}
 
 \membersection{wxDropSource::wxDropSource}\label{wxdropsourcewxdropsource}
 
-\func{}{wxDropSource}{\param{wxWindow*}{ win = NULL}}
+\func{}{wxDropSource}{\param{wxWindow*}{ win = NULL},\param{const wxIconOrCursor\&amp; }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\&amp; }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\&amp; }{iconNone = wxNullIconOrCursor}}
+
+\func{}{wxDropSource}{\param{wxDataObject\&amp;}{ data}, \param{wxWindow*}{ win = NULL},\param{const wxIconOrCursor\&amp; }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\&amp; }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\&amp; }{iconNone = wxNullIconOrCursor}}
 
-Default/wxGTK-specific constructor. If you use the default constructor you must
-call \helpref{wxDropSource::SetData}{wxdropsourcesetdata} later.
+The constructors for wxDataObject.
 
-{\it win} is required by wxGTK and therefore should always be set.
+If you use the constructor without {\it data} parameter you must call 
+\helpref{SetData}{wxdropsourcesetdata} later.
 
-\func{}{wxDropSource}{\param{wxDataObject\&amp; }{data}, \param{wxWindow*}{ win = NULL}}
+Note that the exact type of {\it iconCopy} and subsequent parameters differs
+between wxMSW and wxGTK: these are cursors under Windows but icons for GTK.
+You should use the macro \helpref{wxDROP\_ICON}{wxdropicon} in portable
+programs instead of directly using either of these types.
 
 \wxheading{Parameters}
 
-\docparam{data}{A reference to the \helpref{data object}{wxdataobject} associated with the drop source.}
+\docparam{win}{The window which initiates the drag and drop operation.}
+
+\docparam{iconCopy}{The icon or cursor used for feedback for copy operation.}
+
+\docparam{iconMove}{The icon or cursor used for feedback for move operation.}
+
+\docparam{iconNone}{The icon or cursor used for feedback when operation can't be done.}
 
-\docparam{win}{Only used by wxGTK. TODO}
+{\it win} is the window which initiates the drag and drop operation.
 
 \membersection{wxDropSource::\destruct{wxDropSource}}\label{wxdropsourcedtor}
 
@@ -60,20 +71,32 @@ call \helpref{wxDropSource::SetData}{wxdropsourcesetdata} later.
 
 \func{void}{SetData}{\param{wxDataObject\&amp;}{ data}}
 
-Sets the data \helpref{data object}{wxdataobject} associated with the drop source.
+Sets the data \helpref{wxDataObject}{wxdataobject} associated with the 
+drop source. This will not delete any previously associated data.
 
 \membersection{wxDropSource::DoDragDrop}\label{wxdropsourcedodragdrop}
 
-\func{virtual wxDragResult}{DoDragDrop}{\param{bool }{bAllowMove = FALSE}}
+\func{virtual wxDragResult}{DoDragDrop}{\param{int }{flags = {\tt wxDrag\_CopyOnly}}}
 
-Do it (call this in response to a mouse button press, for example).
+Do it (call this in response to a mouse button press, for example). This starts
+the drag-and-drop operation which will terminate when the user releases the
+mouse.
+
+\wxheading{Parameters}
+
+\docparam{flags}{If {\tt wxDrag\_AllowMove} is included in the flags, data may
+be moved and not only copied (default). If {\tt wxDrag\_DefaultMove} is
+specified (which includes the previous flag), this is even the default
+operation}.
+
+\wxheading{Return value}
 
-If {\bf bAllowMove} is FALSE, data can only be copied. Under GTK, data
-is always copied.
+Returns the operation requested by the user, may be {\tt wxDragCopy}, {\tt
+wxDragMove}, {\tt wxDragCancel} or {\tt wxDragNone} if an error occured.
 
 \membersection{wxDropSource::GiveFeedback}\label{wxdropsourcegivefeedback}
 
-\func{virtual bool}{GiveFeedback}{\param{wxDragResult }{effect}, \param{bool }{bScrolling}}
+\func{virtual bool}{GiveFeedback}{\param{wxDragResult }{effect}, \param{bool }{scrolling}}
 
 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
@@ -81,12 +104,12 @@ slow.
 
 \wxheading{Parameters}
 
-\docparam{effect}{The effect to implement. One of wxDragCopy, wxDragMove. MSW only. }
+\docparam{effect}{The effect to implement. One of wxDragCopy, wxDragMove and wxDragNone. }
 
-\docparam{bScrolling}{TRUE if the window is scrolling. MSW only. }
+\docparam{scrolling}{TRUE if the window is scrolling. MSW only. }
 
 \wxheading{Return value}
 
 Return FALSE if you want default feedback, or TRUE if you implement your own
-feedback.
+feedback. The return values is ignored under GTK.
 
</pre></body></html>