ui/motif/container.c

changeset 443
3379c8a5b6bb
parent 426
3eb26df703bf
--- a/ui/motif/container.c	Mon Jan 13 22:36:57 2025 +0100
+++ b/ui/motif/container.c	Mon Jan 13 22:44:01 2025 +0100
@@ -36,6 +36,22 @@
 
 #include "Grid.h"
 
+
+UIWIDGET ui_customwidget_create(UiObject *obj, ui_createwidget_func create_widget, void *userdata, UiWidgetArgs args) {
+    Arg xargs[64];
+    int n = 0;
+    
+    UiContainerPrivate *ctn = ui_obj_container(obj);
+    UI_APPLY_LAYOUT(ctn->layout, args);
+    
+    Widget parent = ctn->prepare(ctn, xargs, &n);
+    Widget widget = create_widget(obj, args, userdata, parent, xargs, n);
+    XtManageChild(widget);
+    ctn->add(ctn, widget);
+    
+    return widget;
+}
+
 /* ---------------------------- Box Container ---------------------------- */
 
 static UIWIDGET box_create(UiObject *obj, UiContainerArgs args, UiBoxOrientation orientation) { 

mercurial