ui/winui/table.cpp

branch
newapi
changeset 243
9f66c31a27ed
parent 241
c51dd0e9ecb7
child 248
22257f5f4019
equal deleted inserted replaced
242:4ff7361dce95 243:9f66c31a27ed
383 UiDnD dnd; 383 UiDnD dnd;
384 dnd.evttype = 2; 384 dnd.evttype = 2;
385 dnd.dndstartargs = { nullptr }; 385 dnd.dndstartargs = { nullptr };
386 dnd.dndcompletedargs = { nullptr }; 386 dnd.dndcompletedargs = { nullptr };
387 dnd.drageventargs = args; 387 dnd.drageventargs = args;
388 dnd.data = args.Data(); 388 dnd.dataview = args.DataView();
389 389
390 UiListDnd dndevt; 390 UiListDnd dndevt;
391 dndevt.selection = uiselection(); 391 dndevt.selection = uiselection();
392 dndevt.dnd = &dnd; 392 dndevt.dnd = &dnd;
393 393
401 this->ondrop(&evt, this->ondropdata); 401 this->ondrop(&evt, this->ondropdata);
402 402
403 if (dndevt.selection.rows) { 403 if (dndevt.selection.rows) {
404 free(dndevt.selection.rows); 404 free(dndevt.selection.rows);
405 } 405 }
406 }));
407 cellBorder.DragOver(DragEventHandler([this](winrt::Windows::Foundation::IInspectable const& sender, DragEventArgs const& args){
408 args.AcceptedOperation(winrt::Windows::ApplicationModel::DataTransfer::DataPackageOperation::Copy);
406 })); 409 }));
407 } 410 }
408 411
409 // set the cell value 412 // set the cell value
410 // depending on the type, we create different cell controls 413 // depending on the type, we create different cell controls

mercurial