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:
@@ -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 is used. Applications may also prefer to use
|
||||||
wxGenericDragImage on Windows, too.
|
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
|
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.
|
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,
|
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.
|
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},
|
\func{}{wxDragImage}{\param{const wxString\& }{text}, \param{const wxCursor\& }{cursor = wxNullCursor},
|
||||||
\param{const wxPoint& }{hotspot = wxPoint(0, 0)}}
|
\param{const wxPoint& }{hotspot = wxPoint(0, 0)}}
|
||||||
|
|
||||||
Constructs a drag image from a text string and optional cursor.
|
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}}
|
\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.
|
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}}
|
\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.
|
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}
|
\wxheading{Parameters}
|
||||||
|
|
||||||
\docparam{image}{Icon or bitmap to be used as the drag image. The bitmap can
|
\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,
|
to specify the bounding area. This form is equivalent to using the first form,
|
||||||
but more convenient than working out the bounding rectangle explicitly.
|
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.
|
and \helpref{wxDragImage::Move}{wxdragimagemove} to show the image on the screen.
|
||||||
|
|
||||||
Call \helpref{wxDragImage::EndDrag}{wxdragimageenddrag} when the drag has finished.
|
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}
|
\func{bool}{Hide}{\void}
|
||||||
|
|
||||||
Hides the image. You may wish to call this before updating the window
|
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}.
|
and \helpref{wxDragImage::Show}{wxdragimageshow}.
|
||||||
|
|
||||||
\membersection{wxDragImage::Move}\label{wxdragimagemove}
|
\membersection{wxDragImage::Move}\label{wxdragimagemove}
|
||||||
|
|
||||||
\func{bool}{Move}{\param{const wxPoint\& }{pt}}
|
\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
|
\helpref{wxDragImage::Show}{wxdragimageshow} has been called previously (for example
|
||||||
at the start of the drag).
|
at the start of the drag).
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@ wxPython is a blending of the wxWindows GUI classes and the
|
|||||||
|
|
||||||
\wxheading{Python}
|
\wxheading{Python}
|
||||||
|
|
||||||
So what is Python? Go to
|
So what is Python? Go to
|
||||||
\urlref{http://www.python.org}{http://www.python.org} to learn more,
|
\urlref{http://www.python.org}{http://www.python.org} to learn more,
|
||||||
but in a nutshell Python is an interpreted,
|
but in a nutshell Python is an interpreted,
|
||||||
interactive, object-oriented programming language. It is often
|
interactive, object-oriented programming language. It is often
|
||||||
@@ -113,7 +113,7 @@ to use the GUI portions.
|
|||||||
There are quite a few other GUI modules available for Python, some in
|
There are quite a few other GUI modules available for Python, some in
|
||||||
active use, some that haven't been updated for ages. Most are simple
|
active use, some that haven't been updated for ages. Most are simple
|
||||||
wrappers around some C or C++ toolkit or another, and most are not
|
wrappers around some C or C++ toolkit or another, and most are not
|
||||||
cross-platform compatible. See \urlref{this link}{http://www.python.org/download/Contributed.html\#Graphics}
|
cross-platform compatible. See \urlref{this link}{http://www.python.org/download/Contributed.html\#Graphics}
|
||||||
for a listing of a few of them.
|
for a listing of a few of them.
|
||||||
|
|
||||||
%----------------------------------------------------------------------
|
%----------------------------------------------------------------------
|
||||||
@@ -129,7 +129,7 @@ generated C++ code is included under the src directory.
|
|||||||
|
|
||||||
I added a few minor features to SWIG to control some of the code
|
I added a few minor features to SWIG to control some of the code
|
||||||
generation. If you want to play around with this you will need to get
|
generation. If you want to play around with this you will need to get
|
||||||
a recent version of SWIG from their CVS or from a daily build. See
|
a recent version of SWIG from their CVS or from a daily build. See
|
||||||
\urlref{http://www.swig.org/}{http://www.swig.org/} for details.
|
\urlref{http://www.swig.org/}{http://www.swig.org/} for details.
|
||||||
|
|
||||||
wxPython is organized as a Python package. This means that the
|
wxPython is organized as a Python package. This means that the
|
||||||
@@ -183,7 +183,7 @@ utility again.
|
|||||||
|
|
||||||
{\tt python demo.py}
|
{\tt python demo.py}
|
||||||
|
|
||||||
To run it without requiring a console on Win32, you can use the
|
To run it without requiring a console on Win32, you can use the
|
||||||
{\tt pythonw.exe} version of Python either from the command line or from a
|
{\tt pythonw.exe} version of Python either from the command line or from a
|
||||||
shortcut.
|
shortcut.
|
||||||
\end{enumerate}
|
\end{enumerate}
|
||||||
@@ -383,6 +383,7 @@ as possible to the C++ spec over time.
|
|||||||
\item \helpref{wxDC}{wxdc}
|
\item \helpref{wxDC}{wxdc}
|
||||||
\item \helpref{wxDialog}{wxdialog}
|
\item \helpref{wxDialog}{wxdialog}
|
||||||
\item \helpref{wxDirDialog}{wxdirdialog}
|
\item \helpref{wxDirDialog}{wxdirdialog}
|
||||||
|
\item \helpref{wxDragImage}{wxdragimage}
|
||||||
\item \helpref{wxDropFilesEvent}{wxdropfilesevent}
|
\item \helpref{wxDropFilesEvent}{wxdropfilesevent}
|
||||||
\item \helpref{wxDropSource}{wxdropsource}
|
\item \helpref{wxDropSource}{wxdropsource}
|
||||||
\item \helpref{wxDropTarget}{wxdroptarget}
|
\item \helpref{wxDropTarget}{wxdroptarget}
|
||||||
@@ -504,6 +505,7 @@ as possible to the C++ spec over time.
|
|||||||
\item \helpref{wxTextDropTarget}{wxtextdroptarget}
|
\item \helpref{wxTextDropTarget}{wxtextdroptarget}
|
||||||
\item \helpref{wxTextEntryDialog}{wxtextentrydialog}
|
\item \helpref{wxTextEntryDialog}{wxtextentrydialog}
|
||||||
\item \helpref{wxTimer}{wxtimer}
|
\item \helpref{wxTimer}{wxtimer}
|
||||||
|
\item \helpref{wxTipProvider}{wxtipprovider}
|
||||||
\item wxToolBarTool
|
\item wxToolBarTool
|
||||||
\item \helpref{wxToolBar}{wxtoolbar}
|
\item \helpref{wxToolBar}{wxtoolbar}
|
||||||
\item wxToolTip
|
\item wxToolTip
|
||||||
@@ -521,7 +523,7 @@ as possible to the C++ spec over time.
|
|||||||
\section{Where to go for help}\label{wxphelp}
|
\section{Where to go for help}\label{wxphelp}
|
||||||
|
|
||||||
Since wxPython is a blending of multiple technologies, help comes from
|
Since wxPython is a blending of multiple technologies, help comes from
|
||||||
multiple sources. See
|
multiple sources. See
|
||||||
\urlref{http://alldunn.com/wxPython}{http://alldunn.com/wxPython} for details on
|
\urlref{http://alldunn.com/wxPython}{http://alldunn.com/wxPython} for details on
|
||||||
various sources of help, but probably the best source is the
|
various sources of help, but probably the best source is the
|
||||||
wxPython-users mail list. You can view the archive or subscribe by
|
wxPython-users mail list. You can view the archive or subscribe by
|
||||||
|
Reference in New Issue
Block a user