From 7338f30167ea57a9eea4ac544730ae10eef4a322 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 3 May 2020 21:02:59 +0200 Subject: [PATCH] Document wxDataViewEvent::GetProposedDropIndex() This method was added back in d3e8d3f271 (Support or disable "insert" for drag/drop wxDataViewCtrl on OSX, 2018-07-16) but didn't appear in the documentation at all, so describe it, at least minimally. See #18167. --- include/wx/dataview.h | 4 ++-- interface/wx/dataview.h | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/include/wx/dataview.h b/include/wx/dataview.h index e796ab46c7..9a615e2d28 100644 --- a/include/wx/dataview.h +++ b/include/wx/dataview.h @@ -899,8 +899,8 @@ public: int GetDragFlags() const { return m_dragFlags; } void SetDropEffect( wxDragResult effect ) { m_dropEffect = effect; } wxDragResult GetDropEffect() const { return m_dropEffect; } - // for plaforms (currently only OSX) that support Drag/Drop insertion of items, - // this is the proposed child index for the insertion + // For platforms (currently generic and OSX) that support Drag/Drop + // insertion of items, this is the proposed child index for the insertion. void SetProposedDropIndex(int index) { m_proposedDropIndex = index; } int GetProposedDropIndex() const { return m_proposedDropIndex;} #endif // wxUSE_DRAG_AND_DROP diff --git a/interface/wx/dataview.h b/interface/wx/dataview.h index 76aae207d3..a294c04e89 100644 --- a/interface/wx/dataview.h +++ b/interface/wx/dataview.h @@ -3919,6 +3919,19 @@ public: */ int GetCacheTo() const; + /** + Returns the index of the child item at which an item currently being + dragged would be dropped. + + This function can be used from wxEVT_DATAVIEW_ITEM_DROP_POSSIBLE + handlers to determine the exact position of the item being dropped. + + Note that it currently always returns wxNOT_FOUND when using native GTK + implementation of this control. + + @since 3.1.2 + */ + int GetProposedDropIndex() const; /** Returns the item affected by the event.