Added wxDragImage and demo, (used wxGenericDragImage for both

platforms)

Added demo of changing keyboard handling in wxGrid

SWIGged sources update


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7417 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2000-05-17 20:45:27 +00:00
parent a1e181ef4d
commit cabc28c46e
2 changed files with 21 additions and 8 deletions

View File

@@ -7,6 +7,9 @@ On Windows, the WIN32 API is used to do achieve smooth dragging. On other platfo
wxGenericDragImage is used. Applications may also prefer to use
wxGenericDragImage on Windows, too.
\pythonnote{wxPython uses wxGenericDragImage on all platforms, but
uses the wxDragImage name.}
To use this class, when you wish to start dragging an image, create a wxDragImage
object and store it somewhere you can access it as the drag progresses.
Call BeginDrag to start, and EndDrag to stop the drag. To move the image,
@@ -48,19 +51,27 @@ Constructs a drag image from a bitmap and optional cursor.
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)}}
Constructs a drag image from a text string and optional cursor.
\pythonnote{This constructor is called wxDragString in wxPython.}
\func{}{wxDragImage}{\param{const wxTreeCtrl\& }{treeCtrl}, \param{wxTreeItemId\& }{id}}
Constructs a drag image from the text in the given tree control item, and optional cursor.
\pythonnote{This constructor is called wxDragTreeItem in wxPython.}
\func{}{wxDragImage}{\param{const wxListCtrl\& }{treeCtrl}, \param{long }{id}}
Constructs a drag image from the text in the given tree control item, and optional cursor.
\pythonnote{This constructor is called wxDragListItem in wxPython.}
\wxheading{Parameters}
\docparam{image}{Icon or bitmap to be used as the drag image. The bitmap can
@@ -90,7 +101,7 @@ Start dragging the image, using the first window to capture the mouse and the se
to specify the bounding area. This form is equivalent to using the first form,
but more convenient than working out the bounding rectangle explicitly.
You need to then call \helpref{wxDragImage::Show}{wxdragimageshow}
You need to then call \helpref{wxDragImage::Show}{wxdragimageshow}
and \helpref{wxDragImage::Move}{wxdragimagemove} to show the image on the screen.
Call \helpref{wxDragImage::EndDrag}{wxdragimageenddrag} when the drag has finished.
@@ -130,14 +141,14 @@ Note that this call automatically calls ReleaseMouse.
\func{bool}{Hide}{\void}
Hides the image. You may wish to call this before updating the window
contents (perhaps highlighting an item). Then call \helpref{wxDragImage::Move}{wxdragimagemove}
contents (perhaps highlighting an item). Then call \helpref{wxDragImage::Move}{wxdragimagemove}
and \helpref{wxDragImage::Show}{wxdragimageshow}.
\membersection{wxDragImage::Move}\label{wxdragimagemove}
\func{bool}{Move}{\param{const wxPoint\& }{pt}}
Call this to move the image to a new position. The image will only be shown if
Call this to move the image to a new position. The image will only be shown if
\helpref{wxDragImage::Show}{wxdragimageshow} has been called previously (for example
at the start of the drag).