--- a/application/main.c Sun Jan 25 15:01:04 2015 +0100 +++ b/application/main.c Tue Jan 27 09:59:32 2015 +0100 @@ -92,11 +92,24 @@ //ui_select_tab(tabview, 0); } */ + +void action_menu(UiEvent *event, void *data) { + printf("action_menu test: {%s}\n", data); + fflush(stdout); +} + int main(int argc, char** argv) { ui_init("app1", argc, argv); ui_menu("File"); - ui_menuitem("Hello", NULL, NULL); + ui_menuitem("Hello", action_menu, "hello"); + ui_submenu("Submenu1"); + ui_submenu("Submenu2"); + ui_menuitem("item2", NULL, NULL); + ui_submenu_end(); + ui_menuitem("item3", NULL, NULL); + ui_submenu_end(); + ui_menuitem("item4", NULL, NULL); UiObject *obj = ui_window("Test", NULL); ui_show(obj);