diff --git a/demos/SConscript b/demos/SConscript
index 2f564a68e..f55ba203a 100644
--- a/demos/SConscript
+++ b/demos/SConscript
@@ -19,6 +19,8 @@ env.Program(os.path.join(BIN_DIR, 'demo_basic'), ['demo_basic.c', 'demo_main.c']
env.Program(os.path.join(BIN_DIR, 'preview_ui'), ['preview_ui.c']);
env.Program(os.path.join(BIN_DIR, 'demo_desktop'), ['demo_desktop.c']);
+env.Program(os.path.join(BIN_DIR, 'demo_file_browser'), ['demo_file_browser.c',
+ 'demo_main.c']);
diff --git a/demos/assets.c b/demos/assets.c
index a75e5bf48..609741932 100644
--- a/demos/assets.c
+++ b/demos/assets.c
@@ -18,6 +18,7 @@
#include "assets/default/inc/styles/tab_top_compact.data"
#include "assets/default/inc/styles/dialog_info.data"
#include "assets/default/inc/styles/guage.data"
+#include "assets/default/inc/styles/file_browser.data"
#include "assets/default/inc/styles/dialog_confirm.data"
#include "assets/default/inc/styles/dialog.data"
#include "assets/default/inc/styles/tab_top.data"
@@ -71,9 +72,11 @@
#include "assets/default/inc/ui/list_view_m.data"
#include "assets/default/inc/ui/slide_view_h_loop.data"
#include "assets/default/inc/ui/mutable_image.data"
+#include "assets/default/inc/ui/file_chooser.data"
#include "assets/default/inc/ui/calibration_win.data"
#include "assets/default/inc/ui/memtest.data"
#include "assets/default/inc/ui/slide_view_h2.data"
+#include "assets/default/inc/ui/folder_chooser.data"
#include "assets/default/inc/ui/slide_view_v_loop.data"
#include "assets/default/inc/ui/language.data"
#include "assets/default/inc/ui/kb_float.data"
@@ -90,6 +93,7 @@
#include "assets/default/inc/ui/tab_list.data"
#include "assets/default/inc/ui/animator.data"
#include "assets/default/inc/ui/slide_down.data"
+#include "assets/default/inc/ui/file_chooser_for_open.data"
#include "assets/default/inc/ui/scroll_view_h.data"
#include "assets/default/inc/ui/menu_up_center.data"
#include "assets/default/inc/ui/slide_right.data"
@@ -114,6 +118,7 @@
#include "assets/default/inc/ui/basic.data"
#include "assets/default/inc/ui/auto_play.data"
#include "assets/default/inc/ui/guage.data"
+#include "assets/default/inc/ui/file_browser.data"
#include "assets/default/inc/ui/color_picker_full.data"
#include "assets/default/inc/ui/dialog1.data"
#include "assets/default/inc/ui/fade.data"
@@ -132,6 +137,7 @@
#include "assets/default/inc/ui/slide_view_v.data"
#include "assets/default/inc/ui/button.data"
#include "assets/default/inc/ui/menu.data"
+#include "assets/default/inc/ui/file_chooser_for_save.data"
#include "assets/default/inc/ui/system_bar.data"
#include "assets/default/inc/ui/menu_right_bottom.data"
#include "assets/default/inc/ui/list_view_d.data"
@@ -404,7 +410,7 @@
#include "assets/default/inc/images/arrow_left_n.data"
#include "assets/default/inc/images/edit_clear_p.data"
#include "assets/default/inc/images/battery_2.data"
-#endif/*WITH_STB_IMAGE*/
+#endif /*WITH_STB_IMAGE*/
#ifdef WITH_VGCANVAS
#include "assets/default/inc/images/pointer_4.bsvg"
#include "assets/default/inc/images/htest.bsvg"
@@ -413,13 +419,13 @@
#include "assets/default/inc/images/pointer_1.bsvg"
#include "assets/default/inc/images/pointer.bsvg"
#include "assets/default/inc/images/girl.bsvg"
-#endif/*WITH_VGCANVAS*/
+#endif /*WITH_VGCANVAS*/
#if defined(WITH_TRUETYPE_FONT)
#include "assets/default/inc/fonts/default.res"
-#else/*WITH_TRUETYPE_FONT*/
+#else /*WITH_TRUETYPE_FONT*/
#include "assets/default/inc/fonts/default.data"
-#endif/*WITH_TRUETYPE_FONT*/
-#endif/*WITH_FS_RES*/
+#endif /*WITH_TRUETYPE_FONT*/
+#endif /*WITH_FS_RES*/
ret_t assets_init(void) {
assets_manager_t* am = assets_manager();
@@ -474,9 +480,11 @@ ret_t assets_init(void) {
assets_manager_add(am, ui_list_view_m);
assets_manager_add(am, ui_slide_view_h_loop);
assets_manager_add(am, ui_mutable_image);
+ assets_manager_add(am, ui_file_chooser);
assets_manager_add(am, ui_calibration_win);
assets_manager_add(am, ui_memtest);
assets_manager_add(am, ui_slide_view_h2);
+ assets_manager_add(am, ui_folder_chooser);
assets_manager_add(am, ui_slide_view_v_loop);
assets_manager_add(am, ui_language);
assets_manager_add(am, ui_kb_float);
@@ -493,6 +501,7 @@ ret_t assets_init(void) {
assets_manager_add(am, ui_tab_list);
assets_manager_add(am, ui_animator);
assets_manager_add(am, ui_slide_down);
+ assets_manager_add(am, ui_file_chooser_for_open);
assets_manager_add(am, ui_scroll_view_h);
assets_manager_add(am, ui_menu_up_center);
assets_manager_add(am, ui_slide_right);
@@ -517,6 +526,7 @@ ret_t assets_init(void) {
assets_manager_add(am, ui_basic);
assets_manager_add(am, ui_auto_play);
assets_manager_add(am, ui_guage);
+ assets_manager_add(am, ui_file_browser);
assets_manager_add(am, ui_color_picker_full);
assets_manager_add(am, ui_dialog1);
assets_manager_add(am, ui_fade);
@@ -535,6 +545,7 @@ ret_t assets_init(void) {
assets_manager_add(am, ui_slide_view_v);
assets_manager_add(am, ui_button);
assets_manager_add(am, ui_menu);
+ assets_manager_add(am, ui_file_chooser_for_save);
assets_manager_add(am, ui_system_bar);
assets_manager_add(am, ui_menu_right_bottom);
assets_manager_add(am, ui_list_view_d);
@@ -694,6 +705,7 @@ ret_t assets_init(void) {
assets_manager_add(am, style_tab_top_compact);
assets_manager_add(am, style_dialog_info);
assets_manager_add(am, style_guage);
+ assets_manager_add(am, style_file_browser);
assets_manager_add(am, style_dialog_confirm);
assets_manager_add(am, style_dialog);
assets_manager_add(am, style_tab_top);
@@ -714,7 +726,7 @@ ret_t assets_init(void) {
assets_manager_add(am, image_pointer_1);
assets_manager_add(am, image_pointer);
assets_manager_add(am, image_girl);
-#endif/*WITH_VGCANVAS*/
+#endif /*WITH_VGCANVAS*/
#endif
tk_init_assets();
diff --git a/demos/assets/default/inc/styles/file_browser.data b/demos/assets/default/inc/styles/file_browser.data
new file mode 100644
index 000000000..a01b35eba
--- /dev/null
+++ b/demos/assets/default/inc/styles/file_browser.data
@@ -0,0 +1,82 @@
+TK_CONST_DATA_ALIGN(const unsigned char style_file_browser[]) = {
+0x03,0x00,0x00,0x01,0x1c,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x69,0x6c,0x65,0x5f,0x62,0x72,0x6f,
+0x77,0x73,0x65,0x72,0x00,0x64,0x61,0x74,0x61,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0xfd,0xfc,0xfb,0xfa,0x00,0x00,0x00,0x00,0x09,0x00,0x00,0x00,0x90,0x03,0x00,0x00,
+0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x6c,0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xbc,0x03,0x00,0x00,
+0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6f,0x64,0x64,0x5f,0x63,0x6c,0x69,0x63,
+0x6b,0x61,0x62,0x6c,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x6c,0x69,0x73,0x74,0x5f,0x69,0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x04,0x00,0x00,
+0x70,0x72,0x65,0x73,0x73,0x65,0x64,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6f,0x64,0x64,0x5f,0x63,0x6c,0x69,0x63,
+0x6b,0x61,0x62,0x6c,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x6c,0x69,0x73,0x74,0x5f,0x69,0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x54,0x04,0x00,0x00,
+0x6f,0x76,0x65,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6f,0x64,0x64,0x5f,0x63,0x6c,0x69,0x63,
+0x6b,0x61,0x62,0x6c,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x6c,0x69,0x73,0x74,0x5f,0x69,0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0x04,0x00,0x00,
+0x66,0x6f,0x63,0x75,0x73,0x65,0x64,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6f,0x64,0x64,0x5f,0x63,0x6c,0x69,0x63,
+0x6b,0x61,0x62,0x6c,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x6c,0x69,0x73,0x74,0x5f,0x69,0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xec,0x04,0x00,0x00,
+0x6e,0x6f,0x72,0x6d,0x61,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x65,0x76,0x65,0x6e,0x5f,0x63,0x6c,0x69,
+0x63,0x6b,0x61,0x62,0x6c,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x6c,0x69,0x73,0x74,0x5f,0x69,0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x05,0x00,0x00,
+0x70,0x72,0x65,0x73,0x73,0x65,0x64,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x65,0x76,0x65,0x6e,0x5f,0x63,0x6c,0x69,
+0x63,0x6b,0x61,0x62,0x6c,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x6c,0x69,0x73,0x74,0x5f,0x69,0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x84,0x05,0x00,0x00,
+0x6f,0x76,0x65,0x72,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x65,0x76,0x65,0x6e,0x5f,0x63,0x6c,0x69,
+0x63,0x6b,0x61,0x62,0x6c,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x6c,0x69,0x73,0x74,0x5f,0x69,0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xd0,0x05,0x00,0x00,
+0x66,0x6f,0x63,0x75,0x73,0x65,0x64,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x65,0x76,0x65,0x6e,0x5f,0x63,0x6c,0x69,
+0x63,0x6b,0x61,0x62,0x6c,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x6c,0x69,0x73,0x74,0x5f,0x69,0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,
+0x07,0x0d,0x04,0x00,0x74,0x65,0x78,0x74,0x5f,0x61,0x6c,0x69,0x67,0x6e,0x5f,0x68,0x00,0x02,0x00,0x00,
+0x00,0x07,0x0b,0x04,0x00,0x74,0x65,0x78,0x74,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0x00,0x00,0x00,0xff,
+0x04,0x00,0x00,0x00,0x07,0x0d,0x04,0x00,0x62,0x6f,0x72,0x64,0x65,0x72,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
+0x00,0xa0,0xa0,0xa0,0xff,0x07,0x07,0x04,0x00,0x62,0x6f,0x72,0x64,0x65,0x72,0x00,0x08,0x00,0x00,0x00,
+0x07,0x0b,0x04,0x00,0x74,0x65,0x78,0x74,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0x00,0x00,0x00,0xff,0x07,
+0x09,0x04,0x00,0x62,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0xf5,0xf5,0xf5,0xff,0x04,0x00,0x00,0x00,
+0x07,0x0d,0x04,0x00,0x62,0x6f,0x72,0x64,0x65,0x72,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0xa0,0xa0,0xa0,
+0xff,0x07,0x07,0x04,0x00,0x62,0x6f,0x72,0x64,0x65,0x72,0x00,0x08,0x00,0x00,0x00,0x07,0x0b,0x04,0x00,
+0x74,0x65,0x78,0x74,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0x00,0x00,0x00,0xff,0x07,0x09,0x04,0x00,0x62,
+0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0xc0,0xc0,0xc0,0xff,0x04,0x00,0x00,0x00,0x07,0x0d,0x04,0x00,
+0x62,0x6f,0x72,0x64,0x65,0x72,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0xa0,0xa0,0xa0,0xff,0x07,0x07,0x04,
+0x00,0x62,0x6f,0x72,0x64,0x65,0x72,0x00,0x08,0x00,0x00,0x00,0x07,0x0b,0x04,0x00,0x74,0x65,0x78,0x74,
+0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0x00,0x00,0x00,0xff,0x07,0x09,0x04,0x00,0x62,0x67,0x5f,0x63,0x6f,
+0x6c,0x6f,0x72,0x00,0xf5,0xf5,0xf5,0xff,0x04,0x00,0x00,0x00,0x07,0x0d,0x04,0x00,0x62,0x6f,0x72,0x64,
+0x65,0x72,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0xa0,0xa0,0xa0,0xff,0x07,0x07,0x04,0x00,0x62,0x6f,0x72,
+0x64,0x65,0x72,0x00,0x08,0x00,0x00,0x00,0x07,0x0b,0x04,0x00,0x74,0x65,0x78,0x74,0x5f,0x63,0x6f,0x6c,
+0x6f,0x72,0x00,0x00,0x00,0x00,0xff,0x07,0x09,0x04,0x00,0x62,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,
+0xe5,0xe5,0xe5,0xff,0x04,0x00,0x00,0x00,0x07,0x0d,0x04,0x00,0x62,0x6f,0x72,0x64,0x65,0x72,0x5f,0x63,
+0x6f,0x6c,0x6f,0x72,0x00,0xa0,0xa0,0xa0,0xff,0x07,0x07,0x04,0x00,0x62,0x6f,0x72,0x64,0x65,0x72,0x00,
+0x08,0x00,0x00,0x00,0x07,0x0b,0x04,0x00,0x74,0x65,0x78,0x74,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0x00,
+0x00,0x00,0xff,0x07,0x09,0x04,0x00,0x62,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0xea,0xea,0xea,0xff,
+0x04,0x00,0x00,0x00,0x07,0x0d,0x04,0x00,0x62,0x6f,0x72,0x64,0x65,0x72,0x5f,0x63,0x6f,0x6c,0x6f,0x72,
+0x00,0xa0,0xa0,0xa0,0xff,0x07,0x07,0x04,0x00,0x62,0x6f,0x72,0x64,0x65,0x72,0x00,0x08,0x00,0x00,0x00,
+0x07,0x0b,0x04,0x00,0x74,0x65,0x78,0x74,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0x00,0x00,0x00,0xff,0x07,
+0x09,0x04,0x00,0x62,0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0xc0,0xc0,0xc0,0xff,0x04,0x00,0x00,0x00,
+0x07,0x0d,0x04,0x00,0x62,0x6f,0x72,0x64,0x65,0x72,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0xa0,0xa0,0xa0,
+0xff,0x07,0x07,0x04,0x00,0x62,0x6f,0x72,0x64,0x65,0x72,0x00,0x08,0x00,0x00,0x00,0x07,0x0b,0x04,0x00,
+0x74,0x65,0x78,0x74,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0x00,0x00,0x00,0xff,0x07,0x09,0x04,0x00,0x62,
+0x67,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0xea,0xea,0xea,0xff,0x04,0x00,0x00,0x00,0x07,0x0d,0x04,0x00,
+0x62,0x6f,0x72,0x64,0x65,0x72,0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0xa0,0xa0,0xa0,0xff,0x07,0x07,0x04,
+0x00,0x62,0x6f,0x72,0x64,0x65,0x72,0x00,0x08,0x00,0x00,0x00,0x07,0x0b,0x04,0x00,0x74,0x65,0x78,0x74,
+0x5f,0x63,0x6f,0x6c,0x6f,0x72,0x00,0x00,0x00,0x00,0xff,0x07,0x09,0x04,0x00,0x62,0x67,0x5f,0x63,0x6f,
+0x6c,0x6f,0x72,0x00,0xe5,0xe5,0xe5,0xff,0x00,0x00,0x00,0x00,};/*1612*/
diff --git a/demos/assets/default/inc/ui/file_browser.data b/demos/assets/default/inc/ui/file_browser.data
new file mode 100644
index 000000000..dcca46036
--- /dev/null
+++ b/demos/assets/default/inc/ui/file_browser.data
@@ -0,0 +1,38 @@
+TK_CONST_DATA_ALIGN(const unsigned char ui_file_browser[]) = {
+0x04,0x00,0x01,0x01,0xa4,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x69,0x6c,0x65,0x5f,0x62,0x72,0x6f,
+0x77,0x73,0x65,0x72,0x00,0x64,0x61,0x74,0x61,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x12,0x12,0x22,0x11,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0x6e,0x69,0x6d,
+0x5f,0x68,0x69,0x6e,0x74,0x00,0x68,0x74,0x72,0x61,0x6e,0x73,0x6c,0x61,0x74,0x65,0x00,0x63,0x68,0x69,
+0x6c,0x64,0x72,0x65,0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,
+0x28,0x63,0x3d,0x31,0x2c,0x68,0x3d,0x34,0x30,0x2c,0x6d,0x3d,0x35,0x2c,0x73,0x3d,0x35,0x29,0x00,0x00,
+0x68,0x73,0x63,0x72,0x6f,0x6c,0x6c,0x5f,0x6c,0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x77,0x64,0x00,0x74,0x65,0x78,
+0x74,0x00,0x6e,0x6f,0x6e,0x65,0x00,0x00,0x00,0x68,0x73,0x63,0x72,0x6f,0x6c,0x6c,0x5f,0x6c,0x61,0x62,
+0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,
+0x65,0x00,0x66,0x69,0x6c,0x65,0x6e,0x61,0x6d,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x6e,0x6f,0x6e,0x65,
+0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x66,0x69,0x6c,0x65,
+0x5f,0x6f,0x70,0x65,0x6e,0x00,0x74,0x65,0x78,0x74,0x00,0x43,0x68,0x6f,0x6f,0x73,0x65,0x20,0x46,0x6f,
+0x72,0x20,0x4f,0x70,0x65,0x6e,0x2e,0x2e,0x2e,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x6e,0x61,0x6d,0x65,0x00,0x66,0x69,0x6c,0x65,0x5f,0x73,0x61,0x76,0x65,0x00,0x74,0x65,0x78,0x74,0x00,
+0x43,0x68,0x6f,0x6f,0x73,0x65,0x20,0x46,0x6f,0x72,0x20,0x53,0x61,0x76,0x65,0x2e,0x2e,0x2e,0x00,0x00,
+0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x66,0x6f,0x6c,0x64,0x65,0x72,
+0x00,0x74,0x65,0x78,0x74,0x00,0x43,0x68,0x6f,0x6f,0x73,0x65,0x20,0x46,0x6f,0x6c,0x64,0x65,0x72,0x2e,
+0x2e,0x2e,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x62,0x72,
+0x6f,0x77,0x73,0x65,0x72,0x00,0x74,0x65,0x78,0x74,0x00,0x46,0x69,0x6c,0x65,0x20,0x42,0x72,0x6f,0x77,
+0x73,0x65,0x72,0x2e,0x2e,0x2e,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,
+0x65,0x00,0x71,0x75,0x69,0x74,0x00,0x74,0x65,0x78,0x74,0x00,0x51,0x75,0x69,0x74,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,};/*724*/
diff --git a/demos/assets/default/inc/ui/file_chooser.data b/demos/assets/default/inc/ui/file_chooser.data
new file mode 100644
index 000000000..dae529e86
--- /dev/null
+++ b/demos/assets/default/inc/ui/file_chooser.data
@@ -0,0 +1,89 @@
+TK_CONST_DATA_ALIGN(const unsigned char ui_file_chooser[]) = {
+0x04,0x00,0x01,0x01,0xaa,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x69,0x6c,0x65,0x5f,0x63,0x68,0x6f,
+0x6f,0x73,0x65,0x72,0x00,0x64,0x61,0x74,0x61,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x12,0x12,0x22,0x11,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0x6e,0x69,0x6d,
+0x5f,0x68,0x69,0x6e,0x74,0x00,0x68,0x74,0x72,0x61,0x6e,0x73,0x6c,0x61,0x74,0x65,0x00,0x74,0x68,0x65,
+0x6d,0x65,0x00,0x66,0x69,0x6c,0x65,0x5f,0x62,0x72,0x6f,0x77,0x73,0x65,0x72,0x00,0x00,0x66,0x69,0x6c,
+0x65,0x5f,0x62,0x72,0x6f,0x77,0x73,0x65,0x72,0x5f,0x76,0x69,0x65,0x77,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,
+0x00,0x64,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,
+0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,
+0x68,0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x69,0x6e,0x69,0x74,0x5f,0x64,0x69,0x72,0x00,0x2e,0x2f,0x00,
+0x00,0x6c,0x69,0x73,0x74,0x5f,0x76,0x69,0x65,0x77,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x64,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,
+0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x31,
+0x30,0x30,0x25,0x2c,0x68,0x3d,0x2d,0x36,0x30,0x29,0x00,0x69,0x74,0x65,0x6d,0x5f,0x68,0x65,0x69,0x67,
+0x68,0x74,0x00,0x34,0x30,0x00,0x00,0x73,0x63,0x72,0x6f,0x6c,0x6c,0x5f,0x76,0x69,0x65,0x77,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,
+0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,
+0x3d,0x30,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,0x68,0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x6e,0x61,
+0x6d,0x65,0x00,0x63,0x6f,0x6e,0x74,0x61,0x69,0x6e,0x65,0x72,0x00,0x00,0x6c,0x69,0x73,0x74,0x5f,0x69,
+0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x72,0x65,0x74,0x75,0x72,0x6e,0x5f,0x75,0x70,0x00,0x73,0x74,0x79,
+0x6c,0x65,0x00,0x6f,0x64,0x64,0x5f,0x63,0x6c,0x69,0x63,0x6b,0x61,0x62,0x6c,0x65,0x00,0x63,0x68,0x69,
+0x6c,0x64,0x72,0x65,0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,
+0x28,0x72,0x6f,0x77,0x73,0x3d,0x31,0x2c,0x63,0x6f,0x6c,0x73,0x3d,0x30,0x29,0x00,0x00,0x69,0x6d,0x61,
+0x67,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x64,0x72,0x61,0x77,0x5f,
+0x74,0x79,0x70,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x72,0x65,0x74,0x75,
+0x72,0x6e,0x5f,0x75,0x70,0x00,0x00,0x00,0x6c,0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,
+0x00,0x6e,0x61,0x6d,0x65,0x00,0x74,0x72,0x5f,0x74,0x65,0x78,0x74,0x00,0x55,0x70,0x00,0x00,0x00,0x00,
+0x6c,0x69,0x73,0x74,0x5f,0x69,0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x66,0x69,0x6c,0x65,0x00,0x73,0x74,
+0x79,0x6c,0x65,0x00,0x6f,0x64,0x64,0x5f,0x63,0x6c,0x69,0x63,0x6b,0x61,0x62,0x6c,0x65,0x00,0x66,0x6f,
+0x63,0x75,0x73,0x61,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,
+0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x72,0x6f,0x77,
+0x73,0x3d,0x31,0x2c,0x63,0x6f,0x6c,0x73,0x3d,0x30,0x29,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x6e,0x61,0x6d,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x64,0x72,0x61,0x77,0x5f,0x74,0x79,0x70,0x65,
+0x00,0x69,0x63,0x6f,0x6e,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x66,0x69,0x6c,0x65,0x00,0x00,0x00,0x6c,
+0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe2,
+0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,
+0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x2d,0x33,0x30,
+0x2c,0x68,0x3d,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6e,0x61,0x6d,0x65,0x00,0x74,0x65,0x78,0x74,
+0x00,0x00,0x00,0x00,0x00,0x6c,0x69,0x73,0x74,0x5f,0x69,0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x66,0x6f,
+0x6c,0x64,0x65,0x72,0x00,0x73,0x74,0x79,0x6c,0x65,0x00,0x6f,0x64,0x64,0x5f,0x63,0x6c,0x69,0x63,0x6b,
+0x61,0x62,0x6c,0x65,0x00,0x66,0x6f,0x63,0x75,0x73,0x61,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,
+0x63,0x68,0x69,0x6c,0x64,0x72,0x65,0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,
+0x75,0x6c,0x74,0x28,0x72,0x6f,0x77,0x73,0x3d,0x31,0x2c,0x63,0x6f,0x6c,0x73,0x3d,0x30,0x29,0x00,0x00,
+0x69,0x6d,0x61,0x67,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x64,0x72,
+0x61,0x77,0x5f,0x74,0x79,0x70,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x66,
+0x6f,0x6c,0x64,0x65,0x72,0x00,0x00,0x00,0x6c,0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe2,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,
+0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,
+0x79,0x3d,0x30,0x2c,0x77,0x3d,0x2d,0x33,0x30,0x2c,0x68,0x3d,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,
+0x6e,0x61,0x6d,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x63,0x72,0x6f,0x6c,
+0x6c,0x5f,0x62,0x61,0x72,0x5f,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x64,
+0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,
+0x6c,0x74,0x28,0x78,0x3d,0x72,0x69,0x67,0x68,0x74,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x36,0x2c,0x68,
+0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x62,0x61,0x72,0x00,0x76,0x61,0x6c,0x75,
+0x65,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,
+0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x63,0x3a,
+0x2d,0x38,0x30,0x2c,0x79,0x3d,0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x31,0x30,0x2c,0x77,0x3d,0x38,0x30,
+0x2c,0x68,0x3d,0x33,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x6b,0x00,0x74,0x65,0x78,0x74,0x00,
+0x4f,0x4b,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,
+0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x63,0x3a,0x38,0x30,0x2c,
+0x79,0x3d,0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x31,0x30,0x2c,0x77,0x3d,0x38,0x30,0x2c,0x68,0x3d,0x33,
+0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x61,0x6e,0x63,0x65,0x6c,0x00,0x74,0x65,0x78,0x74,0x00,
+0x43,0x61,0x6e,0x63,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*1754*/
diff --git a/demos/assets/default/inc/ui/file_chooser_for_open.data b/demos/assets/default/inc/ui/file_chooser_for_open.data
new file mode 100644
index 000000000..feaa946b3
--- /dev/null
+++ b/demos/assets/default/inc/ui/file_chooser_for_open.data
@@ -0,0 +1,96 @@
+TK_CONST_DATA_ALIGN(const unsigned char ui_file_chooser_for_open[]) = {
+0x04,0x00,0x01,0x01,0x2e,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x69,0x6c,0x65,0x5f,0x63,0x68,0x6f,
+0x6f,0x73,0x65,0x72,0x5f,0x66,0x6f,0x72,0x5f,0x6f,0x70,0x65,0x6e,0x00,0x64,0x61,0x74,0x61,0x00,0x00,
+0x00,0x00,0x00,0x00,0x12,0x12,0x22,0x11,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0x6e,0x69,0x6d,
+0x5f,0x68,0x69,0x6e,0x74,0x00,0x68,0x74,0x72,0x61,0x6e,0x73,0x6c,0x61,0x74,0x65,0x00,0x74,0x68,0x65,
+0x6d,0x65,0x00,0x66,0x69,0x6c,0x65,0x5f,0x62,0x72,0x6f,0x77,0x73,0x65,0x72,0x00,0x00,0x66,0x69,0x6c,
+0x65,0x5f,0x62,0x72,0x6f,0x77,0x73,0x65,0x72,0x5f,0x76,0x69,0x65,0x77,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,
+0x00,0x64,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,
+0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,
+0x68,0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x69,0x6e,0x69,0x74,0x5f,0x64,0x69,0x72,0x00,0x2e,0x2f,0x00,
+0x00,0x6c,0x69,0x73,0x74,0x5f,0x76,0x69,0x65,0x77,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x64,0x00,0x00,0x00,0xa6,0xff,0xff,0xff,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,
+0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x31,
+0x30,0x30,0x25,0x2c,0x68,0x3d,0x2d,0x39,0x30,0x29,0x00,0x69,0x74,0x65,0x6d,0x5f,0x68,0x65,0x69,0x67,
+0x68,0x74,0x00,0x34,0x30,0x00,0x00,0x73,0x63,0x72,0x6f,0x6c,0x6c,0x5f,0x76,0x69,0x65,0x77,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,
+0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,
+0x3d,0x30,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,0x68,0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x6e,0x61,
+0x6d,0x65,0x00,0x63,0x6f,0x6e,0x74,0x61,0x69,0x6e,0x65,0x72,0x00,0x00,0x6c,0x69,0x73,0x74,0x5f,0x69,
+0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x72,0x65,0x74,0x75,0x72,0x6e,0x5f,0x75,0x70,0x00,0x73,0x74,0x79,
+0x6c,0x65,0x00,0x6f,0x64,0x64,0x5f,0x63,0x6c,0x69,0x63,0x6b,0x61,0x62,0x6c,0x65,0x00,0x63,0x68,0x69,
+0x6c,0x64,0x72,0x65,0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,
+0x28,0x72,0x6f,0x77,0x73,0x3d,0x31,0x2c,0x63,0x6f,0x6c,0x73,0x3d,0x30,0x29,0x00,0x00,0x69,0x6d,0x61,
+0x67,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x64,0x72,0x61,0x77,0x5f,
+0x74,0x79,0x70,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x72,0x65,0x74,0x75,
+0x72,0x6e,0x5f,0x75,0x70,0x00,0x00,0x00,0x6c,0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,
+0x00,0x6e,0x61,0x6d,0x65,0x00,0x74,0x72,0x5f,0x74,0x65,0x78,0x74,0x00,0x55,0x70,0x00,0x00,0x00,0x00,
+0x6c,0x69,0x73,0x74,0x5f,0x69,0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x66,0x69,0x6c,0x65,0x00,0x73,0x74,
+0x79,0x6c,0x65,0x00,0x6f,0x64,0x64,0x5f,0x63,0x6c,0x69,0x63,0x6b,0x61,0x62,0x6c,0x65,0x00,0x66,0x6f,
+0x63,0x75,0x73,0x61,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,
+0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x72,0x6f,0x77,
+0x73,0x3d,0x31,0x2c,0x63,0x6f,0x6c,0x73,0x3d,0x30,0x29,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x6e,0x61,0x6d,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x64,0x72,0x61,0x77,0x5f,0x74,0x79,0x70,0x65,
+0x00,0x69,0x63,0x6f,0x6e,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x66,0x69,0x6c,0x65,0x00,0x00,0x00,0x6c,
+0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe2,
+0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,
+0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x2d,0x33,0x30,
+0x2c,0x68,0x3d,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6e,0x61,0x6d,0x65,0x00,0x74,0x65,0x78,0x74,
+0x00,0x00,0x00,0x00,0x00,0x6c,0x69,0x73,0x74,0x5f,0x69,0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x66,0x6f,
+0x6c,0x64,0x65,0x72,0x00,0x73,0x74,0x79,0x6c,0x65,0x00,0x6f,0x64,0x64,0x5f,0x63,0x6c,0x69,0x63,0x6b,
+0x61,0x62,0x6c,0x65,0x00,0x66,0x6f,0x63,0x75,0x73,0x61,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,
+0x63,0x68,0x69,0x6c,0x64,0x72,0x65,0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,
+0x75,0x6c,0x74,0x28,0x72,0x6f,0x77,0x73,0x3d,0x31,0x2c,0x63,0x6f,0x6c,0x73,0x3d,0x30,0x29,0x00,0x00,
+0x69,0x6d,0x61,0x67,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x64,0x72,
+0x61,0x77,0x5f,0x74,0x79,0x70,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x66,
+0x6f,0x6c,0x64,0x65,0x72,0x00,0x00,0x00,0x6c,0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe2,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,
+0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,
+0x79,0x3d,0x30,0x2c,0x77,0x3d,0x2d,0x33,0x30,0x2c,0x68,0x3d,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,
+0x6e,0x61,0x6d,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x63,0x72,0x6f,0x6c,
+0x6c,0x5f,0x62,0x61,0x72,0x5f,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x64,
+0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,
+0x6c,0x74,0x28,0x78,0x3d,0x72,0x69,0x67,0x68,0x74,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x36,0x2c,0x68,
+0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x62,0x61,0x72,0x00,0x76,0x61,0x6c,0x75,
+0x65,0x00,0x30,0x00,0x00,0x00,0x00,0x65,0x64,0x69,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xec,0xff,0xff,0xff,0x1e,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,
+0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x31,0x30,0x2c,
+0x79,0x3d,0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x35,0x30,0x2c,0x77,0x3d,0x2d,0x32,0x30,0x2c,0x68,0x3d,
+0x33,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x73,0x65,0x6c,0x65,0x63,0x74,0x65,0x64,0x5f,0x66,0x69,
+0x6c,0x65,0x00,0x72,0x65,0x61,0x64,0x6f,0x6e,0x6c,0x79,0x00,0x74,0x72,0x75,0x65,0x00,0x00,0x00,0x62,
+0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,
+0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,
+0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x63,0x3a,0x2d,0x38,0x30,0x2c,0x79,0x3d,0x62,0x6f,0x74,
+0x74,0x6f,0x6d,0x3a,0x31,0x30,0x2c,0x77,0x3d,0x38,0x30,0x2c,0x68,0x3d,0x33,0x30,0x29,0x00,0x6e,0x61,
+0x6d,0x65,0x00,0x6f,0x6b,0x00,0x74,0x65,0x78,0x74,0x00,0x4f,0x4b,0x00,0x00,0x00,0x62,0x75,0x74,0x74,
+0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,
+0x1e,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,
+0x75,0x6c,0x74,0x28,0x78,0x3d,0x63,0x3a,0x38,0x30,0x2c,0x79,0x3d,0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,
+0x31,0x30,0x2c,0x77,0x3d,0x38,0x30,0x2c,0x68,0x3d,0x33,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,
+0x61,0x6e,0x63,0x65,0x6c,0x00,0x74,0x65,0x78,0x74,0x00,0x43,0x61,0x6e,0x63,0x65,0x6c,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,};/*1886*/
diff --git a/demos/assets/default/inc/ui/file_chooser_for_save.data b/demos/assets/default/inc/ui/file_chooser_for_save.data
new file mode 100644
index 000000000..39d00bb10
--- /dev/null
+++ b/demos/assets/default/inc/ui/file_chooser_for_save.data
@@ -0,0 +1,95 @@
+TK_CONST_DATA_ALIGN(const unsigned char ui_file_chooser_for_save[]) = {
+0x04,0x00,0x01,0x01,0x20,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x69,0x6c,0x65,0x5f,0x63,0x68,0x6f,
+0x6f,0x73,0x65,0x72,0x5f,0x66,0x6f,0x72,0x5f,0x73,0x61,0x76,0x65,0x00,0x64,0x61,0x74,0x61,0x00,0x00,
+0x00,0x00,0x00,0x00,0x12,0x12,0x22,0x11,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0x6e,0x69,0x6d,
+0x5f,0x68,0x69,0x6e,0x74,0x00,0x68,0x74,0x72,0x61,0x6e,0x73,0x6c,0x61,0x74,0x65,0x00,0x74,0x68,0x65,
+0x6d,0x65,0x00,0x66,0x69,0x6c,0x65,0x5f,0x62,0x72,0x6f,0x77,0x73,0x65,0x72,0x00,0x00,0x66,0x69,0x6c,
+0x65,0x5f,0x62,0x72,0x6f,0x77,0x73,0x65,0x72,0x5f,0x76,0x69,0x65,0x77,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,
+0x00,0x64,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,
+0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,
+0x68,0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x69,0x6e,0x69,0x74,0x5f,0x64,0x69,0x72,0x00,0x2e,0x2f,0x00,
+0x00,0x6c,0x69,0x73,0x74,0x5f,0x76,0x69,0x65,0x77,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x64,0x00,0x00,0x00,0xa6,0xff,0xff,0xff,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,
+0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x31,
+0x30,0x30,0x25,0x2c,0x68,0x3d,0x2d,0x39,0x30,0x29,0x00,0x69,0x74,0x65,0x6d,0x5f,0x68,0x65,0x69,0x67,
+0x68,0x74,0x00,0x34,0x30,0x00,0x00,0x73,0x63,0x72,0x6f,0x6c,0x6c,0x5f,0x76,0x69,0x65,0x77,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,
+0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,
+0x3d,0x30,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,0x68,0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x6e,0x61,
+0x6d,0x65,0x00,0x63,0x6f,0x6e,0x74,0x61,0x69,0x6e,0x65,0x72,0x00,0x00,0x6c,0x69,0x73,0x74,0x5f,0x69,
+0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x72,0x65,0x74,0x75,0x72,0x6e,0x5f,0x75,0x70,0x00,0x73,0x74,0x79,
+0x6c,0x65,0x00,0x6f,0x64,0x64,0x5f,0x63,0x6c,0x69,0x63,0x6b,0x61,0x62,0x6c,0x65,0x00,0x63,0x68,0x69,
+0x6c,0x64,0x72,0x65,0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,
+0x28,0x72,0x6f,0x77,0x73,0x3d,0x31,0x2c,0x63,0x6f,0x6c,0x73,0x3d,0x30,0x29,0x00,0x00,0x69,0x6d,0x61,
+0x67,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x64,0x72,0x61,0x77,0x5f,
+0x74,0x79,0x70,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x72,0x65,0x74,0x75,
+0x72,0x6e,0x5f,0x75,0x70,0x00,0x00,0x00,0x6c,0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,
+0x00,0x6e,0x61,0x6d,0x65,0x00,0x74,0x72,0x5f,0x74,0x65,0x78,0x74,0x00,0x55,0x70,0x00,0x00,0x00,0x00,
+0x6c,0x69,0x73,0x74,0x5f,0x69,0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x66,0x69,0x6c,0x65,0x00,0x73,0x74,
+0x79,0x6c,0x65,0x00,0x6f,0x64,0x64,0x5f,0x63,0x6c,0x69,0x63,0x6b,0x61,0x62,0x6c,0x65,0x00,0x66,0x6f,
+0x63,0x75,0x73,0x61,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,
+0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x72,0x6f,0x77,
+0x73,0x3d,0x31,0x2c,0x63,0x6f,0x6c,0x73,0x3d,0x30,0x29,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x6e,0x61,0x6d,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x64,0x72,0x61,0x77,0x5f,0x74,0x79,0x70,0x65,
+0x00,0x69,0x63,0x6f,0x6e,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x66,0x69,0x6c,0x65,0x00,0x00,0x00,0x6c,
+0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe2,
+0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,
+0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x2d,0x33,0x30,
+0x2c,0x68,0x3d,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6e,0x61,0x6d,0x65,0x00,0x74,0x65,0x78,0x74,
+0x00,0x00,0x00,0x00,0x00,0x6c,0x69,0x73,0x74,0x5f,0x69,0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x66,0x6f,
+0x6c,0x64,0x65,0x72,0x00,0x73,0x74,0x79,0x6c,0x65,0x00,0x6f,0x64,0x64,0x5f,0x63,0x6c,0x69,0x63,0x6b,
+0x61,0x62,0x6c,0x65,0x00,0x66,0x6f,0x63,0x75,0x73,0x61,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,
+0x63,0x68,0x69,0x6c,0x64,0x72,0x65,0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,
+0x75,0x6c,0x74,0x28,0x72,0x6f,0x77,0x73,0x3d,0x31,0x2c,0x63,0x6f,0x6c,0x73,0x3d,0x30,0x29,0x00,0x00,
+0x69,0x6d,0x61,0x67,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x64,0x72,
+0x61,0x77,0x5f,0x74,0x79,0x70,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x66,
+0x6f,0x6c,0x64,0x65,0x72,0x00,0x00,0x00,0x6c,0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe2,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,
+0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,
+0x79,0x3d,0x30,0x2c,0x77,0x3d,0x2d,0x33,0x30,0x2c,0x68,0x3d,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,
+0x6e,0x61,0x6d,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x63,0x72,0x6f,0x6c,
+0x6c,0x5f,0x62,0x61,0x72,0x5f,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x64,
+0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,
+0x6c,0x74,0x28,0x78,0x3d,0x72,0x69,0x67,0x68,0x74,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x36,0x2c,0x68,
+0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x62,0x61,0x72,0x00,0x76,0x61,0x6c,0x75,
+0x65,0x00,0x30,0x00,0x00,0x00,0x00,0x65,0x64,0x69,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0a,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xec,0xff,0xff,0xff,0x1e,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,
+0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x31,0x30,0x2c,
+0x79,0x3d,0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x35,0x30,0x2c,0x77,0x3d,0x2d,0x32,0x30,0x2c,0x68,0x3d,
+0x33,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x73,0x65,0x6c,0x65,0x63,0x74,0x65,0x64,0x5f,0x66,0x69,
+0x6c,0x65,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,
+0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x63,0x3a,0x2d,0x38,0x30,
+0x2c,0x79,0x3d,0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x31,0x30,0x2c,0x77,0x3d,0x38,0x30,0x2c,0x68,0x3d,
+0x33,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x6b,0x00,0x74,0x65,0x78,0x74,0x00,0x4f,0x4b,0x00,
+0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x50,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,
+0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x63,0x3a,0x38,0x30,0x2c,0x79,0x3d,0x62,
+0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x31,0x30,0x2c,0x77,0x3d,0x38,0x30,0x2c,0x68,0x3d,0x33,0x30,0x29,0x00,
+0x6e,0x61,0x6d,0x65,0x00,0x63,0x61,0x6e,0x63,0x65,0x6c,0x00,0x74,0x65,0x78,0x74,0x00,0x43,0x61,0x6e,
+0x63,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*1872*/
diff --git a/demos/assets/default/inc/ui/folder_chooser.data b/demos/assets/default/inc/ui/folder_chooser.data
new file mode 100644
index 000000000..774488856
--- /dev/null
+++ b/demos/assets/default/inc/ui/folder_chooser.data
@@ -0,0 +1,89 @@
+TK_CONST_DATA_ALIGN(const unsigned char ui_folder_chooser[]) = {
+0x04,0x00,0x01,0x01,0xaa,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x6f,0x6c,0x64,0x65,0x72,0x5f,0x63,
+0x68,0x6f,0x6f,0x73,0x65,0x72,0x00,0x64,0x61,0x74,0x61,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x12,0x12,0x22,0x11,0x77,0x69,0x6e,0x64,0x6f,0x77,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x61,0x6e,0x69,0x6d,
+0x5f,0x68,0x69,0x6e,0x74,0x00,0x68,0x74,0x72,0x61,0x6e,0x73,0x6c,0x61,0x74,0x65,0x00,0x74,0x68,0x65,
+0x6d,0x65,0x00,0x66,0x69,0x6c,0x65,0x5f,0x62,0x72,0x6f,0x77,0x73,0x65,0x72,0x00,0x00,0x66,0x69,0x6c,
+0x65,0x5f,0x62,0x72,0x6f,0x77,0x73,0x65,0x72,0x5f,0x76,0x69,0x65,0x77,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,
+0x00,0x64,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,
+0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,
+0x68,0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x69,0x6e,0x69,0x74,0x5f,0x64,0x69,0x72,0x00,0x2e,0x2f,0x00,
+0x00,0x6c,0x69,0x73,0x74,0x5f,0x76,0x69,0x65,0x77,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x64,0x00,0x00,0x00,0xc4,0xff,0xff,0xff,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,
+0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x31,
+0x30,0x30,0x25,0x2c,0x68,0x3d,0x2d,0x36,0x30,0x29,0x00,0x69,0x74,0x65,0x6d,0x5f,0x68,0x65,0x69,0x67,
+0x68,0x74,0x00,0x34,0x30,0x00,0x00,0x73,0x63,0x72,0x6f,0x6c,0x6c,0x5f,0x76,0x69,0x65,0x77,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x64,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,
+0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,
+0x3d,0x30,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,0x68,0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x6e,0x61,
+0x6d,0x65,0x00,0x63,0x6f,0x6e,0x74,0x61,0x69,0x6e,0x65,0x72,0x00,0x00,0x6c,0x69,0x73,0x74,0x5f,0x69,
+0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x72,0x65,0x74,0x75,0x72,0x6e,0x5f,0x75,0x70,0x00,0x73,0x74,0x79,
+0x6c,0x65,0x00,0x6f,0x64,0x64,0x5f,0x63,0x6c,0x69,0x63,0x6b,0x61,0x62,0x6c,0x65,0x00,0x63,0x68,0x69,
+0x6c,0x64,0x72,0x65,0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,
+0x28,0x72,0x6f,0x77,0x73,0x3d,0x31,0x2c,0x63,0x6f,0x6c,0x73,0x3d,0x30,0x29,0x00,0x00,0x69,0x6d,0x61,
+0x67,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x64,0x72,0x61,0x77,0x5f,
+0x74,0x79,0x70,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x72,0x65,0x74,0x75,
+0x72,0x6e,0x5f,0x75,0x70,0x00,0x00,0x00,0x6c,0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,
+0x00,0x6e,0x61,0x6d,0x65,0x00,0x74,0x72,0x5f,0x74,0x65,0x78,0x74,0x00,0x55,0x70,0x00,0x00,0x00,0x00,
+0x6c,0x69,0x73,0x74,0x5f,0x69,0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x66,0x69,0x6c,0x65,0x00,0x73,0x74,
+0x79,0x6c,0x65,0x00,0x6f,0x64,0x64,0x5f,0x63,0x6c,0x69,0x63,0x6b,0x61,0x62,0x6c,0x65,0x00,0x66,0x6f,
+0x63,0x75,0x73,0x61,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,0x63,0x68,0x69,0x6c,0x64,0x72,0x65,
+0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x72,0x6f,0x77,
+0x73,0x3d,0x31,0x2c,0x63,0x6f,0x6c,0x73,0x3d,0x30,0x29,0x00,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x6e,0x61,0x6d,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x64,0x72,0x61,0x77,0x5f,0x74,0x79,0x70,0x65,
+0x00,0x69,0x63,0x6f,0x6e,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x66,0x69,0x6c,0x65,0x00,0x00,0x00,0x6c,
+0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe2,
+0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,
+0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x2d,0x33,0x30,
+0x2c,0x68,0x3d,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6e,0x61,0x6d,0x65,0x00,0x74,0x65,0x78,0x74,
+0x00,0x00,0x00,0x00,0x00,0x6c,0x69,0x73,0x74,0x5f,0x69,0x74,0x65,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x66,0x6f,
+0x6c,0x64,0x65,0x72,0x00,0x73,0x74,0x79,0x6c,0x65,0x00,0x6f,0x64,0x64,0x5f,0x63,0x6c,0x69,0x63,0x6b,
+0x61,0x62,0x6c,0x65,0x00,0x66,0x6f,0x63,0x75,0x73,0x61,0x62,0x6c,0x65,0x00,0x74,0x72,0x75,0x65,0x00,
+0x63,0x68,0x69,0x6c,0x64,0x72,0x65,0x6e,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,
+0x75,0x6c,0x74,0x28,0x72,0x6f,0x77,0x73,0x3d,0x31,0x2c,0x63,0x6f,0x6c,0x73,0x3d,0x30,0x29,0x00,0x00,
+0x69,0x6d,0x61,0x67,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x1e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x64,0x72,
+0x61,0x77,0x5f,0x74,0x79,0x70,0x65,0x00,0x69,0x63,0x6f,0x6e,0x00,0x69,0x6d,0x61,0x67,0x65,0x00,0x66,
+0x6f,0x6c,0x64,0x65,0x72,0x00,0x00,0x00,0x6c,0x61,0x62,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe2,0xff,0xff,0xff,0x00,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,
+0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x30,0x2c,
+0x79,0x3d,0x30,0x2c,0x77,0x3d,0x2d,0x33,0x30,0x2c,0x68,0x3d,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,
+0x6e,0x61,0x6d,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x63,0x72,0x6f,0x6c,
+0x6c,0x5f,0x62,0x61,0x72,0x5f,0x6d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x64,
+0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,
+0x6c,0x74,0x28,0x78,0x3d,0x72,0x69,0x67,0x68,0x74,0x2c,0x79,0x3d,0x30,0x2c,0x77,0x3d,0x36,0x2c,0x68,
+0x3d,0x31,0x30,0x30,0x25,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x62,0x61,0x72,0x00,0x76,0x61,0x6c,0x75,
+0x65,0x00,0x30,0x00,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,
+0x6c,0x61,0x79,0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x63,0x3a,0x2d,
+0x38,0x30,0x2c,0x79,0x3d,0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x31,0x30,0x2c,0x77,0x3d,0x38,0x30,0x2c,
+0x68,0x3d,0x33,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x6b,0x00,0x74,0x65,0x78,0x74,0x00,0x4f,
+0x4b,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x73,0x65,0x6c,0x66,0x5f,0x6c,0x61,0x79,
+0x6f,0x75,0x74,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x28,0x78,0x3d,0x63,0x3a,0x38,0x30,0x2c,0x79,
+0x3d,0x62,0x6f,0x74,0x74,0x6f,0x6d,0x3a,0x31,0x30,0x2c,0x77,0x3d,0x38,0x30,0x2c,0x68,0x3d,0x33,0x30,
+0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x61,0x6e,0x63,0x65,0x6c,0x00,0x74,0x65,0x78,0x74,0x00,0x43,
+0x61,0x6e,0x63,0x65,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*1754*/
diff --git a/demos/assets/default/raw/styles/file_browser.bin b/demos/assets/default/raw/styles/file_browser.bin
new file mode 100644
index 000000000..b5a9f3e5e
Binary files /dev/null and b/demos/assets/default/raw/styles/file_browser.bin differ
diff --git a/demos/assets/default/raw/styles/file_browser.xml b/demos/assets/default/raw/styles/file_browser.xml
new file mode 100644
index 000000000..388c75404
--- /dev/null
+++ b/demos/assets/default/raw/styles/file_browser.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
diff --git a/demos/assets/default/raw/ui/file_browser.bin b/demos/assets/default/raw/ui/file_browser.bin
new file mode 100644
index 000000000..91d1ea6e8
Binary files /dev/null and b/demos/assets/default/raw/ui/file_browser.bin differ
diff --git a/demos/assets/default/raw/ui/file_browser.xml b/demos/assets/default/raw/ui/file_browser.xml
new file mode 100644
index 000000000..45cab91dd
--- /dev/null
+++ b/demos/assets/default/raw/ui/file_browser.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/demos/assets/default/raw/ui/file_browser_view_simple.xml b/demos/assets/default/raw/ui/file_browser_view_simple.xml
deleted file mode 100644
index 67bf41c43..000000000
--- a/demos/assets/default/raw/ui/file_browser_view_simple.xml
+++ /dev/null
@@ -1,46 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/demos/assets/default/raw/ui/file_chooser_for_open.bin b/demos/assets/default/raw/ui/file_chooser_for_open.bin
new file mode 100644
index 000000000..fe255c08c
Binary files /dev/null and b/demos/assets/default/raw/ui/file_chooser_for_open.bin differ
diff --git a/demos/assets/default/raw/ui/file_chooser_for_open.xml b/demos/assets/default/raw/ui/file_chooser_for_open.xml
new file mode 100644
index 000000000..3b5933ca6
--- /dev/null
+++ b/demos/assets/default/raw/ui/file_chooser_for_open.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demos/assets/default/raw/ui/file_chooser_for_save.bin b/demos/assets/default/raw/ui/file_chooser_for_save.bin
new file mode 100644
index 000000000..03e8c3528
Binary files /dev/null and b/demos/assets/default/raw/ui/file_chooser_for_save.bin differ
diff --git a/demos/assets/default/raw/ui/file_chooser_for_save.xml b/demos/assets/default/raw/ui/file_chooser_for_save.xml
new file mode 100644
index 000000000..c79d6e78e
--- /dev/null
+++ b/demos/assets/default/raw/ui/file_chooser_for_save.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demos/assets/default/raw/ui/folder_chooser.bin b/demos/assets/default/raw/ui/folder_chooser.bin
new file mode 100644
index 000000000..039fcc1de
Binary files /dev/null and b/demos/assets/default/raw/ui/folder_chooser.bin differ
diff --git a/demos/assets/default/raw/ui/folder_chooser.xml b/demos/assets/default/raw/ui/folder_chooser.xml
new file mode 100644
index 000000000..ed2107216
--- /dev/null
+++ b/demos/assets/default/raw/ui/folder_chooser.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/demos/demo_file_browser.c b/demos/demo_file_browser.c
new file mode 100644
index 000000000..7e81e6bdb
--- /dev/null
+++ b/demos/demo_file_browser.c
@@ -0,0 +1,88 @@
+/**
+ * File: demo_file_browser.c
+ * Author: AWTK Develop Team
+ * Brief: basic demo
+ *
+ * Copyright (c) 2020 - 2020 Guangzhou ZHIYUAN Electronics Co.,Ltd.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * License file for more details.
+ *
+ */
+
+/**
+ * History:
+ * ================================================================
+ * 2020-01-12 Li XianJing created
+ *
+ */
+
+#include "awtk.h"
+#include "ext_widgets/file_browser/file_chooser.h"
+
+static ret_t on_quit(void* ctx, event_t* e) {
+ tk_quit();
+ return RET_OK;
+}
+
+static ret_t tk_on_choose_file_result(file_chooser_t* chooser) {
+ widget_t* win = WIDGET(chooser->on_result_ctx);
+ widget_t* cwd = widget_lookup(win, "cwd", TRUE);
+ widget_t* filename = widget_lookup(win, "filename", TRUE);
+ if (chooser->aborted) {
+ widget_set_text_utf8(cwd, "aborted");
+ widget_set_text_utf8(filename, "aborted");
+ } else {
+ widget_set_text_utf8(cwd, chooser->cwd.str);
+ widget_set_text_utf8(filename, chooser->filename.str);
+ }
+
+ return RET_OK;
+}
+
+static ret_t on_file_save(void* ctx, event_t* e) {
+ file_chooser_t* chooser = file_chooser_create("./", NULL);
+ file_chooser_set_on_result(chooser, tk_on_choose_file_result, ctx);
+
+ return file_chooser_choose_file_for_save(chooser);
+}
+
+static ret_t on_file_open(void* ctx, event_t* e) {
+ file_chooser_t* chooser = file_chooser_create("./", NULL);
+ file_chooser_set_on_result(chooser, tk_on_choose_file_result, ctx);
+
+ return file_chooser_choose_file_for_open(chooser);
+}
+
+static ret_t on_choose_folder(void* ctx, event_t* e) {
+ file_chooser_t* chooser = file_chooser_create("./", NULL);
+ return_value_if_fail(chooser != NULL, RET_OOM);
+ file_chooser_set_on_result(chooser, tk_on_choose_file_result, ctx);
+
+ return file_chooser_choose_folder(chooser);
+}
+
+static ret_t on_manager(void* ctx, event_t* e) {
+ file_chooser_t* chooser = file_chooser_create("./", NULL);
+ return_value_if_fail(chooser != NULL, RET_OOM);
+ file_chooser_set_on_result(chooser, tk_on_choose_file_result, ctx);
+
+ return file_chooser_choose_folder(chooser);
+}
+
+ret_t application_init() {
+ widget_t* win = NULL;
+ tk_ext_widgets_init();
+
+ win = window_open("file_browser");
+
+ widget_child_on(win, "file_save", EVT_CLICK, on_file_save, win);
+ widget_child_on(win, "file_open", EVT_CLICK, on_file_open, win);
+ widget_child_on(win, "folder", EVT_CLICK, on_choose_folder, win);
+ widget_child_on(win, "manager", EVT_CLICK, on_manager, win);
+ widget_child_on(win, "quit", EVT_CLICK, on_quit, win);
+
+ return RET_OK;
+}
diff --git a/src/ext_widgets/file_browser/file_browser_view.c b/src/ext_widgets/file_browser/file_browser_view.c
index 7303479f4..cabcd815e 100644
--- a/src/ext_widgets/file_browser/file_browser_view.c
+++ b/src/ext_widgets/file_browser/file_browser_view.c
@@ -31,7 +31,7 @@
#ifndef FB_DATE_TIME_FORMAT
#define FB_DATE_TIME_FORMAT "YY-MM-DD hh:mm:ss"
-#endif/*FB_DATE_TIME_FORMAT*/
+#endif /*FB_DATE_TIME_FORMAT*/
static ret_t file_browser_view_reload(widget_t* widget);
@@ -198,6 +198,10 @@ static ret_t file_browser_view_on_item_clicked(void* ctx, event_t* e) {
str_set(&(file_browser_view->value), file_browser_view->fb->cwd);
str_append_char(&(file_browser_view->value), TK_PATH_SEP);
str_append(&(file_browser_view->value), info->name);
+
+ if (file_browser_view->selected_file != NULL) {
+ widget_set_text_utf8(file_browser_view->selected_file, info->name);
+ }
}
widget_dispatch_simple_event(WIDGET(ctx), EVT_VALUE_CHANGED);
@@ -304,19 +308,19 @@ static ret_t file_browser_view_reload(widget_t* widget) {
if (item_child != NULL) {
widget_set_text_utf8(item_child, info->name);
}
-
+
item_child = widget_lookup(item, FILE_BROWSER_VIEW_SIZE, TRUE);
if (item_child != NULL) {
wstr_t* str = &(item_child->text);
wstr_from_int(str, info->size);
}
-
+
item_child = widget_lookup(item, FILE_BROWSER_VIEW_MTIME, TRUE);
if (item_child != NULL) {
wstr_t* str = &(item_child->text);
wstr_format_time(str, FB_DATE_TIME_FORMAT, info->mtime);
}
-
+
item_child = widget_lookup(item, FILE_BROWSER_VIEW_CTIME, TRUE);
if (item_child != NULL) {
wstr_t* str = &(item_child->text);
@@ -338,6 +342,7 @@ static ret_t file_browser_view_init_ui(widget_t* widget) {
return_value_if_fail(container != NULL, RET_BAD_PARAMS);
file_browser_view->container = container;
file_browser_view->cwd = widget_lookup(widget, FILE_BROWSER_VIEW_CWD, TRUE);
+ file_browser_view->selected_file = widget_lookup(widget, FILE_BROWSER_VIEW_SELECTED_FILE, TRUE);
template = widget_lookup(container, FILE_BROWSER_VIEW_FILE, TRUE);
return_value_if_fail(template != NULL, RET_BAD_PARAMS);
diff --git a/src/ext_widgets/file_browser/file_browser_view.h b/src/ext_widgets/file_browser/file_browser_view.h
index 272bb347e..859401639 100644
--- a/src/ext_widgets/file_browser/file_browser_view.h
+++ b/src/ext_widgets/file_browser/file_browser_view.h
@@ -75,6 +75,7 @@ typedef struct _file_browser_view_t {
file_browser_t* fb;
widget_t* cwd;
+ widget_t* selected_file;
widget_t* container;
widget_t* file_template;
widget_t* folder_template;
@@ -271,6 +272,7 @@ ret_t file_browser_view_register(void);
/*用于显示当前路径的控件*/
#define FILE_BROWSER_VIEW_CWD "cwd"
+#define FILE_BROWSER_VIEW_SELECTED_FILE "selected_file"
/*用于显示名称的控件*/
#define FILE_BROWSER_VIEW_NAME "name"
diff --git a/src/ext_widgets/file_browser/file_chooser.c b/src/ext_widgets/file_browser/file_chooser.c
new file mode 100644
index 000000000..b9cc6b5b6
--- /dev/null
+++ b/src/ext_widgets/file_browser/file_chooser.c
@@ -0,0 +1,134 @@
+/**
+ * File: file_chooser.c
+ * Author: AWTK Develop Team
+ * Brief: file/folder choosers
+ *
+ * Copyright (c) 2020 - 2020 Guangzhou ZHIYUAN Electronics Co.,Ltd.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * License file for more details.
+ *
+ */
+
+/**
+ * History:
+ * ================================================================
+ * 2020-01-12 Li XianJing created
+ *
+ */
+
+#include "tkc/mem.h"
+#include "tkc/utils.h"
+#include "base/window.h"
+#include "file_browser/file_chooser.h"
+#include "file_browser/file_browser_view.h"
+
+file_chooser_t* file_chooser_create(const char* init_dir, const char* filter) {
+ file_chooser_t* chooser = TKMEM_ZALLOC(file_chooser_t);
+ return_value_if_fail(chooser != NULL, NULL);
+
+ chooser->init_dir = tk_str_copy(chooser->init_dir, init_dir);
+ chooser->filter = tk_str_copy(chooser->filter, filter);
+ str_init(&(chooser->cwd), 0);
+ str_init(&(chooser->filename), 0);
+
+ return chooser;
+}
+
+ret_t file_chooser_set_on_result(file_chooser_t* chooser, file_chooser_on_result_t on_result,
+ void* on_result_ctx) {
+ return_value_if_fail(chooser != NULL && on_result != NULL, RET_BAD_PARAMS);
+
+ chooser->on_result = on_result;
+ chooser->on_result_ctx = on_result_ctx;
+
+ return RET_OK;
+}
+
+static ret_t file_choose_on_click_to_close(void* ctx, event_t* e) {
+ widget_t* win = widget_get_window(WIDGET(e->target));
+ file_chooser_t* chooser = (file_chooser_t*)ctx;
+ widget_t* widget = widget_lookup_by_type(win, WIDGET_TYPE_FILE_BROWSER_VIEW, TRUE);
+ file_browser_view_t* file_browser = FILE_BROWSER_VIEW(widget);
+
+ chooser->aborted = FALSE;
+ if (chooser->on_result != NULL) {
+ chooser->on_result(chooser);
+ }
+
+ widget_close_window(win);
+ file_chooser_destroy(chooser);
+
+ return RET_OK;
+}
+
+static ret_t file_choose_on_ok(void* ctx, event_t* e) {
+ widget_t* win = widget_get_window(WIDGET(e->target));
+ file_chooser_t* chooser = (file_chooser_t*)ctx;
+ widget_t* widget = widget_lookup_by_type(win, WIDGET_TYPE_FILE_BROWSER_VIEW, TRUE);
+ file_browser_view_t* file_browser = FILE_BROWSER_VIEW(widget);
+ widget_t* selected_file = widget_lookup(widget, FILE_BROWSER_VIEW_SELECTED_FILE, TRUE);
+
+ str_set(&(chooser->cwd), file_browser_view_get_cwd(widget));
+ if (selected_file != NULL) {
+ str_from_wstr(&(chooser->filename), selected_file->text.str);
+ }
+
+ chooser->aborted = FALSE;
+ if (chooser->on_result != NULL) {
+ if (chooser->on_result(chooser) == RET_OK) {
+ widget_close_window(win);
+ file_chooser_destroy(chooser);
+ }
+ }
+
+ return RET_OK;
+}
+
+ret_t file_chooser_choose(file_chooser_t* chooser) {
+ widget_t* win = window_open(chooser->ui);
+
+ widget_child_on(win, "ok", EVT_CLICK, file_choose_on_ok, chooser);
+ widget_child_on(win, "cancel", EVT_CLICK, file_choose_on_click_to_close, chooser);
+ widget_child_on(win, "close", EVT_CLICK, file_choose_on_click_to_close, chooser);
+
+ return RET_OK;
+}
+
+ret_t file_chooser_choose_file_for_save(file_chooser_t* chooser) {
+ return_value_if_fail(chooser != NULL && chooser->on_result != NULL, RET_BAD_PARAMS);
+
+ chooser->ui = FILE_CHOOSER_UI_CHOOSE_FILE_FOR_SAVE;
+
+ return file_chooser_choose(chooser);
+}
+
+ret_t file_chooser_choose_file_for_open(file_chooser_t* chooser) {
+ return_value_if_fail(chooser != NULL && chooser->on_result != NULL, RET_BAD_PARAMS);
+ chooser->ui = FILE_CHOOSER_UI_CHOOSE_FILE_FOR_OPEN;
+
+ return file_chooser_choose(chooser);
+}
+
+ret_t file_chooser_choose_folder(file_chooser_t* chooser) {
+ return_value_if_fail(chooser != NULL && chooser->on_result != NULL, RET_BAD_PARAMS);
+
+ chooser->ui = FILE_CHOOSER_UI_CHOOSE_FOLDER;
+
+ return file_chooser_choose(chooser);
+}
+
+ret_t file_chooser_destroy(file_chooser_t* chooser) {
+ return_value_if_fail(chooser != NULL, RET_BAD_PARAMS);
+
+ str_reset(&(chooser->cwd));
+ str_reset(&(chooser->filename));
+
+ TKMEM_FREE(chooser->filter);
+ TKMEM_FREE(chooser->init_dir);
+ TKMEM_FREE(chooser);
+
+ return RET_OK;
+}
diff --git a/src/ext_widgets/file_browser/file_chooser.h b/src/ext_widgets/file_browser/file_chooser.h
new file mode 100644
index 000000000..b30ac3485
--- /dev/null
+++ b/src/ext_widgets/file_browser/file_chooser.h
@@ -0,0 +1,153 @@
+/**
+ * File: file_chooser.h
+ * Author: AWTK Develop Team
+ * Brief: file/folder choosers
+ *
+ * Copyright (c) 2020 - 2020 Guangzhou ZHIYUAN Electronics Co.,Ltd.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * License file for more details.
+ *
+ */
+
+/**
+ * History:
+ * ================================================================
+ * 2020-01-12 Li XianJing created
+ *
+ */
+
+#ifndef TK_FILE_CHOOSER_H
+#define TK_FILE_CHOOSER_H
+
+#include "base/widget.h"
+
+BEGIN_C_DECLS
+
+struct _file_chooser_t;
+typedef struct _file_chooser_t file_chooser_t;
+
+typedef ret_t (*file_chooser_on_result_t)(file_chooser_t* choose);
+
+/**
+ * @class file_chooser_t
+ * 文件/目录选择器
+ */
+typedef struct _file_chooser_t {
+ /**
+ * @property {char*} init_dir
+ * 初始目录。
+ */
+ char* init_dir;
+
+ /**
+ * @property {char*} filter
+ * 过滤规则。
+ */
+ char* filter;
+
+ /**
+ * @property {file_chooser_on_result_t} on_result
+ * 接受结果的回调函数。
+ */
+ file_chooser_on_result_t on_result;
+
+ /**
+ * @property {void*} on_result_ctx
+ * 用户数据。
+ */
+ void* on_result_ctx;
+
+ /*result*/
+ /**
+ * @property {str_t} cwd
+ * 当前路径。
+ */
+ str_t cwd;
+
+ /**
+ * @property {str_t} filename;
+ * 当前选择的文件。
+ */
+ str_t filename;
+
+ /**
+ * @property {bool_t} aborted
+ * 是否取消了选择。
+ */
+ bool_t aborted;
+
+ /*private*/
+ const char* ui;
+} file_chooser_t;
+
+/**
+ * @method file_chooser_create
+ * @annotation ["constructor"]
+ * 创建file_chooser对象
+ *
+ * @return {file_chooser_t*} 对象。
+ */
+file_chooser_t* file_chooser_create(const char* init_dir, const char* filter);
+
+/**
+ * @method file_chooser_set_on_result
+ * @param {file_chooser_t*} chooser file_chooser对象。
+ * @param {file_chooser_on_result_t*} on_result 接受选择结果的回调函数。
+ * @param {void*} on_result_ctx 接受选择结果的回调函数的上下文。
+ *
+ * @return {ret_t} 返回RET_OK表示成功,否则表示失败。
+ */
+ret_t file_chooser_set_on_result(file_chooser_t* chooser, file_chooser_on_result_t on_result,
+ void* on_result_ctx);
+
+/**
+ * @method file_chooser_choose_file_for_save
+ * 为了保存而选择文件。
+ *
+ * @param {file_chooser_t*} chooser file_chooser对象。
+ *
+ * @return {ret_t} 返回RET_OK表示成功,否则表示失败。
+ */
+ret_t file_chooser_choose_file_for_save(file_chooser_t* chooser);
+
+/**
+ * @method file_chooser_choose_file_for_open
+ * 为了打开而选择文件。
+ *
+ * @param {file_chooser_t*} chooser file_chooser对象。
+ *
+ * @return {ret_t} 返回RET_OK表示成功,否则表示失败。
+ */
+ret_t file_chooser_choose_file_for_open(file_chooser_t* chooser);
+
+/**
+ * @method file_chooser_choose_folder
+ * 选择目录。
+ *
+ * @param {file_chooser_t*} chooser file_chooser对象。
+ *
+ * @return {ret_t} 返回RET_OK表示成功,否则表示失败。
+ */
+ret_t file_chooser_choose_folder(file_chooser_t* chooser);
+
+/**
+ * @method file_chooser_destroy
+ * 销毁file_chooser对象。
+ *
+ * @param {file_chooser_t*} chooser file_chooser对象。
+ *
+ * @return {ret_t} 返回RET_OK表示成功,否则表示失败。
+ */
+ret_t file_chooser_destroy(file_chooser_t* chooser);
+
+/*UI 资源文件名*/
+#define FILE_CHOOSER_UI_CHOOSE_FOLDER "folder_chooser"
+#define FILE_CHOOSER_UI_CHOOSE_FILE_FOR_OPEN "file_chooser_for_open"
+#define FILE_CHOOSER_UI_CHOOSE_FILE_FOR_SAVE "file_chooser_for_save"
+
+END_C_DECLS
+
+#endif /*TK_FILE_CHOOSER_H*/
diff --git a/src/tkc/types_def.h b/src/tkc/types_def.h
index ea9c99fa2..db6039b10 100644
--- a/src/tkc/types_def.h
+++ b/src/tkc/types_def.h
@@ -274,6 +274,7 @@ typedef enum _ret_t {
typedef void* (*tk_create_t)(void);
typedef ret_t (*tk_destroy_t)(void* data);
typedef ret_t (*tk_on_done_t)(void* data);
+typedef ret_t (*tk_on_result_t)(void* ctx, const void* data);
typedef bool_t (*tk_is_valid_t)(void* data);
typedef bool_t (*tk_filter_t)(void* ctx, const void* data);
typedef int (*tk_compare_t)(const void* a, const void* b);
diff --git a/src/widgets/combo_box.c b/src/widgets/combo_box.c
index 85b1e0d6d..2bd1a9e4c 100644
--- a/src/widgets/combo_box.c
+++ b/src/widgets/combo_box.c
@@ -310,7 +310,7 @@ static ret_t combo_box_on_event(widget_t* widget, event_t* e) {
}
ret = edit_on_event(widget, e);
- if(edit->readonly) {
+ if (edit->readonly) {
edit_set_cursor(WIDGET(edit), 0);
}