]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/dropsrc.tex
1. wxLoad/SaveFileSelector return "wxString" instead of "char *"
[wxWidgets.git] / docs / latex / wx / dropsrc.tex
... / ...
CommitLineData
1\section{\class{wxDropSource}}\label{wxdropsource}
2
3\overview{Overview}{wxdndoverview}
4
5This class represents a source for a drag and drop operation.
6
7\wxheading{Derived from}
8
9\helpref{wxObject}{wxobject}
10
11\wxheading{Types}
12
13\index{wxDragResult}wxDragResult is defined as follows:
14
15{\small\begin{verbatim}
16enum wxDragResult
17 {
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)
23 };
24\end{verbatim}%
25}
26
27\wxheading{See also}
28
29\helpref{Drag and drop overview}{wxdndoverview}, \helpref{wxDropTarget}{wxdroptarget},
30\helpref{wxTextDropTarget}{wxtextdroptarget}, \helpref{wxFileDropTarget}{wxfiledroptarget}
31
32\latexignore{\rtfignore{\wxheading{Members}}}
33
34\membersection{wxDropSource::wxDropSource}\label{wxdropsourcewxdropsource}
35
36\func{}{wxDropSource}{\param{wxWindow }{*win = NULL}}
37
38Default/wxGTK-specific constructor. If you use the default constructor you must
39call \helpref{wxDropSource::SetData}{wxdropsourcesetdata} later.
40
41{\it win} is required by wxGTK and therefore should always be set.
42
43\func{}{wxDropSource}{\param{wxDataObject }{\&data}, \param{wxWindow }{*win = NULL}}
44
45\wxheading{Parameters}
46
47\docparam{data}{A reference to the \helpref{data object}{wxdataobject} associated with the drop source.}
48
49\docparam{win}{Only used by wxGTK. TODO}
50
51\membersection{wxDropSource::\destruct{wxDropSource}}\label{wxdropsourcedtor}
52
53\func{virtual }{\destruct{wxDropSource}}{\void}
54
55\membersection{wxDropSource::SetData}\label{wxdropsourcesetdata}
56
57\func{void}{SetData}{\param{wxDataObject }{\&data}}
58
59Sets the data \helpref{data object}{wxdataobject} associated with the drop source.
60
61\membersection{wxDropSource::DoDragDrop}\label{wxdropsourcedodragdrop}
62
63\func{virtual wxDragResult}{DoDragDrop}{\param{bool }{bAllowMove = FALSE}}
64
65Do it (call this in response to a mouse button press, for example).
66
67If {\bf bAllowMove} is FALSE, data can only be copied. Under GTK, data
68is always copied.
69
70\membersection{wxDropSource::GiveFeedback}\label{wxdropsourcegivefeedback}
71
72\func{virtual bool}{GiveFeedback}{\param{wxDragResult }{effect}, \param{bool }{bScrolling}}
73
74Overridable: you may give some custom UI feedback during the drag and drop operation
75in this function. It is called on each mouse move, so your implementation must not be too
76slow.
77
78\wxheading{Parameters}
79
80\docparam{effect}{The effect to implement. One of wxDragCopy, wxDragMove. MSW only. }
81
82\docparam{bScrolling}{TRUE if the window is scrolling. MSW only. }
83
84\wxheading{Return value}
85
86Return FALSE if you want default feedback, or TRUE if you implement your own
87feedback.
88