161 |
161 |
162 UiObject *obj = ui_window("Test", NULL); |
162 UiObject *obj = ui_window("Test", NULL); |
163 ui_set_document(obj, d1); |
163 ui_set_document(obj, d1); |
164 |
164 |
165 //ui_textarea_nv(obj, "text"); |
165 //ui_textarea_nv(obj, "text"); |
166 ui_radiobutton_nv(obj, "1", "int"); |
166 //ui_radiobutton_nv(obj, "1", "int"); |
167 ui_radiobutton_nv(obj, "2", "int"); |
167 //ui_radiobutton_nv(obj, "2", "int"); |
168 ui_radiobutton_nv(obj, "3", "int"); |
168 //ui_radiobutton_nv(obj, "3", "int"); |
169 |
169 |
170 ui_textfield_nv(obj, "t1"); |
170 ui_textfield_nv(obj, "t1"); |
171 //ui_textarea_nv(obj, "text"); |
171 //ui_textarea_nv(obj, "text"); |
172 //d1->t1->observers = ui_add_observer(d1->t1->observers, observ, "t1"); |
172 //d1->t1->observers = ui_add_observer(d1->t1->observers, observ, "t1"); |
173 //d1->text->observers = ui_add_observer(d1->text->observers, observ, "text"); |
173 //d1->text->observers = ui_add_observer(d1->text->observers, observ, "text"); |
175 UiModel *model = ui_model(obj->ctx, UI_ICON_TEXT, "name", UI_STRING, "desc", -1); |
175 UiModel *model = ui_model(obj->ctx, UI_ICON_TEXT, "name", UI_STRING, "desc", -1); |
176 model->getvalue = (ui_getvaluefunc)model_get; |
176 model->getvalue = (ui_getvaluefunc)model_get; |
177 model->drop = list_drop; |
177 model->drop = list_drop; |
178 model->data_get = list_data_get; |
178 model->data_get = list_data_get; |
179 UiListCallbacks cb = {NULL, NULL, NULL}; |
179 UiListCallbacks cb = {NULL, NULL, NULL}; |
180 UIWIDGET table = ui_table_nv(obj, "list", model, cb); |
180 //UIWIDGET table = ui_table_nv(obj, "list", model, cb); |
181 ui_table_dragsource(table, 0, "text/plain", NULL); |
181 //ui_table_dragsource(table, 0, "text/plain", NULL); |
182 |
182 |
183 //ui_spinner_setrange(ui_spinnerf_nv(obj, 1, 0, "d"), 0, 1000); |
183 //ui_spinner_setrange(ui_spinnerf_nv(obj, 1, 0, "d"), 0, 1000); |
184 ui_spinnerr_nv(obj, "r"); |
184 //ui_spinnerr_nv(obj, "r"); |
185 d1->r->setrange(d1->r, 0, 10); |
185 //d1->r->setrange(d1->r, 0, 10); |
186 d1->r->setextent(d1->r, 1); |
186 //d1->r->setextent(d1->r, 1); |
187 d1->d->observers = ui_add_observer(d1->d->observers, doublechanged, NULL); |
187 //d1->d->observers = ui_add_observer(d1->d->observers, doublechanged, NULL); |
188 |
188 |
189 ui_progressbar_nv(obj, "progress"); |
189 //ui_progressbar_nv(obj, "progress"); |
190 ui_button(obj, "Switch Document", action_newdoc, NULL); |
190 ui_button(obj, "Switch Document", action_newdoc, NULL); |
191 |
191 |
192 ui_show(obj); |
192 ui_show(obj); |
193 } |
193 } |
194 |
194 |