ui/common/menu.h

changeset 88
e27526429d85
parent 70
94144a948aff
equal deleted inserted replaced
87:5360027fb282 88:e27526429d85
74 }; 74 };
75 75
76 struct UiMenuItem { 76 struct UiMenuItem {
77 UiMenuItemI item; 77 UiMenuItemI item;
78 ui_callback callback; 78 ui_callback callback;
79 const char *label; 79 char *label;
80 const char *stockid; 80 char *stockid;
81 const char *icon; 81 char *icon;
82 void *userdata; 82 void *userdata;
83 int *groups; 83 int *groups;
84 size_t ngroups; 84 size_t ngroups;
85 }; 85 };
86 86
87 struct UiMenuCheckItem { 87 struct UiMenuCheckItem {
88 UiMenuItemI item; 88 UiMenuItemI item;
89 const char* label; 89 char *label;
90 const char* stockid; 90 char *stockid;
91 const char* icon; 91 char *icon;
92 const char* varname; 92 char *varname;
93 ui_callback callback; 93 ui_callback callback;
94 void *userdata; 94 void *userdata;
95 int *groups; 95 int *groups;
96 size_t ngroups; 96 size_t ngroups;
97 }; 97 };
98 98
99 struct UiMenuRadioItem { 99 struct UiMenuRadioItem {
100 UiMenuItemI item; 100 UiMenuItemI item;
101 const char* label; 101 char *label;
102 const char* stockid; 102 char *stockid;
103 const char* icon; 103 char *icon;
104 ui_callback callback; 104 ui_callback callback;
105 void* userdata; 105 void *userdata;
106 int *groups; 106 int *groups;
107 size_t ngroups; 107 size_t ngroups;
108 }; 108 };
109 109
110 struct UiMenuItemList { 110 struct UiMenuItemList {
111 UiMenuItemI item; 111 UiMenuItemI item;
112 ui_getvaluefunc getvalue; 112 ui_getvaluefunc getvalue;
113 ui_callback callback; 113 ui_callback callback;
114 void *userdata; 114 void *userdata;
115 const char *varname; 115 char *varname;
116 }; 116 };
117 117
118
119
120 struct UiMenuBuilder {
121 UiMenu *menus_begin;
122 UiMenu *menus_end;
123 CxList *current;
124 };
125
126 void uic_menu_init(void);
118 127
119 UiMenu* uic_get_menu_list(void); 128 UiMenu* uic_get_menu_list(void);
120 129
121 void uic_add_menu_to_stack(UiMenu* menu); 130 void uic_add_menu_to_stack(UiMenu* menu);
122 131

mercurial