Add wxDataViewEvent::InitData() helper

Reuse it from both the generic and macOS versions to avoid doing the
same thing in both of them.
This commit is contained in:
Vadim Zeitlin
2021-12-10 20:11:33 +01:00
parent 31bdfd6523
commit 7797ffc730
4 changed files with 22 additions and 7 deletions

View File

@@ -1805,6 +1805,18 @@ void wxDataViewEvent::Init(wxDataViewCtrlBase* dvc,
SetEventObject(dvc);
}
#if wxUSE_DRAG_AND_DROP
void wxDataViewEvent::InitData(wxDataObjectComposite* obj, wxDataFormat format)
{
SetDataFormat(format);
SetDataObject(obj->GetObject(format));
SetDataSize(obj->GetDataSize(format));
}
#endif // wxUSE_DRAG_AND_DROP
#if wxUSE_SPINCTRL
// -------------------------------------