ui/gtk/container.c

changeset 442
dc762a79e72d
parent 440
7c4b9cba09ca
--- a/ui/gtk/container.c	Wed Jan 08 20:35:24 2025 +0100
+++ b/ui/gtk/container.c	Mon Jan 13 22:36:57 2025 +0100
@@ -52,6 +52,17 @@
     return 1;
 }
 
+UIEXPORT UIWIDGET ui_customwidget_create(UiObject *obj, ui_createwidget_func create_widget, void *userdata, UiWidgetArgs args) {
+    UiObject* current = uic_current_obj(obj);
+    
+    UIWIDGET widget = create_widget(obj, args, userdata);
+    
+    UI_APPLY_LAYOUT1(current, args);
+    current->container->add(current->container, widget, FALSE);
+    
+    return widget;
+}
+
 GtkWidget* ui_gtk_vbox_new(int spacing) {
 #if GTK_MAJOR_VERSION >= 3
     return gtk_box_new(GTK_ORIENTATION_VERTICAL, spacing);

mercurial