--- a/application/main.c Sat Aug 30 22:48:46 2014 +0200 +++ b/application/main.c Thu Jan 01 11:23:43 2015 +0100 @@ -43,14 +43,7 @@ UiText text; } Document; -UiText text; - -void action_new(UiEvent *event, void *data) { - printf("new\n"); -} - void action_close(UiEvent *event, void *data) { - printf("action_close\n"); ui_close(event->obj); } @@ -78,9 +71,8 @@ void action_button(UiEvent *event, void *data) { printf("button: %d\n", event->intval); - //char *s = ui_gettext(event->obj, "text"); - char *s = ui_getval(text); - printf("{%s}\n", s); + char *s = ui_gettext(event->obj, "text"); + printf("{%s}\n", s); } int main(int argc, char** argv) { @@ -92,19 +84,15 @@ ui_menu("File"); - //ui_menuitem("Close", action_close, NULL); - ui_menuitem_st(UI_STOCK_NEW, action_new, NULL); ui_menuitem_st(UI_STOCK_CLOSE, action_close, NULL); - //ui_checkitem("Check", action_button, NULL); + ui_checkitem("Check", action_button, NULL); - ui_toolitem_st("button", UI_STOCK_OPEN, action_button, NULL); + ui_toolitem_st("button", UI_STOCK_GO_BACK, action_button, NULL); ui_toolbar_add_default("button"); printf("create window\n"); UiObject *window = ui_window("Mod0", NULL); - //ui_textarea(window, &text); - ///* UiModelInfo *model = ui_model_info(window->ctx, UI_STRING, "Name", UI_STRING, "Email", -1); model->getvalue = (ui_model_getvalue_f)person_getvalue; model->activate = action_activate; @@ -129,8 +117,13 @@ //ui_sidebar(window); ui_table(window, list, model); + ui_button(window, "Test", NULL, NULL); + ui_button(window, "Test", NULL, NULL); + ui_button(window, "Test", NULL, NULL); + ui_button(window, "Test", NULL, NULL); + ui_button(window, "Test", NULL, NULL); + ui_button(window, "Test", NULL, NULL); //ui_end(window); - /* UiTabbedPane *view = ui_tabbed_document_view(window);