made dnd cursors/icons slightly more usable (and much more documented)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7305 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-04-28 12:45:15 +00:00
parent 61dfd2bea1
commit 23cf28b3db
15 changed files with 363 additions and 72 deletions

View File

@@ -37,12 +37,31 @@ enum wxDragResult
\membersection{wxDropSource::wxDropSource}\label{wxdropsourcewxdropsource}
\func{}{wxDropSource}{\param{wxWindow*}{ win = NULL}}
\func{}{wxDropSource}{\param{wxWindow*}{ win = NULL},\param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconNone = wxNullIconOrCursor}}
Default/wxGTK-specific constructor. If you use the default constructor you must
call \helpref{SetData}{wxdropsourcesetdata} later.
\func{}{wxDropSource}{\param{wxDataObject\&}{ data}, \param{wxWindow*}{ win = NULL},\param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconCopy = wxNullIconOrCursor}, \param{const wxIconOrCursor\& }{iconNone = wxNullIconOrCursor}}
Note that {\it win} is required by the GTK port and therefore should always be set.
The constructors for wxDataObject.
If you use the constructor without {\it data} parameter you must call
\helpref{SetData}{wxdropsourcesetdata} later.
Note that the exact type of {\it iconCopy} and subsequent parameters differs
between wxMSW and wxGTK: these are cursors under Windows but icons for GTK.
You should use the macro \helpref{wxDROP\_ICON}{wxdropicon} in portable
programs instead of directly using either of these types.
\wxheading{Parameters}
\docparam{win}{The window which initiates the drag and drop operation.}
\docparam{iconCopy}{The icon or cursor used for feedback for copy operation.}
\docparam{iconMove}{The icon or cursor used for feedback for move operation.}
\docparam{iconNone}{The icon or cursor used for feedback when operation can't be done.}
{\it win} is the window which initiates the drag and drop operation.
\membersection{wxDropSource::\destruct{wxDropSource}}\label{wxdropsourcedtor}

View File

@@ -1100,6 +1100,21 @@ The clipboard must have previously been opened for this call to succeed.
\section{Miscellaneous functions}\label{miscellany}
\membersection{::wxDROP\_ICON}{wxdropicon}
\func{wxIconOrCursor}{wxDROP\_ICON}{\param{const char *}{name}}
This macro creates either a cursor (MSW) or an icon (elsewhere) with the given
name. Under MSW, the cursor is loaded from the resource file and the icon is
loaded from XPM file under other platforms.
This macro should be used with
\helpref{wxDropSource constructor}{wxdropsourcewxdropsource}.
\wxheading{Include files}
<wx/dnd.h>
\membersection{::wxNewId}
\func{long}{wxNewId}{\void}