--- a/application/main.c Mon May 19 21:15:43 2014 +0200 +++ b/application/main.c Tue May 20 13:29:53 2014 +0200 @@ -65,6 +65,10 @@ printf("\n"); } +void action_button(UiEvent *event, void *data) { + printf("button: %d\n", event->intval); +} + int main(int argc, char** argv) { ui_init("app1", argc, argv); ui_locales_dir("/opt/app1/locales"); @@ -75,6 +79,10 @@ ui_menu("File"); ui_menuitem_st(UI_STOCK_CLOSE, action_close, NULL); + ui_checkitem("Check", action_button, NULL); + + ui_toolitem_toggle_st("button", UI_STOCK_GO_BACK, action_button, NULL); + ui_toolbar_add_default("button"); printf("create window\n"); UiObject *window = ui_window("Mod0", NULL);