make/vs/testapp/main.c

branch
newapi
changeset 224
88bc21b19213
parent 223
8d7ca1b320e2
child 225
097f45f9c1fa
--- a/make/vs/testapp/main.c	Thu Oct 19 21:19:19 2023 +0200
+++ b/make/vs/testapp/main.c	Fri Oct 20 16:34:33 2023 +0200
@@ -144,10 +144,15 @@
 }
 
 void dragstart(UiEvent* event, void* data) {
+    UiListDnd* ldnd = event->eventdata;
+    ui_selection_settext(ldnd->dnd, "Hello World!", -1);
+}
+
+void dragcomplete(UiEvent* event, void* data) {
 
 }
 
-void dragcomplete(UiEvent* event, void* data) {
+void dragover(UiEvent* event, void* data) {
 
 }
 
@@ -306,7 +311,7 @@
             UiModel* model = ui_model(obj->ctx, UI_ICON_TEXT, "Col 1", UI_STRING, "Col 2", UI_STRING, "Col 3", -1);
             model->getvalue = table_getvalue;
             ui_table(obj,   .colspan = 3, .model = model, .list = wdata->list2, .onactivate = action_onactivate,
-                            .onselection = action_listselection_changed, .enabledrag = true, .enabledrop = true,
+                            .onselection = action_listselection_changed,
                             .ondragstart = dragstart, .ondragcomplete = dragcomplete, .ondrop = drop);
             ui_model_free(obj->ctx, model);
         }

mercurial