diff --git a/include/wx/msw/dragimag.h b/include/wx/msw/dragimag.h index da33ac0795..38b4a4b0cb 100644 --- a/include/wx/msw/dragimag.h +++ b/include/wx/msw/dragimag.h @@ -114,14 +114,6 @@ public: Create(image, cursor); } - // Deprecated form of the above - wxDragImage(const wxBitmap& image, const wxCursor& cursor, const wxPoint& cursorHotspot) - { - Init(); - - Create(image, cursor, cursorHotspot); - } - wxDragImage(const wxIcon& image, const wxCursor& cursor = wxNullCursor) { Init(); @@ -129,14 +121,6 @@ public: Create(image, cursor); } - // Deprecated form of the above - wxDragImage(const wxIcon& image, const wxCursor& cursor, const wxPoint& cursorHotspot) - { - Init(); - - Create(image, cursor, cursorHotspot); - } - wxDragImage(const wxString& str, const wxCursor& cursor = wxNullCursor) { Init(); @@ -144,14 +128,6 @@ public: Create(str, cursor); } - // Deprecated form of the above - wxDragImage(const wxString& str, const wxCursor& cursor, const wxPoint& cursorHotspot) - { - Init(); - - Create(str, cursor, cursorHotspot); - } - #if wxUSE_TREECTRL wxDragImage(const wxTreeCtrl& treeCtrl, wxTreeItemId& id) { @@ -180,27 +156,12 @@ public: // Create a drag image from a bitmap and optional cursor bool Create(const wxBitmap& image, const wxCursor& cursor = wxNullCursor); - bool Create(const wxBitmap& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot)) - { - wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument.")); - return Create(image, cursor); - } // Create a drag image from an icon and optional cursor bool Create(const wxIcon& image, const wxCursor& cursor = wxNullCursor); - bool Create(const wxIcon& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot)) - { - wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument.")); - return Create(image, cursor); - } // Create a drag image from a string and optional cursor bool Create(const wxString& str, const wxCursor& cursor = wxNullCursor); - bool Create(const wxString& str, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot)) - { - wxLogDebug(wxT("wxDragImage::Create: use of a cursor hotspot is now deprecated. Please omit this argument.")); - return Create(str, cursor); - } #if wxUSE_TREECTRL // Create a drag image for the given tree control item @@ -248,6 +209,16 @@ public: WXHIMAGELIST GetCursorHIMAGELIST() const { return m_hCursorImageList; } #endif + // don't use in new code, use versions without hot spot parameter +#if WXWIN_COMPATIBILITY_2_8 + wxDEPRECATED_CONSTRUCTOR( wxDragImage(const wxBitmap& image, const wxCursor& cursor, const wxPoint& cursorHotspot) ); + wxDEPRECATED_CONSTRUCTOR( wxDragImage(const wxString& str, const wxCursor& cursor, const wxPoint& cursorHotspot) ); + wxDEPRECATED_CONSTRUCTOR( wxDragImage(const wxIcon& image, const wxCursor& cursor, const wxPoint& cursorHotspot) ); + wxDEPRECATED( bool Create(const wxBitmap& image, const wxCursor& cursor, const wxPoint& cursorHotspot) ); + wxDEPRECATED( bool Create(const wxIcon& image, const wxCursor& cursor, const wxPoint& cursorHotspot) ); + wxDEPRECATED( bool Create(const wxString& str, const wxCursor& cursor, const wxPoint& cursorHotspot) ); +#endif // WXWIN_COMPATIBILITY_2_8 + protected: WXHIMAGELIST m_hImageList; diff --git a/interface/wx/dragimag.h b/interface/wx/dragimag.h index b061b2ba1c..9e7d90433a 100644 --- a/interface/wx/dragimag.h +++ b/interface/wx/dragimag.h @@ -56,11 +56,8 @@ public: Bitmap to be used as the drag image. The bitmap can have a mask. @param cursor Optional cursor to combine with the image. - @param cursorHotspot - This parameter is deprecated. */ - wxDragImage(const wxBitmap& image, const wxCursor& cursor = wxNullCursor, - const wxPoint& cursorHotspot = wxPoint(0, 0)); + wxDragImage(const wxBitmap& image, const wxCursor& cursor = wxNullCursor); /** Constructs a drag image from an icon and optional cursor. @@ -68,15 +65,12 @@ public: Icon to be used as the drag image. @param cursor Optional cursor to combine with the image. - @param cursorHotspot - This parameter is deprecated. @beginWxPythonOnly This constructor is called wxDragIcon in wxPython. @endWxPythonOnly */ - wxDragImage(const wxIcon& image, const wxCursor& cursor = wxNullCursor, - const wxPoint& cursorHotspot = wxPoint(0, 0)); + wxDragImage(const wxIcon& image, const wxCursor& cursor = wxNullCursor); /** Constructs a drag image from a text string and optional cursor. @@ -84,15 +78,12 @@ public: Text used to construct a drag image. @param cursor Optional cursor to combine with the image. - @param cursorHotspot - This parameter is deprecated. @beginWxPythonOnly This constructor is called wxDragString in wxPython. @endWxPythonOnly */ - wxDragImage(const wxString& text, const wxCursor& cursor = wxNullCursor, - const wxPoint& cursorHotspot = wxPoint(0, 0)); + wxDragImage(const wxString& text, const wxCursor& cursor = wxNullCursor); /** Constructs a drag image from the text in the given tree control item, and optional cursor. @@ -121,19 +112,6 @@ public: @endWxPythonOnly */ wxDragImage(const wxListCtrl& listCtrl, long id); - /** - Constructs a drag image an optional cursor. This constructor is only - available for wxGenericDragImage, and can be used when the application - supplies DoDrawImage() and GetImageRect(). - - @param cursor - Optional cursor to combine with the image. - @param cursorHotspot - This parameter is deprecated. - */ - wxDragImage(const wxCursor& cursor = wxNullCursor, - const wxPoint& cursorHotspot = wxPoint(0, 0)); - /** Start dragging the image, in a window or full screen. diff --git a/src/msw/dragimag.cpp b/src/msw/dragimag.cpp index 7e06613e36..17cad733bb 100644 --- a/src/msw/dragimag.cpp +++ b/src/msw/dragimag.cpp @@ -96,6 +96,44 @@ void wxDragImage::Init() m_fullScreen = false; } +#if WXWIN_COMPATIBILITY_2_8 +wxDragImage::wxDragImage(const wxBitmap& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot)) +{ + Init(); + + Create(image, cursor); +} + +wxDragImage::wxDragImage(const wxIcon& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot)) +{ + Init(); + + Create(image, cursor); +} + +wxDragImage::wxDragImage(const wxString& str, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot)) +{ + Init(); + + Create(str, cursor); +} + +bool wxDragImage::Create(const wxBitmap& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot)) +{ + return Create(image, cursor); +} + +bool wxDragImage::Create(const wxIcon& image, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot)) +{ + return Create(image, cursor); +} + +bool wxDragImage::Create(const wxString& str, const wxCursor& cursor, const wxPoint& WXUNUSED(cursorHotspot)) +{ + return Create(str, cursor); +} +#endif // WXWIN_COMPATIBILITY_2_8 + // Attributes ////////////////////////////////////////////////////////////////////////////