--- a/ui/motif/container.h Thu Feb 06 22:03:14 2025 +0100 +++ b/ui/motif/container.h Thu Feb 06 22:36:29 2025 +0100 @@ -104,15 +104,24 @@ Dimension y; } UiGridContainer; +typedef struct UiTab { + Widget tab_button; + Widget child; +} UiTab; + typedef struct UiMotifTabView UiMotifTabView; struct UiMotifTabView { Widget form; Widget tabbar; Widget content; Widget current; + UiTab *current_tab; int height; Pixel bg1; Pixel bg2; + Pixel fg1; + GC gc; + int gc_initialized; UiTabViewType tabview; UiSubContainerType subcontainer; CxList *tabs; @@ -121,11 +130,6 @@ void (*remove)(UiMotifTabView *tabview, int index); }; -typedef struct UiTab { - Widget tab_button; - Widget child; -} UiTab; - typedef struct UiTabViewContainer { UiContainerPrivate container; UiMotifTabView *tabview; @@ -134,6 +138,7 @@ 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); +void ui_motif_tabview_change_tab(UiMotifTabView *tabview, UiTab *tab); Widget ui_tabview_container_prepare(UiContainerPrivate *ctn, Arg *args, int *n); void ui_tabview_container_add(UiContainerPrivate *ctn, Widget widget);