git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
		
			
				
	
	
		
			93 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			TeX
		
	
	
	
	
	
			
		
		
	
	
			93 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			TeX
		
	
	
	
	
	
| \section{\class{wxDropSource}}\label{wxdropsource}
 | |
| 
 | |
| \overview{Overview}{wxdndoverview}
 | |
| 
 | |
| This class represents a source for a drag and drop operation.
 | |
| 
 | |
| \wxheading{Derived from}
 | |
| 
 | |
| \helpref{wxObject}{wxobject}
 | |
| 
 | |
| \wxheading{Include files}
 | |
| 
 | |
| <wx/dnd.h>
 | |
| 
 | |
| \wxheading{Types}
 | |
| 
 | |
| \index{wxDragResult}wxDragResult is defined as follows:
 | |
| 
 | |
| {\small\begin{verbatim}
 | |
| 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
 | |
|     wxDragCancel    // the operation was cancelled by user (not an error)
 | |
|   };
 | |
| \end{verbatim}%
 | |
| }
 | |
| 
 | |
| \wxheading{See also}
 | |
| 
 | |
| \helpref{Drag and drop overview}{wxdndoverview}, \helpref{wxDropTarget}{wxdroptarget}, 
 | |
| \helpref{wxTextDropTarget}{wxtextdroptarget}, \helpref{wxFileDropTarget}{wxfiledroptarget}
 | |
| 
 | |
| \latexignore{\rtfignore{\wxheading{Members}}}
 | |
| 
 | |
| \membersection{wxDropSource::wxDropSource}\label{wxdropsourcewxdropsource}
 | |
| 
 | |
| \func{}{wxDropSource}{\param{wxWindow*}{ win = NULL}}
 | |
| 
 | |
| Default/wxGTK-specific constructor. If you use the default constructor you must
 | |
| call \helpref{wxDropSource::SetData}{wxdropsourcesetdata} later.
 | |
| 
 | |
| {\it win} is required by wxGTK and therefore should always be set.
 | |
| 
 | |
| \func{}{wxDropSource}{\param{wxDataObject\& }{data}, \param{wxWindow*}{ win = NULL}}
 | |
| 
 | |
| \wxheading{Parameters}
 | |
| 
 | |
| \docparam{data}{A reference to the \helpref{data object}{wxdataobject} associated with the drop source.}
 | |
| 
 | |
| \docparam{win}{Only used by wxGTK. TODO}
 | |
| 
 | |
| \membersection{wxDropSource::\destruct{wxDropSource}}\label{wxdropsourcedtor}
 | |
| 
 | |
| \func{virtual }{\destruct{wxDropSource}}{\void}
 | |
| 
 | |
| \membersection{wxDropSource::SetData}\label{wxdropsourcesetdata}
 | |
| 
 | |
| \func{void}{SetData}{\param{wxDataObject\&}{ data}}
 | |
| 
 | |
| Sets the data \helpref{data object}{wxdataobject} associated with the drop source.
 | |
| 
 | |
| \membersection{wxDropSource::DoDragDrop}\label{wxdropsourcedodragdrop}
 | |
| 
 | |
| \func{virtual wxDragResult}{DoDragDrop}{\param{bool }{bAllowMove = FALSE}}
 | |
| 
 | |
| Do it (call this in response to a mouse button press, for example).
 | |
| 
 | |
| If {\bf bAllowMove} is FALSE, data can only be copied. Under GTK, data
 | |
| is always copied.
 | |
| 
 | |
| \membersection{wxDropSource::GiveFeedback}\label{wxdropsourcegivefeedback}
 | |
| 
 | |
| \func{virtual bool}{GiveFeedback}{\param{wxDragResult }{effect}, \param{bool }{bScrolling}}
 | |
| 
 | |
| 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
 | |
| slow.
 | |
| 
 | |
| \wxheading{Parameters}
 | |
| 
 | |
| \docparam{effect}{The effect to implement. One of wxDragCopy, wxDragMove. MSW only. }
 | |
| 
 | |
| \docparam{bScrolling}{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
 | |
| feedback.
 | |
| 
 |