diff --git a/include/wx/stc/stc.h b/include/wx/stc/stc.h index 7ffab648bd..833a68b51a 100644 --- a/include/wx/stc/stc.h +++ b/include/wx/stc/stc.h @@ -4479,9 +4479,15 @@ public: #endif // !wxUSE_TEXTCTRL #ifdef STC_USE_DND + // Allow for simulating a DnD DragEnter + wxDragResult DoDragEnter(wxCoord x, wxCoord y, wxDragResult def); + // Allow for simulating a DnD DragOver wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def); + // Allow for simulating a DnD DragLeave + void DoDragLeave(); + // Allow for simulating a DnD DropText bool DoDropText(long x, long y, const wxString& data); #endif diff --git a/interface/wx/stc/stc.h b/interface/wx/stc/stc.h index 18c2117d98..0f22c99636 100644 --- a/interface/wx/stc/stc.h +++ b/interface/wx/stc/stc.h @@ -5676,11 +5676,25 @@ public: */ bool LoadFile(const wxString& filename); + /** + Allow for simulating a DnD DragEnter + + @since 3.1.0 + */ + wxDragResult DoDragEnter(wxCoord x, wxCoord y, wxDragResult defaultRes); + /** Allow for simulating a DnD DragOver */ wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult defaultRes); + /** + Allow for simulating a DnD DragLeave + + @since 3.1.0 + */ + void DoDragLeave(); + /** Allow for simulating a DnD DropText */ diff --git a/src/stc/stc.cpp b/src/stc/stc.cpp index f8e90f72c1..66c6f3ae0c 100644 --- a/src/stc/stc.cpp +++ b/src/stc/stc.cpp @@ -4488,10 +4488,17 @@ bool wxStyledTextCtrl::LoadFile(const wxString& filename) #endif // !wxUSE_TEXTCTRL #if wxUSE_DRAG_AND_DROP -wxDragResult wxStyledTextCtrl::DoDragOver(wxCoord x, wxCoord y, wxDragResult def) { - return m_swx->DoDragOver(x, y, def); +wxDragResult wxStyledTextCtrl::DoDragEnter(wxCoord x, wxCoord y, wxDragResult def) { + return m_swx->DoDragEnter(x, y, def); } +wxDragResult wxStyledTextCtrl::DoDragOver(wxCoord x, wxCoord y, wxDragResult def) { + return m_swx->DoDragOver(x, y, def); +} + +void wxStyledTextCtrl::DoDragLeave() { + m_swx->DoDragLeave(); +} bool wxStyledTextCtrl::DoDropText(long x, long y, const wxString& data) { return m_swx->DoDropText(x, y, data); diff --git a/src/stc/stc.cpp.in b/src/stc/stc.cpp.in index d0f0ac8a8a..e97f3da4c2 100644 --- a/src/stc/stc.cpp.in +++ b/src/stc/stc.cpp.in @@ -626,10 +626,17 @@ bool wxStyledTextCtrl::LoadFile(const wxString& filename) #endif // !wxUSE_TEXTCTRL #if wxUSE_DRAG_AND_DROP -wxDragResult wxStyledTextCtrl::DoDragOver(wxCoord x, wxCoord y, wxDragResult def) { - return m_swx->DoDragOver(x, y, def); +wxDragResult wxStyledTextCtrl::DoDragEnter(wxCoord x, wxCoord y, wxDragResult def) { + return m_swx->DoDragEnter(x, y, def); } +wxDragResult wxStyledTextCtrl::DoDragOver(wxCoord x, wxCoord y, wxDragResult def) { + return m_swx->DoDragOver(x, y, def); +} + +void wxStyledTextCtrl::DoDragLeave() { + m_swx->DoDragLeave(); +} bool wxStyledTextCtrl::DoDropText(long x, long y, const wxString& data) { return m_swx->DoDropText(x, y, data); diff --git a/src/stc/stc.h.in b/src/stc/stc.h.in index 63fb35a307..b8279aadaa 100644 --- a/src/stc/stc.h.in +++ b/src/stc/stc.h.in @@ -221,9 +221,15 @@ public: #endif // !wxUSE_TEXTCTRL #ifdef STC_USE_DND + // Allow for simulating a DnD DragEnter + wxDragResult DoDragEnter(wxCoord x, wxCoord y, wxDragResult def); + // Allow for simulating a DnD DragOver wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult def); + // Allow for simulating a DnD DragLeave + void DoDragLeave(); + // Allow for simulating a DnD DropText bool DoDropText(long x, long y, const wxString& data); #endif diff --git a/src/stc/stc.interface.h.in b/src/stc/stc.interface.h.in index 0aae4703cd..acd3015e0e 100644 --- a/src/stc/stc.interface.h.in +++ b/src/stc/stc.interface.h.in @@ -278,11 +278,25 @@ public: */ bool LoadFile(const wxString& filename); + /** + Allow for simulating a DnD DragEnter + + @since 3.1.0 + */ + wxDragResult DoDragEnter(wxCoord x, wxCoord y, wxDragResult defaultRes); + /** Allow for simulating a DnD DragOver */ wxDragResult DoDragOver(wxCoord x, wxCoord y, wxDragResult defaultRes); + /** + Allow for simulating a DnD DragLeave + + @since 3.1.0 + */ + void DoDragLeave(); + /** Allow for simulating a DnD DropText */