--- a/ui/motif/container.h Sat Oct 04 14:54:25 2025 +0200 +++ b/ui/motif/container.h Sun Oct 19 21:20:08 2025 +0200 @@ -62,21 +62,6 @@ #define ui_obj_container(obj) (UiContainerPrivate*)obj->container_end -typedef struct UiLayout UiLayout; - -struct UiLayout { - UiBool fill; - UiBool newline; - char *label; - UiBool hexpand; - UiBool vexpand; - UiBool hfill; - UiBool vfill; - UiBool override_defaults; - int width; - int colspan; - int rowspan; -}; enum UiBoxOrientation { UI_BOX_VERTICAL = 0, @@ -88,11 +73,10 @@ struct UiContainerPrivate { UiContainerX container; - Widget (*prepare)(UiContainerPrivate*, Arg *, int*); + Widget (*prepare)(UiContainerPrivate*, UiLayout *layout, Arg *, int*); void (*add)(UiContainerPrivate*, Widget); Widget widget; UiContainerType type; - UiLayout layout; }; typedef struct UiBoxContainer { @@ -143,6 +127,9 @@ UiMotifTabView *tabview; } UiTabViewContainer; +Widget ui_container_prepare(UiContainerPrivate *container, UiLayout *layout, Arg *args, int *n); +void ui_container_add(UiContainerPrivate *container, Widget widget); + void ui_motif_tabview_select(UiMotifTabView *tabview, int tab); void ui_motif_tabview_add_tab(UiMotifTabView *tabview, int index, const char *name, Widget child); void ui_motif_tabview_remove(UiMotifTabView *tabview, int index); @@ -150,12 +137,12 @@ int64_t ui_tabview_get(UiInteger *i); void ui_tabview_set(UiInteger *i, int64_t value); -Widget ui_tabview_container_prepare(UiContainerPrivate *ctn, Arg *args, int *n); +Widget ui_tabview_container_prepare(UiContainerPrivate *ctn, UiLayout *layout, Arg *args, int *n); void ui_tabview_container_add(UiContainerPrivate *ctn, Widget widget); UiContainerX* ui_box_container(UiObject *obj, Widget grid, UiBoxOrientation orientation); -Widget ui_vbox_prepare(UiContainerPrivate *ctn, Arg *args, int *n); -Widget ui_hbox_prepare(UiContainerPrivate *ctn, Arg *args, int *n); +Widget ui_vbox_prepare(UiContainerPrivate *ctn, UiLayout *layout, Arg *args, int *n); +Widget ui_hbox_prepare(UiContainerPrivate *ctn, UiLayout *layout, Arg *args, int *n); void ui_box_container_add(UiContainerPrivate *ctn, Widget widget); @@ -166,7 +153,7 @@ UiBool def_vexpand, UiBool def_hfill, UiBool def_vfill); -Widget ui_grid_container_prepare(UiContainerPrivate *ctn, Arg *args, int *n); +Widget ui_grid_container_prepare(UiContainerPrivate *ctn, UiLayout *layout, Arg *args, int *n); void ui_grid_container_add(UiContainerPrivate *ctn, Widget widget); #ifdef __cplusplus