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
}
11 \wxheading{Include files
}
17 \index{wxDragResult
}wxDragResult is defined as follows:
19 {\small\begin{verbatim
}
22 wxDragError, // error prevented the d&d operation from completing
23 wxDragNone, // drag target didn't accept the data
24 wxDragCopy, // the data was successfully copied
25 wxDragMove, // the data was successfully moved
26 wxDragCancel // the operation was cancelled by user (not an error)
33 \helpref{Drag and drop overview
}{wxdndoverview
},
\helpref{wxDropTarget
}{wxdroptarget
},
34 \helpref{wxTextDropTarget
}{wxtextdroptarget
},
\helpref{wxFileDropTarget
}{wxfiledroptarget
}
36 \latexignore{\rtfignore{\wxheading{Members
}}}
38 \membersection{wxDropSource::wxDropSource
}\label{wxdropsourcewxdropsource
}
40 \func{}{wxDropSource
}{\param{wxWindow*
}{ win = NULL
}}
42 Default/wxGTK-specific constructor. If you use the default constructor you must
43 call
\helpref{wxDropSource::SetData
}{wxdropsourcesetdata
} later.
45 {\it win
} is required by wxGTK and therefore should always be set.
47 \func{}{wxDropSource
}{\param{wxDataObject\&
}{data
},
\param{wxWindow*
}{ win = NULL
}}
49 \wxheading{Parameters
}
51 \docparam{data
}{A reference to the
\helpref{data object
}{wxdataobject
} associated with the drop source.
}
53 \docparam{win
}{Only used by wxGTK. TODO
}
55 \membersection{wxDropSource::
\destruct{wxDropSource
}}\label{wxdropsourcedtor
}
57 \func{virtual
}{\destruct{wxDropSource
}}{\void}
59 \membersection{wxDropSource::SetData
}\label{wxdropsourcesetdata
}
61 \func{void
}{SetData
}{\param{wxDataObject\&
}{ data
}}
63 Sets the data
\helpref{data object
}{wxdataobject
} associated with the drop source.
65 \membersection{wxDropSource::DoDragDrop
}\label{wxdropsourcedodragdrop
}
67 \func{virtual wxDragResult
}{DoDragDrop
}{\param{bool
}{bAllowMove = FALSE
}}
69 Do it (call this in response to a mouse button press, for example).
71 If
{\bf bAllowMove
} is FALSE, data can only be copied. Under GTK, data
74 \membersection{wxDropSource::GiveFeedback
}\label{wxdropsourcegivefeedback
}
76 \func{virtual bool
}{GiveFeedback
}{\param{wxDragResult
}{effect
},
\param{bool
}{bScrolling
}}
78 Overridable: you may give some custom UI feedback during the drag and drop operation
79 in this function. It is called on each mouse move, so your implementation must not be too
82 \wxheading{Parameters
}
84 \docparam{effect
}{The effect to implement. One of wxDragCopy, wxDragMove. MSW only.
}
86 \docparam{bScrolling
}{TRUE if the window is scrolling. MSW only.
}
88 \wxheading{Return value
}
90 Return FALSE if you want default feedback, or TRUE if you implement your own