make/vs/testapp/main.c

branch
newapi
changeset 223
8d7ca1b320e2
parent 221
a82d9beaa94a
child 224
88bc21b19213
--- a/make/vs/testapp/main.c	Thu Oct 19 20:38:16 2023 +0200
+++ b/make/vs/testapp/main.c	Thu Oct 19 21:19:19 2023 +0200
@@ -143,6 +143,18 @@
     printf("index: %d\n", i);
 }
 
+void dragstart(UiEvent* event, void* data) {
+
+}
+
+void dragcomplete(UiEvent* event, void* data) {
+
+}
+
+void drop(UiEvent* event, void* data) {
+
+}
+
 void application_startup(UiEvent* event, void* data) {
     UiObject* obj = ui_window("Test", NULL);
     WindowData* wdata = ui_malloc(obj->ctx, sizeof(WindowData));
@@ -294,7 +306,8 @@
             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, .enabledrag = true, .enabledrop = true,
+                            .ondragstart = dragstart, .ondragcomplete = dragcomplete, .ondrop = drop);
             ui_model_free(obj->ctx, model);
         }
     }   

mercurial