application/main.c

branch
newapi
changeset 270
9389313ac00f
parent 269
3380100e20f5
child 275
132c7bcc6997
equal deleted inserted replaced
269:3380100e20f5 270:9389313ac00f
81 return icon; 81 return icon;
82 } 82 }
83 */ 83 */
84 84
85 char *str = elm; 85 char *str = elm;
86 return col == 1 ? str : "x"; 86 return col == 0 ? str : "x";
87 } 87 }
88 88
89 void application_startup(UiEvent *event, void *data) { 89 void application_startup(UiEvent *event, void *data) {
90 90
91 UiObject *obj = ui_window("Test", NULL); 91 UiObject *obj = ui_window("Test", NULL);
118 ui_textfield(obj, .value = doc->str1); 118 ui_textfield(obj, .value = doc->str1);
119 ui_newline(obj); 119 ui_newline(obj);
120 120
121 //UiModel *model = ui_model(obj->ctx, UI_ICON_TEXT, "Col 1", UI_STRING, "Col 2", -1); 121 //UiModel *model = ui_model(obj->ctx, UI_ICON_TEXT, "Col 1", UI_STRING, "Col 2", -1);
122 //model->getvalue = list_getvalue; 122 //model->getvalue = list_getvalue;
123 ui_listview(obj, .hexpand = true, .vexpand = true, .colspan = 2, .varname = "list", .getvalue = list_getvalue); 123 ui_combobox(obj, .hexpand = true, .vexpand = false, .colspan = 2, .varname = "list", .getvalue = list_getvalue);
124 } 124 }
125 125
126 ui_show(obj); 126 ui_show(obj);
127 } 127 }
128 128

mercurial