Support or disable "insert" for drag/drop wxDataViewCtrl on OSX

see #18167
This commit is contained in:
Stefan Csomor
2018-07-16 19:42:35 +02:00
parent b554cf0018
commit d3e8d3f271
3 changed files with 28 additions and 7 deletions

View File

@@ -846,7 +846,8 @@ public:
m_dataBuffer(event.m_dataBuffer),
m_dataSize(event.m_dataSize),
m_dragFlags(event.m_dragFlags),
m_dropEffect(event.m_dropEffect)
m_dropEffect(event.m_dropEffect),
m_proposedDropIndex(event.m_proposedDropIndex)
#endif
{ }
@@ -889,6 +890,10 @@ 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
void SetProposedDropIndex(int index) { m_proposedDropIndex = index; }
int GetProposedDropIndex() const { return m_proposedDropIndex;}
#endif // wxUSE_DRAG_AND_DROP
virtual wxEvent *Clone() const wxOVERRIDE { return new wxDataViewEvent(*this); }
@@ -928,6 +933,7 @@ protected:
int m_dragFlags;
wxDragResult m_dropEffect;
int m_proposedDropIndex;
#endif // wxUSE_DRAG_AND_DROP
private: