ui/common/context.c

branch
newapi
changeset 392
df62b7205bd3
parent 387
80edb1a93f7a
child 406
0ebf9d7b23e8
--- a/ui/common/context.c	Tue Nov 26 10:02:04 2024 +0100
+++ b/ui/common/context.c	Tue Nov 26 10:40:03 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