X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..c266eff98c5e44012647f54f38a1e29ecabd8759:/docs/latex/wx/dropsrc.tex?ds=sidebyside diff --git a/docs/latex/wx/dropsrc.tex b/docs/latex/wx/dropsrc.tex index 9b306331ee..23055438d3 100644 --- a/docs/latex/wx/dropsrc.tex +++ b/docs/latex/wx/dropsrc.tex @@ -13,6 +13,10 @@ None +\wxheading{Library} + +\helpref{wxCore}{librarieslist} + \wxheading{Types} \index{wxDragResult}wxDragResult is defined as follows: @@ -23,7 +27,8 @@ 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 + wxDragMove, // the data was successfully moved (MSW only) + wxDragLink, // operation is a drag-link wxDragCancel // the operation was cancelled by user (not an error) }; \end{verbatim} @@ -37,9 +42,9 @@ enum wxDragResult \membersection{wxDropSource::wxDropSource}\label{wxdropsourcewxdropsource} -\func{}{wxDropSource}{\param{wxWindow*}{ win = NULL},\param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconNone = wxNullIconOrCursor}} +\func{}{wxDropSource}{\param{wxWindow*}{ win = NULL},\param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconMove = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconNone = wxNullIconOrCursor}} -\func{}{wxDropSource}{\param{wxDataObject\&}{ data}, \param{wxWindow*}{ win = NULL},\param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconNone = wxNullIconOrCursor}} +\func{}{wxDropSource}{\param{wxDataObject\&}{ data}, \param{wxWindow*}{ win = NULL},\param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconMove = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconNone = wxNullIconOrCursor}} The constructors for wxDataObject. @@ -76,15 +81,33 @@ 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). 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} + +Returns the operation requested by the user, may be {\tt wxDragCopy}, {\tt +wxDragMove}, {\tt wxDragLink}, {\tt wxDragCancel} or {\tt wxDragNone} if an error occurred. -Do it (call this in response to a mouse button press, for example). +\membersection{wxDropSource::GetDataObject}\label{wxdropsourcegetdataobject} -If {\bf allowMove} is FALSE, data can only be copied. +\func{wxDataObject *}{GetDataObject}{\void} + +Returns the wxDataObject object that has been assigned previously. \membersection{wxDropSource::GiveFeedback}\label{wxdropsourcegivefeedback} -\func{virtual bool}{GiveFeedback}{\param{wxDragResult }{effect}, \param{bool }{scrolling}} +\func{virtual bool}{GiveFeedback}{\param{wxDragResult }{effect}} 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 @@ -92,12 +115,24 @@ slow. \wxheading{Parameters} -\docparam{effect}{The effect to implement. One of wxDragCopy, wxDragMove and wxDragNone. } +\docparam{effect}{The effect to implement. One of {\tt wxDragCopy}, {\tt wxDragMove}, {\tt wxDragLink} and {\tt 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. +\membersection{wxDropSource::SetCursor}\label{wxdropsourcesetcursor} + +\func{void}{SetCursor}{\param{wxDragResult }{res}, \param{const wxCursor\& }{cursor}} + +Set the icon to use for a certain drag result. + +\wxheading{Parameters} + +\docparam{res}{The drag result to set the icon for. } + +\docparam{cursor}{The ion to show when this drag result occurs. } +