application/main.c

branch
newapi
changeset 335
91d4f0391282
parent 333
634e3ce80afe
child 336
56c12f44c2d3
equal deleted inserted replaced
334:00be546d3b38 335:91d4f0391282
35 35
36 typedef struct { 36 typedef struct {
37 UiString *str1; 37 UiString *str1;
38 UiString *str2; 38 UiString *str2;
39 UiString *path; 39 UiString *path;
40 UiText *text;
40 UiDouble *progress; 41 UiDouble *progress;
41 UiList *list; 42 UiList *list;
42 UiList *menulist; 43 UiList *menulist;
43 UiInteger *radio; 44 UiInteger *radio;
44 UiInteger *tabview; 45 UiInteger *tabview;
86 ui_list_append(doc->list, "test1"); 87 ui_list_append(doc->list, "test1");
87 ui_list_append(doc->list, "test2"); 88 ui_list_append(doc->list, "test2");
88 ui_list_append(doc->list, "test3"); 89 ui_list_append(doc->list, "test3");
89 doc->radio = ui_int_new(docctx, "radio"); 90 doc->radio = ui_int_new(docctx, "radio");
90 doc->tabview = ui_int_new(docctx, "tabview"); 91 doc->tabview = ui_int_new(docctx, "tabview");
92 //doc->text = ui_text_new(docctx, "text");
91 return doc; 93 return doc;
92 } 94 }
93 95
94 UiIcon *icon = NULL; 96 UiIcon *icon = NULL;
95 97
190 } 192 }
191 } 193 }
192 ui_tab(obj, "Tab 2") { 194 ui_tab(obj, "Tab 2") {
193 ui_button(obj, .label = "Button", .onclick=action_tab2_button); 195 ui_button(obj, .label = "Button", .onclick=action_tab2_button);
194 } 196 }
195 ui_tab(obj, "Tab 3 x") { 197 ui_tab(obj, "Tab 3") {
196 UiTabViewArgs args = {0}; 198 UiTabViewArgs args = {0};
197 tabview = ui_tabview_create(obj, args); 199 UI_CTN(obj, tabview=ui_tabview_create(obj, args)) {
198 200 UiObject *tab1 = ui_tabview_add(tabview, "Sub 1", -1);
199 UiObject *tab1 = ui_tabview_add(tabview, "Sub 1", -1); 201 ui_button(tab1, .label = "Button 1");
200 ui_button(tab1, .label = "Button 1"); 202
201 203
202 204 UiObject *tab2 = ui_tabview_add(tabview, "Sub 2", -1);
203 UiObject *tab2 = ui_tabview_add(tabview, "Sub 2", -1); 205 ui_button(tab2, .label = "Button 2");
204 ui_button(tab2, .label = "Button 2"); 206 }
205 207 }
208 ui_tab(obj, "Tab 4") {
209 ui_textarea(obj, .varname = "text");
206 } 210 }
207 } 211 }
208 212
209 /* 213 /*
210 214

mercurial