X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4cc4bfafe5a31cb96f35b3ec9b19fa2b0b3a4eef..27d335cc2308072844d554ee0c58b5539273d7ab:/interface/dnd.h diff --git a/interface/dnd.h b/interface/dnd.h index f92bbe4c3b..e93ddeef7e 100644 --- a/interface/dnd.h +++ b/interface/dnd.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Name: dnd.h -// Purpose: documentation for wxTextDropTarget class +// Purpose: interface of wxTextDropTarget // Author: wxWidgets team // RCS-ID: $Id$ // Licence: wxWindows license @@ -15,8 +15,7 @@ @library{wxcore} @category{dnd} - @seealso - @ref overview_wxdndoverview, wxDropSource, wxDropTarget, wxFileDropTarget + @see @ref overview_wxdndoverview, wxDropSource, wxDropTarget, wxFileDropTarget */ class wxTextDropTarget : public wxDropTarget { @@ -34,7 +33,7 @@ public: /** Override this function to receive dropped text. - + @param x The x coordinate of the mouse. @param y @@ -47,6 +46,7 @@ public: }; + /** @class wxDropTarget @wxheader{dnd.h} @@ -73,8 +73,8 @@ public: @library{wxcore} @category{dnd} - @seealso - wxDropSource, wxTextDropTarget, wxFileDropTarget, wxDataFormat, wxDataObject + @see wxDropSource, wxTextDropTarget, wxFileDropTarget, wxDataFormat, + wxDataObject */ class wxDropTarget { @@ -108,14 +108,14 @@ public: /** Called when the mouse is being dragged over the drop target. By default, this calls functions return the suggested return value @e def. - + @param x The x coordinate of the mouse. @param y The y coordinate of the mouse. @param def Suggested value for return value. Determined by SHIFT or CONTROL key states. - + @returns Returns the desired operation or wxDragNone. This is used for optical feedback from the side of the drop source, typically in form of changing the icon. @@ -126,12 +126,12 @@ public: /** Called when the user drops a data object on the target. Return @false to veto the operation. - + @param x The x coordinate of the mouse. @param y The y coordinate of the mouse. - + @returns Return @true to accept the data, @false to veto the operation. */ virtual bool OnDrop(wxCoord x, wxCoord y); @@ -139,7 +139,7 @@ public: /** Called when the mouse enters the drop target. By default, this calls OnDragOver(). - + @param x The x coordinate of the mouse. @param y @@ -147,7 +147,7 @@ public: @param def Suggested default for return value. Determined by SHIFT or CONTROL key states. - + @returns Returns the desired operation or wxDragNone. This is used for optical feedback from the side of the drop source, typically in form of changing the icon. @@ -168,6 +168,7 @@ public: }; + /** @class wxDropSource @wxheader{dnd.h} @@ -180,8 +181,7 @@ public: @library{wxcore} @category{dnd} - @seealso - wxDropTarget, wxTextDropTarget, wxFileDropTarget + @see wxDropTarget, wxTextDropTarget, wxFileDropTarget */ class wxDropSource { @@ -193,9 +193,9 @@ public: SetData() later. Note that the exact type of @a iconCopy and subsequent parameters differs between wxMSW and wxGTK: these are cursors under Windows but icons for GTK. - You should use the macro wxDROP_ICON in portable + You should use the macro wxDROP_ICON() in portable programs instead of directly using either of these types. - + @param win The window which initiates the drag and drop operation. @param iconCopy @@ -216,7 +216,7 @@ public: //@} /** - + */ ~wxDropSource(); @@ -224,13 +224,13 @@ public: Do it (call this in response to a mouse button press, for example). This starts the drag-and-drop operation which will terminate when the user releases the mouse. - + @param flags If wxDrag_AllowMove is included in the flags, data may be moved and not only copied (default). If wxDrag_DefaultMove is specified (which includes the previous flag), this is even the default operation - + @returns Returns the operation requested by the user, may be wxDragCopy, wxDragMove, wxDragLink, wxDragCancel or wxDragNone if an error occurred. @@ -248,13 +248,13 @@ public: in this function. It is called on each mouse move, so your implementation must not be too slow. - + @param effect The effect to implement. One of wxDragCopy, wxDragMove, wxDragLink and wxDragNone. @param scrolling @true if the window is scrolling. MSW only. - + @returns Return @false if you want default feedback, or @true if you implement your own feedback. The return values is ignored under GTK. @@ -263,7 +263,7 @@ public: /** Set the icon to use for a certain drag result. - + @param res The drag result to set the icon for. @param cursor @@ -279,6 +279,7 @@ public: }; + /** @class wxFileDropTarget @wxheader{dnd.h} @@ -289,8 +290,7 @@ public: @library{wxcore} @category{dnd} - @seealso - @ref overview_wxdndoverview, wxDropSource, wxDropTarget, wxTextDropTarget + @see @ref overview_wxdndoverview, wxDropSource, wxDropTarget, wxTextDropTarget */ class wxFileDropTarget : public wxDropTarget { @@ -308,7 +308,7 @@ public: /** Override this function to receive dropped files. - + @param x The x coordinate of the mouse. @param y @@ -321,16 +321,27 @@ public: }; + // ============================================================================ // Global functions/macros // ============================================================================ +/** @ingroup group_funcmacro_gdi */ +//@{ + /** - 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 - @ref wxDropSource::wxdropsource "wxDropSource constructor". + This macro creates either a cursor (MSW) or an icon (elsewhere) with the + given @a name (of type <tt>const char*</tt>). 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 wxDropSource::wxDropSource(). + + @returns wxCursor on MSW, otherwise returns a wxIcon + + @header{wx/dnd.h} */ -#define wxIconOrCursor wxDROP_ICON(const char* name) /* implementation is private */ +#define wxDROP_ICON(name) + +//@}