1 \section{\class{wxDropSource
}}\label{wxdropsource
}
3 \overview{Overview
}{wxdndoverview
}
5 This class represents a source for a drag and drop operation.
7 \wxheading{Derived from
}
9 \helpref{wxObject
}{wxobject
}
13 \index{wxDragResult
}wxDragResult is defined as follows:
15 {\small\begin{verbatim
}
18 wxDragError, // error prevented the d&d operation from completing
19 wxDragNone, // drag target didn't accept the data
20 wxDragCopy, // the data was successfully copied
21 wxDragMove, // the data was successfully moved
22 wxDragCancel // the operation was cancelled by user (not an error)
29 \helpref{Drag and drop overview
}{wxdndoverview
},
\helpref{wxDropTarget
}{wxdroptarget
},
30 \helpref{wxTextDropTarget
}{wxtextdroptarget
},
\helpref{wxFileDropTarget
}{wxfiledroptarget
}
32 \latexignore{\rtfignore{\wxheading{Members
}}}
34 \membersection{wxDropSource::wxDropSource
}\label{wxdropsourcewxdropsource
}
36 \func{}{wxDropSource
}{\param{wxWindow*
}{ win = NULL
}}
38 Default/wxGTK-specific constructor. If you use the default constructor you must
39 call
\helpref{wxDropSource::SetData
}{wxdropsourcesetdata
} later.
41 {\it win
} is required by wxGTK and therefore should always be set.
43 \func{}{wxDropSource
}{\param{wxDataObject\&
}{data
},
\param{wxWindow*
}{ win = NULL
}}
45 \wxheading{Parameters
}
47 \docparam{data
}{A reference to the
\helpref{data object
}{wxdataobject
} associated with the drop source.
}
49 \docparam{win
}{Only used by wxGTK. TODO
}
51 \membersection{wxDropSource::
\destruct{wxDropSource
}}\label{wxdropsourcedtor
}
53 \func{virtual
}{\destruct{wxDropSource
}}{\void}
55 \membersection{wxDropSource::SetData
}\label{wxdropsourcesetdata
}
57 \func{void
}{SetData
}{\param{wxDataObject\&
}{ data
}}
59 Sets the data
\helpref{data object
}{wxdataobject
} associated with the drop source.
61 \membersection{wxDropSource::DoDragDrop
}\label{wxdropsourcedodragdrop
}
63 \func{virtual wxDragResult
}{DoDragDrop
}{\param{bool
}{bAllowMove = FALSE
}}
65 Do it (call this in response to a mouse button press, for example).
67 If
{\bf bAllowMove
} is FALSE, data can only be copied. Under GTK, data
70 \membersection{wxDropSource::GiveFeedback
}\label{wxdropsourcegivefeedback
}
72 \func{virtual bool
}{GiveFeedback
}{\param{wxDragResult
}{effect
},
\param{bool
}{bScrolling
}}
74 Overridable: you may give some custom UI feedback during the drag and drop operation
75 in this function. It is called on each mouse move, so your implementation must not be too
78 \wxheading{Parameters
}
80 \docparam{effect
}{The effect to implement. One of wxDragCopy, wxDragMove. MSW only.
}
82 \docparam{bScrolling
}{TRUE if the window is scrolling. MSW only.
}
84 \wxheading{Return value
}
86 Return FALSE if you want default feedback, or TRUE if you implement your own