improve slide view

This commit is contained in:
lixianjing 2021-07-29 18:05:00 +08:00
parent 3b5f101bfb
commit 20b0f5e132
17 changed files with 422 additions and 75 deletions

View File

@ -473,7 +473,6 @@ static ret_t on_combo_box_changed(void* ctx, event_t* e) {
static ret_t on_remove_self(void* ctx, event_t* e) {
widget_t* widget = WIDGET(ctx);
widget_remove_child(widget->parent, widget);
widget_destroy(widget);
return RET_OK;
@ -485,8 +484,12 @@ static ret_t on_remove_view(void* ctx, event_t* e) {
while (iter != NULL) {
if (tk_str_eq(widget_get_type(iter), WIDGET_TYPE_VIEW)) {
widget_remove_child(iter->parent, iter);
widget_destroy(iter);
if (iter->parent != NULL &&
tk_str_eq(widget_get_type(iter->parent), WIDGET_TYPE_SLIDE_VIEW)) {
slide_view_remove_index(iter->parent, widget_index_of(iter));
} else {
widget_destroy(iter);
}
return RET_OK;
}
iter = iter->parent;
@ -535,8 +538,19 @@ static ret_t on_remove_tab_idle(const idle_info_t* idle) {
return_value_if_fail(remove_index >= 0, RET_BAD_PARAMS);
widget_remove_child(tab_btn_group, widget_get_child(tab_btn_group, remove_index));
widget_remove_child(pages, widget_get_child(pages, remove_index));
if (tab_btn_group != NULL) {
widget_t* tab_btn = widget_get_child(tab_btn_group, remove_index);
if (tab_btn != NULL) {
widget_destroy(tab_btn);
}
}
if (pages != NULL) {
widget_t* page = widget_get_child(pages, remove_index);
if (page != NULL) {
widget_destroy(page);
}
}
return RET_REMOVE;
}
@ -547,7 +561,7 @@ static ret_t on_remove_tab(void* ctx, event_t* e) {
while (iter != NULL && iter->parent != NULL && iter->parent->parent != NULL) {
if (tk_str_eq(widget_get_type(iter->parent), WIDGET_TYPE_PAGES) ||
tk_str_eq(widget_get_type(iter->parent), WIDGET_TYPE_TAB_BUTTON_GROUP)) {
idle_add(on_remove_tab_idle, (void*)iter);
widget_add_idle(iter, on_remove_tab_idle);
return RET_STOP;
}
iter = iter->parent;

View File

@ -1,12 +1,16 @@
<window anim_hint="htranslate" children_layout="default(h=30,c=1,m=5,s=10)">
<button name="open:slide_view_h" text="slide_view_h"/>
<button name="open:slide_view_h1" text="slide_view_h1"/>
<button name="open:slide_view_h2" text="slide_view_h2"/>
<button name="open:slide_view_v" text="slide_view_v"/>
<button name="open:slide_view_v1" text="slide_view_v1"/>
<button name="open:slide_view_v2" text="slide_view_v2"/>
<button name="open:slide_view_h_loop" text="slide_view_h loop"/>
<button name="open:slide_view_v_loop" text="slide_view_v loop"/>
<button name="open:auto_play_${device_orientation},auto_play" text="auto_play"/>
<button name="close" text="Close"/>
</window>
<window anim_hint="htranslate" name="slide_view">
<scroll_view name="scroll_view" x="0" y="0" w="100%" h="100%" children_layout="default(r=0,c=1,x=5,y=5,s=10)" yslidable="true">
<button name="open:slide_view_h" h="30" text="slide_view_h"/>
<button name="open:slide_view_h1" h="30" text="slide_view_h1"/>
<button name="open:slide_view_h2" h="30" text="slide_view_h2"/>
<button name="open:slide_view_v" h="30" text="slide_view_v"/>
<button name="open:slide_view_v1" h="30" text="slide_view_v1"/>
<button name="open:slide_view_v2" h="30" text="slide_view_v2"/>
<button name="open:slide_view_h_loop" h="30" text="slide_view_h loop"/>
<button name="open:slide_view_v_loop" h="30" text="slide_view_v loop"/>
<button name="open:auto_play_${device_orientation},auto_play" h="30" text="auto_play"/>
<button name="open:slide_view_remove" h="30" text="remove"/>
<button name="open:slide_view_remove_loop" h="30" text="remove loop"/>
<button name="close" h="30" text="Close"/>
</scroll_view>
</window>

View File

@ -0,0 +1,20 @@
<window anim_hint="htranslate" >
<slide_view x="0" y="0" w="100%" h="100%" style="dot" child_number="1" >
<view x="0" y="0" w="100%" h="100%" children_layout="default(c=1,r=3)">
<label name="view_index" text="0"/>
<button x="c" w="50%" h="40" name="clone_view" text="clone"/>
<button x="c" w="50%" h="40" name="remove_view" text="remove"/>
</view>
<view x="0" y="0" w="100%" h="100%" children_layout="default(c=1,r=3)">
<label name="view_index" x="c" text="1"/>
<button x="c" w="50%" h="40" name="clone_view" text="clone"/>
<button x="c" w="50%" h="40" name="remove_view" text="remove"/>
</view>
<view x="0" y="0" w="100%" h="100%" children_layout="default(c=1,r=3)">
<label name="view_index" x="c" text="2"/>
<button x="c" w="50%" h="40" name="clone_view" text="clone"/>
<button x="c" w="50%" h="40" name="remove_view" text="remove"/>
</view>
</slide_view>
<slide_indicator_arc x="0" y="b" w="100%" h="20" default_paint="stroke_dot"/>
</window>

View File

@ -0,0 +1,20 @@
<window anim_hint="htranslate" >
<slide_view x="0" y="0" w="100%" h="100%" style="dot" child_number="1" loop="true">
<view x="0" y="0" w="100%" h="100%" children_layout="default(c=1,r=3)">
<label name="view_index" text="0"/>
<button x="c" w="50%" h="40" name="clone_view" text="clone"/>
<button x="c" w="50%" h="40" name="remove_view" text="remove"/>
</view>
<view x="0" y="0" w="100%" h="100%" children_layout="default(c=1,r=3)">
<label name="view_index" x="c" text="1"/>
<button x="c" w="50%" h="40" name="clone_view" text="clone"/>
<button x="c" w="50%" h="40" name="remove_view" text="remove"/>
</view>
<view x="0" y="0" w="100%" h="100%" children_layout="default(c=1,r=3)">
<label name="view_index" x="c" text="2"/>
<button x="c" w="50%" h="40" name="clone_view" text="clone"/>
<button x="c" w="50%" h="40" name="remove_view" text="remove"/>
</view>
</slide_view>
<slide_indicator_arc x="0" y="b" w="100%" h="20" default_paint="stroke_dot"/>
</window>

View File

@ -3,6 +3,7 @@
2021/07/28
* 完善slide\_menu感谢智明提供补丁
* 修改 agge 兼容没有 d3d 会崩溃的问题(感谢智明提供补丁)。
* 完善slide view删除当前view的处理(感谢兆坤提供补丁)。
2021/07/27
* 裁剪了assets-1m的资源感谢智明提供补丁

View File

@ -71,6 +71,7 @@ extern TK_CONST_DATA_ALIGN(const unsigned char ui_keyboard[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_kb_hex[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_gauge_h[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_popdown[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_slide_view_remove[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_color[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_color_picker[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_switch[]);
@ -170,6 +171,7 @@ extern TK_CONST_DATA_ALIGN(const unsigned char ui_menu_left_top[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_kb_ufloat[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_kb_default[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_tab_button_view_page2[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_slide_view_remove_loop[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_slide_up[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_rich_text2[]);
extern TK_CONST_DATA_ALIGN(const unsigned char ui_list_view_h[]);
@ -553,6 +555,7 @@ ret_t assets_init_dark(void) {
assets_manager_add(am, ui_kb_hex);
assets_manager_add(am, ui_gauge_h);
assets_manager_add(am, ui_popdown);
assets_manager_add(am, ui_slide_view_remove);
assets_manager_add(am, ui_color);
assets_manager_add(am, ui_color_picker);
assets_manager_add(am, ui_switch);
@ -652,6 +655,7 @@ ret_t assets_init_dark(void) {
assets_manager_add(am, ui_kb_ufloat);
assets_manager_add(am, ui_kb_default);
assets_manager_add(am, ui_tab_button_view_page2);
assets_manager_add(am, ui_slide_view_remove_loop);
assets_manager_add(am, ui_slide_up);
assets_manager_add(am, ui_rich_text2);
assets_manager_add(am, ui_list_view_h);

View File

@ -71,6 +71,7 @@
#include "default/inc/ui/kb_hex.data"
#include "default/inc/ui/gauge_h.data"
#include "default/inc/ui/popdown.data"
#include "default/inc/ui/slide_view_remove.data"
#include "default/inc/ui/color.data"
#include "default/inc/ui/color_picker.data"
#include "default/inc/ui/switch.data"
@ -170,6 +171,7 @@
#include "default/inc/ui/kb_ufloat.data"
#include "default/inc/ui/kb_default.data"
#include "default/inc/ui/tab_button_view_page2.data"
#include "default/inc/ui/slide_view_remove_loop.data"
#include "default/inc/ui/slide_up.data"
#include "default/inc/ui/rich_text2.data"
#include "default/inc/ui/list_view_h.data"
@ -553,6 +555,7 @@ ret_t assets_init_default(void) {
assets_manager_add(am, ui_kb_hex);
assets_manager_add(am, ui_gauge_h);
assets_manager_add(am, ui_popdown);
assets_manager_add(am, ui_slide_view_remove);
assets_manager_add(am, ui_color);
assets_manager_add(am, ui_color_picker);
assets_manager_add(am, ui_switch);
@ -652,6 +655,7 @@ ret_t assets_init_default(void) {
assets_manager_add(am, ui_kb_ufloat);
assets_manager_add(am, ui_kb_default);
assets_manager_add(am, ui_tab_button_view_page2);
assets_manager_add(am, ui_slide_view_remove_loop);
assets_manager_add(am, ui_slide_up);
assets_manager_add(am, ui_rich_text2);
assets_manager_add(am, ui_list_view_h);

View File

@ -1,57 +1,74 @@
TK_CONST_DATA_ALIGN(const unsigned char ui_slide_view[]) = {
0x04,0x00,0x01,0x01,0x27,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,
0x04,0x00,0x01,0x01,0x75,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,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,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,0x68,0x3d,0x33,0x30,0x2c,0x63,0x3d,0x31,0x2c,0x6d,0x3d,0x35,0x2c,0x73,0x3d,0x31,0x30,0x29,0x00,
0x5f,0x68,0x69,0x6e,0x74,0x00,0x68,0x74,0x72,0x61,0x6e,0x73,0x6c,0x61,0x74,0x65,0x00,0x6e,0x61,0x6d,
0x65,0x00,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,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,0x73,0x63,0x72,0x6f,0x6c,0x6c,0x5f,0x76,0x69,0x65,
0x77,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,0x3d,0x30,0x2c,0x63,0x3d,0x31,0x2c,0x78,0x3d,0x35,0x2c,0x79,0x3d,
0x35,0x2c,0x73,0x3d,0x31,0x30,0x29,0x00,0x79,0x73,0x6c,0x69,0x64,0x61,0x62,0x6c,0x65,0x00,0x74,0x72,
0x75,0x65,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,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,
0x6e,0x3a,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x68,0x00,0x74,0x65,0x78,0x74,0x00,
0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x68,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,0x1e,
0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,
0x69,0x65,0x77,0x5f,0x68,0x31,0x00,0x74,0x65,0x78,0x74,0x00,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,
0x65,0x77,0x5f,0x68,0x31,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,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,
0x00,0x6f,0x70,0x65,0x6e,0x3a,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x68,0x32,0x00,
0x74,0x65,0x78,0x74,0x00,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x68,0x32,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,0x6f,0x70,0x65,0x6e,0x3a,0x73,
0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x68,0x00,0x74,0x65,0x78,0x74,0x00,0x73,0x6c,0x69,
0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x68,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,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x73,
0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x76,0x00,0x74,0x65,0x78,0x74,0x00,0x73,0x6c,0x69,
0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x76,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,0x1e,0x00,0x00,0x00,
0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,
0x5f,0x68,0x31,0x00,0x74,0x65,0x78,0x74,0x00,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,
0x68,0x31,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x5f,0x76,0x31,0x00,0x74,0x65,0x78,0x74,0x00,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,
0x76,0x31,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,0x6f,0x70,
0x65,0x6e,0x3a,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x68,0x32,0x00,0x74,0x65,0x78,
0x74,0x00,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x68,0x32,0x00,0x00,0x00,0x62,0x75,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,
0x65,0x6e,0x3a,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x76,0x32,0x00,0x74,0x65,0x78,
0x74,0x00,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x76,0x32,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,0x6f,0x70,0x65,0x6e,0x3a,0x73,0x6c,0x69,0x64,
0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x76,0x00,0x74,0x65,0x78,0x74,0x00,0x73,0x6c,0x69,0x64,0x65,0x5f,
0x76,0x69,0x65,0x77,0x5f,0x76,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x73,0x6c,0x69,0x64,
0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x68,0x5f,0x6c,0x6f,0x6f,0x70,0x00,0x74,0x65,0x78,0x74,0x00,0x73,
0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x68,0x20,0x6c,0x6f,0x6f,0x70,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,
0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x76,0x31,
0x00,0x74,0x65,0x78,0x74,0x00,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x76,0x31,0x00,
0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x73,0x6c,0x69,
0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x76,0x5f,0x6c,0x6f,0x6f,0x70,0x00,0x74,0x65,0x78,0x74,0x00,
0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x76,0x20,0x6c,0x6f,0x6f,0x70,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,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,
0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x76,0x32,0x00,0x74,0x65,0x78,0x74,0x00,0x73,
0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x76,0x32,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,0x6f,0x70,0x65,0x6e,0x3a,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,
0x69,0x65,0x77,0x5f,0x68,0x5f,0x6c,0x6f,0x6f,0x70,0x00,0x74,0x65,0x78,0x74,0x00,0x73,0x6c,0x69,0x64,
0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x68,0x20,0x6c,0x6f,0x6f,0x70,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,0x6f,0x70,0x65,0x6e,0x3a,0x73,0x6c,0x69,0x64,0x65,0x5f,
0x76,0x69,0x65,0x77,0x5f,0x76,0x5f,0x6c,0x6f,0x6f,0x70,0x00,0x74,0x65,0x78,0x74,0x00,0x73,0x6c,0x69,
0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x76,0x20,0x6c,0x6f,0x6f,0x70,0x00,0x00,0x00,0x62,0x75,0x74,
0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x61,0x75,
0x74,0x6f,0x5f,0x70,0x6c,0x61,0x79,0x5f,0x24,0x7b,0x64,0x65,0x76,0x69,0x63,0x65,0x5f,0x6f,0x72,0x69,
0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x7d,0x2c,0x61,0x75,0x74,0x6f,0x5f,0x70,0x6c,0x61,0x79,0x00,
0x74,0x65,0x78,0x74,0x00,0x61,0x75,0x74,0x6f,0x5f,0x70,0x6c,0x61,0x79,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,0x6f,0x70,0x65,0x6e,0x3a,0x61,0x75,0x74,0x6f,0x5f,
0x70,0x6c,0x61,0x79,0x5f,0x24,0x7b,0x64,0x65,0x76,0x69,0x63,0x65,0x5f,0x6f,0x72,0x69,0x65,0x6e,0x74,
0x61,0x74,0x69,0x6f,0x6e,0x7d,0x2c,0x61,0x75,0x74,0x6f,0x5f,0x70,0x6c,0x61,0x79,0x00,0x74,0x65,0x78,
0x74,0x00,0x61,0x75,0x74,0x6f,0x5f,0x70,0x6c,0x61,0x79,0x00,0x00,0x00,0x62,0x75,0x74,0x74,0x6f,0x6e,
0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x6f,0x70,0x65,0x6e,0x3a,0x73,0x6c,0x69,0x64,0x65,
0x5f,0x76,0x69,0x65,0x77,0x5f,0x72,0x65,0x6d,0x6f,0x76,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x72,0x65,
0x6d,0x6f,0x76,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,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,
0x6f,0x70,0x65,0x6e,0x3a,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,0x65,0x77,0x5f,0x72,0x65,0x6d,0x6f,
0x76,0x65,0x5f,0x6c,0x6f,0x6f,0x70,0x00,0x74,0x65,0x78,0x74,0x00,0x72,0x65,0x6d,0x6f,0x76,0x65,0x20,
0x6c,0x6f,0x6f,0x70,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,0x6e,0x61,0x6d,0x65,0x00,0x63,0x6c,0x6f,0x73,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x43,0x6c,
0x6f,0x73,0x65,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*1111*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1e,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,
0x63,0x6c,0x6f,0x73,0x65,0x00,0x74,0x65,0x78,0x74,0x00,0x43,0x6c,0x6f,0x73,0x65,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,};/*1445*/

View File

@ -0,0 +1,86 @@
TK_CONST_DATA_ALIGN(const unsigned char ui_slide_view_remove[]) = {
0x04,0x00,0x01,0x01,0x68,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,
0x65,0x77,0x5f,0x72,0x65,0x6d,0x6f,0x76,0x65,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,0x00,0x73,0x6c,
0x69,0x64,0x65,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,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,0x73,0x74,0x79,0x6c,0x65,0x00,0x64,0x6f,0x74,0x00,0x63,
0x68,0x69,0x6c,0x64,0x5f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x00,0x31,0x00,0x00,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,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,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,0x72,0x3d,0x33,0x29,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,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,0x6d,0x65,0x00,0x76,0x69,0x65,0x77,0x5f,0x69,0x6e,
0x64,0x65,0x78,0x00,0x74,0x65,0x78,0x74,0x00,0x30,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,0x32,0x00,0x00,0x00,0x28,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,0x2c,0x77,0x3d,0x35,0x30,0x25,0x2c,0x68,0x3d,0x34,0x30,0x29,0x00,0x6e,0x61,0x6d,
0x65,0x00,0x63,0x6c,0x6f,0x6e,0x65,0x5f,0x76,0x69,0x65,0x77,0x00,0x74,0x65,0x78,0x74,0x00,0x63,0x6c,
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,0x32,0x00,0x00,0x00,0x28,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,0x2c,0x77,0x3d,
0x35,0x30,0x25,0x2c,0x68,0x3d,0x34,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x72,0x65,0x6d,0x6f,0x76,
0x65,0x5f,0x76,0x69,0x65,0x77,0x00,0x74,0x65,0x78,0x74,0x00,0x72,0x65,0x6d,0x6f,0x76,0x65,0x00,0x00,
0x00,0x00,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,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,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,0x72,0x3d,0x33,0x29,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,0x00,0x00,0x00,0x00,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,0x63,0x29,0x00,
0x6e,0x61,0x6d,0x65,0x00,0x76,0x69,0x65,0x77,0x5f,0x69,0x6e,0x64,0x65,0x78,0x00,0x74,0x65,0x78,0x74,
0x00,0x31,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,0x32,0x00,0x00,0x00,0x28,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,0x2c,0x77,0x3d,0x35,
0x30,0x25,0x2c,0x68,0x3d,0x34,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x6c,0x6f,0x6e,0x65,0x5f,
0x76,0x69,0x65,0x77,0x00,0x74,0x65,0x78,0x74,0x00,0x63,0x6c,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,0x32,0x00,
0x00,0x00,0x28,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,0x2c,0x77,0x3d,0x35,0x30,0x25,0x2c,0x68,0x3d,0x34,0x30,
0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x72,0x65,0x6d,0x6f,0x76,0x65,0x5f,0x76,0x69,0x65,0x77,0x00,0x74,
0x65,0x78,0x74,0x00,0x72,0x65,0x6d,0x6f,0x76,0x65,0x00,0x00,0x00,0x00,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,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,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,0x72,0x3d,0x33,0x29,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,0x00,
0x00,0x00,0x00,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,0x63,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x76,0x69,0x65,
0x77,0x5f,0x69,0x6e,0x64,0x65,0x78,0x00,0x74,0x65,0x78,0x74,0x00,0x32,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,0x32,0x00,0x00,
0x00,0x28,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,0x2c,0x77,0x3d,0x35,0x30,0x25,0x2c,0x68,0x3d,0x34,0x30,0x29,
0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x6c,0x6f,0x6e,0x65,0x5f,0x76,0x69,0x65,0x77,0x00,0x74,0x65,0x78,
0x74,0x00,0x63,0x6c,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,0x32,0x00,0x00,0x00,0x28,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,0x2c,0x77,0x3d,0x35,0x30,0x25,0x2c,0x68,0x3d,0x34,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x72,
0x65,0x6d,0x6f,0x76,0x65,0x5f,0x76,0x69,0x65,0x77,0x00,0x74,0x65,0x78,0x74,0x00,0x72,0x65,0x6d,0x6f,
0x76,0x65,0x00,0x00,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x5f,0x69,0x6e,0x64,0x69,0x63,0x61,0x74,
0x6f,0x72,0x5f,0x61,0x72,0x63,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,0x14,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,0x62,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,0x68,0x3d,0x32,0x30,0x29,0x00,0x64,0x65,0x66,0x61,
0x75,0x6c,0x74,0x5f,0x70,0x61,0x69,0x6e,0x74,0x00,0x73,0x74,0x72,0x6f,0x6b,0x65,0x5f,0x64,0x6f,0x74,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*1688*/

View File

@ -0,0 +1,86 @@
TK_CONST_DATA_ALIGN(const unsigned char ui_slide_view_remove_loop[]) = {
0x04,0x00,0x01,0x01,0x72,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x73,0x6c,0x69,0x64,0x65,0x5f,0x76,0x69,
0x65,0x77,0x5f,0x72,0x65,0x6d,0x6f,0x76,0x65,0x5f,0x6c,0x6f,0x6f,0x70,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,0x00,0x73,0x6c,
0x69,0x64,0x65,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,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,0x73,0x74,0x79,0x6c,0x65,0x00,0x64,0x6f,0x74,0x00,0x63,
0x68,0x69,0x6c,0x64,0x5f,0x6e,0x75,0x6d,0x62,0x65,0x72,0x00,0x31,0x00,0x6c,0x6f,0x6f,0x70,0x00,0x74,
0x72,0x75,0x65,0x00,0x00,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,
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,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,0x72,0x3d,0x33,0x29,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,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x6e,0x61,
0x6d,0x65,0x00,0x76,0x69,0x65,0x77,0x5f,0x69,0x6e,0x64,0x65,0x78,0x00,0x74,0x65,0x78,0x74,0x00,0x30,
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,0x32,0x00,0x00,0x00,0x28,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,0x2c,0x77,0x3d,0x35,0x30,0x25,
0x2c,0x68,0x3d,0x34,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x6c,0x6f,0x6e,0x65,0x5f,0x76,0x69,
0x65,0x77,0x00,0x74,0x65,0x78,0x74,0x00,0x63,0x6c,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,0x32,0x00,0x00,0x00,
0x28,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,0x2c,0x77,0x3d,0x35,0x30,0x25,0x2c,0x68,0x3d,0x34,0x30,0x29,0x00,
0x6e,0x61,0x6d,0x65,0x00,0x72,0x65,0x6d,0x6f,0x76,0x65,0x5f,0x76,0x69,0x65,0x77,0x00,0x74,0x65,0x78,
0x74,0x00,0x72,0x65,0x6d,0x6f,0x76,0x65,0x00,0x00,0x00,0x00,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,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,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,0x72,0x3d,0x33,0x29,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,0x00,0x00,0x00,
0x00,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,0x63,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x76,0x69,0x65,0x77,0x5f,
0x69,0x6e,0x64,0x65,0x78,0x00,0x74,0x65,0x78,0x74,0x00,0x31,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,0x32,0x00,0x00,0x00,0x28,
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,0x2c,0x77,0x3d,0x35,0x30,0x25,0x2c,0x68,0x3d,0x34,0x30,0x29,0x00,0x6e,
0x61,0x6d,0x65,0x00,0x63,0x6c,0x6f,0x6e,0x65,0x5f,0x76,0x69,0x65,0x77,0x00,0x74,0x65,0x78,0x74,0x00,
0x63,0x6c,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,0x32,0x00,0x00,0x00,0x28,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,0x2c,
0x77,0x3d,0x35,0x30,0x25,0x2c,0x68,0x3d,0x34,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x72,0x65,0x6d,
0x6f,0x76,0x65,0x5f,0x76,0x69,0x65,0x77,0x00,0x74,0x65,0x78,0x74,0x00,0x72,0x65,0x6d,0x6f,0x76,0x65,
0x00,0x00,0x00,0x00,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,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,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,0x72,0x3d,0x33,0x29,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,0x00,0x00,0x00,0x00,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,0x63,
0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x76,0x69,0x65,0x77,0x5f,0x69,0x6e,0x64,0x65,0x78,0x00,0x74,0x65,
0x78,0x74,0x00,0x32,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,0x32,0x00,0x00,0x00,0x28,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,0x2c,0x77,
0x3d,0x35,0x30,0x25,0x2c,0x68,0x3d,0x34,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x63,0x6c,0x6f,0x6e,
0x65,0x5f,0x76,0x69,0x65,0x77,0x00,0x74,0x65,0x78,0x74,0x00,0x63,0x6c,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,
0x32,0x00,0x00,0x00,0x28,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,0x2c,0x77,0x3d,0x35,0x30,0x25,0x2c,0x68,0x3d,
0x34,0x30,0x29,0x00,0x6e,0x61,0x6d,0x65,0x00,0x72,0x65,0x6d,0x6f,0x76,0x65,0x5f,0x76,0x69,0x65,0x77,
0x00,0x74,0x65,0x78,0x74,0x00,0x72,0x65,0x6d,0x6f,0x76,0x65,0x00,0x00,0x00,0x00,0x00,0x73,0x6c,0x69,
0x64,0x65,0x5f,0x69,0x6e,0x64,0x69,0x63,0x61,0x74,0x6f,0x72,0x5f,0x61,0x72,0x63,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,0x14,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,0x62,0x2c,0x77,0x3d,0x31,0x30,0x30,0x25,0x2c,
0x68,0x3d,0x32,0x30,0x29,0x00,0x64,0x65,0x66,0x61,0x75,0x6c,0x74,0x5f,0x70,0x61,0x69,0x6e,0x74,0x00,
0x73,0x74,0x72,0x6f,0x6b,0x65,0x5f,0x64,0x6f,0x74,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,};/*1698*/

Binary file not shown.

Binary file not shown.

View File

@ -71,6 +71,7 @@
#include "assets/default/inc/ui/kb_hex.data"
#include "assets/default/inc/ui/gauge_h.data"
#include "assets/default/inc/ui/popdown.data"
#include "assets/default/inc/ui/slide_view_remove.data"
#include "assets/default/inc/ui/color.data"
#include "assets/default/inc/ui/color_picker.data"
#include "assets/default/inc/ui/switch.data"
@ -170,6 +171,7 @@
#include "assets/default/inc/ui/kb_ufloat.data"
#include "assets/default/inc/ui/kb_default.data"
#include "assets/default/inc/ui/tab_button_view_page2.data"
#include "assets/default/inc/ui/slide_view_remove_loop.data"
#include "assets/default/inc/ui/slide_up.data"
#include "assets/default/inc/ui/rich_text2.data"
#include "assets/default/inc/ui/list_view_h.data"
@ -553,6 +555,7 @@ ret_t assets_init(void) {
assets_manager_add(am, ui_kb_hex);
assets_manager_add(am, ui_gauge_h);
assets_manager_add(am, ui_popdown);
assets_manager_add(am, ui_slide_view_remove);
assets_manager_add(am, ui_color);
assets_manager_add(am, ui_color_picker);
assets_manager_add(am, ui_switch);
@ -652,6 +655,7 @@ ret_t assets_init(void) {
assets_manager_add(am, ui_kb_ufloat);
assets_manager_add(am, ui_kb_default);
assets_manager_add(am, ui_tab_button_view_page2);
assets_manager_add(am, ui_slide_view_remove_loop);
assets_manager_add(am, ui_slide_up);
assets_manager_add(am, ui_rich_text2);
assets_manager_add(am, ui_list_view_h);

View File

@ -71,6 +71,7 @@
#include "assets/default/inc/ui/kb_hex.data"
#include "assets/default/inc/ui/gauge_h.data"
#include "assets/default/inc/ui/popdown.data"
#include "assets/default/inc/ui/slide_view_remove.data"
#include "assets/default/inc/ui/color.data"
#include "assets/default/inc/ui/color_picker.data"
#include "assets/default/inc/ui/switch.data"
@ -170,6 +171,7 @@
#include "assets/default/inc/ui/kb_ufloat.data"
#include "assets/default/inc/ui/kb_default.data"
#include "assets/default/inc/ui/tab_button_view_page2.data"
#include "assets/default/inc/ui/slide_view_remove_loop.data"
#include "assets/default/inc/ui/slide_up.data"
#include "assets/default/inc/ui/rich_text2.data"
#include "assets/default/inc/ui/list_view_h.data"
@ -553,6 +555,7 @@ ret_t assets_init(void) {
assets_manager_add(am, ui_kb_hex);
assets_manager_add(am, ui_gauge_h);
assets_manager_add(am, ui_popdown);
assets_manager_add(am, ui_slide_view_remove);
assets_manager_add(am, ui_color);
assets_manager_add(am, ui_color_picker);
assets_manager_add(am, ui_switch);
@ -652,6 +655,7 @@ ret_t assets_init(void) {
assets_manager_add(am, ui_kb_ufloat);
assets_manager_add(am, ui_kb_default);
assets_manager_add(am, ui_tab_button_view_page2);
assets_manager_add(am, ui_slide_view_remove_loop);
assets_manager_add(am, ui_slide_up);
assets_manager_add(am, ui_rich_text2);
assets_manager_add(am, ui_list_view_h);

View File

@ -29,6 +29,7 @@
static ret_t slide_view_save_target(widget_t* widget);
static ret_t slide_view_restore_target(widget_t* widget);
static ret_t slide_view_set_active_no_animate_impl(widget_t* widget, uint32_t active, bool_t force);
static ret_t slide_view_set_active_no_animate(widget_t* widget, uint32_t active);
static bool_t anim_hint_is_overlap(slide_view_t* slide_view) {
@ -136,14 +137,25 @@ static ret_t slide_view_on_scroll_done(void* ctx, event_t* e) {
return_value_if_fail(widget != NULL && slide_view != NULL, RET_BAD_PARAMS);
if (slide_view->xoffset > 0 || slide_view->yoffset > 0) {
slide_view_set_active_no_animate(widget, widget_index_of(slide_view->prev));
if (slide_view->remove_when_anim_done) {
widget_destroy(slide_view->next);
slide_view_set_active_no_animate_impl(widget, widget_index_of(slide_view->prev), TRUE);
} else {
slide_view_set_active_no_animate(widget, widget_index_of(slide_view->prev));
}
} else if (slide_view->xoffset < 0 || slide_view->yoffset < 0) {
slide_view_set_active_no_animate(widget, widget_index_of(slide_view->next));
if (slide_view->remove_when_anim_done) {
widget_destroy(slide_view->prev);
slide_view_set_active_no_animate_impl(widget, widget_index_of(slide_view->next), TRUE);
} else {
slide_view_set_active_no_animate(widget, widget_index_of(slide_view->next));
}
}
slide_view->xoffset = 0;
slide_view->yoffset = 0;
slide_view->animating = FALSE;
slide_view->remove_when_anim_done = FALSE;
slide_view->prev = NULL;
slide_view->next = NULL;
@ -347,9 +359,9 @@ static ret_t slide_view_on_event(widget_t* widget, event_t* e) {
static widget_t* slide_view_find_target(widget_t* widget, xy_t x, xy_t y) {
slide_view_t* slide_view = SLIDE_VIEW(widget);
return_value_if_fail(widget != NULL && slide_view != NULL, NULL);
return_value_if_fail(widget != NULL && slide_view != NULL && widget->children != NULL, NULL);
if (slide_view->xoffset || slide_view->yoffset) {
if (slide_view->xoffset || slide_view->yoffset || slide_view->active >= widget->children->size) {
return NULL;
}
@ -667,7 +679,12 @@ static ret_t slide_view_on_paint_children(widget_t* widget, canvas_t* c) {
uint8_t save_a = c->lcd->global_alpha;
vgcanvas_t* vg = canvas_get_vgcanvas(c);
slide_view_t* slide_view = SLIDE_VIEW(widget);
return_value_if_fail(widget != NULL && slide_view != NULL, RET_BAD_PARAMS);
return_value_if_fail(widget != NULL && slide_view != NULL && widget->children != NULL,
RET_BAD_PARAMS);
if (slide_view->active >= widget->children->size) {
return RET_OK;
}
active = widget_get_child(widget, slide_view->active);
return_value_if_fail(active != NULL, RET_BAD_PARAMS);
@ -756,8 +773,11 @@ static ret_t slide_view_save_target(widget_t* widget) {
widget_t* target = NULL;
widget_t* active_view = NULL;
slide_view_t* slide_view = SLIDE_VIEW(widget);
return_value_if_fail(slide_view != NULL, RET_BAD_PARAMS);
active_view = widget_get_child(widget, slide_view->active);
return_value_if_fail(slide_view != NULL && widget->children != NULL, RET_BAD_PARAMS);
if (slide_view->active < widget->children->size) {
active_view = widget_get_child(widget, slide_view->active);
}
if (active_view != NULL) {
target = active_view;
@ -789,8 +809,11 @@ static ret_t slide_view_restore_target(widget_t* widget) {
widget_t* target = NULL;
widget_t* active_view = NULL;
slide_view_t* slide_view = SLIDE_VIEW(widget);
return_value_if_fail(slide_view != NULL, RET_BAD_PARAMS);
active_view = widget_get_child(widget, slide_view->active);
return_value_if_fail(slide_view != NULL && widget->children != NULL, RET_BAD_PARAMS);
if (slide_view->active < widget->children->size) {
active_view = widget_get_child(widget, slide_view->active);
}
if (active_view != NULL) {
target = default_focused_child_get_save_target(widget, active_view);
@ -811,11 +834,12 @@ static ret_t slide_view_restore_target(widget_t* widget) {
return RET_OK;
}
static ret_t slide_view_set_active_no_animate(widget_t* widget, uint32_t active) {
static ret_t slide_view_set_active_no_animate_impl(widget_t* widget, uint32_t active,
bool_t force) {
slide_view_t* slide_view = SLIDE_VIEW(widget);
return_value_if_fail(slide_view != NULL, RET_BAD_PARAMS);
if (slide_view->active != active && widget->children != NULL) {
if ((force || slide_view->active != active) && widget->children != NULL) {
value_change_event_t evt;
slide_view_save_target(widget);
@ -840,6 +864,10 @@ static ret_t slide_view_set_active_no_animate(widget_t* widget, uint32_t active)
return RET_OK;
}
static ret_t slide_view_set_active_no_animate(widget_t* widget, uint32_t active) {
return slide_view_set_active_no_animate_impl(widget, active, FALSE);
}
static ret_t slide_view_set_active_animate(widget_t* widget, uint32_t active) {
int32_t xoffset_end = 0;
int32_t yoffset_end = 0;
@ -852,13 +880,14 @@ static ret_t slide_view_set_active_animate(widget_t* widget, uint32_t active) {
}
old_active = slide_view->active;
if (old_active < active) {
slide_view->prev = NULL;
if (old_active < active ||
(slide_view->loop && active == 0 && old_active == widget->children->size - 1)) {
slide_view->prev = widget_get_child(widget, old_active);
slide_view->next = widget_get_child(widget, active);
xoffset_end = slide_view->vertical ? 0 : -widget->w;
yoffset_end = slide_view->vertical ? -widget->h : 0;
} else {
slide_view->next = NULL;
slide_view->next = widget_get_child(widget, old_active);
slide_view->prev = widget_get_child(widget, active);
xoffset_end = slide_view->vertical ? 0 : widget->w;
yoffset_end = slide_view->vertical ? widget->h : 0;
@ -965,6 +994,48 @@ ret_t slide_view_set_auto_play(widget_t* widget, uint16_t auto_play) {
return RET_OK;
}
ret_t slide_view_remove_index(widget_t* widget, uint32_t index) {
ret_t ret = RET_FAIL;
int32_t active = -1;
slide_view_t* slide_view = SLIDE_VIEW(widget);
return_value_if_fail(widget != NULL && slide_view != NULL && widget->children != NULL,
RET_BAD_PARAMS);
return_value_if_fail(index < widget->children->size, RET_BAD_PARAMS);
active = (int32_t)slide_view->active;
if (widget->children->size > 1) {
if (index < active) {
ret = widget_destroy(widget_get_child(widget, index));
if (RET_OK == ret) {
active = tk_max(active - 1, 0);
slide_view_set_active_no_animate(widget, active);
}
} else if (index == active) {
if (index == widget->children->size - 1) {
active = slide_view->loop ? 0 : tk_max(active - 1, 0);
} else {
active++;
}
slide_view->remove_when_anim_done = TRUE;
ret = slide_view_set_active_animate(widget, active);
if (RET_OK != ret) {
slide_view->remove_when_anim_done = FALSE;
}
} else {
ret = widget_destroy(widget_get_child(widget, active));
}
} else {
ret = widget_destroy(widget_get_child(widget, active));
}
return ret;
}
widget_t* slide_view_cast(widget_t* widget) {
return_value_if_fail(WIDGET_IS_INSTANCE_OF(widget, slide_view), NULL);

View File

@ -111,23 +111,24 @@ typedef struct _slide_view_t {
*/
char* anim_hint;
/*private*/
/* private */
velocity_t velocity;
point_t down;
int32_t xoffset;
int32_t yoffset;
uint32_t active;
bool_t animating;
uint32_t timer_id;
bool_t dragged;
bool_t pressed;
velocity_t velocity;
bool_t animating;
bool_t remove_when_anim_done;
/* for save focused child */
str_t str_target;
uint32_t init_idle_id;
uint32_t focused_idle_id;
/*for animation*/
/* for animation */
widget_t* prev;
widget_t* next;
@ -251,6 +252,17 @@ ret_t slide_view_set_anim_hint(widget_t* widget, const char* anim_hint);
*/
ret_t slide_view_set_loop(widget_t* widget, bool_t loop);
/**
* @method slide_view_remove_index
*
* @annotation ["scriptable"]
* @param {widget_t*} widget slide_view对象
* @param {uint32_t} index
*
* @return {ret_t} RET_OK表示成功
*/
ret_t slide_view_remove_index(widget_t* widget, uint32_t index);
/*public for test only*/
widget_t* slide_view_get_prev(slide_view_t* slide_view);
widget_t* slide_view_get_next(slide_view_t* slide_view);