ui/common/menu.h

changeset 88
e27526429d85
parent 70
94144a948aff
--- a/ui/common/menu.h	Sun Nov 17 15:19:32 2024 +0100
+++ b/ui/common/menu.h	Tue Nov 26 10:40:45 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);

mercurial