diff -r 7b3a3130be44 -r 64ded9f6a6c6 ui/gtk/container.h --- a/ui/gtk/container.h Mon Jan 06 22:22:55 2025 +0100 +++ b/ui/gtk/container.h Tue Feb 25 21:11:00 2025 +0100 @@ -31,6 +31,7 @@ #include "../ui/toolkit.h" #include "../ui/container.h" +#include "toolkit.h" #include <string.h> #include <cx/allocator.h> @@ -65,6 +66,7 @@ UiBool vexpand; UiBool hfill; UiBool vfill; + UiBool override_defaults; int width; int colspan; int rowspan; @@ -89,6 +91,10 @@ typedef struct UiGridContainer { UiContainer container; + UiBool def_hexpand; + UiBool def_vexpand; + UiBool def_hfill; + UiBool def_vfill; int x; int y; #ifdef UI_GTK2 @@ -97,16 +103,6 @@ #endif } UiGridContainer; -/* -typedef struct UiPanedContainer { - UiContainer container; - GtkWidget *current_pane; - int orientation; - int max; - int cur; -} UiPanedContainer; -*/ - typedef struct UiTabViewContainer { UiContainer container; } UiTabViewContainer; @@ -127,6 +123,16 @@ int rowspacing; } UiGtkTabView; + +typedef struct UiSplitPaneContainer { + UiContainer container; + GtkWidget *current_pane; + UiOrientation orientation; + int pos; + int max; + int nchildren; +} UiSplitPaneContainer; + typedef struct UiHeaderbarContainer { UiContainer container; GtkWidget *centerbox; @@ -170,7 +176,13 @@ void ui_box_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill); GtkWidget* ui_create_grid_widget(int colspacing, int rowspacing); -UiContainer* ui_grid_container(UiObject *obj, GtkWidget *grid); +UiContainer* ui_grid_container( + UiObject *obj, + GtkWidget *grid, + UiBool def_hexpand, + UiBool def_vexpand, + UiBool def_hfill, + UiBool def_vfill); void ui_grid_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill); UiContainer* ui_frame_container(UiObject *obj, GtkWidget *frame); @@ -185,10 +197,9 @@ UiContainer* ui_tabview_container(UiObject *obj, GtkWidget *tabview); void ui_tabview_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill); -void ui_paned_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill); +UiContainer* ui_splitpane_container(UiObject *obj, GtkWidget *pane, UiOrientation orientation, int max); +void ui_splitpane_container_add(UiContainer *ct, GtkWidget *widget, UiBool fill); -void ui_split_container_add1(UiContainer *ct, GtkWidget *widget, UiBool fill); -void ui_split_container_add2(UiContainer *ct, GtkWidget *widget, UiBool fill); UiGtkTabView* ui_widget_get_tabview_data(UIWIDGET tabview);