ui/winui/list.cpp

branch
newapi
changeset 382
de653b07050b
parent 378
d41b1ffc5f77
equal deleted inserted replaced
381:b47bda6666ce 382:de653b07050b
62 UIElement elm = listview; 62 UIElement elm = listview;
63 UiWidget* widget = new UiWidget(elm); 63 UiWidget* widget = new UiWidget(elm);
64 widget->data1 = args.model; 64 widget->data1 = args.model;
65 widget->data2 = args.getvalue; 65 widget->data2 = args.getvalue;
66 ui_context_add_widget_destructor(current->ctx, widget); 66 ui_context_add_widget_destructor(current->ctx, widget);
67 ui_set_widget_groups(current->ctx, widget, args.groups);
67 68
68 // bind var 69 // bind var
69 UiVar* var = uic_widget_var(obj->ctx, current->ctx, args.list, args.varname, UI_VAR_LIST); 70 UiVar* var = uic_widget_var(obj->ctx, current->ctx, args.list, args.varname, UI_VAR_LIST);
70 if (var) { 71 if (var) {
71 UiList* list = (UiList*)var->value; 72 UiList* list = (UiList*)var->value;
133 UIElement elm = combobox; 134 UIElement elm = combobox;
134 UiWidget* widget = new UiWidget(elm); 135 UiWidget* widget = new UiWidget(elm);
135 widget->data1 = args.model; 136 widget->data1 = args.model;
136 widget->data2 = args.getvalue; 137 widget->data2 = args.getvalue;
137 ui_context_add_widget_destructor(current->ctx, widget); 138 ui_context_add_widget_destructor(current->ctx, widget);
139 ui_set_widget_groups(current->ctx, widget, args.groups);
138 140
139 // bind var 141 // bind var
140 UiVar* var = uic_widget_var(obj->ctx, current->ctx, args.list, args.varname, UI_VAR_LIST); 142 UiVar* var = uic_widget_var(obj->ctx, current->ctx, args.list, args.varname, UI_VAR_LIST);
141 if (var) { 143 if (var) {
142 UiList* list = (UiList*)var->value; 144 UiList* list = (UiList*)var->value;
228 UIElement elm = bcbar; 230 UIElement elm = bcbar;
229 UiWidget* widget = new UiWidget(elm); 231 UiWidget* widget = new UiWidget(elm);
230 widget->data1 = args.model; 232 widget->data1 = args.model;
231 widget->data2 = args.getvalue; 233 widget->data2 = args.getvalue;
232 ui_context_add_widget_destructor(current->ctx, widget); 234 ui_context_add_widget_destructor(current->ctx, widget);
235 ui_set_widget_groups(current->ctx, widget, args.groups);
233 236
234 // bind var 237 // bind var
235 UiVar* var = uic_widget_var(obj->ctx, current->ctx, args.list, args.varname, UI_VAR_LIST); 238 UiVar* var = uic_widget_var(obj->ctx, current->ctx, args.list, args.varname, UI_VAR_LIST);
236 if (var) { 239 if (var) {
237 UiList* list = (UiList*)var->value; 240 UiList* list = (UiList*)var->value;

mercurial