--- a/ui/common/menu.h Sun Nov 17 15:21:50 2024 +0100 +++ b/ui/common/menu.h Thu Nov 21 12:04:53 2024 +0100 @@ -76,9 +76,9 @@ struct UiMenuItem { UiMenuItemI item; ui_callback callback; - const char *label; - const char *stockid; - const char *icon; + char *label; + char *stockid; + char *icon; void *userdata; int *groups; size_t ngroups; @@ -86,10 +86,10 @@ struct UiMenuCheckItem { UiMenuItemI item; - const char* label; - const char* stockid; - const char* icon; - const char* varname; + char *label; + char *stockid; + char *icon; + char *varname; ui_callback callback; void *userdata; int *groups; @@ -98,11 +98,11 @@ struct UiMenuRadioItem { UiMenuItemI item; - const char* label; - const char* stockid; - const char* icon; + char *label; + char *stockid; + char *icon; ui_callback callback; - void* userdata; + void *userdata; int *groups; size_t ngroups; }; @@ -112,10 +112,19 @@ ui_getvaluefunc getvalue; ui_callback callback; void *userdata; - const char *varname; + char *varname; }; + +struct UiMenuBuilder { + UiMenu *menus_begin; + UiMenu *menus_end; + CxList *current; +}; + +void uic_menu_init(void); + UiMenu* uic_get_menu_list(void); void uic_add_menu_to_stack(UiMenu* menu);