application/main.c

branch
newapi
changeset 424
51e856688fba
parent 422
c1354a29a7e9
child 426
3eb26df703bf
equal deleted inserted replaced
423:02bafb660eb2 424:51e856688fba
562 562
563 WData *wdata = ui_malloc(obj->ctx, sizeof(WData)); 563 WData *wdata = ui_malloc(obj->ctx, sizeof(WData));
564 wdata->path = ui_string_new(obj->ctx, NULL); 564 wdata->path = ui_string_new(obj->ctx, NULL);
565 obj->window = wdata; 565 obj->window = wdata;
566 566
567 ui_button(obj, .label = "Add Item", .onclick = action_button); 567 /*
568 ui_button(obj, .label = "Add Item", .onclick = action_button, .name = "mybutton1");
569 ui_button(obj, .label = "Test2", .name = "mybutton2");
570 ui_button(obj, .label = "Test3", .name = "mybutton3");
571 ui_hbox0(obj) {
572 ui_button(obj, .label = "hbutton1");
573 ui_button(obj, .label = "hbutton2");
574 ui_button(obj, .label = "hbutton3", .fill = UI_ON);
575 ui_button(obj, .label = "hbutton4");
576 ui_button(obj, .label = "hbutton5");
577
578 }
579 ui_button(obj, .label = "Test4", .name = "mybutton4", .fill = UI_ON);
580 ui_button(obj, .label = "end");
581 */
582
583 ui_grid(obj, .columnspacing = 10, .rowspacing = 20, .fill = UI_ON) {
584 ui_button(obj, .label = "Add Item", .onclick = action_button, .name = "mybutton1");
585 ui_newline(obj);
586 ui_button(obj, .label = "Line 2 B1");
587 ui_button(obj, .label = "Line 2 B2");
588 ui_button(obj, .label = "Line 2 B3");
589 ui_newline(obj);
590 ui_button(obj, .label = "Line 3", .colspan = 3, .hfill = TRUE, .vexpand = TRUE, .vfill = TRUE);
591 ui_newline(obj);
592 ui_button(obj, .label = "Line 4 B1");
593 ui_button(obj, .label = "Line 4 B2");
594 ui_button(obj, .label = "Line 4 B3");
595 ui_button(obj, .label = "Line 4 B4", .hexpand = TRUE, .hfill = TRUE);
596 ui_button(obj, .label = "Line EOL");
597 ui_newline(obj);
598 ui_button(obj, .colspan = 5, .hfill = TRUE);
599 }
568 600
569 ui_show(obj); 601 ui_show(obj);
570 } 602 }
571 603
572 void action_test(UiEvent *event, void *data) { 604 void action_test(UiEvent *event, void *data) {

mercurial