This class is used when you wish to drag an object on the screen,
and a simple cursor is not enough.
-On Windows, the WIN32 API is used to do achieve smooth dragging. On other platforms,
+On Windows, the Win32 API is used to achieve smooth dragging. On other platforms,
wxGenericDragImage is used. Applications may also prefer to use
wxGenericDragImage on Windows, too.
Please see {\tt samples/dragimag} for an example.
+%\wxheading{Notes}
+%
+%Using the native Windows implementation, you must supply an image with a mask, or
+%the image will not show when dragged. It is not clear if this is a bug
+%in Windows or in the wxDragImage implementation. You can add a mask
+%with a call to wxImage::SetMaskColour, passing RGB values not likely
+%to be in the image. [CURED by creating the ImageList with ILC_MASK]
+
\wxheading{Derived from}
\helpref{wxObject}{wxobject}
<wx/dragimag.h>\\
<wx/generic/dragimgg.h>
+\wxheading{Library}
+
+\helpref{wxCore}{librarieslist}
+
\latexignore{\rtfignore{\wxheading{Members}}}
Default constructor.
\func{}{wxDragImage}{\param{const wxBitmap\& }{image}, \param{const wxCursor\& }{cursor = wxNullCursor},
- \param{const wxPoint& }{hotspot = wxPoint(0, 0)}}
+ \param{const wxPoint\& }{cursorHotspot = wxPoint(0, 0)}}
Constructs a drag image from a bitmap and optional cursor.
\func{}{wxDragImage}{\param{const wxIcon\& }{image}, \param{const wxCursor\& }{cursor = wxNullCursor},
- \param{const wxPoint& }{hotspot = wxPoint(0, 0)}}
+ \param{const wxPoint\& }{cursorHotspot = wxPoint(0, 0)}}
Constructs a drag image from an icon and optional cursor.
\pythonnote{This constructor is called wxDragIcon in wxPython.}
\func{}{wxDragImage}{\param{const wxString\& }{text}, \param{const wxCursor\& }{cursor = wxNullCursor},
- \param{const wxPoint& }{hotspot = wxPoint(0, 0)}}
+ \param{const wxPoint\& }{cursorHotspot = wxPoint(0, 0)}}
Constructs a drag image from a text string and optional cursor.
\pythonnote{This constructor is called wxDragListItem in wxPython.}
\func{}{wxDragImage}{\param{const wxCursor\& }{cursor = wxNullCursor},
- \param{const wxPoint& }{hotspot = wxPoint(0, 0)}}
+ \param{const wxPoint\& }{cursorHotspot = wxPoint(0, 0)}}
Constructs a drag image an optional cursor. This constructor is only available for
wxGenericDragImage, and can be used when the application
\docparam{cursor}{Optional cursor to combine with the image.}
-\docparam{hotspot}{Position of the hotspot within the new image.}
+\docparam{hotspot}{This parameter is deprecated.}
\docparam{treeCtrl}{Tree control for constructing a tree drag image.}
\membersection{wxDragImage::BeginDrag}\label{wxdragimagebegindrag}
-\func{bool}{BeginDrag}{\param{const wxPoint\& }{hotspot}, \param{wxWindow* }{window}, \param{bool}{ fullScreen = FALSE}, \param{wxRect*}{ rect = NULL}}
+\func{bool}{BeginDrag}{\param{const wxPoint\& }{hotspot}, \param{wxWindow* }{window}, \param{bool}{ fullScreen = false}, \param{wxRect*}{ rect = NULL}}
Start dragging the image, in a window or full screen.
of the image.}
\docparam{window}{The window that captures the mouse, and within which the dragging
-is limited unless {\it fullScreen} is TRUE.}
+is limited unless {\it fullScreen} is true.}
\docparam{boundingWindow}{In the second form of the function, specifies the
area within which the drag occurs.}
-\docparam{fullScreen}{If TRUE, specifies that the drag will be visible over the full
+\docparam{fullScreen}{If true, specifies that the drag will be visible over the full
screen, or over as much of the screen as is specified by {\it rect}. Note that the mouse will
still be captured in {\it window}.}
\helpref{wxDragImage::Show}{wxdragimageshow} has been called previously (for example
at the start of the drag).
-{\it pt} is the position in window coordinates (or screen coordinates if no
-window was specified to BeginDrag.
+{\it pt} is the position in client coordinates (relative to the window specified in BeginDrag).
You can move the image either when the image is hidden or shown, but in general dragging
will be smoother if you move the image when it is shown.