ui/common/context.c

changeset 88
e27526429d85
parent 87
5360027fb282
child 100
d2bd73d28ff1
--- a/ui/common/context.c	Sun Nov 17 15:19:32 2024 +0100
+++ b/ui/common/context.c	Tue Nov 26 10:40:45 2024 +0100
@@ -62,7 +62,7 @@
     ctx->vars = cxHashMapCreate(mp->allocator, CX_STORE_POINTERS, 16);
     
     ctx->documents = cxLinkedListCreate(mp->allocator, cx_cmp_intptr, CX_STORE_POINTERS);
-    ctx->group_widgets = cxLinkedListCreate(mp->allocator, NULL, sizeof(UiGroupWidget));
+    ctx->group_widgets = cxLinkedListCreate(mp->allocator, cx_cmp_ptr, sizeof(UiGroupWidget));
     ctx->groups = cxArrayListCreate(mp->allocator, cx_cmp_int, sizeof(int), 32);
     
     ctx->attach_document = uic_context_attach_document;
@@ -331,6 +331,7 @@
                 t->obj = f->obj;
                 t->update = f->update;
                 t->getselection = f->getselection;
+                t->setselection = f->setselection;
             }
 
             UiVar tmp = *from;
@@ -556,6 +557,10 @@
     cxListAdd(ctx->group_widgets, &gw);
 }
 
+void uic_remove_group_widget(UiContext *ctx, void *widget) {
+    (void)cxListFindRemove(ctx->group_widgets, widget);
+}
+
 UIEXPORT void *ui_allocator(UiContext *ctx) {
     return (void*)ctx->allocator;
 }

mercurial