182 |
185 |
183 doc->items = ui_list_new(docctx, "items"); |
186 doc->items = ui_list_new(docctx, "items"); |
184 ui_list_append(doc->items, "Item 1"); |
187 ui_list_append(doc->items, "Item 1"); |
185 ui_list_append(doc->items, "Item 2"); |
188 ui_list_append(doc->items, "Item 2"); |
186 ui_list_append(doc->items, "Item 3"); |
189 ui_list_append(doc->items, "Item 3"); |
|
190 |
|
191 doc->web = ui_generic_new(docctx, NULL); |
187 |
192 |
188 //doc->text = ui_text_new(docctx, "text"); |
193 //doc->text = ui_text_new(docctx, "text"); |
189 return doc; |
194 return doc; |
190 } |
195 } |
191 |
196 |
478 ui_button(obj, .label = "Button 2"); |
483 ui_button(obj, .label = "Button 2"); |
479 } |
484 } |
480 } |
485 } |
481 ui_tab(obj, "Tab 9") { |
486 ui_tab(obj, "Tab 9") { |
482 #ifdef UI_WEBVIEW |
487 #ifdef UI_WEBVIEW |
483 ui_webview(obj, .fill = UI_ON); |
488 ui_webview(obj, .fill = UI_ON, .value = doc->web); |
|
489 cxstring html = CX_STR("<html><body><h1>Hello Toolkit</h1><p>Toolkit WebView</p></body></html>"); |
|
490 ui_webview_load_content(doc->web, "mypage", html.ptr, html.length, NULL, NULL); |
484 #else |
491 #else |
485 ui_label(obj, "Webview is not supported"); |
492 ui_label(obj, "Webview is not supported"); |
486 #endif |
493 #endif |
487 } |
494 } |
488 ui_tab(obj, "Tab 10") { |
495 ui_tab(obj, "Tab 10") { |