X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b2cf617cb8160a92696f1421675963aa00cb0c2b..e00a5d3ca15eec8db3e231d79d82ff6965e3466b:/docs/latex/wx/dropsrc.tex diff --git a/docs/latex/wx/dropsrc.tex b/docs/latex/wx/dropsrc.tex index b9ec41ca95..041c31c227 100644 --- a/docs/latex/wx/dropsrc.tex +++ b/docs/latex/wx/dropsrc.tex @@ -2,7 +2,7 @@ This class represents a source for a drag and drop operation. -See \helpref{Drag'n'Drop overview}{wxdndoverview} and \helpref{wxDataObject overview}{wxdataobjectoverview} +See \helpref{Drag and drop overview}{wxdndoverview} and \helpref{wxDataObject overview}{wxdataobjectoverview} for more information. \wxheading{Derived from} @@ -37,12 +37,31 @@ enum wxDragResult \membersection{wxDropSource::wxDropSource}\label{wxdropsourcewxdropsource} -\func{}{wxDropSource}{\param{wxWindow*}{ win = NULL}} +\func{}{wxDropSource}{\param{wxWindow*}{ win = NULL},\param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconNone = wxNullIconOrCursor}} -Default/wxGTK-specific constructor. If you use the default constructor you must -call \helpref{SetData}{wxdropsourcesetdata} later. +\func{}{wxDropSource}{\param{wxDataObject\&}{ data}, \param{wxWindow*}{ win = NULL},\param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconNone = wxNullIconOrCursor}} -Note that {\it win} is required by the GTK port and therefore should always be set. +The constructors for wxDataObject. + +If you use the constructor without {\it data} parameter you must call +\helpref{SetData}{wxdropsourcesetdata} later. + +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{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.} + +{\it win} is the window which initiates the drag and drop operation. \membersection{wxDropSource::\destruct{wxDropSource}}\label{wxdropsourcedtor} @@ -57,11 +76,23 @@ drop source. This will not delete any previously associated data. \membersection{wxDropSource::DoDragDrop}\label{wxdropsourcedodragdrop} -\func{virtual wxDragResult}{DoDragDrop}{\param{bool }{allowMove = 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 allowMove} is FALSE, data can only be 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} @@ -75,10 +106,10 @@ slow. \docparam{effect}{The effect to implement. One of wxDragCopy, wxDragMove and wxDragNone. } -\docparam{scrolling}{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 +Return false if you want default feedback, or true if you implement your own feedback. The return values is ignored under GTK.