]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/droptrgt.tex
removed wxITALIC/wxSLANT stuff from wxHTML (no longer neccessary, we have intelligent...
[wxWidgets.git] / docs / latex / wx / droptrgt.tex
1 \section{\class{wxDropTarget}}\label{wxdroptarget}
2
3 \overview{Overview}{wxdndoverview}
4
5 This class represents a target for a drag and drop operation.
6
7 \wxheading{Derived from}
8
9 \helpref{wxObject}{wxobject}
10
11 \wxheading{Include files}
12
13 <wx/dnd.h>
14
15 \wxheading{See also}
16
17 \helpref{Drag and drop overview}{wxdndoverview}, \helpref{wxDropSource}{wxdropsource},
18 \helpref{wxTextDropTarget}{wxtextdroptarget}, \helpref{wxFileDropTarget}{wxfiledroptarget}
19
20 \latexignore{\rtfignore{\wxheading{Members}}}
21
22 \membersection{wxDropTarget::wxDropTarget}\label{wxdroptargetwxdroptarget}
23
24 \func{}{wxDropTarget}{\void}
25
26 Constructor.
27
28 \membersection{wxDropTarget::\destruct{wxDropTarget}}\label{wxdroptargetdtor}
29
30 \func{}{\destruct{wxDropTarget}}{\void}
31
32 Destructor.
33
34 \membersection{wxDropTarget::GetFormatCount}\label{wxdroptargetgetformatcount}
35
36 \constfunc{virtual size\_t}{GetFormatCount}{\void}
37
38 Override this to indicate how many formats you support.
39
40 \membersection{wxDropTarget::GetFormat}\label{wxdroptargetgetformat}
41
42 \constfunc{virtual wxDataFormat}{GetFormat}{\param{size\_t }{n}}
43
44 Override this to indicate what kind of data you support.
45
46 \membersection{wxDropTarget::OnData}\label{wxdroptargetondata}
47
48 \func{virtual wxDragResult}{OnData}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxDragResult}{ def}}
49
50 Called after OnDrop() returns TRUE: you will usually just call
51 GetData() from here and, probably, also refresh something to update the
52 new data and, finally, return the code indicating how did the operation
53 complete (returning default value in case of success and wxDragError on
54 failure is usually ok).
55
56 \membersection{wxDropTarget::OnDrop}\label{wxdroptargetondrop}
57
58 \func{virtual bool}{OnDrop}{\param{long }{x}, \param{long }{y}, \param{const void* }{data}, \param{size\_t }{size}}
59
60 Called when the user drops a data object on the target. Return FALSE to veto the operation.
61
62 \wxheading{Parameters}
63
64 \docparam{x}{The x coordinate of the mouse.}
65
66 \docparam{y}{The y coordinate of the mouse.}
67
68 \docparam{data}{The data being dropped.}
69
70 \docparam{size}{The size of the data being dropped.}
71
72 \wxheading{Return value}
73
74 Return TRUE to accept the data, FALSE to veto the operation.
75
76 \membersection{wxDropTarget::OnEnter}\label{wxdroptargetonenter}
77
78 \func{virtual void}{OnEnter}{\void}
79
80 Called when the mouse enters the drop target.
81
82 \membersection{wxDropTarget::OnLeave}\label{wxdroptargetonleave}
83
84 \func{virtual void}{OnLeave}{\void}
85
86 Called when the mouse leaves the drop target.
87