Expose ScintillaWX DoDragEnter() and DoDragLeave() methods.

These methods are needed to allow implementing alternative wxDropTargets, in
addition to the already public DoDragOver().

Closes #16010.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-02-22 14:54:39 +00:00
parent 0415f0ab05
commit 876859fcb7
6 changed files with 58 additions and 4 deletions

View File

@ -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

View File

@ -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
*/

View File

@ -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);

View File

@ -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);

View File

@ -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

View File

@ -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
*/