]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/dropsrc.tex
Corrected stupid error.
[wxWidgets.git] / docs / latex / wx / dropsrc.tex
1 \section{\class{wxDropSource}}\label{wxdropsource}
2
3 \overview{Overview}{wxdndoverview}
4
5 This 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}
16 enum 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
38 Default/wxGTK-specific constructor. If you use the default constructor you must
39 call \helpref{wxDropSource::SetData}{wxdropsourcesetdata} later.
40
41 {\it win} is only used by wxGTK. TODO: in what circumstances?
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
59 Sets 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
65 Do it (call this in response to a mouse button press, for example).
66
67 If {\bf bAllowMove} is FALSE, data can only be copied.
68
69 \membersection{wxDropSource::GiveFeedback}\label{wxdropsourcegivefeedback}
70
71 \func{virtual bool}{GiveFeedback}{\param{wxDragResult }{effect}, \param{bool }{bScrolling}}
72
73 Overridable: you may give some custom UI feedback during the drag and drop operation
74 in this function. It is called on each mouse move, so your implementation must not be too
75 slow.
76
77 \wxheading{Parameters}
78
79 \docparam{effect}{The effect to implement. One of wxDragCopy, wxDragMove.}
80
81 \docparam{bScrolling}{TRUE if the window is scrolling.}
82
83 \wxheading{Return value}
84
85 Return FALSE if you want default feedback, or TRUE if you implement your own
86 feedback.
87