AWTK Designer源代码整理
AWTK Designer
AWTK平台配置有编辑器AWTK Designer,使用方式类似于Qt Designer,
下载链接:https://awtk.zlg.cn/web/index.html#/Login
AWTK Designer支持什么操作系统
目前支持Windows x64、Windows x86、Ubuntu等操作系统
常用函数
官网文档:https://awtk.zlg.cn/api/awtk/
如何续期
AWTK Designer许可证有使用期限,如果许可证到期,将无法继续使用AWTK Designer。如需继续使用AWTK Designer,可按以下步骤,完成许可证续期:
(1)前往 AWTK云平台;
(2)登录帐号后进入"个人信息"页面,绑定公司邮箱并完整填写真实有效的公司信息。
通过管理员审核后将会定期获赠续期卡劵,可用于许可续期,类似Visual Studio社区版
如何在项目工程中引用第三方库
AWTK 项目工程中有 SConstruct 文件,该文件是 SCons 的编译脚本。当开发者需要在程序中使用依赖库或者进行自定义预处理时,需要遵循 Python 语法编写 SConstruct 文件,详见以下文档:
如何引用第三方库
利用 app_helper 编写 SConstruct
资源管理器中图片的"x1、x2、x3、xx"是什么意思
AWTK Designer 项目创建后,design 目录默认有一个名称为"default"的主题目录,其中"images"目录用于存放该主题使用的图片,它包含以下子目录:
x1:存放普通密度屏幕上使用的图片;
x2:存放2倍密度屏幕上使用的图片;
x3:存放3倍密度屏幕上使用的图片;
xx:存放与屏幕密度无关的图片;
AWTK 运行时会优先在 x1、x2、x3 目录中的其中一个查找图片(比如LCD的DPR=1,则在x1目录),如果找不到,则在xx目录中查找。
备注:设备像素比(DPR)=设备像素(又称物理像素)/设备独立像素(又称密度无关像素或逻辑像素,可以认为是计算机坐标系统中的一个点,代表一个可以由程序使用的虚拟像素),比如DPR=2,则表示1逻辑像素等于2物理像素。
常见问题
终端显示Cannot find module 'glob'
这是由于没有安装Node.js中的glob模块,或者是没有将glob模块的安装路径添加至环境变量,变量名称必须为NODE_PATH。一般来说,在终端中执行以下命令,安装glob模块即可:npm install -g glob
控件源代码整理
1.基础控件
1.1按钮
// 创建按钮
widget_t* button = button_create(parent,x,y,w,h);
// 状态
// normal,正常状态
// pressed,指针按下状态
// over,指针悬浮状态
// disable,禁用状态
// focused,聚焦状态
widget_set_state(button,state);
// 查找控件
widget_t* widget_lookup(button, "button_name", NULL);
// 注册事件
widget_on(button,EVT_CLICK, on_button_click, void* ctx);
// 设置名称
widget_set_name(button,"button");
// 设置布局
widget_set_children_layout(button,params);// 无/单行/单列/网格
widget_set_enable(button,"TRUE");
widget_set_visible(button,"TRUE");
widget_set_floating(button,"TRUE");
// 样式
// 修改边框颜色
widget_set_style_str(button,"normal:border_color","#C2C2C2");
widget_set_style_str(button,"over:border_color","#C2C2C2");
widget_set_style_str(button,"pressed:border_color","#C2C2C2");
widget_set_style_str(button,"disabled:border_color","#C2C2C2");
widget_set_style_str(button,"focus:border_color","#C2C2C2");
// 修改边框类型,left/right/top/bottom/all
widget_set_style_str(button,"normal:border","all");
widget_set_style_str(button,"over:border","all");
widget_set_style_str(button,"pressed:border","all");
widget_set_style_str(button,"disabled:border","all");
widget_set_style_str(button,"focus:border","all");
// 修改边框宽度
widget_set_style_int(button,"normal:border_width",1);
widget_set_style_int(button,"over:border_width",1);
widget_set_style_int(button,"pressed:border_width",1);
widget_set_style_int(button,"disabled:border_width",1);
widget_set_style_int(button,"focus:border_width",1);
// 修改圆角半径
widget_set_style_int(button,"normal:round_radius",4);
widget_set_style_int(button,"over:round_radius",4);
widget_set_style_int(button,"pressed:round_radius",4);
widget_set_style_int(button,"disabled:round_radius",4);
widget_set_style_int(button,"focus:round_radius",4);
// 修改左上圆角半径
widget_set_style_int(button,"normal:round_radius_top_left",4);
widget_set_style_int(button,"over:round_radius_top_left",4);
widget_set_style_int(button,"pressed:round_radius_top_left",4);
widget_set_style_int(button,"disabled:round_radius",4);
widget_set_style_int(button,"focus:round_radius_top_left",4);
// 修改右上圆角半径
widget_set_style_int(button,"normal:round_radius_top_right",4);
widget_set_style_int(button,"over:round_radius_top_right",4);
widget_set_style_int(button,"pressed:round_radius_top_right",4);
widget_set_style_int(button,"disabled:round_radius_top_right",4);
widget_set_style_int(button,"focus:round_radius_top_right",4);
// 修改左下圆角半径
widget_set_style_int(button,"normal:round_radius_bottom_left",4);
widget_set_style_int(button,"over:round_radius_bottom_left",4);
widget_set_style_int(button,"pressed:round_radius_bottom_left",4);
widget_set_style_int(button,"disabled:round_radius_bottom_left",4);
widget_set_style_int(button,"focus:round_radius_bottom_left",4);
// 修改右下圆角半径
widget_set_style_int(button,"normal:round_radius_bottom_right",4);
widget_set_style_int(button,"over:round_radius_bottom_right",4);
widget_set_style_int(button,"pressed:round_radius_bottom_right",4);
widget_set_style_int(button,"disabled:round_radius_bottom_right",4);
widget_set_style_int(button,"focus:round_radius_bottom_right",4);
// 修改文本颜色
widget_set_style_str(button,"normal:text_color","#44444444");
widget_set_style_str(button,"over:text_color","#44444444");
widget_set_style_str(button,"pressed:text_color","#44444444");
widget_set_style_str(button,"disabled:text_color","#44444444");
widget_set_style_str(button,"focus:text_color","#44444444");
// 修改字体名称
widget_set_style(button,"normal:font_name","font_name");
widget_set_style(button,"over:font_name","font_name");
widget_set_style(button,"pressed:font_name","font_name");
widget_set_style(button,"disabled:font_name","font_name");
widget_set_style(button,"focus:font_name","font_name");
// 修改字体大小
widget_set_style_int(button,"normal:font_size",18);
widget_set_style_int(button,"over:font_size",18);
widget_set_style_int(button,"pressed:font_size",18);
widget_set_style_int(button,"disabled:font_size",18);
widget_set_style_int(button,"focus:font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style(button,"normal:text_align_h","center");
widget_set_style(button,"over:text_align_h","center");
widget_set_style(button,"pressed:text_align_h","center");
widget_set_style(button,"disabled:text_align_h","center");
widget_set_style(button,"focus:text_align_h","center");
// 修改文本竖直对齐方式,none/middle/top/bottom
widget_set_style_str(button,"normal:text_align_v","middle");
widget_set_style_str(button,"over:text_align_v","middle");
widget_set_style_str(button,"pressed:text_align_v","middle");
widget_set_style_str(button,"disabled:text_align_v","middle");
widget_set_style_str(button,"focus:text_align_v","middle");
// 修改背景颜色
widget_set_style_str(button,"normal:bg_color","#F4F4F4");
widget_set_style_str(button,"over:bg_color","#F4F4F4");
widget_set_style_str(button,"pressed:bg_color","#F4F4F4");
widget_set_style_str(button,"disabled:bg_color","#F4F4F4");
widget_set_style_str(button,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(button,"normal:bg_image","item");
widget_set_style_str(button,"over:bg_image","item");
widget_set_style_str(button,"pressed:bg_image","item");
widget_set_style_str(button,"disable:bg_image","item");
widget_set_style_str(button,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(button,"normal:bg_image_draw_type",way);
widget_set_style_str(button,"over:bg_image_draw_type",way);
widget_set_style_str(button,"pressed:bg_image_draw_type",way);
widget_set_style_str(button,"disabled:bg_image_draw_type",way);
widget_set_style_str(button,"focus:bg_image_draw_type",way);
// 修改图标位置,auto/left/right/top/bottom/center
widget_set_style_str(button,"normal:icon_at",way);
widget_set_style_str(button,"over:icon_at",way);
widget_set_style_str(button,"pressed:icon_at",way);
widget_set_style_str(button,"disabled:icon_at",way);
widget_set_style_str(button,"focus:icon_at",way);
// 修改图标名称
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(button,"normal:icon",way);
widget_set_style_str(button,"over:icon",way);
widget_set_style_str(button,"pressed:icon",way);
widget_set_style_str(button,"disabled:icon",way);
widget_set_style_str(button,"focus:icon",way);
// 修改边距
widget_set_style_int(button,"normal:margin",0);
widget_set_style_int(button,"over:margin",0);
widget_set_style_int(button,"pressed:margin",0);
widget_set_style_int(button,"disabled:margin",0);
widget_set_style_int(button,"focus:margin",0);
// 修改上边距
widget_set_style_int(button,"normal:margin_top",0);
widget_set_style_int(button,"over:margin_top",0);
widget_set_style_int(button,"pressed:margin_top",0);
widget_set_style_int(button,"disabled:margin_top",0);
widget_set_style_int(button,"focus:margin_top",0);
// 修改下边距
widget_set_style_int(button,"normal:margin_bottom",0);
widget_set_style_int(button,"over:margin_bottom",0);
widget_set_style_int(button,"pressed:margin_bottom",0);
widget_set_style_int(button,"disabled:margin_bottom",0);
widget_set_style_int(button,"focus:margin_bottom",0);
// 修改左边距
widget_set_style_int(button,"normal:margin_left",0);
widget_set_style_int(button,"over:margin_left",0);
widget_set_style_int(button,"pressed:margin_left",0);
widget_set_style_int(button,"disabled:margin_left",0);
widget_set_style_int(button,"focus:margin_left",0);
// 修改右边距
widget_set_style_int(button,"normal:margin_right",0);
widget_set_style_int(button,"over:margin_right",0);
widget_set_style_int(button,"pressed:margin_right",0);
widget_set_style_int(button,"disabled:margin_right",0);
widget_set_style_int(button,"focus:margin_right",0);
// 修改x方向偏移量
widget_set_style_int(button,"normal:x_offset",0);
widget_set_style_int(button,"over:x_offset",0);
widget_set_style_int(button,"pressed:x_offset",0);
widget_set_style_int(button,"disabled:x_offset",0);
widget_set_style_int(button,"focus:x_offset",0);
// 修改y方向偏移量
widget_set_style_int(button,"normal:y_offset",0);
widget_set_style_int(button,"over:y_offset",0);
widget_set_style_int(button,"pressed:y_offset",0);
widget_set_style_int(button,"disabled:y_offset",0);
widget_set_style_int(button,"focus:y_offset",0);
// 修改间距
widget_set_style_int(button,"normal:spacer",2);
widget_set_style_int(button,"over:spacer",2);
widget_set_style_int(button,"pressed:spacer",2);
widget_set_style_int(button,"disabled:spacer",2);
widget_set_style_int(button,"focus:spacer",2);
// 动画
// 值
widget_set_text(button,"btn_value");
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(button,TRUE);
// 是否接收用户事件
widget_set_sensitive(button,TRUE);
// 是否支持焦点停留
widget_set_focusable(button,TRUE);
// 是否支持焦点状态
widget_set_focus_state(button,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(button,4);
// 设置重复触发EVT_CLICK事件的时间间隔
button_set_repeat(button,TRUE);
    
// 是否启用长按事件
button_set_enable_long_press(button,TRUE);  
    
// 是否启用预览
button_set_enable_preview(button,TRUE); 
    
// 触发长按事件的时间(ms)
button_set_long_press_time(button,500);
    
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(button,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(button,"auto_adjust_size",TRUE);
// 事件
// 点击事件
EVT_CLICK
// 长按事件    
EVT_LONG_PRESS    
1.2多选按钮
// 创建按钮
widget_t* check_button = check_button_create(parent,x,y,w,h);
// 状态
// normal,正常状态
// pressed,指针按下状态
// over,指针悬浮状态
// disable,禁用状态
// focused,聚焦状态
// 设置名称
widget_set_name(check_button,"check_button");
// 设置布局
widget_set_children_layout(check_button,params);// 无/单行/单列/网格
widget_set_enable(check_button,TRUE);
widget_set_visible(check_button,TRUE);
widget_set_floating(check_button,TRUE);
// 样式
// 修改边框颜色
widget_set_style_str(check_button,"normal:border_color","#C2C2C2");
widget_set_style_str(check_button,"over:border_color","#C2C2C2");
widget_set_style_str(check_button,"pressed:border_color","#C2C2C2");
widget_set_style_str(check_button,"disabled:border_color","#C2C2C2");
widget_set_style_str(check_button,"focus:border_color","#C2C2C2");
// 修改边框类型,left/right/top/bottom/all
widget_set_style——str(check_button,"normal:border","all");
widget_set_style——str(check_button,"over:border","all");
widget_set_style——str(check_button,"pressed:border","all");
widget_set_style——str(check_button,"disabled:border","all");
widget_set_style——str(check_button,"focus:border","all");
// 修改边框宽度
widget_set_style_int(check_button,"normal:border_width",1);
widget_set_style_int(check_button,"over:border_width",1);
widget_set_style_int(check_button,"pressed:border_width",1);
widget_set_style_int(check_button,"disabled:border_width",1);
widget_set_style_int(check_button,"focus:border_width",1);
// 修改圆角半径
widget_set_style_int(check_button,"normal:round_radius",4);
widget_set_style_int(check_button,"over:round_radius",4);
widget_set_style_int(check_button,"pressed:round_radius",4);
widget_set_style_int(check_button,"disabled:round_radius",4);
widget_set_style_int(check_button,"focus:round_radius",4);
// 修改左上圆角半径
widget_set_style_int(check_button,"normal:round_radius_top_left",4);
widget_set_style_int(check_button,"over:round_radius_top_left",4);
widget_set_style_int(check_button,"pressed:round_radius_top_left",4);
widget_set_style_int(check_button,"disabled:round_radius",4);
widget_set_style_int(check_button,"focus:round_radius_top_left",4);
// 修改右上圆角半径
widget_set_style_int(check_button,"normal:round_radius_top_right",4);
widget_set_style_int(check_button,"over:round_radius_top_right",4);
widget_set_style_int(check_button,"pressed:round_radius_top_right",4);
widget_set_style_int(check_button,"disabled:round_radius_top_right",4);
widget_set_style_int(check_button,"focus:round_radius_top_right",4);
// 修改左下圆角半径
widget_set_style_int(check_button,"normal:round_radius_bottom_left",4);
widget_set_style_int(check_button,"over:round_radius_bottom_left",4);
widget_set_style_int(check_button,"pressed:round_radius_bottom_left",4);
widget_set_style_int(check_button,"disabled:round_radius_bottom_left",4);
widget_set_style_int(check_button,"focus:round_radius_bottom_left",4);
// 修改右下圆角半径
widget_set_style_int(check_button,"normal:round_radius_bottom_right",4);
widget_set_style_int(check_button,"over:round_radius_bottom_right",4);
widget_set_style_int(check_button,"pressed:round_radius_bottom_right",4);
widget_set_style_int(check_button,"disabled:round_radius_bottom_right",4);
widget_set_style_int(check_button,"focus:round_radius_bottom_right",4);
// 修改文本颜色
widget_set_style_str(check_button,"normal:text_color","#44444444");
widget_set_style_str(check_button,"over:text_color","#44444444");
widget_set_style_str(check_button,"pressed:text_color","#44444444");
widget_set_style_str(check_button,"disabled:text_color","#44444444");
widget_set_style_str(check_button,"focus:text_color","#44444444");
// 修改字体名称
widget_set_style_str(check_button,"normal:font_name","font_name");
widget_set_style_str(check_button,"over:font_name","font_name");
widget_set_style_str(check_button,"pressed:font_name","font_name");
widget_set_style_str(check_button,"disabled:font_name","font_name");
widget_set_style_str(check_button,"focus:font_name","font_name");
// 修改字体大小
widget_set_style_int(check_button,"normal:font_size",18);
widget_set_style_int(check_button,"over:font_size",18);
widget_set_style_int(check_button,"pressed:font_size",18);
widget_set_style_int(check_button,"disabled:font_size",18);
widget_set_style_int(check_button,"focus:font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style_str(check_button,"normal:text_align_h","center");
widget_set_style_str(check_button,"over:text_align_h","center");
widget_set_style_str(check_button,"pressed:text_align_h","center");
widget_set_style_str(check_button,"disabled:text_align_h","center");
widget_set_style_str(check_button,"focus:text_align_h","center");
// 修改文本竖直对齐方式,none/middle/top/bottom
widget_set_style_str(check_button,"normal:text_align_v","middle");
widget_set_style_str(check_button,"over:text_align_v","middle");
widget_set_style_str(check_button,"pressed:text_align_v","middle");
widget_set_style_str(check_button,"disabled:text_align_v","middle");
widget_set_style_str(check_button,"focus:text_align_v","middle");
// 修改背景颜色
widget_set_style_str(check_button,"normal:bg_color","#F4F4F4");
widget_set_style_str(check_button,"over:bg_color","#F4F4F4");
widget_set_style_str(check_button,"pressed:bg_color","#F4F4F4");
widget_set_style_str(check_button,"disabled:bg_color","#F4F4F4");
widget_set_style_str(check_button,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(check_button,"normal:bg_image","item");
widget_set_style_str(check_button,"over:bg_image","item");
widget_set_style_str(check_button,"pressed:bg_image","item");
widget_set_style_str(check_button,"disable:bg_image","item");
widget_set_style_str(check_button,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(check_button,"normal:bg_image_draw_type","way");
widget_set_style_str(check_button,"over:bg_image_draw_type","way");
widget_set_style_str(check_button,"pressed:bg_image_draw_type","way");
widget_set_style_str(check_button,"disabled:bg_image_draw_type","way");
widget_set_style_str(check_button,"focus:bg_image_draw_type","way");
// 修改图标位置,auto/left/right/top/bottom/center
widget_set_style_str(check_button,"normal:icon_at","way");
widget_set_style_str(check_button,"over:icon_at","way");
widget_set_style_str(check_button,"pressed:icon_at","way");
widget_set_style_str(check_button,"disabled:icon_at","way");
widget_set_style_str(check_button,"focus:icon_at","way");
// 修改图标名称
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(check_button,"normal:icon","way");
widget_set_style_str(check_button,"over:icon","way");
widget_set_style_str(check_button,"pressed:icon","way");
widget_set_style_str(check_button,"disabled:icon","way");
widget_set_style_str(check_button,"focus:icon","way");
// 修改边距
widget_set_style_int(check_button,"normal:margin",0);
widget_set_style_int(check_button,"over:margin",0);
widget_set_style_int(check_button,"pressed:margin",0);
widget_set_style_int(check_button,"disabled:margin",0);
widget_set_style_int(check_button,"focus:margin",0);
// 修改上边距
widget_set_style_int(check_button,"normal:margin_top",0);
widget_set_style_int(check_button,"over:margin_top",0);
widget_set_style_int(check_button,"pressed:margin_top",0);
widget_set_style_int(check_button,"disabled:margin_top",0);
widget_set_style_int(check_button,"focus:margin_top",0);
// 修改下边距
widget_set_style_int(check_button,"normal:margin_bottom",0);
widget_set_style_int(check_button,"over:margin_bottom",0);
widget_set_style_int(check_button,"pressed:margin_bottom",0);
widget_set_style_int(check_button,"disabled:margin_bottom",0);
widget_set_style_int(check_button,"focus:margin_bottom",0);
// 修改左边距
widget_set_style_int(check_button,"normal:margin_left",0);
widget_set_style_int(check_button,"over:margin_left",0);
widget_set_style_int(check_button,"pressed:margin_left",0);
widget_set_style_int(check_button,"disabled:margin_left",0);
widget_set_style_int(check_button,"focus:margin_left",0);
// 修改右边距
widget_set_style_int(check_button,"normal:margin_right",0);
widget_set_style_int(check_button,"over:margin_right",0);
widget_set_style_int(check_button,"pressed:margin_right",0);
widget_set_style_int(check_button,"disabled:margin_right",0);
widget_set_style_int(check_button,"focus:margin_right",0);
// 修改x方向偏移量
widget_set_style_int(check_button,"normal:x_offset",0);
widget_set_style_int(check_button,"over:x_offset",0);
widget_set_style_int(check_button,"pressed:x_offset",0);
widget_set_style_int(check_button,"disabled:x_offset",0);
widget_set_style_int(check_button,"focus:x_offset",0);
// 修改y方向偏移量
widget_set_style_int(check_button,"normal:y_offset",0);
widget_set_style_int(check_button,"over:y_offset",0);
widget_set_style_int(check_button,"pressed:y_offset",0);
widget_set_style_int(check_button,"disabled:y_offset",0);
widget_set_style_int(check_button,"focus:y_offset",0);
// 修改间距
widget_set_style_int(check_button,"normal:spacer",2);
widget_set_style_int(check_button,"over:spacer",2);
widget_set_style_int(check_button,"pressed:spacer",2);
widget_set_style_int(check_button,"disabled:spacer",2);
widget_set_style_int(check_button,"focus:spacer",2);
// 动画
// 值
widget_set_value(check_button,FALSE);
widget_set_text(check_button,"btn_value");
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(check_button,TRUE);
// 是否接收用户事件
widget_set_sensitive(check_button,TRUE);
// 是否支持焦点停留
widget_set_focusable(check_button,TRUE);
// 是否支持焦点状态
widget_set_focus_state(check_button,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(check_button,4);
    
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(check_button,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(check_button,"auto_adjust_size",TRUE);
1.3单选按钮
// 创建按钮
widget_t* radio_button = radio_button_create(parent,x,y,w,h);
// 状态
// normal,正常状态
// pressed,指针按下状态
// over,指针悬浮状态
// disable,禁用状态
// focused,聚焦状态
// 设置名称
widget_set_name(radio_button,"radio_button");
// 设置布局
widget_set_children_layout(radio_button,params);// 无/单行/单列/网格
widget_set_enable(radio_button,TRUE);
widget_set_visible(radio_button,TRUE);
widget_set_floating(radio_button,TRUE);
// 样式
// 修改边框颜色
widget_set_style_str(radio_button,"normal:border_color","#C2C2C2");
widget_set_style_str(radio_button,"over:border_color","#C2C2C2");
widget_set_style_str(radio_button,"pressed:border_color","#C2C2C2");
widget_set_style_str(radio_button,"disabled:border_color","#C2C2C2");
widget_set_style_str(radio_button,"focus:border_color","#C2C2C2");
// 修改边框类型,left/right/top/bottom/all
widget_set_style_str(radio_button,"normal:border","all");
widget_set_style_str(radio_button,"over:border","all");
widget_set_style_str(radio_button,"pressed:border","all");
widget_set_style_str(radio_button,"disabled:border","all");
widget_set_style_str(radio_button,"focus:border","all");
// 修改边框宽度
widget_set_style_int(radio_button,"normal:border_width",1);
widget_set_style_int(radio_button,"over:border_width",1);
widget_set_style_int(radio_button,"pressed:border_width",1);
widget_set_style_int(radio_button,"disabled:border_width",1);
widget_set_style_int(radio_button,"focus:border_width",1);
// 修改圆角半径
widget_set_style_int(radio_button,"normal:round_radius",4);
widget_set_style_int(radio_button,"over:round_radius",4);
widget_set_style_int(radio_button,"pressed:round_radius",4);
widget_set_style_int(radio_button,"disabled:round_radius",4);
widget_set_style_int(radio_button,"focus:round_radius",4);
// 修改左上圆角半径
widget_set_style_int(radio_button,"normal:round_radius_top_left",4);
widget_set_style_int(radio_button,"over:round_radius_top_left",4);
widget_set_style_int(radio_button,"pressed:round_radius_top_left",4);
widget_set_style_int(radio_button,"disabled:round_radius",4);
widget_set_style_int(radio_button,"focus:round_radius_top_left",4);
// 修改右上圆角半径
widget_set_style_int(radio_button,"normal:round_radius_top_right",4);
widget_set_style_int(radio_button,"over:round_radius_top_right",4);
widget_set_style_int(radio_button,"pressed:round_radius_top_right",4);
widget_set_style_int(radio_button,"disabled:round_radius_top_right",4);
widget_set_style_int(radio_button,"focus:round_radius_top_right",4);
// 修改左下圆角半径
widget_set_style_int(radio_button,"normal:round_radius_bottom_left",4);
widget_set_style_int(radio_button,"over:round_radius_bottom_left",4);
widget_set_style_int(radio_button,"pressed:round_radius_bottom_left",4);
widget_set_style_int(radio_button,"disabled:round_radius_bottom_left",4);
widget_set_style_int(radio_button,"focus:round_radius_bottom_left",4);
// 修改右下圆角半径
widget_set_style_int(radio_button,"normal:round_radius_bottom_right",4);
widget_set_style_int(radio_button,"over:round_radius_bottom_right",4);
widget_set_style_int(radio_button,"pressed:round_radius_bottom_right",4);
widget_set_style_int(radio_button,"disabled:round_radius_bottom_right",4);
widget_set_style_int(radio_button,"focus:round_radius_bottom_right",4);
// 修改文本颜色
widget_set_style_str(radio_button,"normal:text_color","#44444444");
widget_set_style_str(radio_button,"over:text_color","#44444444");
widget_set_style_str(radio_button,"pressed:text_color","#44444444");
widget_set_style_str(radio_button,"disabled:text_color","#44444444");
widget_set_style_str(radio_button,"focus:text_color","#44444444");
// 修改字体名称
widget_set_style_str(radio_button,"normal:font_name","font_name");
widget_set_style_str(radio_button,"over:font_name","font_name");
widget_set_style_str(radio_button,"pressed:font_name","font_name");
widget_set_style_str(radio_button,"disabled:font_name","font_name");
widget_set_style_str(radio_button,"focus:font_name","font_name");
// 修改字体大小
widget_set_style_int(radio_button,"normal:font_size",18);
widget_set_style_int(radio_button,"over:font_size",18);
widget_set_style_int(radio_button,"pressed:font_size",18);
widget_set_style_int(radio_button,"disabled:font_size",18);
widget_set_style_int(radio_button,"focus:font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style_str(radio_button,"normal:text_align_h","center");
widget_set_style_str(radio_button,"over:text_align_h","center");
widget_set_style_str(radio_button,"pressed:text_align_h","center");
widget_set_style_str(radio_button,"disabled:text_align_h","center");
widget_set_style_str(radio_button,"focus:text_align_h","center");
// 修改文本竖直对齐方式,none/middle/top/bottom
widget_set_style_str(radio_button,"normal:text_align_v","middle");
widget_set_style_str(radio_button,"over:text_align_v","middle");
widget_set_style_str(radio_button,"pressed:text_align_v","middle");
widget_set_style_str(radio_button,"disabled:text_align_v","middle");
widget_set_style_str(radio_button,"focus:text_align_v","middle");
// 修改背景颜色
widget_set_style_str(radio_button,"normal:bg_color","#F4F4F4");
widget_set_style_str(radio_button,"over:bg_color","#F4F4F4");
widget_set_style_str(radio_button,"pressed:bg_color","#F4F4F4");
widget_set_style_str(radio_button,"disabled:bg_color","#F4F4F4");
widget_set_style_str(radio_button,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(radio_button,"normal:bg_image","item");
widget_set_style_str(radio_button,"over:bg_image","item");
widget_set_style_str(radio_button,"pressed:bg_image","item");
widget_set_style_str(radio_button,"disable:bg_image","item");
widget_set_style_str(radio_button,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(radio_button,"normal:bg_image_draw_type","way");
widget_set_style_str(radio_button,"over:bg_image_draw_type","way");
widget_set_style_str(radio_button,"pressed:bg_image_draw_type","way");
widget_set_style_str(radio_button,"disabled:bg_image_draw_type","way");
widget_set_style_str(radio_button,"focus:bg_image_draw_type","way");
// 修改图标位置,auto/left/right/top/bottom/center
widget_set_style_str(radio_button,"normal:icon_at","way");
widget_set_style_str(radio_button,"over:icon_at","way");
widget_set_style_str(radio_button,"pressed:icon_at","way");
widget_set_style_str(radio_button,"disabled:icon_at","way");
widget_set_style_str(radio_button,"focus:icon_at","way");
// 修改图标名称
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(radio_button,"normal:icon","way");
widget_set_style_str(radio_button,"over:icon","way");
widget_set_style_str(radio_button,"pressed:icon","way");
widget_set_style_str(radio_button,"disabled:icon","way");
widget_set_style_str(radio_button,"focus:icon","way");
// 修改边距
widget_set_style_int(radio_button,"normal:margin",0);
widget_set_style_int(radio_button,"over:margin",0);
widget_set_style_int(radio_button,"pressed:margin",0);
widget_set_style_int(radio_button,"disabled:margin",0);
widget_set_style_int(radio_button,"focus:margin",0);
// 修改上边距
widget_set_style_int(radio_button,"normal:margin_top",0);
widget_set_style_int(radio_button,"over:margin_top",0);
widget_set_style_int(radio_button,"pressed:margin_top",0);
widget_set_style_int(radio_button,"disabled:margin_top",0);
widget_set_style_int(radio_button,"focus:margin_top",0);
// 修改下边距
widget_set_style_int(radio_button,"normal:margin_bottom",0);
widget_set_style_int(radio_button,"over:margin_bottom",0);
widget_set_style_int(radio_button,"pressed:margin_bottom",0);
widget_set_style_int(radio_button,"disabled:margin_bottom",0);
widget_set_style_int(radio_button,"focus:margin_bottom",0);
// 修改左边距
widget_set_style_int(radio_button,"normal:margin_left",0);
widget_set_style_int(radio_button,"over:margin_left",0);
widget_set_style_int(radio_button,"pressed:margin_left",0);
widget_set_style_int(radio_button,"disabled:margin_left",0);
widget_set_style_int(radio_button,"focus:margin_left",0);
// 修改右边距
widget_set_style_int(radio_button,"normal:margin_right",0);
widget_set_style_int(radio_button,"over:margin_right",0);
widget_set_style_int(radio_button,"pressed:margin_right",0);
widget_set_style_int(radio_button,"disabled:margin_right",0);
widget_set_style_int(radio_button,"focus:margin_right",0);
// 修改x方向偏移量
widget_set_style_int(radio_button,"normal:x_offset",0);
widget_set_style_int(radio_button,"over:x_offset",0);
widget_set_style_int(radio_button,"pressed:x_offset",0);
widget_set_style_int(radio_button,"disabled:x_offset",0);
widget_set_style_int(radio_button,"focus:x_offset",0);
// 修改y方向偏移量
widget_set_style_int(radio_button,"normal:y_offset",0);
widget_set_style_int(radio_button,"over:y_offset",0);
widget_set_style_int(radio_button,"pressed:y_offset",0);
widget_set_style_int(radio_button,"disabled:y_offset",0);
widget_set_style_int(radio_button,"focus:y_offset",0);
// 修改间距
widget_set_style_int(radio_button,"normal:spacer",2);
widget_set_style_int(radio_button,"over:spacer",2);
widget_set_style_int(radio_button,"pressed:spacer",2);
widget_set_style_int(radio_button,"disabled:spacer",2);
widget_set_style_int(radio_button,"focus:spacer",2);
// 动画
// 值
widget_set_value(radio_button,FALSE);
widget_set_text(radio_button,"btn_value");
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(radio_button,TRUE);
// 是否接收用户事件
widget_set_sensitive(radio_button,TRUE);
// 是否支持焦点停留
widget_set_focusable(radio_button,TRUE);
// 是否支持焦点状态
widget_set_focus_state(radio_button,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(radio_button,4);
    
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(radio_button,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(radio_button,"auto_adjust_size",TRUE);
1.4标签按钮
// 创建按钮
widget_t* tab_button = tab_button_create(parent,x,y,w,h);
// 状态
// normal,正常状态
// pressed,指针按下状态
// over,指针悬浮状态
// disable,禁用状态
// focused,聚焦状态
// normal_of_active,正常激活状态
// pressed_of_active,指针按下激活状态
// over_of_active,指针悬浮激活状态
// disable_of_active,禁用激活状态
// focused_of_active,聚焦激活状态
// 设置名称
widget_set_name(tab_button,"tab_button");
// 设置布局
widget_set_children_layout(tab_button,params);// 无/单行/单列/网格
widget_set_enable(tab_button,TRUE);
widget_set_visible(tab_button,TRUE);
widget_set_floating(tab_button,TRUE);
// 样式
// 修改边框颜色
widget_set_style_str(tab_button,"normal:border_color","#C2C2C2");
widget_set_style_str(tab_button,"over:border_color","#C2C2C2");
widget_set_style_str(tab_button,"pressed:border_color","#C2C2C2");
widget_set_style_str(tab_button,"disabled:border_color","#C2C2C2");
widget_set_style_str(tab_button,"focus:border_color","#C2C2C2");
// 修改边框类型,left/right/top/bottom/all
widget_set_style_str(tab_button,"normal:border","all");
widget_set_style_str(tab_button,"over:border","all");
widget_set_style_str(tab_button,"pressed:border","all");
widget_set_style_str(tab_button,"disabled:border","all");
widget_set_style_str(tab_button,"focus:border","all");
// 修改边框宽度
widget_set_style_int(tab_button,"normal:border_width",1);
widget_set_style_int(tab_button,"over:border_width",1);
widget_set_style_int(tab_button,"pressed:border_width",1);
widget_set_style_int(tab_button,"disabled:border_width",1);
widget_set_style_int(tab_button,"focus:border_width",1);
// 修改圆角半径
widget_set_style_int(tab_button,"normal:round_radius",4);
widget_set_style_int(tab_button,"over:round_radius",4);
widget_set_style_int(tab_button,"pressed:round_radius",4);
widget_set_style_int(tab_button,"disabled:round_radius",4);
widget_set_style_int(tab_button,"focus:round_radius",4);
// 修改左上圆角半径
widget_set_style_int(tab_button,"normal:round_radius_top_left",4);
widget_set_style_int(tab_button,"over:round_radius_top_left",4);
widget_set_style_int(tab_button,"pressed:round_radius_top_left",4);
widget_set_style_int(tab_button,"disabled:round_radius",4);
widget_set_style_int(tab_button,"focus:round_radius_top_left",4);
// 修改右上圆角半径
widget_set_style_int(tab_button,"normal:round_radius_top_right",4);
widget_set_style_int(tab_button,"over:round_radius_top_right",4);
widget_set_style_int(tab_button,"pressed:round_radius_top_right",4);
widget_set_style_int(tab_button,"disabled:round_radius_top_right",4);
widget_set_style_int(tab_button,"focus:round_radius_top_right",4);
// 修改左下圆角半径
widget_set_style_int(tab_button,"normal:round_radius_bottom_left",4);
widget_set_style_int(tab_button,"over:round_radius_bottom_left",4);
widget_set_style_int(tab_button,"pressed:round_radius_bottom_left",4);
widget_set_style_int(tab_button,"disabled:round_radius_bottom_left",4);
widget_set_style_int(tab_button,"focus:round_radius_bottom_left",4);
// 修改右下圆角半径
widget_set_style_int(tab_button,"normal:round_radius_bottom_right",4);
widget_set_style_int(tab_button,"over:round_radius_bottom_right",4);
widget_set_style_int(tab_button,"pressed:round_radius_bottom_right",4);
widget_set_style_int(tab_button,"disabled:round_radius_bottom_right",4);
widget_set_style_int(tab_button,"focus:round_radius_bottom_right",4);
// 修改文本颜色
widget_set_style_str(tab_button,"normal:text_color","#44444444");
widget_set_style_str(tab_button,"over:text_color","#44444444");
widget_set_style_str(tab_button,"pressed:text_color","#44444444");
widget_set_style_str(tab_button,"disabled:text_color","#44444444");
widget_set_style_str(tab_button,"focus:text_color","#44444444");
// 修改字体名称
widget_set_style_str(tab_button,"normal:font_name","font_name");
widget_set_style_str(tab_button,"over:font_name","font_name");
widget_set_style_str(tab_button,"pressed:font_name","font_name");
widget_set_style_str(tab_button,"disabled:font_name","font_name");
widget_set_style_str(tab_button,"focus:font_name","font_name");
// 修改字体大小
widget_set_style_int(tab_button,"normal:font_size",18);
widget_set_style_int(tab_button,"over:font_size",18);
widget_set_style_int(tab_button,"pressed:font_size",18);
widget_set_style_int(tab_button,"disabled:font_size",18);
widget_set_style_int(tab_button,"focus:font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style_str(tab_button,"normal:text_align_h","center");
widget_set_style_str(tab_button,"over:text_align_h","center");
widget_set_style_str(tab_button,"pressed:text_align_h","center");
widget_set_style_str(tab_button,"disabled:text_align_h","center");
widget_set_style_str(tab_button,"focus:text_align_h","center");
// 修改文本竖直对齐方式,none/middle/top/bottom
widget_set_style_str(tab_button,"normal:text_align_v","middle");
widget_set_style_str(tab_button,"over:text_align_v","middle");
widget_set_style_str(tab_button,"pressed:text_align_v","middle");
widget_set_style_str(tab_button,"disabled:text_align_v","middle");
widget_set_style_str(tab_button,"focus:text_align_v","middle");
// 修改背景颜色
widget_set_style_str(tab_button,"normal:bg_color","#F4F4F4");
widget_set_style_str(tab_button,"over:bg_color","#F4F4F4");
widget_set_style_str(tab_button,"pressed:bg_color","#F4F4F4");
widget_set_style_str(tab_button,"disabled:bg_color","#F4F4F4");
widget_set_style_str(tab_button,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(tab_button,"normal:bg_image","item");
widget_set_style_str(tab_button,"over:bg_image","item");
widget_set_style_str(tab_button,"pressed:bg_image","item");
widget_set_style_str(tab_button,"disable:bg_image","item");
widget_set_style_str(tab_button,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(tab_button,"normal:bg_image_draw_type","way");
widget_set_style_str(tab_button,"over:bg_image_draw_type","way");
widget_set_style_str(tab_button,"pressed:bg_image_draw_type","way");
widget_set_style_str(tab_button,"disabled:bg_image_draw_type","way");
widget_set_style_str(tab_button,"focus:bg_image_draw_type","way");
// 修改图标位置,auto/left/right/top/bottom/center
widget_set_style_str(tab_button,"normal:icon_at","way");
widget_set_style_str(tab_button,"over:icon_at","way");
widget_set_style_str(tab_button,"pressed:icon_at","way");
widget_set_style_str(tab_button,"disabled:icon_at","way");
widget_set_style_str(tab_button,"focus:icon_at","way");
// 修改图标名称
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(tab_button,"normal:icon","way");
widget_set_style_str(tab_button,"over:icon","way");
widget_set_style_str(tab_button,"pressed:icon","way");
widget_set_style_str(tab_button,"disabled:icon","way");
widget_set_style_str(tab_button,"focus:icon","way");
// 修改边距
widget_set_style_int(tab_button,"normal:margin",0);
widget_set_style_int(tab_button,"over:margin",0);
widget_set_style_int(tab_button,"pressed:margin",0);
widget_set_style_int(tab_button,"disabled:margin",0);
widget_set_style_int(tab_button,"focus:margin",0);
// 修改上边距
widget_set_style_int(tab_button,"normal:margin_top",0);
widget_set_style_int(tab_button,"over:margin_top",0);
widget_set_style_int(tab_button,"pressed:margin_top",0);
widget_set_style_int(tab_button,"disabled:margin_top",0);
widget_set_style_int(tab_button,"focus:margin_top",0);
// 修改下边距
widget_set_style_int(tab_button,"normal:margin_bottom",0);
widget_set_style_int(tab_button,"over:margin_bottom",0);
widget_set_style_int(tab_button,"pressed:margin_bottom",0);
widget_set_style_int(tab_button,"disabled:margin_bottom",0);
widget_set_style_int(tab_button,"focus:margin_bottom",0);
// 修改左边距
widget_set_style_int(tab_button,"normal:margin_left",0);
widget_set_style_int(tab_button,"over:margin_left",0);
widget_set_style_int(tab_button,"pressed:margin_left",0);
widget_set_style_int(tab_button,"disabled:margin_left",0);
widget_set_style_int(tab_button,"focus:margin_left",0);
// 修改右边距
widget_set_style_int(tab_button,"normal:margin_right",0);
widget_set_style_int(tab_button,"over:margin_right",0);
widget_set_style_int(tab_button,"pressed:margin_right",0);
widget_set_style_int(tab_button,"disabled:margin_right",0);
widget_set_style_int(tab_button,"focus:margin_right",0);
// 修改x方向偏移量
widget_set_style_int(tab_button,"normal:x_offset",0);
widget_set_style_int(tab_button,"over:x_offset",0);
widget_set_style_int(tab_button,"pressed:x_offset",0);
widget_set_style_int(tab_button,"disabled:x_offset",0);
widget_set_style_int(tab_button,"focus:x_offset",0);
// 修改y方向偏移量
widget_set_style_int(tab_button,"normal:y_offset",0);
widget_set_style_int(tab_button,"over:y_offset",0);
widget_set_style_int(tab_button,"pressed:y_offset",0);
widget_set_style_int(tab_button,"disabled:y_offset",0);
widget_set_style_int(tab_button,"focus:y_offset",0);
// 修改间距
widget_set_style_int(tab_button,"normal:spacer",2);
widget_set_style_int(tab_button,"over:spacer",2);
widget_set_style_int(tab_button,"pressed:spacer",2);
widget_set_style_int(tab_button,"disabled:spacer",2);
widget_set_style_int(tab_button,"focus:spacer",2);
// 动画
// 值
widget_set_value(tab_button,FALSE);
widget_set_text(tab_button,"btn_value");
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(tab_button,TRUE);
// 是否接收用户事件
widget_set_sensitive(tab_button,TRUE);
// 是否支持焦点停留
widget_set_focusable(tab_button,TRUE);
// 是否支持焦点状态
widget_set_focus_state(tab_button,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(tab_button,4);
// 激活后加载的UI名称
widget_set_load_ui(tab_button);
// 当前项的图标名称
widget_set_active_icon(tab_button);
// 非当前项的图标名称
widget_set_icon(tab_button);    
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(tab_button,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(tab_button,"auto_adjust_size",TRUE);
1.5单行编辑
// 创建单行编辑
widget_t* edit = edit_create(parent,x,y,w,h);
// 状态
// normal,正常状态
// focused,聚焦状态
// disable,禁用状态
// error,错误状态
// empty,空值状态
// empty_focus,空值聚焦状态
// over,悬浮状态
// empty_over,空值悬浮状态
// changed,值改变状态状态
// 设置名称
widget_set_name(edit,"edit");
// 设置布局
widget_set_children_layout(edit,params);// 无/单行/单列/网格
widget_set_enable(edit,TRUE);
widget_set_visible(edit,TRUE);
widget_set_floating(edit,TRUE);
// 样式
// 修改边框颜色
widget_set_style_str(edit,"normal:border_color","#C2C2C2");
widget_set_style_str(edit,"over:border_color","#C2C2C2");
widget_set_style_str(edit,"changed:border_color","#C2C2C2");
widget_set_style_str(edit,"disabled:border_color","#C2C2C2");
widget_set_style_str(edit,"focus:border_color","#C2C2C2");
widget_set_style_str(edit,"error:border_color","#C2C2C2");
widget_set_style_str(edit,"empty:border_color","#C2C2C2");
widget_set_style_str(edit,"empty_focus:border_color","#C2C2C2");
widget_set_style_str(edit,"empty_over:border_color","#C2C2C2");
// 修改边框类型,left/right/top/bottom/all
widget_set_style_str(edit,"normal:border","all");
widget_set_style_str(edit,"over:border","all");
widget_set_style_str(edit,"changed:border","all");
widget_set_style_str(edit,"disabled:border","all");
widget_set_style_str(edit,"focus:border","all");
widget_set_style_str(edit,"error:border","all");
widget_set_style_str(edit,"empty:border","all");
widget_set_style_str(edit,"empty_focus:border","all");
widget_set_style_str(edit,"empty_over:border","all");
// 修改边框宽度
widget_set_style_int(edit,"normal:border_width",1);
widget_set_style_int(edit,"over:border_width",1);
widget_set_style_int(edit,"changed:border_width",1);
widget_set_style_int(edit,"disabled:border_width",1);
widget_set_style_int(edit,"focus:border_width",1);
widget_set_style_int(edit,"error:border_width",1);
widget_set_style_int(edit,"empty:border_width",1);
widget_set_style_int(edit,"empty_focus:border_width",1);
widget_set_style_int(edit,"empty_over:border_width",1);
// 修改圆角半径
widget_set_style_int(edit,"normal:round_radius",4);
widget_set_style_int(edit,"over:round_radius",4);
widget_set_style_int(edit,"changed:round_radius",4);
widget_set_style_int(edit,"disabled:round_radius",4);
widget_set_style_int(edit,"focus:round_radius",4);
widget_set_style_int(edit,"error:round_radius",4);
widget_set_style_int(edit,"empty:round_radius",4);
widget_set_style_int(edit,"empty_focus:round_radius",4);
widget_set_style_int(edit,"empty_over:round_radius",4);
// 修改左上圆角半径
widget_set_style_int(edit,"normal:round_radius_top_left",4);
widget_set_style_int(edit,"over:round_radius_top_left",4);
widget_set_style_int(edit,"changed:round_radius_top_left",4);
widget_set_style_int(edit,"disabled:round_radius_top_left",4);
widget_set_style_int(edit,"focus:round_radius_top_left",4);
widget_set_style_int(edit,"error:round_radius_top_left",4);
widget_set_style_int(edit,"empty:round_radius_top_left",4);
widget_set_style_int(edit,"empty_focus:round_radius_top_left",4);
widget_set_style_int(edit,"empty_over:round_radius_top_left",4);
// 修改右上圆角半径
widget_set_style_int(edit,"normal:round_radius_top_right",4);
widget_set_style_int(edit,"over:round_radius_top_right",4);
widget_set_style_int(edit,"changed:round_radius_top_right",4);
widget_set_style_int(edit,"disabled:round_radius_top_right",4);
widget_set_style_int(edit,"focus:round_radius_top_right",4);
widget_set_style_int(edit,"error:round_radius_top_right",4);
widget_set_style_int(edit,"empty:round_radius_top_right",4);
widget_set_style_int(edit,"empty_focus:round_radius_top_right",4);
widget_set_style_int(edit,"empty_over:round_radius_top_right",4);
// 修改左下圆角半径
widget_set_style_int(edit,"normal:round_radius_bottom_left",4);
widget_set_style_int(edit,"over:round_radius_bottom_left",4);
widget_set_style_int(edit,"changed:round_radius_bottom_left",4);
widget_set_style_int(edit,"disabled:round_radius_bottom_left",4);
widget_set_style_int(edit,"focus:round_radius_bottom_left",4);
widget_set_style_int(edit,"error:round_radius_bottom_left",4);
widget_set_style_int(edit,"empty:round_radius_bottom_left",4);
widget_set_style_int(edit,"empty_focus:round_radius_bottom_left",4);
widget_set_style_int(edit,"empty_over:round_radius_bottom_left",4);
// 修改右下圆角半径
widget_set_style_int(edit,"normal:round_radius_bottom_right",4);
widget_set_style_int(edit,"over:round_radius_bottom_right",4);
widget_set_style_int(edit,"changed:round_radius_bottom_right",4);
widget_set_style_int(edit,"disabled:round_radius_bottom_right",4);
widget_set_style_int(edit,"focus:round_radius_bottom_right",4);
widget_set_style_int(edit,"error:round_radius_bottom_right",4);
widget_set_style_int(edit,"empty:round_radius_bottom_right",4);
widget_set_style_int(edit,"empty_focus:round_radius_bottom_right",4);
widget_set_style_int(edit,"empty_over:round_radius_bottom_right",4);
// 修改文本颜色
widget_set_style_str(edit,"normal:text_color","#959494");
widget_set_style_str(edit,"over:text_color","#959494");
widget_set_style_str(edit,"changed:text_color","#959494");
widget_set_style_str(edit,"disabled:text_color","#959494");
widget_set_style_str(edit,"focus:text_color","#959494");
widget_set_style_str(edit,"error:text_color","#959494");
widget_set_style_str(edit,"empty:text_color","#959494");
widget_set_style_str(edit,"empty_focus:text_color","#959494");
widget_set_style_str(edit,"empty_over:text_color","#959494");
// 修改选中文本颜色
widget_set_style_str(edit,"normal:selected_text_color","#010101");
widget_set_style_str(edit,"over:selected_text_color","#010101");
widget_set_style_str(edit,"changed:selected_text_color","#010101");
widget_set_style_str(edit,"disabled:selected_text_color","#010101");
widget_set_style_str(edit,"focus:selected_text_color","#010101");
widget_set_style_str(edit,"error:selected_text_color","#010101");
widget_set_style_str(edit,"empty:selected_text_color","#010101");
widget_set_style_str(edit,"empty_focus:selected_text_color","#010101");
widget_set_style_str(edit,"empty_over:selected_text_color","#010101");
// 修改提示文本颜色
widget_set_style_str(edit,"normal:tips_text_color","#959494");
widget_set_style_str(edit,"over:tips_text_color","#959494");
widget_set_style_str(edit,"changed:tips_text_color","#959494");
widget_set_style_str(edit,"disabled:tips_text_color","#959494");
widget_set_style_str(edit,"focus:tips_text_color","#959494");
widget_set_style_str(edit,"error:tips_text_color","#959494");
widget_set_style_str(edit,"empty:tips_text_color","#959494");
widget_set_style_str(edit,"empty_focus:tips_text_color","#959494");
widget_set_style_str(edit,"empty_over:tips_text_color","#959494");
// 修改字体名称
widget_set_style_str(edit,"normal:font_name","font_name");
widget_set_style_str(edit,"over:font_name","font_name");
widget_set_style_str(edit,"changed:font_name","font_name");
widget_set_style_str(edit,"disabled:font_name","font_name");
widget_set_style_str(edit,"focus:font_name","font_name");
widget_set_style_str(edit,"error:font_name","font_name");
widget_set_style_str(edit,"empty:font_name","font_name");
widget_set_style_str(edit,"empty_focus:font_name","font_name");
widget_set_style_str(edit,"empty_over:font_name","font_name");
// 修改字体大小
widget_set_style_int(edit,"normal:font_size",18);
widget_set_style_int(edit,"over:font_size",18);
widget_set_style_int(edit,"changed:font_size",18);
widget_set_style_int(edit,"disabled:font_size",18);
widget_set_style_int(edit,"focus:font_size",18);
widget_set_style_int(edit,"error:font_size",18);
widget_set_style_int(edit,"empty:font_size",18);
widget_set_style_int(edit,"empty_focus:font_size",18);
widget_set_style_int(edit,"empty_over:font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style_str(edit,"normal:text_align_h","center");
widget_set_style_str(edit,"over:text_align_h","center");
widget_set_style_str(edit,"changed:text_align_h","center");
widget_set_style_str(edit,"disabled:text_align_h","center");
widget_set_style_str(edit,"focus:text_align_h","center");
widget_set_style_str(edit,"error:text_align_h","center");
widget_set_style_str(edit,"empty:text_align_h","center");
widget_set_style_str(edit,"empty_focus:text_align_h","center");
widget_set_style_str(edit,"empty_over:text_align_h","center");
// 修改背景颜色
widget_set_style_str(edit,"normal:bg_color","#F7F7F7");
widget_set_style_str(edit,"over:bg_color","#F7F7F7");
widget_set_style_str(edit,"changed:bg_color","#F7F7F7");
widget_set_style_str(edit,"disabled:bg_color","#F7F7F7");
widget_set_style_str(edit,"focus:bg_color","#F7F7F7");
widget_set_style_str(edit,"error:bg_color","#F7F7F7");
widget_set_style_str(edit,"empty:bg_color","#F7F7F7");
widget_set_style_str(edit,"empty_focus:bg_color","#F7F7F7");
widget_set_style_str(edit,"empty_over:bg_color","#F7F7F7");
// 修改选中背景颜色
widget_set_style_str(edit,"normal:selected_bg_color","#B5D7FD");
widget_set_style_str(edit,"over:selected_bg_color","#B5D7FD");
widget_set_style_str(edit,"changed:selected_bg_color","#B5D7FD");
widget_set_style_str(edit,"disabled:selected_bg_color","#B5D7FD");
widget_set_style_str(edit,"focus:selected_bg_color","#B5D7FD");
widget_set_style_str(edit,"error:selected_bg_color","#B5D7FD");
widget_set_style_str(edit,"empty:selected_bg_color","#B5D7FD");
widget_set_style_str(edit,"empty_focus:selected_bg_color","#B5D7FD");
widget_set_style_str(edit,"empty_over:selected_bg_color","#B5D7FD");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/changed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(edit,"normal:bg_image","item");
widget_set_style_str(edit,"over:bg_image","item");
widget_set_style_str(edit,"changed:bg_image","item");
widget_set_style_str(edit,"disable:bg_image","item");
widget_set_style_str(edit,"focus:bg_image","item");
widget_set_style_str(edit,"error:bg_image","item");
widget_set_style_str(edit,"empty:bg_image","item");
widget_set_style_str(edit,"empty_focus:bg_image","item");
widget_set_style_str(edit,"empty_over:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(edit,"normal:bg_image_draw_type","way");
widget_set_style_str(edit,"over:bg_image_draw_type","way");
widget_set_style_str(edit,"changed:bg_image_draw_type","way");
widget_set_style_str(edit,"disabled:bg_image_draw_type","way");
widget_set_style_str(edit,"focus:bg_image_draw_type","way");
widget_set_style_str(edit,"error:bg_image_draw_type","way");
widget_set_style_str(edit,"empty:bg_image_draw_type","way");
widget_set_style_str(edit,"empty_focus:bg_image_draw_type","way");
widget_set_style_str(edit,"empty_over:bg_image_draw_type","way");
// 修改边距
widget_set_style_int(edit,"normal:margin",0);
widget_set_style_int(edit,"over:margin",0);
widget_set_style_int(edit,"changed:margin",0);
widget_set_style_int(edit,"disabled:margin",0);
widget_set_style_int(edit,"focus:margin",0);
widget_set_style_int(edit,"error:border_color",0);
widget_set_style_int(edit,"empty:border_color",0);
widget_set_style_int(edit,"empty_focus:border_color",0);
widget_set_style_int(edit,"empty_over:border_color",0);
// 修改上边距
widget_set_style_int(edit,"normal:margin_top",0);
widget_set_style_int(edit,"over:margin_top",0);
widget_set_style_int(edit,"changed:margin_top",0);
widget_set_style_int(edit,"disabled:margin_top",0);
widget_set_style_int(edit,"focus:margin_top",0);
widget_set_style_int(edit,"error:margin_top",0);
widget_set_style_int(edit,"empty:margin_top",0);
widget_set_style_int(edit,"empty_focus:margin_top",0);
widget_set_style_int(edit,"empty_over:margin_top",0);
// 修改下边距
widget_set_style_int(edit,"normal:margin_bottom",0);
widget_set_style_int(edit,"over:margin_bottom",0);
widget_set_style_int(edit,"changed:margin_bottom",0);
widget_set_style_int(edit,"disabled:margin_bottom",0);
widget_set_style_int(edit,"focus:margin_bottom",0);
widget_set_style_int(edit,"error:margin_bottom",0);
widget_set_style_int(edit,"empty:margin_bottom",0);
widget_set_style_int(edit,"empty_focus:margin_bottom",0);
widget_set_style_int(edit,"empty_over:margin_bottom",0);
// 修改左边距
widget_set_style_int(edit,"normal:margin_left",0);
widget_set_style_int(edit,"over:margin_left",0);
widget_set_style_int(edit,"changed:margin_left",0);
widget_set_style_int(edit,"disabled:margin_left",0);
widget_set_style_int(edit,"focus:margin_left",0);
widget_set_style_int(edit,"error:margin_left",0);
widget_set_style_int(edit,"empty:margin_left",0);
widget_set_style_int(edit,"empty_focus:margin_left",0);
widget_set_style_int(edit,"empty_over:margin_left",0);
// 修改右边距
widget_set_style_int(edit,"normal:margin_right",0);
widget_set_style_int(edit,"over:margin_right",0);
widget_set_style_int(edit,"changed:margin_right",0);
widget_set_style_int(edit,"disabled:margin_right",0);
widget_set_style_int(edit,"focus:margin_right",0);
widget_set_style_int(edit,"error:margin_right",0);
widget_set_style_int(edit,"empty:margin_right",0);
widget_set_style_int(edit,"empty_focus:margin_right",0);
widget_set_style_int(edit,"empty_over:margin_right",0);
// 修改x方向偏移量
widget_set_style_int(edit,"normal:x_offset",0);
widget_set_style_int(edit,"over:x_offset",0);
widget_set_style_int(edit,"changed:x_offset",0);
widget_set_style_int(edit,"disabled:x_offset",0);
widget_set_style_int(edit,"focus:x_offset",0);
widget_set_style_int(edit,"error:x_offset",0);
widget_set_style_int(edit,"empty:x_offset",0);
widget_set_style_int(edit,"empty_focus:x_offset",0);
widget_set_style_int(edit,"empty_over:x_offset",0);
// 修改y方向偏移量
widget_set_style_int(edit,"normal:y_offset",0);
widget_set_style_int(edit,"over:y_offset",0);
widget_set_style_int(edit,"changed:y_offset",0);
widget_set_style_int(edit,"disabled:y_offset",0);
widget_set_style_int(edit,"focus:y_offset",0);
widget_set_style_int(edit,"error:y_offset",0);
widget_set_style_int(edit,"empty:y_offset",0);
widget_set_style_int(edit,"empty_focus:y_offset",0);
widget_set_style_int(edit,"empty_over:y_offset",0);
// 动画
// 值
widget_set_auto_fix(edit,TRUE);
widget_set_input_type(edit,"text");	// text,int,uint,hex,float,ufloat,email,password,phone,ipv4,date,time,time_full,custom,custom_password,ascii
widget_set_min(edit,0);
widget_set_max(edit,1024);
widget_set_step(edit,1);
widget_set_tips(edit,"enter yout text");
widget_set_text(edit,"edit_value");
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(edit,TRUE);
// 是否接收用户事件
widget_set_sensitive(edit,TRUE);
// 是否支持焦点停留
widget_set_focusable(edit,TRUE);
// 是否支持焦点状态
widget_set_focus_state(edit,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(edit,4);
// 软键盘上action按钮的文本,next,将焦点切换到下一个控件/done,完成,关闭软键盘
widget_set_action_text(edit,"done");
// 自定义软键盘名称
widget_set_keyboard(edit,"不使用软键盘");
// 设置编辑器是否为只读
widget_set_readonly(edit,FALSE);
// 设置密码是否可见
widget_set_password_visible(edit,FALSE);
// 获得焦点时不选中文本
widget_set_select_none_when_focused(edit,FALSE);
// 获得焦点时打开输入法
widget_set_open_im_when_focused(edit,TRUE);
// 是否在失去焦点时关闭输入法
widget_set_close_im_when_blurred(edit,TRUE);
// 是否支持撤销编辑
widget_set_cancelble(edit,FALSE);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(edit,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(edit,"auto_adjust_size",TRUE);
1.6微调编辑
// 创建微调编辑
widget_t* spin_box = spin_box_create(parent,x,y,w,h);
// 状态
// normal,正常状态
// focused,聚焦状态
// disable,禁用状态
// error,错误状态
// empty,空值状态
// empty_focus,空值聚焦状态
// over,悬浮状态
// empty_over,空值悬浮状态
// changed,值改变状态状态
// 设置名称
widget_set_name(spin_box,"spin_box");
// 设置布局
widget_set_children_layout(spin_box,params);// 无/单行/单列/网格
widget_set_enable(spin_box,TRUE);
widget_set_visible(spin_box,TRUE);
widget_set_floating(spin_box,TRUE);
// 样式
// 修改边框颜色
widget_set_style_str(spin_box,"normal:border_color","#C2C2C2");
widget_set_style_str(spin_box,"over:border_color","#C2C2C2");
widget_set_style_str(spin_box,"changed:border_color","#C2C2C2");
widget_set_style_str(spin_box,"disabled:border_color","#C2C2C2");
widget_set_style_str(spin_box,"focus:border_color","#C2C2C2");
widget_set_style_str(spin_box,"error:border_color","#C2C2C2");
widget_set_style_str(spin_box,"empty:border_color","#C2C2C2");
widget_set_style_str(spin_box,"empty_focus:border_color","#C2C2C2");
widget_set_style_str(spin_box,"empty_over:border_color","#C2C2C2");
// 修改边框类型,left/right/top/bottom/all
widget_set_style_str(spin_box,"normal:border","all");
widget_set_style_str(spin_box,"over:border","all");
widget_set_style_str(spin_box,"changed:border","all");
widget_set_style_str(spin_box,"disabled:border","all");
widget_set_style_str(spin_box,"focus:border","all");
widget_set_style_str(spin_box,"error:border","all");
widget_set_style_str(spin_box,"empty:border","all");
widget_set_style_str(spin_box,"empty_focus:border","all");
widget_set_style_str(spin_box,"empty_over:border","all");
// 修改边框宽度
widget_set_style_int(spin_box,"normal:border_width",1);
widget_set_style_int(spin_box,"over:border_width",1);
widget_set_style_int(spin_box,"changed:border_width",1);
widget_set_style_int(spin_box,"disabled:border_width",1);
widget_set_style_int(spin_box,"focus:border_width",1);
widget_set_style_int(spin_box,"error:border_width",1);
widget_set_style_int(spin_box,"empty:border_width",1);
widget_set_style_int(spin_box,"empty_focus:border_width",1);
widget_set_style_int(spin_box,"empty_over:border_width",1);
// 修改圆角半径
widget_set_style_int(spin_box,"normal:round_radius",4);
widget_set_style_int(spin_box,"over:round_radius",4);
widget_set_style_int(spin_box,"changed:round_radius",4);
widget_set_style_int(spin_box,"disabled:round_radius",4);
widget_set_style_int(spin_box,"focus:round_radius",4);
widget_set_style_int(spin_box,"error:round_radius",4);
widget_set_style_int(spin_box,"empty:round_radius",4);
widget_set_style_int(spin_box,"empty_focus:round_radius",4);
widget_set_style_int(spin_box,"empty_over:round_radius",4);
// 修改左上圆角半径
widget_set_style_int(spin_box,"normal:round_radius_top_left",4);
widget_set_style_int(spin_box,"over:round_radius_top_left",4);
widget_set_style_int(spin_box,"changed:round_radius_top_left",4);
widget_set_style_int(spin_box,"disabled:round_radius_top_left",4);
widget_set_style_int(spin_box,"focus:round_radius_top_left",4);
widget_set_style_int(spin_box,"error:round_radius_top_left",4);
widget_set_style_int(spin_box,"empty:round_radius_top_left",4);
widget_set_style_int(spin_box,"empty_focus:round_radius_top_left",4);
widget_set_style_int(spin_box,"empty_over:round_radius_top_left",4);
// 修改右上圆角半径
widget_set_style_int(spin_box,"normal:round_radius_top_right",4);
widget_set_style_int(spin_box,"over:round_radius_top_right",4);
widget_set_style_int(spin_box,"changed:round_radius_top_right",4);
widget_set_style_int(spin_box,"disabled:round_radius_top_right",4);
widget_set_style_int(spin_box,"focus:round_radius_top_right",4);
widget_set_style_int(spin_box,"error:round_radius_top_right",4);
widget_set_style_int(spin_box,"empty:round_radius_top_right",4);
widget_set_style_int(spin_box,"empty_focus:round_radius_top_right",4);
widget_set_style_int(spin_box,"empty_over:round_radius_top_right",4);
// 修改左下圆角半径
widget_set_style_int(spin_box,"normal:round_radius_bottom_left",4);
widget_set_style_int(spin_box,"over:round_radius_bottom_left",4);
widget_set_style_int(spin_box,"changed:round_radius_bottom_left",4);
widget_set_style_int(spin_box,"disabled:round_radius_bottom_left",4);
widget_set_style_int(spin_box,"focus:round_radius_bottom_left",4);
widget_set_style_int(spin_box,"error:round_radius_bottom_left",4);
widget_set_style_int(spin_box,"empty:round_radius_bottom_left",4);
widget_set_style_int(spin_box,"empty_focus:round_radius_bottom_left",4);
widget_set_style_int(spin_box,"empty_over:round_radius_bottom_left",4);
// 修改右下圆角半径
widget_set_style_int(spin_box,"normal:round_radius_bottom_right",4);
widget_set_style_int(spin_box,"over:round_radius_bottom_right",4);
widget_set_style_int(spin_box,"changed:round_radius_bottom_right",4);
widget_set_style_int(spin_box,"disabled:round_radius_bottom_right",4);
widget_set_style_int(spin_box,"focus:round_radius_bottom_right",4);
widget_set_style_int(spin_box,"error:round_radius_bottom_right",4);
widget_set_style_int(spin_box,"empty:round_radius_bottom_right",4);
widget_set_style_int(spin_box,"empty_focus:round_radius_bottom_right",4);
widget_set_style_int(spin_box,"empty_over:round_radius_bottom_right",4);
// 修改文本颜色
widget_set_style_str(spin_box,"normal:text_color","#959494");
widget_set_style_str(spin_box,"over:text_color","#959494");
widget_set_style_str(spin_box,"changed:text_color","#959494");
widget_set_style_str(spin_box,"disabled:text_color","#959494");
widget_set_style_str(spin_box,"focus:text_color","#959494");
widget_set_style_str(spin_box,"error:text_color","#959494");
widget_set_style_str(spin_box,"empty:text_color","#959494");
widget_set_style_str(spin_box,"empty_focus:text_color","#959494");
widget_set_style_str(spin_box,"empty_over:text_color","#959494");
// 修改选中文本颜色
widget_set_style_str(spin_box,"normal:selected_text_color","#010101");
widget_set_style_str(spin_box,"over:selected_text_color","#010101");
widget_set_style_str(spin_box,"changed:selected_text_color","#010101");
widget_set_style_str(spin_box,"disabled:selected_text_color","#010101");
widget_set_style_str(spin_box,"focus:selected_text_color","#010101");
widget_set_style_str(spin_box,"error:selected_text_color","#010101");
widget_set_style_str(spin_box,"empty:selected_text_color","#010101");
widget_set_style_str(spin_box,"empty_focus:selected_text_color","#010101");
widget_set_style_str(spin_box,"empty_over:selected_text_color","#010101");
// 修改提示文本颜色
widget_set_style_str(spin_box,"normal:tips_text_color","#959494");
widget_set_style_str(spin_box,"over:tips_text_color","#959494");
widget_set_style_str(spin_box,"changed:tips_text_color","#959494");
widget_set_style_str(spin_box,"disabled:tips_text_color","#959494");
widget_set_style_str(spin_box,"focus:tips_text_color","#959494");
widget_set_style_str(spin_box,"error:tips_text_color","#959494");
widget_set_style_str(spin_box,"empty:tips_text_color","#959494");
widget_set_style_str(spin_box,"empty_focus:tips_text_color","#959494");
widget_set_style_str(spin_box,"empty_over:tips_text_color","#959494");
// 修改字体名称
widget_set_style_str(spin_box,"normal:font_name","font_name");
widget_set_style_str(spin_box,"over:font_name","font_name");
widget_set_style_str(spin_box,"changed:font_name","font_name");
widget_set_style_str(spin_box,"disabled:font_name","font_name");
widget_set_style_str(spin_box,"focus:font_name","font_name");
widget_set_style_str(spin_box,"error:font_name","font_name");
widget_set_style_str(spin_box,"empty:font_name","font_name");
widget_set_style_str(spin_box,"empty_focus:font_name","font_name");
widget_set_style_str(spin_box,"empty_over:font_name","font_name");
// 修改字体大小
widget_set_style_int(spin_box,"normal:font_size",18);
widget_set_style_int(spin_box,"over:font_size",18);
widget_set_style_int(spin_box,"changed:font_size",18);
widget_set_style_int(spin_box,"disabled:font_size",18);
widget_set_style_int(spin_box,"focus:font_size",18);
widget_set_style_int(spin_box,"error:font_size",18);
widget_set_style_int(spin_box,"empty:font_size",18);
widget_set_style_int(spin_box,"empty_focus:font_size",18);
widget_set_style_int(spin_box,"empty_over:font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style_str(spin_box,"normal:text_align_h","center");
widget_set_style_str(spin_box,"over:text_align_h","center");
widget_set_style_str(spin_box,"changed:text_align_h","center");
widget_set_style_str(spin_box,"disabled:text_align_h","center");
widget_set_style_str(spin_box,"focus:text_align_h","center");
widget_set_style_str(spin_box,"error:text_align_h","center");
widget_set_style_str(spin_box,"empty:text_align_h","center");
widget_set_style_str(spin_box,"empty_focus:text_align_h","center");
widget_set_style_str(spin_box,"empty_over:text_align_h","center");
// 修改背景颜色
widget_set_style_str(spin_box,"normal:bg_color","#F7F7F7");
widget_set_style_str(spin_box,"over:bg_color","#F7F7F7");
widget_set_style_str(spin_box,"changed:bg_color","#F7F7F7");
widget_set_style_str(spin_box,"disabled:bg_color","#F7F7F7");
widget_set_style_str(spin_box,"focus:bg_color","#F7F7F7");
widget_set_style_str(spin_box,"error:bg_color","#F7F7F7");
widget_set_style_str(spin_box,"empty:bg_color","#F7F7F7");
widget_set_style_str(spin_box,"empty_focus:bg_color","#F7F7F7");
widget_set_style_str(spin_box,"empty_over:bg_color","#F7F7F7");
// 修改选中背景颜色
widget_set_style_str(spin_box,"normal:selected_bg_color","#B5D7FD");
widget_set_style_str(spin_box,"over:selected_bg_color","#B5D7FD");
widget_set_style_str(spin_box,"changed:selected_bg_color","#B5D7FD");
widget_set_style_str(spin_box,"disabled:selected_bg_color","#B5D7FD");
widget_set_style_str(spin_box,"focus:selected_bg_color","#B5D7FD");
widget_set_style_str(spin_box,"error:selected_bg_color","#B5D7FD");
widget_set_style_str(spin_box,"empty:selected_bg_color","#B5D7FD");
widget_set_style_str(spin_box,"empty_focus:selected_bg_color","#B5D7FD");
widget_set_style_str(spin_box,"empty_over:selected_bg_color","#B5D7FD");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/changed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(spin_box,"normal:bg_image","item");
widget_set_style_str(spin_box,"over:bg_image","item");
widget_set_style_str(spin_box,"changed:bg_image","item");
widget_set_style_str(spin_box,"disable:bg_image","item");
widget_set_style_str(spin_box,"focus:bg_image","item");
widget_set_style_str(spin_box,"error:bg_image","item");
widget_set_style_str(spin_box,"empty:bg_image","item");
widget_set_style_str(spin_box,"empty_focus:bg_image","item");
widget_set_style_str(spin_box,"empty_over:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(spin_box,"normal:bg_image_draw_type","way");
widget_set_style_str(spin_box,"over:bg_image_draw_type","way");
widget_set_style_str(spin_box,"changed:bg_image_draw_type","way");
widget_set_style_str(spin_box,"disabled:bg_image_draw_type","way");
widget_set_style_str(spin_box,"focus:bg_image_draw_type","way");
widget_set_style_str(spin_box,"error:bg_image_draw_type","way");
widget_set_style_str(spin_box,"empty:bg_image_draw_type","way");
widget_set_style_str(spin_box,"empty_focus:bg_image_draw_type","way");
widget_set_style_str(spin_box,"empty_over:bg_image_draw_type","way");
// 修改边距
widget_set_style_int(spin_box,"normal:margin",0);
widget_set_style_int(spin_box,"over:margin",0);
widget_set_style_int(spin_box,"changed:margin",0);
widget_set_style_int(spin_box,"disabled:margin",0);
widget_set_style_int(spin_box,"focus:margin",0);
widget_set_style_int(spin_box,"error:border_color",0);
widget_set_style_int(spin_box,"empty:border_color",0);
widget_set_style_int(spin_box,"empty_focus:border_color",0);
widget_set_style_int(spin_box,"empty_over:border_color",0);
// 修改上边距
widget_set_style_int(spin_box,"normal:margin_top",0);
widget_set_style_int(spin_box,"over:margin_top",0);
widget_set_style_int(spin_box,"changed:margin_top",0);
widget_set_style_int(spin_box,"disabled:margin_top",0);
widget_set_style_int(spin_box,"focus:margin_top",0);
widget_set_style_int(spin_box,"error:margin_top",0);
widget_set_style_int(spin_box,"empty:margin_top",0);
widget_set_style_int(spin_box,"empty_focus:margin_top",0);
widget_set_style_int(spin_box,"empty_over:margin_top",0);
// 修改下边距
widget_set_style_int(spin_box,"normal:margin_bottom",0);
widget_set_style_int(spin_box,"over:margin_bottom",0);
widget_set_style_int(spin_box,"changed:margin_bottom",0);
widget_set_style_int(spin_box,"disabled:margin_bottom",0);
widget_set_style_int(spin_box,"focus:margin_bottom",0);
widget_set_style_int(spin_box,"error:margin_bottom",0);
widget_set_style_int(spin_box,"empty:margin_bottom",0);
widget_set_style_int(spin_box,"empty_focus:margin_bottom",0);
widget_set_style_int(spin_box,"empty_over:margin_bottom",0);
// 修改左边距
widget_set_style_int(spin_box,"normal:margin_left",0);
widget_set_style_int(spin_box,"over:margin_left",0);
widget_set_style_int(spin_box,"changed:margin_left",0);
widget_set_style_int(spin_box,"disabled:margin_left",0);
widget_set_style_int(spin_box,"focus:margin_left",0);
widget_set_style_int(spin_box,"error:margin_left",0);
widget_set_style_int(spin_box,"empty:margin_left",0);
widget_set_style_int(spin_box,"empty_focus:margin_left",0);
widget_set_style_int(spin_box,"empty_over:margin_left",0);
// 修改右边距
widget_set_style_int(spin_box,"normal:margin_right",0);
widget_set_style_int(spin_box,"over:margin_right",0);
widget_set_style_int(spin_box,"changed:margin_right",0);
widget_set_style_int(spin_box,"disabled:margin_right",0);
widget_set_style_int(spin_box,"focus:margin_right",0);
widget_set_style_int(spin_box,"error:margin_right",0);
widget_set_style_int(spin_box,"empty:margin_right",0);
widget_set_style_int(spin_box,"empty_focus:margin_right",0);
widget_set_style_int(spin_box,"empty_over:margin_right",0);
// 修改x方向偏移量
widget_set_style_int(spin_box,"normal:x_offset",0);
widget_set_style_int(spin_box,"over:x_offset",0);
widget_set_style_int(spin_box,"changed:x_offset",0);
widget_set_style_int(spin_box,"disabled:x_offset",0);
widget_set_style_int(spin_box,"focus:x_offset",0);
widget_set_style_int(spin_box,"error:x_offset",0);
widget_set_style_int(spin_box,"empty:x_offset",0);
widget_set_style_int(spin_box,"empty_focus:x_offset",0);
widget_set_style_int(spin_box,"empty_over:x_offset",0);
// 修改y方向偏移量
widget_set_style_int(spin_box,"normal:y_offset",0);
widget_set_style_int(spin_box,"over:y_offset",0);
widget_set_style_int(spin_box,"changed:y_offset",0);
widget_set_style_int(spin_box,"disabled:y_offset",0);
widget_set_style_int(spin_box,"focus:y_offset",0);
widget_set_style_int(spin_box,"error:y_offset",0);
widget_set_style_int(spin_box,"empty:y_offset",0);
widget_set_style_int(spin_box,"empty_focus:y_offset",0);
widget_set_style_int(spin_box,"empty_over:y_offset",0);
// 动画
// 值
widget_set_auto_fix(spin_box,TRUE);
widget_set_input_type(spin_box,"text");	// text,int,uint,hex,float,ufloat,email,password,phone,ipv4,date,time,time_full,custom,custom_password,ascii
widget_set_min(spin_box,0);
widget_set_max(spin_box,1024);
widget_set_step(spin_box,1);
widget_set_tips(spin_box,"enter yout text");
widget_set_text(spin_box,"spin_box_value");
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(spin_box,TRUE);
// 是否接收用户事件
widget_set_sensitive(spin_box,TRUE);
// 是否支持焦点停留
widget_set_focusable(spin_box,TRUE);
// 是否支持焦点状态
widget_set_focus_state(spin_box,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(spin_box,4);
// 是否启用易点击事件
widget_set_easy_touch_mode(spin_box,FALSE);
// 重复触发EVT_CLICK事件的时间间隔(ms)
widget_set_repeat(spin_box,300);
// 软键盘上action按钮的文本,next,将焦点切换到下一个控件/done,完成,关闭软键盘
widget_set_action_text(spin_box,"done");
// 自定义软键盘名称
widget_set_keyboard(spin_box,"不使用软键盘");
// 设置编辑器是否为只读
widget_set_readonly(spin_box,FALSE);
// 设置密码是否可见
widget_set_password_visible(spin_box,FALSE);
// 获得焦点时不选中文本
widget_set_select_none_when_focused(spin_box,FALSE);
// 获得焦点时打开输入法
widget_set_open_im_when_focused(spin_box,TRUE);
// 是否在失去焦点时关闭输入法
widget_set_close_im_when_blurred(spin_box,TRUE);
// 是否支持撤销编辑
widget_set_cancelble(spin_box,FALSE);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_pointer_cursor(spin_box,"name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_auto_adjust_size(spin_box,TRUE);
1.7下拉列表
// 创建下拉列表
widget_t* combo_box_ex = combo_box_ex_create(parent,x,y,w,h);
// 状态
// normal,正常状态
// focused,聚焦状态
// disable,禁用状态
// error,错误状态
// empty,空值状态
// empty_focus,空值聚焦状态
// over,悬浮状态
// empty_over,空值悬浮状态
// changed,值改变状态状态
// 设置名称
widget_set_name(combo_box_ex,"combo_box_ex");
// 设置布局
widget_set_children_layout(combo_box_ex,params);// 无/单行/单列/网格
widget_set_enable(combo_box_ex,TRUE);
widget_set_visible(combo_box_ex,TRUE);
widget_set_floating(combo_box_ex,TRUE);
// 样式
// 修改边框颜色
widget_set_style_str(combo_box_ex,"normal:border_color","#C2C2C2");
widget_set_style_str(combo_box_ex,"over:border_color","#C2C2C2");
widget_set_style_str(combo_box_ex,"changed:border_color","#C2C2C2");
widget_set_style_str(combo_box_ex,"disabled:border_color","#C2C2C2");
widget_set_style_str(combo_box_ex,"focus:border_color","#C2C2C2");
widget_set_style_str(combo_box_ex,"error:border_color","#C2C2C2");
widget_set_style_str(combo_box_ex,"empty:border_color","#C2C2C2");
widget_set_style_str(combo_box_ex,"empty_focus:border_color","#C2C2C2");
widget_set_style_str(combo_box_ex,"empty_over:border_color","#C2C2C2");
// 修改边框类型,left/right/top/bottom/all
widget_set_style_str(combo_box_ex,"normal:border","all");
widget_set_style_str(combo_box_ex,"over:border","all");
widget_set_style_str(combo_box_ex,"changed:border","all");
widget_set_style_str(combo_box_ex,"disabled:border","all");
widget_set_style_str(combo_box_ex,"focus:border","all");
widget_set_style_str(combo_box_ex,"error:border","all");
widget_set_style_str(combo_box_ex,"empty:border","all");
widget_set_style_str(combo_box_ex,"empty_focus:border","all");
widget_set_style_str(combo_box_ex,"empty_over:border","all");
// 修改边框宽度
widget_set_style_int(combo_box_ex,"normal:border_width",1);
widget_set_style_int(combo_box_ex,"over:border_width",1);
widget_set_style_int(combo_box_ex,"changed:border_width",1);
widget_set_style_int(combo_box_ex,"disabled:border_width",1);
widget_set_style_int(combo_box_ex,"focus:border_width",1);
widget_set_style_int(combo_box_ex,"error:border_width",1);
widget_set_style_int(combo_box_ex,"empty:border_width",1);
widget_set_style_int(combo_box_ex,"empty_focus:border_width",1);
widget_set_style_int(combo_box_ex,"empty_over:border_width",1);
// 修改圆角半径
widget_set_style_int(combo_box_ex,"normal:round_radius",4);
widget_set_style_int(combo_box_ex,"over:round_radius",4);
widget_set_style_int(combo_box_ex,"changed:round_radius",4);
widget_set_style_int(combo_box_ex,"disabled:round_radius",4);
widget_set_style_int(combo_box_ex,"focus:round_radius",4);
widget_set_style_int(combo_box_ex,"error:round_radius",4);
widget_set_style_int(combo_box_ex,"empty:round_radius",4);
widget_set_style_int(combo_box_ex,"empty_focus:round_radius",4);
widget_set_style_int(combo_box_ex,"empty_over:round_radius",4);
// 修改左上圆角半径
widget_set_style_int(combo_box_ex,"normal:round_radius_top_left",4);
widget_set_style_int(combo_box_ex,"over:round_radius_top_left",4);
widget_set_style_int(combo_box_ex,"changed:round_radius_top_left",4);
widget_set_style_int(combo_box_ex,"disabled:round_radius_top_left",4);
widget_set_style_int(combo_box_ex,"focus:round_radius_top_left",4);
widget_set_style_int(combo_box_ex,"error:round_radius_top_left",4);
widget_set_style_int(combo_box_ex,"empty:round_radius_top_left",4);
widget_set_style_int(combo_box_ex,"empty_focus:round_radius_top_left",4);
widget_set_style_int(combo_box_ex,"empty_over:round_radius_top_left",4);
// 修改右上圆角半径
widget_set_style_int(combo_box_ex,"normal:round_radius_top_right",4);
widget_set_style_int(combo_box_ex,"over:round_radius_top_right",4);
widget_set_style_int(combo_box_ex,"changed:round_radius_top_right",4);
widget_set_style_int(combo_box_ex,"disabled:round_radius_top_right",4);
widget_set_style_int(combo_box_ex,"focus:round_radius_top_right",4);
widget_set_style_int(combo_box_ex,"error:round_radius_top_right",4);
widget_set_style_int(combo_box_ex,"empty:round_radius_top_right",4);
widget_set_style_int(combo_box_ex,"empty_focus:round_radius_top_right",4);
widget_set_style_int(combo_box_ex,"empty_over:round_radius_top_right",4);
// 修改左下圆角半径
widget_set_style_int(combo_box_ex,"normal:round_radius_bottom_left",4);
widget_set_style_int(combo_box_ex,"over:round_radius_bottom_left",4);
widget_set_style_int(combo_box_ex,"changed:round_radius_bottom_left",4);
widget_set_style_int(combo_box_ex,"disabled:round_radius_bottom_left",4);
widget_set_style_int(combo_box_ex,"focus:round_radius_bottom_left",4);
widget_set_style_int(combo_box_ex,"error:round_radius_bottom_left",4);
widget_set_style_int(combo_box_ex,"empty:round_radius_bottom_left",4);
widget_set_style_int(combo_box_ex,"empty_focus:round_radius_bottom_left",4);
widget_set_style_int(combo_box_ex,"empty_over:round_radius_bottom_left",4);
// 修改右下圆角半径
widget_set_style_int(combo_box_ex,"normal:round_radius_bottom_right",4);
widget_set_style_int(combo_box_ex,"over:round_radius_bottom_right",4);
widget_set_style_int(combo_box_ex,"changed:round_radius_bottom_right",4);
widget_set_style_int(combo_box_ex,"disabled:round_radius_bottom_right",4);
widget_set_style_int(combo_box_ex,"focus:round_radius_bottom_right",4);
widget_set_style_int(combo_box_ex,"error:round_radius_bottom_right",4);
widget_set_style_int(combo_box_ex,"empty:round_radius_bottom_right",4);
widget_set_style_int(combo_box_ex,"empty_focus:round_radius_bottom_right",4);
widget_set_style_int(combo_box_ex,"empty_over:round_radius_bottom_right",4);
// 修改文本颜色
widget_set_style_str(combo_box_ex,"normal:text_color","#959494");
widget_set_style_str(combo_box_ex,"over:text_color","#959494");
widget_set_style_str(combo_box_ex,"changed:text_color","#959494");
widget_set_style_str(combo_box_ex,"disabled:text_color","#959494");
widget_set_style_str(combo_box_ex,"focus:text_color","#959494");
widget_set_style_str(combo_box_ex,"error:text_color","#959494");
widget_set_style_str(combo_box_ex,"empty:text_color","#959494");
widget_set_style_str(combo_box_ex,"empty_focus:text_color","#959494");
widget_set_style_str(combo_box_ex,"empty_over:text_color","#959494");
// 修改选中文本颜色
widget_set_style_str(combo_box_ex,"normal:selected_text_color","#010101");
widget_set_style_str(combo_box_ex,"over:selected_text_color","#010101");
widget_set_style_str(combo_box_ex,"changed:selected_text_color","#010101");
widget_set_style_str(combo_box_ex,"disabled:selected_text_color","#010101");
widget_set_style_str(combo_box_ex,"focus:selected_text_color","#010101");
widget_set_style_str(combo_box_ex,"error:selected_text_color","#010101");
widget_set_style_str(combo_box_ex,"empty:selected_text_color","#010101");
widget_set_style_str(combo_box_ex,"empty_focus:selected_text_color","#010101");
widget_set_style_str(combo_box_ex,"empty_over:selected_text_color","#010101");
// 修改提示文本颜色
widget_set_style_str(combo_box_ex,"normal:tips_text_color","#959494");
widget_set_style_str(combo_box_ex,"over:tips_text_color","#959494");
widget_set_style_str(combo_box_ex,"changed:tips_text_color","#959494");
widget_set_style_str(combo_box_ex,"disabled:tips_text_color","#959494");
widget_set_style_str(combo_box_ex,"focus:tips_text_color","#959494");
widget_set_style_str(combo_box_ex,"error:tips_text_color","#959494");
widget_set_style_str(combo_box_ex,"empty:tips_text_color","#959494");
widget_set_style_str(combo_box_ex,"empty_focus:tips_text_color","#959494");
widget_set_style_str(combo_box_ex,"empty_over:tips_text_color","#959494");
// 修改字体名称
widget_set_style_str(combo_box_ex,"normal:font_name","font_name");
widget_set_style_str(combo_box_ex,"over:font_name","font_name");
widget_set_style_str(combo_box_ex,"changed:font_name","font_name");
widget_set_style_str(combo_box_ex,"disabled:font_name","font_name");
widget_set_style_str(combo_box_ex,"focus:font_name","font_name");
widget_set_style_str(combo_box_ex,"error:font_name","font_name");
widget_set_style_str(combo_box_ex,"empty:font_name","font_name");
widget_set_style_str(combo_box_ex,"empty_focus:font_name","font_name");
widget_set_style_str(combo_box_ex,"empty_over:font_name","font_name");
// 修改字体大小
widget_set_style_int(combo_box_ex,"normal:font_size",18);
widget_set_style_int(combo_box_ex,"over:font_size",18);
widget_set_style_int(combo_box_ex,"changed:font_size",18);
widget_set_style_int(combo_box_ex,"disabled:font_size",18);
widget_set_style_int(combo_box_ex,"focus:font_size",18);
widget_set_style_int(combo_box_ex,"error:font_size",18);
widget_set_style_int(combo_box_ex,"empty:font_size",18);
widget_set_style_int(combo_box_ex,"empty_focus:font_size",18);
widget_set_style_int(combo_box_ex,"empty_over:font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style_str(combo_box_ex,"normal:text_align_h","center");
widget_set_style_str(combo_box_ex,"over:text_align_h","center");
widget_set_style_str(combo_box_ex,"changed:text_align_h","center");
widget_set_style_str(combo_box_ex,"disabled:text_align_h","center");
widget_set_style_str(combo_box_ex,"focus:text_align_h","center");
widget_set_style_str(combo_box_ex,"error:text_align_h","center");
widget_set_style_str(combo_box_ex,"empty:text_align_h","center");
widget_set_style_str(combo_box_ex,"empty_focus:text_align_h","center");
widget_set_style_str(combo_box_ex,"empty_over:text_align_h","center");
// 修改背景颜色
widget_set_style_str(combo_box_ex,"normal:bg_color","#F7F7F7");
widget_set_style_str(combo_box_ex,"over:bg_color","#F7F7F7");
widget_set_style_str(combo_box_ex,"changed:bg_color","#F7F7F7");
widget_set_style_str(combo_box_ex,"disabled:bg_color","#F7F7F7");
widget_set_style_str(combo_box_ex,"focus:bg_color","#F7F7F7");
widget_set_style_str(combo_box_ex,"error:bg_color","#F7F7F7");
widget_set_style_str(combo_box_ex,"empty:bg_color","#F7F7F7");
widget_set_style_str(combo_box_ex,"empty_focus:bg_color","#F7F7F7");
widget_set_style_str(combo_box_ex,"empty_over:bg_color","#F7F7F7");
// 修改选中背景颜色
widget_set_style_str(combo_box_ex,"normal:selected_bg_color","#B5D7FD");
widget_set_style_str(combo_box_ex,"over:selected_bg_color","#B5D7FD");
widget_set_style_str(combo_box_ex,"changed:selected_bg_color","#B5D7FD");
widget_set_style_str(combo_box_ex,"disabled:selected_bg_color","#B5D7FD");
widget_set_style_str(combo_box_ex,"focus:selected_bg_color","#B5D7FD");
widget_set_style_str(combo_box_ex,"error:selected_bg_color","#B5D7FD");
widget_set_style_str(combo_box_ex,"empty:selected_bg_color","#B5D7FD");
widget_set_style_str(combo_box_ex,"empty_focus:selected_bg_color","#B5D7FD");
widget_set_style_str(combo_box_ex,"empty_over:selected_bg_color","#B5D7FD");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/changed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(combo_box_ex,"normal:bg_image","item");
widget_set_style_str(combo_box_ex,"over:bg_image","item");
widget_set_style_str(combo_box_ex,"changed:bg_image","item");
widget_set_style_str(combo_box_ex,"disable:bg_image","item");
widget_set_style_str(combo_box_ex,"focus:bg_image","item");
widget_set_style_str(combo_box_ex,"error:bg_image","item");
widget_set_style_str(combo_box_ex,"empty:bg_image","item");
widget_set_style_str(combo_box_ex,"empty_focus:bg_image","item");
widget_set_style_str(combo_box_ex,"empty_over:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(combo_box_ex,"normal:bg_image_draw_type","way");
widget_set_style_str(combo_box_ex,"over:bg_image_draw_type","way");
widget_set_style_str(combo_box_ex,"changed:bg_image_draw_type","way");
widget_set_style_str(combo_box_ex,"disabled:bg_image_draw_type","way");
widget_set_style_str(combo_box_ex,"focus:bg_image_draw_type","way");
widget_set_style_str(combo_box_ex,"error:bg_image_draw_type","way");
widget_set_style_str(combo_box_ex,"empty:bg_image_draw_type","way");
widget_set_style_str(combo_box_ex,"empty_focus:bg_image_draw_type","way");
widget_set_style_str(combo_box_ex,"empty_over:bg_image_draw_type","way");
// 修改边距
widget_set_style_int(combo_box_ex,"normal:margin",0);
widget_set_style_int(combo_box_ex,"over:margin",0);
widget_set_style_int(combo_box_ex,"changed:margin",0);
widget_set_style_int(combo_box_ex,"disabled:margin",0);
widget_set_style_int(combo_box_ex,"focus:margin",0);
widget_set_style_int(combo_box_ex,"error:border_color",0);
widget_set_style_int(combo_box_ex,"empty:border_color",0);
widget_set_style_int(combo_box_ex,"empty_focus:border_color",0);
widget_set_style_int(combo_box_ex,"empty_over:border_color",0);
// 修改上边距
widget_set_style_int(combo_box_ex,"normal:margin_top",0);
widget_set_style_int(combo_box_ex,"over:margin_top",0);
widget_set_style_int(combo_box_ex,"changed:margin_top",0);
widget_set_style_int(combo_box_ex,"disabled:margin_top",0);
widget_set_style_int(combo_box_ex,"focus:margin_top",0);
widget_set_style_int(combo_box_ex,"error:margin_top",0);
widget_set_style_int(combo_box_ex,"empty:margin_top",0);
widget_set_style_int(combo_box_ex,"empty_focus:margin_top",0);
widget_set_style_int(combo_box_ex,"empty_over:margin_top",0);
// 修改下边距
widget_set_style_int(combo_box_ex,"normal:margin_bottom",0);
widget_set_style_int(combo_box_ex,"over:margin_bottom",0);
widget_set_style_int(combo_box_ex,"changed:margin_bottom",0);
widget_set_style_int(combo_box_ex,"disabled:margin_bottom",0);
widget_set_style_int(combo_box_ex,"focus:margin_bottom",0);
widget_set_style_int(combo_box_ex,"error:margin_bottom",0);
widget_set_style_int(combo_box_ex,"empty:margin_bottom",0);
widget_set_style_int(combo_box_ex,"empty_focus:margin_bottom",0);
widget_set_style_int(combo_box_ex,"empty_over:margin_bottom",0);
// 修改左边距
widget_set_style_int(combo_box_ex,"normal:margin_left",0);
widget_set_style_int(combo_box_ex,"over:margin_left",0);
widget_set_style_int(combo_box_ex,"changed:margin_left",0);
widget_set_style_int(combo_box_ex,"disabled:margin_left",0);
widget_set_style_int(combo_box_ex,"focus:margin_left",0);
widget_set_style_int(combo_box_ex,"error:margin_left",0);
widget_set_style_int(combo_box_ex,"empty:margin_left",0);
widget_set_style_int(combo_box_ex,"empty_focus:margin_left",0);
widget_set_style_int(combo_box_ex,"empty_over:margin_left",0);
// 修改右边距
widget_set_style_int(combo_box_ex,"normal:margin_right",0);
widget_set_style_int(combo_box_ex,"over:margin_right",0);
widget_set_style_int(combo_box_ex,"changed:margin_right",0);
widget_set_style_int(combo_box_ex,"disabled:margin_right",0);
widget_set_style_int(combo_box_ex,"focus:margin_right",0);
widget_set_style_int(combo_box_ex,"error:margin_right",0);
widget_set_style_int(combo_box_ex,"empty:margin_right",0);
widget_set_style_int(combo_box_ex,"empty_focus:margin_right",0);
widget_set_style_int(combo_box_ex,"empty_over:margin_right",0);
// 修改x方向偏移量
widget_set_style_int(combo_box_ex,"normal:x_offset",0);
widget_set_style_int(combo_box_ex,"over:x_offset",0);
widget_set_style_int(combo_box_ex,"changed:x_offset",0);
widget_set_style_int(combo_box_ex,"disabled:x_offset",0);
widget_set_style_int(combo_box_ex,"focus:x_offset",0);
widget_set_style_int(combo_box_ex,"error:x_offset",0);
widget_set_style_int(combo_box_ex,"empty:x_offset",0);
widget_set_style_int(combo_box_ex,"empty_focus:x_offset",0);
widget_set_style_int(combo_box_ex,"empty_over:x_offset",0);
// 修改y方向偏移量
widget_set_style_int(combo_box_ex,"normal:y_offset",0);
widget_set_style_int(combo_box_ex,"over:y_offset",0);
widget_set_style_int(combo_box_ex,"changed:y_offset",0);
widget_set_style_int(combo_box_ex,"disabled:y_offset",0);
widget_set_style_int(combo_box_ex,"focus:y_offset",0);
widget_set_style_int(combo_box_ex,"error:y_offset",0);
widget_set_style_int(combo_box_ex,"empty:y_offset",0);
widget_set_style_int(combo_box_ex,"empty_focus:y_offset",0);
widget_set_style_int(combo_box_ex,"empty_over:y_offset",0);
// 动画
// 值
widget_set_auto_fix(combo_box_ex,TRUE);
widget_set_input_type(combo_box_ex,"text");	// text,int,uint,hex,float,ufloat,email,password,phone,ipv4,date,time,time_full,custom,custom_password,ascii
widget_set_min(combo_box_ex,0);
widget_set_max(combo_box_ex,1024);
widget_set_step(combo_box_ex,1);
widget_set_tips(combo_box_ex,"enter yout text");
widget_set_value(combo_box_ex,0);
widget_set_text(combo_box_ex,"combo_box_ex_value");
widget_set_options(combo_box_ex,""item"");
widget_set_selected_index(combo_box_ex,0);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(combo_box_ex,TRUE);
// 是否接收用户事件
widget_set_sensitive(combo_box_ex,TRUE);
// 是否支持焦点停留
widget_set_focusable(combo_box_ex,TRUE);
// 是否支持焦点状态
widget_set_focus_state(combo_box_ex,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(combo_box_ex,4);
// 点击按钮时,要打开的窗口名称
widget_set_open_window(combo_box_ex,"window_name");
// 弹出窗口的主题
widget_set_theme_of_popup(combo_box_ex,"window-theme");
// 下拉选项的高度
widget_set_item_height(combo_box_ex,30);
// 是否启用易点击事件
widget_set_easy_touch_mode(combo_box_ex,FALSE);
// 重复触发EVT_CLICK事件的时间间隔(ms)
widget_set_repeat(combo_box_ex,300);
// 软键盘上action按钮的文本,next,将焦点切换到下一个控件/done,完成,关闭软键盘
widget_set_action_text(combo_box_ex,"done");
// 自定义软键盘名称
widget_set_keyboard(combo_box_ex,"不使用软键盘");
// 设置编辑器是否为只读
widget_set_readonly(combo_box_ex,FALSE);
// 设置密码是否可见
widget_set_password_visible(combo_box_ex,FALSE);
// 获得焦点时不选中文本
widget_set_select_none_when_focused(combo_box_ex,FALSE);
// 获得焦点时打开输入法
widget_set_open_im_when_focused(combo_box_ex,TRUE);
// 是否在失去焦点时关闭输入法
widget_set_close_im_when_blurred(combo_box_ex,TRUE);
// 是否支持撤销编辑
widget_set_cancelble(combo_box_ex,FALSE);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_pointer_cursor(combo_box_ex,"name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_auto_adjust_size(combo_box_ex,TRUE);
1.8下拉列表项
// 创建下拉列表项
widget_t* combo_box_item = combo_box_item_create(parent,x,y,w,h);
// 状态
// normal,正常状态
// focused,聚焦状态
// disable,禁用状态
// over,悬浮状态
// pressed,值改变状态状态
// normal_of_checked,正常选中状态
// focused_of_checked,聚焦选中状态
// disable_of_checked,禁用选中状态
// over_of_checked,悬浮选中状态
// pressed_of_checked,值改变选中状态
// 设置名称
widget_set_name(combo_box_item,"combo_box_item");
// 设置布局
widget_set_children_layout(combo_box_item,params);// 无/单行/单列/网格
widget_set_enable(combo_box_item,TRUE);
widget_set_visible(combo_box_item,TRUE);
widget_set_floating(combo_box_item,TRUE);
// 样式
// 修改边框颜色
widget_set_style_str(combo_box_item,"normal:border_color","#C2C2C2");
widget_set_style_str(combo_box_item,"over:border_color","#C2C2C2");
widget_set_style_str(combo_box_item,"pressed:border_color","#C2C2C2");
widget_set_style_str(combo_box_item,"disabled:border_color","#C2C2C2");
widget_set_style_str(combo_box_item,"focus:border_color","#C2C2C2");
widget_set_style_str(combo_box_item,"normal_of_checked:border_color","#C2C2C2");
widget_set_style_str(combo_box_item,"over_of_checked:border_color","#C2C2C2");
widget_set_style_str(combo_box_item,"pressed_of_checked:border_color","#C2C2C2");
widget_set_style_str(combo_box_item,"disabled_of_checked:border_color","#C2C2C2");
widget_set_style_str(combo_box_item,"focus_of_checked:border_color","#C2C2C2");
// 修改边框类型,left/right/top/bottom/all
widget_set_style_str(combo_box_item,"normal:border","all");
widget_set_style_str(combo_box_item,"over:border","all");
widget_set_style_str(combo_box_item,"pressed:border","all");
widget_set_style_str(combo_box_item,"disabled:border","all");
widget_set_style_str(combo_box_item,"focus:border","all");
widget_set_style_str(combo_box_item,"normal_of_checked:border","all");
widget_set_style_str(combo_box_item,"over_of_checked:border","all");
widget_set_style_str(combo_box_item,"pressed_of_checked:border","all");
widget_set_style_str(combo_box_item,"disabled_of_checked:border","all");
widget_set_style_str(combo_box_item,"focus_of_checked:border","all");
// 修改边框宽度
widget_set_style_int(combo_box_item,"normal:border_width",1);
widget_set_style_int(combo_box_item,"over:border_width",1);
widget_set_style_int(combo_box_item,"pressed:border_width",1);
widget_set_style_int(combo_box_item,"disabled:border_width",1);
widget_set_style_int(combo_box_item,"focus:border_width",1);
widget_set_style_int(combo_box_item,"normal_of_checked:border_width",1);
widget_set_style_int(combo_box_item,"over_of_checked:border_width",1);
widget_set_style_int(combo_box_item,"pressed_of_checked:border_width",1);
widget_set_style_int(combo_box_item,"disabled_of_checked:border_width",1);
widget_set_style_int(combo_box_item,"focus_of_checked:border_width",1);
// 修改圆角半径
widget_set_style_int(combo_box_item,"normal:round_radius",4);
widget_set_style_int(combo_box_item,"over:round_radius",4);
widget_set_style_int(combo_box_item,"pressed:round_radius",4);
widget_set_style_int(combo_box_item,"disabled:round_radius",4);
widget_set_style_int(combo_box_item,"focus:round_radius",4);
widget_set_style_int(combo_box_item,"normal_of_checked:round_radius",4);
widget_set_style_int(combo_box_item,"over_of_checked:round_radius",4);
widget_set_style_int(combo_box_item,"pressed_of_checked:round_radius",4);
widget_set_style_int(combo_box_item,"disabled_of_checked:round_radius",4);
widget_set_style_int(combo_box_item,"focus_of_checked:round_radius",4);
// 修改左上圆角半径
widget_set_style_int(combo_box_item,"normal:round_radius_top_left",4);
widget_set_style_int(combo_box_item,"over:round_radius_top_left",4);
widget_set_style_int(combo_box_item,"pressed:round_radius_top_left",4);
widget_set_style_int(combo_box_item,"disabled:round_radius_top_left",4);
widget_set_style_int(combo_box_item,"focus:round_radius_top_left",4);
widget_set_style_int(combo_box_item,"normal_of_checked:round_radius_top_left",4);
widget_set_style_int(combo_box_item,"over_of_checked:round_radius_top_left",4);
widget_set_style_int(combo_box_item,"pressed_of_checked:round_radius_top_left",4);
widget_set_style_int(combo_box_item,"disabled_of_checked:round_radius_top_left",4);
widget_set_style_int(combo_box_item,"focus_of_checked:round_radius_top_left",4);
// 修改右上圆角半径
widget_set_style_int(combo_box_item,"normal:round_radius_top_right",4);
widget_set_style_int(combo_box_item,"over:round_radius_top_right",4);
widget_set_style_int(combo_box_item,"pressed:round_radius_top_right",4);
widget_set_style_int(combo_box_item,"disabled:round_radius_top_right",4);
widget_set_style_int(combo_box_item,"focus:round_radius_top_right",4);
widget_set_style_int(combo_box_item,"normal_of_checked:round_radius_top_right",4);
widget_set_style_int(combo_box_item,"over_of_checked:round_radius_top_right",4);
widget_set_style_int(combo_box_item,"pressed_of_checked:round_radius_top_right",4);
widget_set_style_int(combo_box_item,"disabled_of_checked:round_radius_top_right",4);
widget_set_style_int(combo_box_item,"focus_of_checked:round_radius_top_right",4);
// 修改左下圆角半径
widget_set_style_int(combo_box_item,"normal:round_radius_bottom_left",4);
widget_set_style_int(combo_box_item,"over:round_radius_bottom_left",4);
widget_set_style_int(combo_box_item,"pressed:round_radius_bottom_left",4);
widget_set_style_int(combo_box_item,"disabled:round_radius_bottom_left",4);
widget_set_style_int(combo_box_item,"focus:round_radius_bottom_left",4);
widget_set_style_int(combo_box_item,"normal_of_checked:round_radius_bottom_left",4);
widget_set_style_int(combo_box_item,"over_of_checked:round_radius_bottom_left",4);
widget_set_style_int(combo_box_item,"pressed_of_checked:round_radius_bottom_left",4);
widget_set_style_int(combo_box_item,"disabled_of_checked:round_radius_bottom_left",4);
widget_set_style_int(combo_box_item,"focus_of_checked:round_radius_bottom_left",4);
// 修改右下圆角半径
widget_set_style_int(combo_box_item,"normal:round_radius_bottom_right",4);
widget_set_style_int(combo_box_item,"over:round_radius_bottom_right",4);
widget_set_style_int(combo_box_item,"pressed:round_radius_bottom_right",4);
widget_set_style_int(combo_box_item,"disabled:round_radius_bottom_right",4);
widget_set_style_int(combo_box_item,"focus:round_radius_bottom_right",4);
widget_set_style_int(combo_box_item,"normal_of_checked:round_radius_bottom_right",4);
widget_set_style_int(combo_box_item,"over_of_checked:round_radius_bottom_right",4);
widget_set_style_int(combo_box_item,"pressed_of_checked:round_radius_bottom_right",4);
widget_set_style_int(combo_box_item,"disabled_of_checked:round_radius_bottom_right",4);
widget_set_style_int(combo_box_item,"focus_of_checked:round_radius_bottom_right",4);
// 修改文本颜色
widget_set_style_str(combo_box_item,"normal:text_color","#959494");
widget_set_style_str(combo_box_item,"over:text_color","#959494");
widget_set_style_str(combo_box_item,"pressed:text_color","#959494");
widget_set_style_str(combo_box_item,"disabled:text_color","#959494");
widget_set_style_str(combo_box_item,"focus:text_color","#959494");
widget_set_style_str(combo_box_item,"normal_of_checked:text_color","#959494");
widget_set_style_str(combo_box_item,"over_of_checked:text_color","#959494");
widget_set_style_str(combo_box_item,"pressed_of_checked:text_color","#959494");
widget_set_style_str(combo_box_item,"disabled_of_checked:text_color","#959494");
widget_set_style_str(combo_box_item,"focus_of_checked:text_color","#959494");
// 修改选中文本颜色
widget_set_style_str(combo_box_item,"normal:selected_text_color","#010101");
widget_set_style_str(combo_box_item,"over:selected_text_color","#010101");
widget_set_style_str(combo_box_item,"pressed:selected_text_color","#010101");
widget_set_style_str(combo_box_item,"disabled:selected_text_color","#010101");
widget_set_style_str(combo_box_item,"focus:selected_text_color","#010101");
widget_set_style_str(combo_box_item,"normal_of_checked:selected_text_color","#010101");
widget_set_style_str(combo_box_item,"over_of_checked:selected_text_color","#010101");
widget_set_style_str(combo_box_item,"pressed_of_checked:selected_text_color","#010101");
widget_set_style_str(combo_box_item,"disabled_of_checked:selected_text_color","#010101");
widget_set_style_str(combo_box_item,"focus_of_checked:selected_text_color","#010101");
// 修改提示文本颜色
widget_set_style_str(combo_box_item,"normal:tips_text_color","#959494");
widget_set_style_str(combo_box_item,"over:tips_text_color","#959494");
widget_set_style_str(combo_box_item,"pressed:tips_text_color","#959494");
widget_set_style_str(combo_box_item,"disabled:tips_text_color","#959494");
widget_set_style_str(combo_box_item,"focus:tips_text_color","#959494");
widget_set_style_str(combo_box_item,"normal_of_checked:tips_text_color","#959494");
widget_set_style_str(combo_box_item,"over_of_checked:tips_text_color","#959494");
widget_set_style_str(combo_box_item,"pressed_of_checked:tips_text_color","#959494");
widget_set_style_str(combo_box_item,"disabled_of_checked:tips_text_color","#959494");
widget_set_style_str(combo_box_item,"focus_of_checked:tips_text_color","#959494");
// 修改字体名称
widget_set_style_str(combo_box_item,"normal:font_name","font_name");
widget_set_style_str(combo_box_item,"over:font_name","font_name");
widget_set_style_str(combo_box_item,"pressed:font_name","font_name");
widget_set_style_str(combo_box_item,"disabled:font_name","font_name");
widget_set_style_str(combo_box_item,"focus:font_name","font_name");
widget_set_style_str(combo_box_item,"normal_of_checked:font_name","font_name");
widget_set_style_str(combo_box_item,"over_of_checked:font_name","font_name");
widget_set_style_str(combo_box_item,"pressed_of_checked:font_name","font_name");
widget_set_style_str(combo_box_item,"disabled_of_checked:font_name","font_name");
widget_set_style_str(combo_box_item,"focus_of_checked:font_name","font_name");
// 修改字体大小
widget_set_style_int(combo_box_item,"normal:font_size",18);
widget_set_style_int(combo_box_item,"over:font_size",18);
widget_set_style_int(combo_box_item,"pressed:font_size",18);
widget_set_style_int(combo_box_item,"disabled:font_size",18);
widget_set_style_int(combo_box_item,"focus:font_size",18);
widget_set_style_int(combo_box_item,"normal_of_checked:font_size",18);
widget_set_style_int(combo_box_item,"over_of_checked:font_size",18);
widget_set_style_int(combo_box_item,"pressed_of_checked:font_size",18);
widget_set_style_int(combo_box_item,"disabled_of_checked:font_size",18);
widget_set_style_int(combo_box_item,"focus_of_checked:font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style_str(combo_box_item,"normal:text_align_h","center");
widget_set_style_str(combo_box_item,"over:text_align_h","center");
widget_set_style_str(combo_box_item,"pressed:text_align_h","center");
widget_set_style_str(combo_box_item,"disabled:text_align_h","center");
widget_set_style_str(combo_box_item,"focus:text_align_h","center");
widget_set_style_str(combo_box_item,"normal_of_checked:text_align_h","center");
widget_set_style_str(combo_box_item,"over_of_checked:text_align_h","center");
widget_set_style_str(combo_box_item,"pressed_of_checked:text_align_h","center");
widget_set_style_str(combo_box_item,"disabled_of_checked:text_align_h","center");
widget_set_style_str(combo_box_item,"focus_of_checked:text_align_h","center");
// 修改背景颜色
widget_set_style_str(combo_box_item,"normal:bg_color","#F7F7F7");
widget_set_style_str(combo_box_item,"over:bg_color","#F7F7F7");
widget_set_style_str(combo_box_item,"pressed:bg_color","#F7F7F7");
widget_set_style_str(combo_box_item,"disabled:bg_color","#F7F7F7");
widget_set_style_str(combo_box_item,"focus:bg_color","#F7F7F7");
widget_set_style_str(combo_box_item,"normal_of_checked:bg_color","#F7F7F7");
widget_set_style_str(combo_box_item,"over_of_checked:bg_color","#F7F7F7");
widget_set_style_str(combo_box_item,"pressed_of_checked:bg_color","#F7F7F7");
widget_set_style_str(combo_box_item,"disabled_of_checked:bg_color","#F7F7F7");
widget_set_style_str(combo_box_item,"focus_of_checked:bg_color","#F7F7F7");
// 修改选中背景颜色
widget_set_style_str(combo_box_item,"normal:selected_bg_color","#B5D7FD");
widget_set_style_str(combo_box_item,"over:selected_bg_color","#B5D7FD");
widget_set_style_str(combo_box_item,"pressed:selected_bg_color","#B5D7FD");
widget_set_style_str(combo_box_item,"disabled:selected_bg_color","#B5D7FD");
widget_set_style_str(combo_box_item,"focus:selected_bg_color","#B5D7FD");
widget_set_style_str(combo_box_item,"normal_of_checked:selected_bg_color","#B5D7FD");
widget_set_style_str(combo_box_item,"over_of_checked:selected_bg_color","#B5D7FD");
widget_set_style_str(combo_box_item,"pressed_of_checked:selected_bg_color","#B5D7FD");
widget_set_style_str(combo_box_item,"disabled_of_checked:selected_bg_color","#B5D7FD");
widget_set_style_str(combo_box_item,"focus_of_checked:selected_bg_color","#B5D7FD");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(combo_box_item,"normal:bg_image","item");
widget_set_style_str(combo_box_item,"over:bg_image","item");
widget_set_style_str(combo_box_item,"pressed:bg_image","item");
widget_set_style_str(combo_box_item,"disable:bg_image","item");
widget_set_style_str(combo_box_item,"focus:bg_image","item");
widget_set_style_str(combo_box_item,"normal_of_checked:bg_image","item");
widget_set_style_str(combo_box_item,"over_of_checked:bg_image","item");
widget_set_style_str(combo_box_item,"pressed_of_checked:bg_image","item");
widget_set_style_str(combo_box_item,"disable_of_checked:bg_image","item");
widget_set_style_str(combo_box_item,"focus_of_checked:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(combo_box_item,"normal:bg_image_draw_type","way");
widget_set_style_str(combo_box_item,"over:bg_image_draw_type","way");
widget_set_style_str(combo_box_item,"pressed:bg_image_draw_type","way");
widget_set_style_str(combo_box_item,"disabled:bg_image_draw_type","way");
widget_set_style_str(combo_box_item,"focus:bg_image_draw_type","way");
widget_set_style_str(combo_box_item,"normal_of_checked:bg_image_draw_type","way");
widget_set_style_str(combo_box_item,"over_of_checked:bg_image_draw_type","way");
widget_set_style_str(combo_box_item,"pressed_of_checked:bg_image_draw_type","way");
widget_set_style_str(combo_box_item,"disabled_of_checked:bg_image_draw_type","way");
widget_set_style_str(combo_box_item,"focus_of_checked:bg_image_draw_type","way");
// 修改边距
widget_set_style_int(combo_box_item,"normal:margin",0);
widget_set_style_int(combo_box_item,"over:margin",0);
widget_set_style_int(combo_box_item,"pressed:margin",0);
widget_set_style_int(combo_box_item,"disabled:margin",0);
widget_set_style_int(combo_box_item,"focus:margin",0);
widget_set_style_int(combo_box_item,"normal_of_checked:margin",0);
widget_set_style_int(combo_box_item,"over_of_checked:margin",0);
widget_set_style_int(combo_box_item,"pressed_of_checked:margin",0);
widget_set_style_int(combo_box_item,"disabled_of_checked:margin",0);
widget_set_style_int(combo_box_item,"focus_of_checked:margin",0);
// 修改上边距
widget_set_style_int(combo_box_item,"normal:margin_top",0);
widget_set_style_int(combo_box_item,"over:margin_top",0);
widget_set_style_int(combo_box_item,"pressed:margin_top",0);
widget_set_style_int(combo_box_item,"disabled:margin_top",0);
widget_set_style_int(combo_box_item,"focus:margin_top",0);
widget_set_style_int(combo_box_item,"normal_of_checked:margin_top",0);
widget_set_style_int(combo_box_item,"ove_of_checkedr:margin_top",0);
widget_set_style_int(combo_box_item,"pressed_of_checked:margin_top",0);
widget_set_style_int(combo_box_item,"disabled_of_checked:margin_top",0);
widget_set_style_int(combo_box_item,"focus_of_checked:margin_top",0);
// 修改下边距
widget_set_style_int(combo_box_item,"normal:margin_bottom",0);
widget_set_style_int(combo_box_item,"over:margin_bottom",0);
widget_set_style_int(combo_box_item,"pressed:margin_bottom",0);
widget_set_style_int(combo_box_item,"disabled:margin_bottom",0);
widget_set_style_int(combo_box_item,"focus:margin_bottom",0);
widget_set_style_int(combo_box_item,"normal_of_checked:margin_bottom",0);
widget_set_style_int(combo_box_item,"over_of_checked:margin_bottom",0);
widget_set_style_int(combo_box_item,"pressed_of_checked:margin_bottom",0);
widget_set_style_int(combo_box_item,"disabled_of_checked:margin_bottom",0);
widget_set_style_int(combo_box_item,"focus_of_checked:margin_bottom",0);
// 修改左边距
widget_set_style_int(combo_box_item,"normal:margin_left",0);
widget_set_style_int(combo_box_item,"over:margin_left",0);
widget_set_style_int(combo_box_item,"pressed:margin_left",0);
widget_set_style_int(combo_box_item,"disabled:margin_left",0);
widget_set_style_int(combo_box_item,"focus:margin_left",0);
widget_set_style_int(combo_box_item,"normal_of_checked:margin_left",0);
widget_set_style_int(combo_box_item,"over_of_checked:margin_left",0);
widget_set_style_int(combo_box_item,"pressed_of_checked:margin_left",0);
widget_set_style_int(combo_box_item,"disabled_of_checked:margin_left",0);
widget_set_style_int(combo_box_item,"focus_of_checked:margin_left",0);
// 修改右边距
widget_set_style_int(combo_box_item,"normal:margin_right",0);
widget_set_style_int(combo_box_item,"over:margin_right",0);
widget_set_style_int(combo_box_item,"pressed:margin_right",0);
widget_set_style_int(combo_box_item,"disabled:margin_right",0);
widget_set_style_int(combo_box_item,"focus:margin_right",0);
widget_set_style_int(combo_box_item,"normal_of_checked:margin_right",0);
widget_set_style_int(combo_box_item,"over_of_checked:margin_right",0);
widget_set_style_int(combo_box_item,"pressed_of_checked:margin_right",0);
widget_set_style_int(combo_box_item,"disabled_of_checked:margin_right",0);
widget_set_style_int(combo_box_item,"focus_of_checked:margin_right",0);
// 修改x方向偏移量
widget_set_style_int(combo_box_item,"normal:x_offset",0);
widget_set_style_int(combo_box_item,"over:x_offset",0);
widget_set_style_int(combo_box_item,"pressed:x_offset",0);
widget_set_style_int(combo_box_item,"disabled:x_offset",0);
widget_set_style_int(combo_box_item,"focus:x_offset",0);
widget_set_style_int(combo_box_item,"normal_of_checked:x_offset",0);
widget_set_style_int(combo_box_item,"over_of_checked:x_offset",0);
widget_set_style_int(combo_box_item,"pressed_of_checked:x_offset",0);
widget_set_style_int(combo_box_item,"disabled_of_checked:x_offset",0);
widget_set_style_int(combo_box_item,"focus_of_checked:x_offset",0);
// 修改y方向偏移量
widget_set_style_int(combo_box_item,"normal:y_offset",0);
widget_set_style_int(combo_box_item,"over:y_offset",0);
widget_set_style_int(combo_box_item,"changed:y_offset",0);
widget_set_style_int(combo_box_item,"disabled:y_offset",0);
widget_set_style_int(combo_box_item,"focus:y_offset",0);
widget_set_style_int(combo_box_item,"normal_of_checked:y_offset",0);
widget_set_style_int(combo_box_item,"over_of_checked:y_offset",0);
widget_set_style_int(combo_box_item,"changed_of_checked:y_offset",0);
widget_set_style_int(combo_box_item,"disabled_of_checked:y_offset",0);
widget_set_style_int(combo_box_item,"focus_of_checked:y_offset",0);
// 修改间距
widget_set_style_int(combo_box_item,"normal:spacer",2);
widget_set_style_int(combo_box_item,"over:spacer",2);
widget_set_style_int(combo_box_item,"changed:spacer",2);
widget_set_style_int(combo_box_item,"disabled:spacer",2);
widget_set_style_int(combo_box_item,"focus:spacer",2);
widget_set_style_int(combo_box_item,"normal_of_checked:spacer",2);
widget_set_style_int(combo_box_item,"over_of_checked:spacer",2);
widget_set_style_int(combo_box_item,"changed_of_checked:spacer",2);
widget_set_style_int(combo_box_item,"disabled_of_checked:spacer",2);
widget_set_style_int(combo_box_item,"focus_of_checked:spacer",2);
// 动画
// 值
widget_set_value(combo_box_item,0);
widget_set_text(combo_box_item,"combo_box_item_value");
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(combo_box_item,TRUE);
// 是否接收用户事件
widget_set_sensitive(combo_box_item,TRUE);
// 是否支持焦点停留
widget_set_focusable(combo_box_item,TRUE);
// 是否支持焦点状态
widget_set_focus_state(combo_box_item,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(combo_box_item,4);
// 点击按钮时,要打开的窗口名称
widget_set_open_window(combo_box_item,"window_name");
// 弹出窗口的主题
widget_set_theme_of_popup(combo_box_item,"window-theme");
// 下拉选项的高度
widget_set_item_height(combo_box_item,30);
// 是否启用易点击事件
widget_set_easy_touch_mode(combo_box_item,FALSE);
// 重复触发EVT_CLICK事件的时间间隔(ms)
widget_set_repeat(combo_box_item,300);
// 软键盘上action按钮的文本,next,将焦点切换到下一个控件/done,完成,关闭软键盘
widget_set_action_text(combo_box_item,"done");
// 自定义软键盘名称
widget_set_keyboard(combo_box_item,"不使用软键盘");
// 设置编辑器是否为只读
widget_set_readonly(combo_box_item,FALSE);
// 设置密码是否可见
widget_set_password_visible(combo_box_item,FALSE);
// 获得焦点时不选中文本
widget_set_select_none_when_focused(combo_box_item,FALSE);
// 获得焦点时打开输入法
widget_set_open_im_when_focused(combo_box_item,TRUE);
// 是否在失去焦点时关闭输入法
widget_set_close_im_when_blurred(combo_box_item,TRUE);
// 是否支持撤销编辑
widget_set_cancelble(combo_box_item,FALSE);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_pointer_cursor(combo_box_item,"name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_auto_adjust_size(combo_box_item,TRUE);
1.9静态文本
// 创建文本
widget_t* label = label_create(parent,x,y,w,h);
/**
 * @method widget_lookup
 * 查找指定名称的子控件(返回第一个)。
 * @annotation ["scriptable"]
 * @param {widget_t*} widget 控件对象。
 * @param {const char*} name 子控件的名称。
 * @param {bool_t} recursive 是否递归查找全部子控件。
 *
 * @return {widget_t*} 子控件或NULL。
 */
widget_t* widget_lookup(widget_t* widget, const char* name, bool_t recursive);
// 状态
// normal,正常状态
// disable,禁用状态
// focused,聚焦状态
widget_set_state(label,state);
   
// 名称
widget_set_name(label,"label_name");
// 布局
widget_set_children_layout(label,params);// 无/单行/单列/网格
widget_set_enable(label,TRUE);
widget_set_visible(label,TRUE);
widget_set_floating(label,TRUE);
// 样式
// 修改边框颜色
widget_set_style_str(label,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style_str(label,"border","all");
// 设置控件宽度
widget_set_style_int(label,"border_width",1);
// 设置圆角半径
widget_set_style_int(label,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(label,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(label,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(label,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(label,"round_radius_bottom_right",0);
// 设置文本颜色
widget_set_style_str(label,"text_color","#F00");
// 设置字体名称
widget_set_style_str(label,"font_name","label_name");
// 设置字体大小
widget_set_style_int(label,"font_size",18);
// 设置文本水平对齐方式,none/left/center/right
widget_set_style_str(label,"text_align_h","center");
// 设置文本垂直对齐方式,none/top/middle/bottom
widget_set_style_str(label,"text_align_v","midlle");
// 设置背景颜色
widget_set_style_str(label,"bg_color","#F00");
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(label,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(label,"bg_image_draw_type","default");
// 设置图标位置,auto/top/bottom/left/right/center
widget_set_style_str(label,"icon_at","auto");
// 设置图标
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(label,"icon","item");
// 设置边距
widget_set_style_int(label,"margin",0);
// 设置上边距
widget_set_style_int(label,"margin_top",0);
// 设置下边距
widget_set_style_int(label,"margin_bottom",0);
// 设置左边距
widget_set_style_int(label,"margin_left",0);
// 设置右边距
widget_set_style_int(label,"margin_right",0);
// 设置x方向的偏移量
widget_set_style_int(label,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(label,"y_offset",0);
// 设置间距
widget_set_style_int(label,"spacer",2);
// 动画
// 值
widget_set_text(label,"Hi,Midea");
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(label,TRUE);
// 是否接收用户事件
widget_set_sensitive(label,TRUE);
// 是否支持焦点停留
widget_set_focusable(label,TRUE);
// 是否支持焦点状态
widget_set_focus_state(label,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(label,4);
// 设置显示字符的个数(小于0时全部显示)
widget_set_length(label,-1);
// 设置自动换行
widget_set_line_wrap(label,TRUE);
// 设置单词换行
widget_set_word_wrap(label,TRUE);
// 当auto_adjust_size为TRUE时,用于控制控件的最大宽度,超出该宽度后才自动换行
widget_set_max_w(label,0);
    
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_pointer_cursor(label,"name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_auto_adjust_size(label,TRUE);    
1.10图片
// 创建图片
widget_t* image = image_create(parent,x,y,w,h);
// 状态
// normal,正常状态
// pressed,指针按下状态
// selected,选中状态
// disable,禁用状态
// focused,聚焦状态
// 名称
widget_set_name(image,"image_name");
// 布局
widget_set_children_layout(image,params);// 无/单行/单列/网格
widget_set_enable(image,TRUE);
widget_set_visible(image,TRUE);
widget_set_floating(image,TRUE);
// 样式
// 修改边框颜色
widget_set_style_str(image,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style_str(image,"border","all");
// 设置控件宽度
widget_set_style_int(image,"border_width",1);
// 设置圆角半径
widget_set_style_int(image,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(image,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(image,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(image,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(image,"round_radius_bottom_right",0);
// 设置文本颜色
widget_set_style_str(image,"text_color","#F00");
// 设置字体名称
widget_set_style_str(image,"font_name","label_name");
// 设置字体大小
widget_set_style_int(image,"font_size",18);
// 设置文本水平对齐方式,none/left/center/right
widget_set_style_str(image,"text_align_h","center");
// 设置文本垂直对齐方式,none/top/middle/bottom
widget_set_style_str(image,"text_align_v","middle");
// 设置背景颜色
widget_set_style_str(image,"bg_color","#F00");
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(image,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(image,"bg_image_draw_type",default);
// 设置图标位置,auto/top/bottom/left/right/center
widget_set_style_str(image,"icon_at","auto");
// 设置图标
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(image,"icon","item");
// 设置边距
widget_set_style_int(image,"margin",0);
// 设置上边距
widget_set_style_int(image,"margin_top",0);
// 设置下边距
widget_set_style_int(image,"margin_bottom",0);
// 设置左边距
widget_set_style_int(image,"margin_left",0);
// 设置右边距
widget_set_style_int(image,"margin_right",0);
// 设置x方向的偏移量
widget_set_style_int(image,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(image,"y_offset",0);
// 设置间距
widget_set_style_int(image,"spacer",2);
// 动画
// 值
// 设置图片名称,cross/gauge_bg/num0
widget_set_image(image,num0);
// 设置图片的绘制方式,default/center/icon/scale
widget_set_draw_type(image,default);
// 设置控件在x方向上的缩放比例
widget_set_scale_x(image,1);
// 设置控件在y方向上的缩放比例
widget_set_scale_y(image,1);
// 设置文本
widget_set_text_utf8(image,"");
// 锚点(0-1).0在控件左边,0.5在控件中间,1在控件右边
widget_set_anchor_x(image,0.5);
// 锚点(0-1).0在控件上边,0.5在控件中间,1在控件下边
widget_set_anchor_y(image,0.5);
// 设置控件的旋转角度
widget_set_rotation(image,0);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(image,TRUE);
// 是否接收用户事件
widget_set_sensitive(image,TRUE);
// 是否支持焦点停留
widget_set_focusable(image,TRUE);
// 是否支持焦点状态
widget_set_focus_state(image,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(image,4);
// 设置点击时,是否触发EVT_CLICK事件
widget_set_clickable(image,FALSE);
// 是否设置选中状态
widget_set_selectable(image,FALSE);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_pointer_cursor(image,"name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_auto_adjust_size(image,TRUE);    
1.11滑动条
// 创建滑动条
widget_t* slider = slider_create(parent,x,y,w,h);
// 状态
// normal,正常状态
// disable,禁用状态
// focused,聚焦状态
// over,悬浮状态
// pressed,按下状态
    
// 名称
widget_set_name(slider,"slider_name");
// 布局
widget_set_children_layout(slider,params);// 无/单行/单列/网格
widget_set_enable(slider,TRUE);
widget_set_visible(slider,TRUE);
widget_set_floating(slider,TRUE);
// 样式
// 修改边框颜色
widget_set_style_str(slider,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style_str(slider,"border","all");
// 设置圆角半径
widget_set_style_int(slider,"round_radius",5);
// 设置左上圆角半径
widget_set_style_int(slider,"round_radius_top_left",5);
// 设置右上圆角半径
widget_set_style_int(slider,"round_radius_top_right",5);
// 设置左下圆角半径
widget_set_style_int(slider,"round_radius_bottom_left",5);
// 设置右下圆角半径
widget_set_style_int(slider,"round_radius_bottom_right",5);
// 设置背景颜色
widget_set_style_str(slider,"bg_color","#D8D8D8");
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(slider,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(slider,"bg_image_draw_type","default");
// 设置前景颜色
widget_set_style_str(slider,"fg_color","#338FFF");
// 设置前景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(slider,"fg_image","bg_image_name");
// 设置前景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(slider,"fg_image_draw_type","default");
// 设置图标位置,auto/top/bottom/left/right/center
widget_set_style_str(slider,"icon_at","auto");
// 设置图标
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(slider,"icon","item");
// 设置x方向的偏移量
widget_set_style_int(slider,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(slider,"y_offset",0);
// 动画
// 值
widget_set_min(slider,0);
widget_set_max(slider,100);
widget_set_step(slider,1);
widget_set_value(slider,40);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(slider,TRUE);
// 是否接收用户事件
widget_set_sensitive(slider,TRUE);
// 是否支持焦点停留
widget_set_focusable(slider,TRUE);
// 是否支持焦点状态
widget_set_focus_state(slider,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(slider,4);
// 设置轴的宽度或者高度
widget_set_bar_size(slider,0);
// 设置滑块的宽度或者高度
widget_set_dragger_size(slider,0);
// 设置前景色的线帽形状
widget_set_line_cap(slider,"");
// 滑块是否为垂直方向
widget_set_vertical(slider,FALSE);
// 滑块的宽/高度是否根据icon相适应
widget_set_dragger_adapt_to_icon(TRUE);
// 是否允许在轴上改变滑块位置
widget_set_slide_with_bar(FALSE);
    
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_pointer_cursor(slider,"name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_auto_adjust_size(slider,TRUE);    
1.12进度条
// 创建进度条
widget_t* progress_bar = progress_bar_create(parent,x,y,w,h);
// 状态
// normal,正常状态
// disable,禁用状态
// focused,聚焦状态
    
// 名称
widget_set_name(progress_bar,"progress_bar_name");
// 布局
widget_set_children_layout(progress_bar,params);// 无/单行/单列/网格
widget_set_enable(progress_bar,TRUE);
widget_set_visible(progress_bar,TRUE);
widget_set_floating(progress_bar,TRUE);
// 样式
// 修改边框颜色
widget_set_style_str(progress_bar,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style_str(progress_bar,"border","all");
// 设置边框宽度
widget_set_style_int(progress_bar,"border_width",1);
// 设置圆角半径
widget_set_style_int(progress_bar,"round_radius",5);
// 设置左上圆角半径
widget_set_style_int(progress_bar,"round_radius_top_left",5);
// 设置右上圆角半径
widget_set_style_int(progress_bar,"round_radius_top_right",5);
// 设置左下圆角半径
widget_set_style_int(progress_bar,"round_radius_bottom_left",5);
// 设置右下圆角半径
widget_set_style_int(progress_bar,"round_radius_bottom_right",5);
// 设置文文本颜色
widget_set_style_str(progress_bar,"text_color","#444444");
// 设置字体名字
widget_set_style_str(progress_bar,"font_name","default");
// 设置字体大小
widget_set_style_int(progress_bar,"font_size",18);
// 设置文本水平对齐方式,none/center/left/right
widget_set_style_str(progress_bar,"text_align_h","center");
// 设置文本竖直对齐方式,none/middle/top/buttom
widget_set_style_str(progress_bar,"text_align_v","middle");
// 设置背景颜色
widget_set_style_str(progress_bar,"bg_color","#D8D8D8");
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// progress_bar_bg/fg,背景/前景滑动条
widget_set_style_str(progress_bar,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(progress_bar,"bg_image_draw_type","default");
// 设置前景颜色
widget_set_style_str(progress_bar,"fg_color","#338FFF");
// 设置前景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// progress_bar_bg/fg,背景/前景滑动条
widget_set_style_str(progress_bar,"fg_image","bg_image_name");
// 设置前景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(progress_bar,"fg_image_draw_type","default");
// 设置图标位置,auto/top/bottom/left/right/center
widget_set_style_str(progress_bar,"icon_at","auto");
// 设置边距
widget_set_style_int(progress_ba,"margin",0);
// 设置上边距
widget_set_style_int(progress_bar,"margin_top",0);
// 设置下边距
widget_set_style_int(progress_bar,"margin_bottom",0);
// 设置左边距
widget_set_style_int(progress_bar,"margin_left",0);
// 设置右边距
widget_set_style_int(progress_bar,"margin_right",0);
// 设置图标
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// progress_bar_bg/fg,背景/前景滑动条
widget_set_style_str(progress_bar,"icon","item");
// 设置x方向的偏移量
widget_set_style_int(progress_bar,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(progress_bar,"y_offset",0);
// 动画
// 值
widget_set_max(progress_bar,100);
widget_set_value(progress_bar,40);
widget_set_format(progress_bar,"");	// 数值到字符串转换的格式
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(progress_bar,TRUE);
// 是否接收用户事件
widget_set_sensitive(progress_bar,TRUE);
// 是否支持焦点停留
widget_set_focusable(progress_bar,TRUE);
// 是否支持焦点状态
widget_set_focus_state(progress_bar,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(progress_bar,4);
// 进度条是否为垂直方向
widget_set_vertical(progress_bar,FALSE);
// 设置是否展示文本
widget_set_show_text(progress_bar,FALSE);
// 设置是否反向显示
widget_set_reverse(progress_bar,FALSE);
    
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// progress_bar_bg/fg,背景/前景滑动条
widget_set_pointer_cursor(progress_bar,"name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_auto_adjust_size(progress_bar,TRUE);    
1.13滚动条
// 创建进度条
widget_t* scroll_bar_d = scroll_bar_d_create(parent,x,y,w,h);
// 状态
// normal,正常状态
// disable,禁用状态
// focused,聚焦状态
// over,悬浮状态
// pressed,按下状态
// 名称
widget_set_name(scroll_bar_d,"scroll_bar_d_name");
// 布局
widget_set_children_layout(scroll_bar_d,params);// 无/单行/单列/网格
widget_set_enable(scroll_bar_d,TRUE);
widget_set_visible(scroll_bar_d,TRUE);
widget_set_floating(scroll_bar_d,TRUE);
// 样式
// 修改边框颜色
widget_set_style_str(scroll_bar_d,"border_color","#BEBEBE");
// 设置控件边框,left/right/top/bottom/all
widget_set_style_str(scroll_bar_d,"border","all");
// 设置边框宽度
widget_set_style_int(scroll_bar_d,"border_width",1);
// 设置圆角半径
widget_set_style_int(scroll_bar_d,"round_radius",5);
// 设置左上圆角半径
widget_set_style_int(scroll_bar_d,"round_radius_top_left",5);
// 设置右上圆角半径
widget_set_style_int(scroll_bar_d,"round_radius_top_right",5);
// 设置左下圆角半径
widget_set_style_int(scroll_bar_d,"round_radius_bottom_left",5);
// 设置右下圆角半径
widget_set_style_int(scroll_bar_d,"round_radius_bottom_right",5);
// 设置背景颜色
widget_set_style_str(scroll_bar_d,"bg_color","#D8D8D8");
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// scroll_bar_d_bg/fg,背景/前景滑动条
widget_set_style_str(scroll_bar_d,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(scroll_bar_d,"bg_image_draw_type",default);
// 设置x方向的偏移量
widget_set_style_int(scroll_bar_d,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(scroll_bar_d,"y_offset",0);
// 动画
// 值
widget_set_max(scroll_bar_d,100);
widget_set_value(scroll_bar_d,40);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(scroll_bar_d,TRUE);
// 是否接收用户事件
widget_set_sensitive(scroll_bar_d,TRUE);
// 是否支持焦点停留
widget_set_focusable(scroll_bar_d,TRUE);
// 是否支持焦点状态
widget_set_focus_state(scroll_bar_d,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(scroll_bar_d,4);
// 设置行高
widget_set_row(scroll_bar_d,30);
// 设置页面滚动的时间(ms)
widget_set_animator_time(scroll_bar_d,500);
// 设置滚动是否启动动画
widget_set_animatable(scroll_bar_d,TRUE);
// 设置是否自动隐藏
widget_set_auto_hide(scroll_bar_d,FALSE);
    
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// scroll_bar_d_bg/fg,背景/前景滑动条
widget_set_pointer_cursor(scroll_bar_d,"name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_auto_adjust_size(scroll_bar_d,TRUE);    
1.14mobile滚动条
// 创建进度条
widget_t* scroll_bar_m = scroll_bar_m_create(parent,x,y,w,h);
// 状态
// normal,正常状态
// disable,禁用状态
// focused,聚焦状态
// 名称
widget_set_name(scroll_bar_m,"scroll_bar_m_name");
// 布局
widget_set_children_layout(scroll_bar_m,params);// 无/单行/单列/网格
widget_set_enable(scroll_bar_m,TRUE);
widget_set_visible(scroll_bar_m,TRUE);
widget_set_floating(scroll_bar_m,TRUE);
// 样式
// 修改边框颜色
widget_set_style_str(scroll_bar_m,"border_color","#BEBEBE");
// 设置控件边框,left/right/top/bottom/all
widget_set_style_str(scroll_bar_m,"border","all");
// 设置边框宽度
widget_set_style_int(scroll_bar_m,"border_width",1);
// 设置圆角半径
widget_set_style_int(scroll_bar_m,"round_radius",5);
// 设置左上圆角半径
widget_set_style_int(scroll_bar_m,"round_radius_top_left",5);
// 设置右上圆角半径
widget_set_style_int(scroll_bar_m,"round_radius_top_right",5);
// 设置左下圆角半径
widget_set_style_int(scroll_bar_m,"round_radius_bottom_left",5);
// 设置右下圆角半径
widget_set_style_int(scroll_bar_m,"round_radius_bottom_right",5);
// 设置背景颜色
widget_set_style_str(scroll_bar_m,"bg_color","#D8D8D8");
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// scroll_bar_m_bg/fg,背景/前景滑动条
widget_set_style_str(scroll_bar_m,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(scroll_bar_m,"bg_image_draw_type","default");
// 设置前景颜色
widget_set_style_str(scroll_bar_m,"fg_color","#808080");
// 设置x方向的偏移量
widget_set_style_int(scroll_bar_m,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(scroll_bar_m,"y_offset",0);
// 动画
// 值
widget_set_max(scroll_bar_m,1000);
widget_set_value(scroll_bar_m,40);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(scroll_bar_m,TRUE);
// 是否接收用户事件
widget_set_sensitive(scroll_bar_m,TRUE);
// 是否支持焦点停留
widget_set_focusable(scroll_bar_m,TRUE);
// 是否支持焦点状态
widget_set_focus_state(scroll_bar_m,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(scroll_bar_m,4);
// 设置滚动是否启动动画
widget_set_animatable(scroll_bar_m,TRUE);
// 设置是否自动隐藏
widget_set_auto_hide(scroll_bar_m,FALSE);
    
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// scroll_bar_m_bg/fg,背景/前景滑动条
widget_set_pointer_cursor(scroll_bar_m,"name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_auto_adjust_size(scroll_bar_m,TRUE);    
1.15指示器
// 创建弧形指示器
widget_t* slide_indicator = slide_indicator_create(parent,x,y,w,h);
// normal,正常状态
// pressed,按下状态
// disable,失效状态
// focused,聚焦状态
// 布局
widget_set_children_layout(slide_indicator,params);// 无/单行/单列/网格
widget_set_enable(slide_indicator,TRUE);
widget_set_visible(slide_indicator,TRUE);
widget_set_floating(slide_indicator,TRUE);
widget_set_margin(slide_indicator,0);
// 样式
// 修改边框颜色
widget_set_style_str(slide_indicator,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style_str(slide_indicator,"border","all");
// 设置控件宽度
widget_set_style_int(slide_indicator,"border_width",1);
// 设置圆角半径
widget_set_style_int(slide_indicator,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(slide_indicator,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(slide_indicator,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(slide_indicator,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(slide_indicator,"round_radius_bottom_right",0);
// 设置背景颜色
widget_set_style_str(slide_indicator,"bg_color","#F00");
// 设置背景图片
widget_set_style_str(slide_indicator,"bg_image","bg_image_name");
// 设置背景图片绘制方式,default/icon/center/scale
widget_set_style_str(slide_indicator,,"bg_image_draw_type","default");
// 设置前景颜色
widget_set_style_str(slide_indicator,"fg_color","#338FFF40");
// 设置当前页面的前景颜色
widget_set_style_str(slide_indicator,"selected_fg_color","#338FFF");
// 设置文本水平对齐方式,none/left/center/right
widget_set_style_str(slide_indicator,"text_align_h","center");
// 设置文本垂直对齐方式,none/top/middle/bottom
widget_set_style_str(slide_indicator,"text_align_v","midlle");
// 设置背景颜色
widget_set_style_str(slide_indicator,"bg_color","#338FFF40");
// 设置选中背景颜色
widget_set_style_str(slide_indicator,"selected_bg_color","#338FFF");
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(slide_indicator,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(slide_indicator,"bg_image_draw_type","default");
// 设置图标
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(slide_indicator,"icon","item");
// 设置Active图标的名称,
widget_set_style_str(slide_indicator,"active_icon","active_icon_name");
// 设置x方向的偏移量
widget_set_style_int(slide_indicator,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(slide_indicator,"y_offset",0);
// 动画
// 值
// 设置控件最大值
widget_set_max(slide_indicator,0);
// 设置控件大小
widget_set_size(slide_indicator,8);
// 设置值
widget_set_value(slide_indicator,0);
// 锚点(0-1).0在控件左边,0.5在控件中间,1在控件右边
widget_set_anchor_x(slide_indicator,0.5);
// 锚点(0-1).0在控件上边,0.5在控件中间,1在控件下边
widget_set_anchor_y(slide_indicator,0.5);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(slide_indicator,TRUE);
// 是否接收用户事件
widget_set_sensitive(slide_indicator,TRUE);
// 是否支持焦点停留
widget_set_focusable(slide_indicator,TRUE);
// 是否支持焦点状态
widget_set_focus_state(slide_indicator,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(slide_indicator,4);
// 设置指示器的类型
widget_set_default_paint(slide_indicator,"auto");
// 设置是否自动隐藏
widget_set_auto_hide(slide_indicator,0);
// 设置中心之间的间距
widget_set_spacing(slide_indicator,16);
// 指示器指定的目标控件的名称
widget_set_indicated_target(slide_indicator,"");
// 是否启用过渡效果
widget_set_transition(slide_indicator,FALSE);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_pointer_cursor(slide_indicator,"name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_auto_adjust_size(slide_indicator,TRUE);    
1.16弧形指示器
// 创建弧形指示器
widget_t* slide_indicator_arc = slide_indicator_create_arc(parent,x,y,w,h);
// 布局
widget_set_children_layout(slide_indicator_arc,params);// 无/单行/单列/网格
widget_set_enable(slide_indicator_arc,TRUE);
widget_set_visible(slide_indicator_arc,TRUE);
widget_set_floating(slide_indicator_arc,TRUE);
widget_set_margin(slide_indicator_arc,0);
// 样式
// 修改边框颜色
widget_set_style_str(slide_indicator_arc,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style_str(slide_indicator_arc,"border","all");
// 设置控件宽度
widget_set_style_int(slide_indicator_arc,"border_width",1);
// 设置圆角半径
widget_set_style_int(slide_indicator_arc,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(slide_indicator_arc,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(slide_indicator_arc,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(slide_indicator_arc,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(slide_indicator_arc,"round_radius_bottom_right",0);
// 设置背景颜色
widget_set_style_str(slide_indicator_arc,"bg_color","#F00");
// 设置背景图片
widget_set_style_str(slide_indicator_arc,"bg_image","bg_image_name");
// 设置背景图片绘制方式,default/icon/center/scale
widget_set_style_str(slide_indicator_arc,"bg_image_draw_type","default");
// 设置前景颜色
widget_set_style_str(slide_indicator_arc,"fg_color","#338FFF40");
// 设置当前页面的前景颜色
widget_set_style_str(slide_indicator_arc,"selected_fg_color","#338FFF");
// 设置文本水平对齐方式,none/left/center/right
widget_set_style_str(slide_indicator_arc,"text_align_h","center");
// 设置文本垂直对齐方式,none/top/middle/bottom
widget_set_style_str(slide_indicator_arc,"text_align_v","midlle");
// 设置背景颜色
widget_set_style_str(slide_indicator_arc,"bg_color","#F00");
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(slide_indicator_arc,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(slide_indicator_arc,"bg_image_draw_type","default");
// 设置图标
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(slide_indicator_arc,"icon","item");
// 设置Active图标的名称,
widget_set_style_str(slide_indicator_arc,"active_icon","active_icon_name");
// 设置x方向的偏移量
widget_set_style_int(slide_indicator_arc,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(slide_indicator_arc,"t_offset",0);
// 动画
// 值
// 设置图片名称,cross/gauge_bg/num0
widget_set_image(slide_indicator_arc,num0);
// 设置图片的绘制方式,default/center/icon/scale
widget_set_draw_type(slide_indicator_arc,default);
// 设置控件在x方向上的缩放比例
widget_set_scale_x(slide_indicator_arc,1);
// 设置控件在y方向上的缩放比例
widget_set_scale_y(slide_indicator_arc,1);
// 设置文本
widget_set_text(slide_indicator_arc,"");
// 锚点(0-1).0在控件左边,0.5在控件中间,1在控件右边
widget_set_anchor_x(slide_indicator_arc,0.5);
// 锚点(0-1).0在控件上边,0.5在控件中间,1在控件下边
widget_set_anchor_y(slide_indicator_arc,0.5);
// 设置控件的旋转角度
widget_set_rotation(slide_indicator_arc,0);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(slide_indicator_arc,TRUE);
// 是否接收用户事件
widget_set_sensitive(slide_indicator_arc,TRUE);
// 是否支持焦点停留
widget_set_focusable(slide_indicator_arc,TRUE);
// 是否支持焦点状态
widget_set_focus_state(slide_indicator_arc,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(slide_indicator_arc,4);
// 设置点击时,是否触发EVT_CLICK事件
widget_set_clickable(slide_indicator_arc,FALSE);
// 是否设置选中状态
widget_set_selectable(slide_indicator_arc,FALSE);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_pointer_cursor(slide_indicator_arc,"name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_auto_adjust_size(slide_indicator_arc,TRUE);    
1.17输入法候选字
// 创建弧形指示器
widget_t* candidate = candidate_create(parent,x,y,w,h);
// normal,正常状态
// pressed,按下状态
// disable,失效状态
// 布局
widget_set_children_layout(candidate,params);// 无/单行/单列/网格
widget_set_enable(candidate,TRUE);
widget_set_visible(candidate,TRUE);
widget_set_floating(candidate,TRUE);
widget_set_margin(candidate,0);
// 样式
// 修改边框颜色
widget_set_style_str(candidate,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style_str(candidate,"border","all");
// 设置控件宽度
widget_set_style_int(candidate,"border_width",1);
// 设置圆角半径
widget_set_style_int(candidate,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(candidate,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(candidate,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(candidate,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(candidate,"round_radius_bottom_right",0);
// 设置文本颜色
widget_set_style_str(candidate,"text_color","#444444");
// 设置字体名称
widget_set_style_str(candidate,"font_name","");
// 设置字体大小
widget_set_style_int(candidate,"font_size",18);
// 设置水平文字对齐方式,none/center/left/right
widget_set_style_str(candidate,"text_align_h","center");
// 设置竖直文字对齐方式,none/middle/top/bottom
widget_set_style_str(candidate,"text_align_v","middle");
// 设置背景颜色
widget_set_style_str(candidate,"bg_color","#F00");
// 设置背景图片
widget_set_style_str(candidate,"bg_image","bg_image_name");
// 设置背景图片绘制方式,default/icon/center/scale
widget_set_style_str(candidate,"bg_image_draw_type","default");
// 设置前景颜色
widget_set_style_str(candidate,"fg_color","#338FFF40");
// 设置当前页面的前景颜色
widget_set_style_str(candidate,"selected_fg_color","#338FFF");
// 设置文本水平对齐方式,none/left/center/right
widget_set_style_str(candidate,"text_align_h","center");
// 设置文本垂直对齐方式,none/top/middle/bottom
widget_set_style_str(candidate,"text_align_v","midlle");
// 设置背景颜色
widget_set_style_str(candidate,"bg_color","#338FFF40");
// 设置选中背景颜色
widget_set_style_str(candidate,"selected_bg_color","#338FFF");
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(candidate,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(candidate,"bg_image_draw_type","default");
// 设置图标
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(candidate,"icon","item");
// 设置Active图标的名称,
widget_set_style_str(candidate,"active_icon","active_icon_name");
// 设置边距
widget_set_style_int(candidate,"set_margin",0);
// 设置上边距
widget_set_style_int(candidate,"set_margin_top",0);
// 设置下边距
widget_set_style_int(candidate,"set_margin_bottom",0);
// 设置左边距
widget_set_style_int(candidate,"set_margin_left",0);
// 设置右边距
widget_set_style_int(candidate,"set_margin_right",0);
// 设置x方向的偏移量
widget_set_style_int(candidate,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(candidate,"y_offset",0);
// 设置间隔
widget_set_style_int(candidate,"spacer",2);
// 动画
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(candidate,TRUE);
// 是否接收用户事件
widget_set_sensitive(candidate,TRUE);
// 是否支持焦点停留
widget_set_focusable(candidate,TRUE);
// 是否支持焦点状态
widget_set_focus_state(candidate,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(candidate,4);
// 是否为预候选字
widget_set_pre(candidate,FALSE);
// 是否启用用数字选择候选字
widget_set_select_by_num(candidate,TRUE);
// 设置是否自动隐藏
widget_set_auto_hide(candidate,0);
// 设置按钮style的名称
widget_set_button_style(candidate,"");
// 是否启用候选字预览
widget_set_enable_preview(candidate,FALSE);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_pointer_cursor(candidate,"name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_auto_adjust_size(candidate,TRUE);    
2.容器
2.1通用容器
// 创建通用容器
widget_t* view = view_create(parent,x,y,w,h);
// normal,正常状态
// pressed,按下状态
// disable,失效状态
// 布局
widget_set_children_layout(view,params);// 无/单行/单列/网格
widget_set_enable(view,TRUE);
widget_set_visible(view,TRUE);
widget_set_floating(view,TRUE);
widget_set_margin(view,0);
// 样式
// 修改边框颜色
widget_set_style_str(view,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style_str(view,"border","all");
// 设置控件宽度
widget_set_style_int(view,"border_width",1);
// 设置圆角半径
widget_set_style_int(view,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(view,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(view,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(view,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(view,"round_radius_bottom_right",0);
// 设置背景颜色
widget_set_style_str(view,"bg_color","#F00");
// 设置背景图片
widget_set_style_str(view,"bg_image","bg_image_name");
// 设置背景图片绘制方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(view,"bg_image_draw_type","default");
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(view,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(view,"bg_image_draw_type","default");
// 设置x方向的偏移量
widget_set_style_int(view,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(view,"y_offset",0);
// 动画
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(view,TRUE);
// 是否接收用户事件
widget_set_sensitive(view,TRUE);
// 是否支持焦点停留
widget_set_focusable(view,TRUE);
// 是否支持焦点状态
widget_set_focus_state(view,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(view,4);
// 缺省获得焦点的子控件
widget_set_default_focused_child(view,"child_name");
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(view,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(view,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(view,"opacity",255);
2.2标签按钮分组
// 创建标签按钮分组
widget_t* tab_button_group = tab_button_group_create(parent,x,y,w,h);
// normal,正常状态
// pressed,按下状态
// disable,失效状态
// 布局
widget_set_children_layout(tab_button_group,params);// 无/单行/单列/网格
widget_set_enable(tab_button_group,TRUE);
widget_set_visible(tab_button_group,TRUE);
widget_set_floating(tab_button_group,TRUE);
widget_set_margin(tab_button_group,0);
// 样式
// 修改边框颜色
widget_set_style_str(tab_button_group,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style_str(tab_button_group,"border","all");
// 设置控件宽度
widget_set_style_int(tab_button_group,"border_width",1);
// 设置圆角半径
widget_set_style_int(tab_button_group,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(tab_button_group,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(tab_button_group,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(tab_button_group,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(tab_button_group,"round_radius_bottom_right",0);
// 设置背景颜色
widget_set_style_str(tab_button_group,"bg_color","#F00");
// 设置背景图片
widget_set_style_str(tab_button_group,"bg_image","bg_image_name");
// 设置背景图片绘制方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(tab_button_group,"bg_image_draw_type","default");
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(tab_button_group,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(tab_button_group,"bg_image_draw_type","default");
// 设置x方向的偏移量
widget_set_style_int(tab_button_group,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(tab_button_group,"y_offset",0);
// 动画
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(tab_button_group,TRUE);
// 是否接收用户事件
widget_set_sensitive(tab_button_group,TRUE);
// 是否支持焦点停留
widget_set_focusable(tab_button_group,TRUE);
// 是否支持焦点状态
widget_set_focus_state(tab_button_group,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(tab_button_group,4);
// 紧凑型排版子控件
widget_set_compact(tab_button_group,FALSE);
// 是否支持滚动
widget_set_scrollable(tab_button_group,FALSE);
// 是否开启tab_button的左右滚动动画
widget_set_enable_hscroll_animator(tab_button_group,FALSE);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(tab_button_group,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(tab_button_group,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(tab_button_group,"opacity",255);
2.3页面容器
// 创建页面容器
widget_t* pages = pages_create(parent,x,y,w,h);
// normal,正常状态
// pressed,按下状态
// disable,失效状态
// 布局
widget_set_children_layout(pages,params);// 无/单行/单列/网格
widget_set_enable(pages,TRUE);
widget_set_visible(pages,TRUE);
widget_set_floating(pages,TRUE);
widget_set_margin(pages,0);
// 样式
// 修改边框颜色
widget_set_style_str(pages,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style_str(pages,"border","all");
// 设置控件宽度
widget_set_style_int(pages,"border_width",1);
// 设置圆角半径
widget_set_style_int(pages,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(pages,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(pages,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(pages,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(pages,"round_radius_bottom_right",0);
// 设置背景颜色
widget_set_style_str(pages,"bg_color","#F00");
// 设置背景图片
widget_set_style_str(pages,"bg_image","bg_image_name");
// 设置背景图片绘制方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(pages,"bg_image_draw_type","default");
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(pages,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(pages,"bg_image_draw_type","default");
// 设置x方向的偏移量
widget_set_style_int(pages,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(pages,"y_offset",0);
// 动画
// 值
widget_set_value(pages,2147483647);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(pages,TRUE);
// 是否接收用户事件
widget_set_sensitive(pages,TRUE);
// 是否支持焦点停留
widget_set_focusable(pages,TRUE);
// 是否支持焦点状态
widget_set_focus_state(pages,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(pages,4);
//设置当前活跃的page
widget_set_prop_int(pages,"active",2147483647);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(pages,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(pages,"auto_adjust_size",TRUE);    
2.4拖动容器
// 创建拖动容器
widget_t* dragger = dragger_create(parent,x,y,w,h);
// normal,正常状态
// pressed,按下状态
// disable,失效状态
// over,悬浮状态
// pressed,按下状态
// 布局
widget_set_children_layout(dragger,params);// 无/单行/单列/网格
widget_set_enable(dragger,TRUE);
widget_set_visible(dragger,TRUE);
widget_set_floating(dragger,TRUE);
widget_set_margin(dragger,0);
// 样式
// 修改边框颜色
widget_set_style_str(dragger,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style_str(dragger,"border","all");
// 设置控件宽度
widget_set_style_int(dragger,"border_width",1);
// 设置圆角半径
widget_set_style_int(dragger,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(dragger,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(dragger,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(dragger,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(dragger,"round_radius_bottom_right",0);
// 设置文本颜色
widget_set_style_str(dragger,"text_color","#00000000");
// 设置字体名称
widget_set_style_str(dragger,"font_name","font_name");
// 设置字体大小
widget_set_style_str(dragger,"font_size",18);
// 设置水平文本对齐方式,none/center/left/right
widget_set_style_str(dragger,"text_align_h","center");
// 设置垂直文本对齐方式,none/middle/top/bottom
widget_set_style_str(dragger,"text_align_v","middle");
// 设置背景颜色
widget_set_style_str(dragger,"bg_color","#F00");
// 设置背景图片
widget_set_style_str(dragger,"bg_image","bg_image_name");
// 设置背景图片绘制方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(dragger,"bg_image_draw_type","default");
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(dragger,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(dragger,"bg_image_draw_type","default");
// 设置图标位置,auto/top/bottom/left/right/center
widget_set_style_str(dragger,"icon_at","auto");
// 设置图标名称
widget_set_style_str(dragger,"icon","");
// 设置边距
widget_set_style_int(dragger,"margin",0);
// 设置上边距
widget_set_style_int(dragger,"margin_top",0);
// 设置下边距
widget_set_style_int(dragger,"margin_bottom",0);
// 设置左边距
widget_set_style_int(dragger,"margin_left",0);
// 设置右边距
widget_set_style_int(dragger,"margin_right",0);
// 设置x方向的偏移量
widget_set_style_int(dragger,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(dragger,"y_offset",0);
// 设置间距
widget_set_style_int(dragger,"spacer",2);
// 动画
// 值
// 设置x坐标的最大值
widget_set_x_max(dragger,200);
// 设置x坐标的最小值
widget_set_x_min(dragger,0);
// 设置y坐标的最大值
widget_set_y_max(dragger,200);
// 设置y坐标的最小值
widget_set_y_min(dragger,0);
// 设置坐标的最值
widget_set_text(dragger,);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(dragger,TRUE);
// 是否接收用户事件
widget_set_sensitive(dragger,TRUE);
// 是否支持焦点停留
widget_set_focusable(dragger,TRUE);
// 是否支持焦点状态
widget_set_focus_state(dragger,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(dragger,4);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(dragger,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(dragger,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(dragger,"opacity",255);
2.5列表项
// 创建列表项容器
widget_t* list_item = list_item_create(parent,x,y,w,h);
// normal,正常状态
// pressed,按下状态
// disable,失效状态
// over,悬浮状态
// pressed,按下状态
// 布局
widget_set_children_layout(list_item,params);// 无/单行/单列/网格
widget_set_enable(list_item,TRUE);
widget_set_visible(list_item,TRUE);
widget_set_floating(list_item,TRUE);
widget_set_margin(list_item,0);
// 样式
// 修改边框颜色
widget_set_style_str(list_item,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style_str(list_item,"border","all");
// 设置控件宽度
widget_set_style_int(list_item,"border_width",1);
// 设置圆角半径
widget_set_style_int(list_item,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(list_item,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(list_item,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(list_item,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(list_item,"round_radius_bottom_right",0);
// 设置文本样式
widget_set_style_str(list_item,"text_color","#444444");
// 设置字体名称
widget_set_style_str(list_item,"font_name","fonr_name");
// 设置字体大小
widget_set_style_int(list_item,"font_size",18);
// 设置文本对齐方式,none/center/left/right
widget_set_style_str(list_item,"text_align_h","center");
// 设置文本对齐方式,none/middle/top/bottom
widget_set_style_str(list_item,"text_align_v","middle");
// 设置背景颜色
widget_set_style_str(list_item,"bg_color","#F00");
// 设置背景图片
widget_set_style_str(list_item,"bg_image","bg_image_name");
// 设置背景图片绘制方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(list_item,"bg_image_draw_type","default");
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(list_item,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(list_item,"bg_image_draw_type","default");
// 设置图标位置,auto/top/bottom/left/right/center
widget_set_style_str(list_item,"icon_at","auto");
// 设置图标名称
widget_set_style_str(list_item,"icon","");
// 设置边距
widget_set_style_int(list_item,"margin",0);
// 设置上边距
widget_set_style_int(list_item,"margin_top",0);
// 设置下边距
widget_set_style_int(list_item,"margin_bottom",0);
// 设置左边距
widget_set_style_int(list_item,"margin_left",0);
// 设置右边距
widget_set_style_int(list_item,"margin_right",0);
// 设置x方向的偏移量
widget_set_style_int(list_item,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(list_item,"y_offset",0);
// 动画
// 值
widget_set_text(list_item,"");
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(list_item,TRUE);
// 是否接收用户事件
widget_set_sensitive(list_item,TRUE);
// 是否支持焦点停留
widget_set_focusable(list_item,TRUE);
// 是否支持焦点状态
widget_set_focus_state(list_item,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(list_item,4);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(list_item,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(list_item,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(list_item,"opacity",255);
2.6裁剪容器
// 创建裁剪容器
widget_t* clip_view = clip_view_create(parent,x,y,w,h);
// normal,正常状态
// pressed,按下状态
// disable,失效状态
// 布局
widget_set_children_layout(clip_view,params);// 无/单行/单列/网格
widget_set_enable(clip_view,TRUE);
widget_set_visible(clip_view,TRUE);
widget_set_floating(clip_view,TRUE);
widget_set_margin(clip_view,0);
// 样式
// 修改边框颜色
widget_set_style_str(clip_view,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style_str(clip_view,"border","all");
// 设置控件宽度
widget_set_style_int(clip_view,"border_width",1);
// 设置圆角半径
widget_set_style_int(clip_view,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(clip_view,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(clip_view,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(clip_view,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(clip_view,"round_radius_bottom_right",0);
// 设置背景颜色
widget_set_style_str(clip_view,"bg_color","#F00");
// 设置背景图片
widget_set_style_str(clip_view,"bg_image","bg_image_name");
// 设置背景图片绘制方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(clip_view,"bg_image_draw_type","default");
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(clip_view,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(clip_view,"bg_image_draw_type","default");
// 设置x方向的偏移量
widget_set_style_int(clip_view,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(clip_view,"y_offset",0);
// 动画
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(clip_view,TRUE);
// 是否接收用户事件
widget_set_sensitive(clip_view,TRUE);
// 是否支持焦点停留
widget_set_focusable(clip_view,TRUE);
// 是否支持焦点状态
widget_set_focus_state(clip_view,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(clip_view,4);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(clip_view,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(clip_view,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(clip_view,"opacity",255);
2.7网格容器
// 创建网格容器
widget_t* grid = grid_create(parent,x,y,w,h);
// normal,正常状态
// pressed,按下状态
// disable,失效状态
// 布局
widget_set_children_layout(grid,params);// 无/单行/单列/网格
widget_set_enable(grid,TRUE);
widget_set_visible(grid,TRUE);
widget_set_floating(grid,TRUE);
widget_set_margin(grid,0);
// 样式
// 修改边框颜色
widget_set_style_str(grid,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style_str(grid,"border","all");
// 设置控件宽度
widget_set_style_int(grid,"border_width",1);
// 设置圆角半径
widget_set_style_int(grid,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(grid,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(grid,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(grid,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(grid,"round_radius_bottom_right",0);
// 设置背景颜色
widget_set_style_str(grid,"bg_color","#F00");
// 设置背景图片
widget_set_style_str(grid,"bg_image","bg_image_name");
// 设置背景图片绘制方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(grid,"bg_image_draw_type",""default"");
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(grid,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_styl_str(grid,"bg_image_draw_type","default");
// 设置x方向的偏移量
widget_set_style_int(grid,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(grid,"y_offset",0);
// 设置网格颜色
widget_set_styl_str(grid,"grid_color","#00000000");
// 设置偶数行背景颜色
widget_set_styl_str(grid,"even_bg_color","#00000000");
// 设置奇数行背景颜色
widget_set_styl_str(grid,"odd_bg_color","#00000000");
// 动画
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(grid,TRUE);
// 是否接收用户事件
widget_set_sensitive(grid,TRUE);
// 是否支持焦点停留
widget_set_focusable(grid,TRUE);
// 是否支持焦点状态
widget_set_focus_state(grid,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(grid,4);
// 设置行数
widget_set_rows(grid,3);
// 设置各列的参数
widget_set_columns_definition(grid,);
// 设置是否显示网格
widget_set_show_grid(grid,FALSE);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(grid,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(grid,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(grid,"opacity",255);
3.视图
3.1标签视图
// 创建标签视图
widget_t* tab_control = tab_control_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// pressed,按下状态
// disable,失效状态
widget_set_state(tab_control,state);
// 布局
widget_set_children_layout(tab_control,params);// 无/单行/单列/网格
widget_set_enable(tab_control,TRUE);
widget_set_visible(tab_control,TRUE);
widget_set_floating(tab_control,TRUE);
widget_set_margin(tab_control,0);
// 样式
// 修改边框颜色
widget_set_style_str(tab_control,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(tab_control,"border","all");
// 设置控件宽度
widget_set_style_int(tab_control,"border_width",1);
// 设置圆角半径
widget_set_style_int(tab_control,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(tab_control,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(tab_control,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(tab_control,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(tab_control,"round_radius_bottom_right",0);
// 设置文本颜色
widget_set_style_str(tab_control,"text_color","F00");
// 设置字体名称
widget_set_style_str(tab_control,"font_name","default");
// 设置字体大小
widget_set_style_int(tab_control,"font_size",18);
// 设置水平对齐方式
widget_set_style_str(tab_control,"text_align_h","center");
// 设置垂直对齐方式
widget_set_style_str(tab_control,"text_align_v","middle");
// 设置背景颜色
widget_set_style_str(tab_control,"bg_color","F00");
// 设置背景图片
widget_set_style_str(tab_control,"bg_image","bg_image_name");
// 设置背景图片绘制方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(tab_control,"bg_image_draw_type",default);
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(tab_control,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(tab_control,"bg_image_draw_type",default);
// 修改图标位置,auto/left/right/top/bottom/center
widget_set_style_str(tab_control,"normal:icon_at","way");
widget_set_style_str(tab_control,"disabled:icon_at","way");
widget_set_style_str(tab_control,"focus:icon_at","way");
// 修改图标名称
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(tab_control,"normal:icon","way");
widget_set_style_str(tab_control,"disabled:icon","way");
widget_set_style_str(tab_control,"focus:icon","way");
// 修改边距
widget_set_style_int(tab_control,"normal:margin",0);
widget_set_style_int(tab_control,"disabled:margin",0);
widget_set_style_int(tab_control,"focus:margin",0);
// 修改上边距
widget_set_style_int(tab_control,"normal:margin_top",0);
widget_set_style_int(tab_control,"disabled:margin_top",0);
widget_set_style_int(tab_control,"focus:margin_top",0);
// 修改下边距
widget_set_style_int(tab_control,"normal:margin_bottom",0);
widget_set_style_int(tab_control,"disabled:margin_bottom",0);
widget_set_style_int(tab_control,"focus:margin_bottom",0);
// 修改左边距
widget_set_style_int(tab_control,"normal:margin_left",0);
widget_set_style_int(tab_control,"disabled:margin_left",0);
widget_set_style_int(tab_control,"focus:margin_left",0);
// 修改右边距
widget_set_style_int(tab_control,"normal:margin_right",0);
widget_set_style_int(tab_control,"disabled:margin_right",0);
widget_set_style_int(tab_control,"focus:margin_right",0);
// 设置x方向的偏移量
widget_set_style_int(tab_control,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(tab_control,"y_offset",0);
// 设置间距
widget_set_style_int(tab_control,"spacer",2);
// 动画
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(tab_control,TRUE);
// 是否接收用户事件
widget_set_sensitive(tab_control,TRUE);
// 是否支持焦点停留
widget_set_focusable(tab_control,TRUE);
// 是否支持焦点状态
widget_set_focus_state(tab_control,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(tab_control,4);
// 缺省获得焦点的子控件
widget_set_default_focused_child(tab_control,"child_name");
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(tab_control,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(tab_control,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(tab_control,"opacity",255);
3.2滚动视图
// 创建滚动视图
widget_t* scroll_view = scroll_view_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// pressed,按下状态
// disable,失效状态
widget_set_state(scroll_view,state);
// 布局
widget_set_children_layout(scroll_view,params);// 无/单行/单列/网格
widget_set_enable(scroll_view,TRUE);
widget_set_visible(scroll_view,TRUE);
widget_set_floating(scroll_view,TRUE);
widget_set_margin(scroll_view,0);
// 样式
// 修改边框颜色
widget_set_style_str(scroll_view,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(scroll_view,"border","all");
// 设置控件宽度
widget_set_style_int(scroll_view,"border_width",1);
// 设置圆角半径
widget_set_style_int(scroll_view,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(scroll_view,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(scroll_view,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(scroll_view,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(scroll_view,"round_radius_bottom_right",0);
// 设置背景颜色
widget_set_style_str(scroll_view,"bg_color","F00");
// 设置背景图片
widget_set_style_str(scroll_view,"bg_image","bg_image_name");
// 设置背景图片绘制方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(scroll_view,"bg_image_draw_type","default");
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(scroll_view,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(scroll_view,"bg_image_draw_type","default");
// 设置x方向的偏移量
widget_set_style_int(scroll_view,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(scroll_view,"y_offset",0);
// 动画
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(scroll_view,TRUE);
// 是否接收用户事件
widget_set_sensitive(scroll_view,TRUE);
// 是否支持焦点停留
widget_set_focusable(scroll_view,TRUE);
// 是否支持焦点状态
widget_set_focus_state(scroll_view,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(scroll_view,4);
// 设置x偏移量
widget_set_prop_int(scroll_view,"xoffset",0);
// 设置y偏移量
widget_set_prop_int(scroll_view,"yoffset",0);
// 设置x偏移速度比例
widget_set_prop_int(scroll_view,"xspeed_scale",2);
// 设置y偏移速度比例
widget_set_prop_int(scroll_view,"yspeed_scale",2);
// 设置是否允许x方向滑动
widget_set_prop_bool(scroll_view,"xslidable",FALSE);
// 设置是否允许y方向滑动
widget_set_prop_bool(scroll_view,"yslidable",FALSE);
// 设置滚动时offset是否按页面对齐
widget_set_prop_bool(scroll_view,"snap_to_page",FALSE);
// 设置是否每次翻一页
widget_set_prop_bool(scroll_view,"move_to_page",FALSE);
// 设置是否递归查找全部子控件
widget_set_prop_bool(scroll_view,"recursive",FALSE);
// 设置滑动到极限时可继续滑动区域的占比
widget_set_prop_int(scroll_view,"slide_limit_ratio",1);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(scroll_view,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(scroll_view,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(scroll_view,"opacity",255);
3.3滑动视图
// 创建滑动视图
widget_t* slide_view = slide_view_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// pressed,按下状态
// disable,失效状态
widget_set_state(slide_view,state);
// 布局
widget_set_children_layout(slide_view,params);// 无/单行/单列/网格
widget_set_enable(slide_view,TRUE);
widget_set_visible(slide_view,TRUE);
widget_set_floating(slide_view,TRUE);
widget_set_margin(slide_view,0);
// 样式
// 修改边框颜色
widget_set_style_str(slide_view,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(slide_view,"border","all");
// 设置控件宽度
widget_set_style_int(slide_view,"border_width",1);
// 设置圆角半径
widget_set_style_int(slide_view,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(slide_view,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(slide_view,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(slide_view,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(slide_view,"round_radius_bottom_right",0);
// 设置背景颜色
widget_set_style_str(slide_view,"bg_color","F00");
// 设置背景图片
widget_set_style_str(slide_view,"bg_image_name");
// 设置背景图片绘制方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(slide_view,"bg_image_draw_type","default");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(slide_view,"bg_image_draw_type","default");
// 设置x方向的偏移量
widget_set_style_int(slide_view,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(slide_view,"y_offset",0);
// 动画
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(slide_view,TRUE);
// 是否接收用户事件
widget_set_sensitive(slide_view,TRUE);
// 是否支持焦点停留
widget_set_focusable(slide_view,TRUE);
// 是否支持焦点状态
widget_set_focus_state(slide_view,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(slide_view,4);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(slide_view,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(slide_view,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(slide_view,"opacity",255);
3.4列表视图
// 创建列表视图
widget_t* list_view = list_view_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// pressed,按下状态
// disable,失效状态
widget_set_state(list_view,state);
// 布局
widget_set_children_layout(list_view,params);// 无/单行/单列/网格
widget_set_enable(list_view,TRUE);
widget_set_visible(list_view,TRUE);
widget_set_floating(list_view,TRUE);
widget_set_margin(list_view,0);
// 样式
// 修改边框颜色
widget_set_style_str(list_view,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(list_view,"border","all");
// 设置控件宽度
widget_set_style_int(list_view,"border_width",1);
// 设置圆角半径
widget_set_style_int(list_view,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(list_view,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(list_view,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(list_view,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(list_view,"round_radius_bottom_right",0);
// 设置背景颜色
widget_set_style_str(list_view,"bg_color","F00");
// 设置背景图片
widget_set_style_str(list_view,"bg_image_name");
// 设置背景图片绘制方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(list_view,"bg_image_draw_type",default);
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(list_view,"bg_image_draw_type",default);
// 修改图标位置,auto/left/right/top/bottom/center
widget_set_style_str(tab_control,"normal:icon_at","way");
widget_set_style_str(tab_control,"disabled:icon_at","way");
widget_set_style_str(tab_control,"focus:icon_at","way");
// 修改图标名称
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(tab_control,"normal:icon","way");
widget_set_style_str(tab_control,"disabled:icon","way");
widget_set_style_str(tab_control,"focus:icon","way");
// 设置x方向的偏移量
widget_set_style_int(list_view,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(list_view,"y_offset",0);
// 设置间距
widget_set_style_int(list_view,"spacer",2);
// 动画
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(list_view,TRUE);
// 是否接收用户事件
widget_set_sensitive(list_view,TRUE);
// 是否支持焦点停留
widget_set_focusable(list_view,TRUE);
// 是否支持焦点状态
widget_set_focus_state(list_view,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(list_view,4);
// 设置列表项的高度
widget_set_prop_int(list_view,"item_height",0);
// 设置列表项的缺省高度
widget_set_prop_int(list_view,"default_item_height",60);
// 设置如果不需要滚动条时,自动隐藏滚动条
widget_set_prop_bool(list_view,"auto_hide_scroll_bar",FALSE);
// 设置滚动条是否悬浮在scroll_view上面
widget_set_prop_bool(list_view,"flaoting_scroll_bar",FALSE);
// 设置鼠标光标图片名称
widget_set_prop_str(list_view,"pointing_cursor","");
// 设置是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(list_view,"auto_adjust_size",FALSE);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(list_view,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(list_view,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(list_view,"opacity",255);
3.5水平列表视图
// 创建水平列表视图
widget_t* list_view_h = list_view_h_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// pressed,按下状态
// disable,失效状态
widget_set_state(list_view_h,state);
// 布局
widget_set_children_layout(list_view_h,params);// 无/单行/单列/网格
widget_set_enable(list_view_h,TRUE);
widget_set_visible(list_view_h,TRUE);
widget_set_floating(list_view_h,TRUE);
widget_set_margin(list_view_h,0);
// 样式
// 修改边框颜色
widget_set_style_str(list_view_h,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(list_view_h,"border","all");
// 设置控件宽度
widget_set_style_int(list_view_h,"border_width",1);
// 设置圆角半径
widget_set_style_int(list_view_h,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(list_view_h,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(list_view_h,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(list_view_h,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(list_view_h,"round_radius_bottom_right",0);
// 修改图标位置,auto/left/right/top/bottom/center
widget_set_style_str(list_view_h,"normal:icon_at","way");
widget_set_style_str(list_view_h,"disabled:icon_at","way");
widget_set_style_str(list_view_h,"focus:icon_at","way");
// 修改图标名称
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(list_view_h,"normal:icon","way");
widget_set_style_str(list_view_h,"disabled:icon","way");
widget_set_style_str(list_view_h,"focus:icon","way");
// 修改边距
widget_set_style_int(list_view_h,"normal:margin",0);
widget_set_style_int(list_view_h,"disabled:margin",0);
widget_set_style_int(list_view_h,"focus:margin",0);
// 修改上边距
widget_set_style_int(list_view_h,"normal:margin_top",0);
widget_set_style_int(list_view_h,"disabled:margin_top",0);
widget_set_style_int(list_view_h,"focus:margin_top",0);
// 修改下边距
widget_set_style_int(list_view_h,"normal:margin_bottom",0);
widget_set_style_int(list_view_h,"disabled:margin_bottom",0);
widget_set_style_int(list_view_h,"focus:margin_bottom",0);
// 修改左边距
widget_set_style_int(list_view_h,"normal:margin_left",0);
widget_set_style_int(list_view_h,"disabled:margin_left",0);
widget_set_style_int(list_view_h,"focus:margin_left",0);
// 修改右边距
widget_set_style_int(list_view_h,"normal:margin_right",0);
widget_set_style_int(list_view_h,"disabled:margin_right",0);
widget_set_style_int(list_view_h,"focus:margin_right",0);
// 设置x方向的偏移量
widget_set_style_int(list_view_h,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(list_view_h,"y_offset",0);
// 设置间距
widget_set_style_int(list_view_h,"spacer",2);
// 动画
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(list_view_h,TRUE);
// 是否接收用户事件
widget_set_sensitive(list_view_h,TRUE);
// 是否支持焦点停留
widget_set_focusable(list_view_h,TRUE);
// 是否支持焦点状态
widget_set_focus_state(list_view_h,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(list_view_h,4);
// 设置列表项的宽度
widget_set_prop_int(list_view_h,"item_width",200);
// 设置间距
widget_set_prop_int(list_view_h,"spacing",60);
// 设置如果不需要滚动条时,自动隐藏滚动条
widget_set_prop_str(list_view_h,"pointer_cursor","");
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(list_view_h,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(list_view_h,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(list_view_h,"opacity",255);
4.图文
4.1GIF
// 创建GIF图像
widget_t* gif = gif_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// pressed,按下状态
// disable,失效状态
// selected,选择状态
// focused,聚焦状态
widget_set_state(gif,state);
// 布局
widget_set_children_layout(gif,params);// 无/单行/单列/网格
widget_set_enable(gif,TRUE);
widget_set_visible(gif,TRUE);
widget_set_floating(gif,TRUE);
widget_set_margin(gif,0);
// 样式
// 修改边框颜色
widget_set_style_str(gif,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(gif,"border","all");
// 设置控件宽度
widget_set_style_int(gif,"border_width",1);
// 设置圆角半径
widget_set_style_int(gif,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(gif,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(gif,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(gif,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(gif,"round_radius_bottom_right",0);
// 设置x方向的偏移量
widget_set_style_int(gif,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(gif,"y_offset",0);
// 动画
// 值
// 设置图片名称
widget_set_prop_str(gif,"image","item");
// 控件在X方向上的缩放比例
widget_set_prop_int(gif,"scale_x",1);
// 控件在Y方向上的缩放比例
widget_set_prop_int(gif,"scale_y",1);
// 设置循环播放的次数
widget_set_prop_int(gif,"loop",);
// 锚点(0-1).0在控件左边,0.5在控件中间,1在控件右边
widget_set_prop_int(gif,"anchor_x",0.5);
// 锚点(0-1).0在控件上边,0.5在控件中间,1在控件下边
widget_set_prop_int(gif,"anchor_y",0.5);
// 控件的旋转角度
widget_set_prop_int(gif,"rotation",0);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(gif,TRUE);
// 是否接收用户事件
widget_set_sensitive(gif,TRUE);
// 是否支持焦点停留
widget_set_focusable(gif,TRUE);
// 是否支持焦点状态
widget_set_focus_state(gif,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(gif,4);
// 点击时,是否触发EVT_CLICK事件
widget_set_prop_bool(gif,"clickable",FALSE);
// 是否设置选中状态
widget_set_prop_bool(gif,"selectable",FALSE);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(gif,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(gif,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(gif,"opacity",255);
4.2SVG
// 创建SVG图像
widget_t* svg = svg_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// pressed,按下状态
// disable,失效状态
// selected,选择状态
// focused,聚焦状态
widget_set_state(svg,state);
// 布局
widget_set_children_layout(svg,params);// 无/单行/单列/网格
widget_set_enable(svg,TRUE);
widget_set_visible(svg,TRUE);
widget_set_floating(svg,TRUE);
widget_set_margin(svg,0);
// 样式
// 修改边框颜色
widget_set_style_str(svg,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(svg,"border","all");
// 设置控件宽度
widget_set_style_int(svg,"border_width",1);
// 设置圆角半径
widget_set_style_int(svg,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(svg,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(svg,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(svg,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(svg,"round_radius_bottom_right",0);
// 修改文本颜色
widget_set_style_str(svg,"normal:text_color","#44444444");
widget_set_style_str(svg,"over:text_color","#44444444");
widget_set_style_str(svg,"pressed:text_color","#44444444");
widget_set_style_str(svg,"disabled:text_color","#44444444");
widget_set_style_str(svg,"focus:text_color","#44444444");
// 修改字体名称
widget_set_style(svg,"normal:font_name","font_name");
widget_set_style(svg,"over:font_name","font_name");
widget_set_style(svg,"pressed:font_name","font_name");
widget_set_style(svg,"disabled:font_name","font_name");
widget_set_style(svg,"focus:font_name","font_name");
// 修改字体大小
widget_set_style_int(svg,"normal:font_size",18);
widget_set_style_int(svg,"over:font_size",18);
widget_set_style_int(svg,"pressed:font_size",18);
widget_set_style_int(svg,"disabled:font_size",18);
widget_set_style_int(svg,"focus:font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style(svg,"normal:text_align_h","center");
widget_set_style(svg,"over:text_align_h","center");
widget_set_style(svg,"pressed:text_align_h","center");
widget_set_style(svg,"disabled:text_align_h","center");
widget_set_style(svg,"focus:text_align_h","center");
// 修改文本竖直对齐方式,none/middle/top/bottom
widget_set_style_str(svg,"normal:text_align_v","middle");
widget_set_style_str(svg,"over:text_align_v","middle");
widget_set_style_str(svg,"pressed:text_align_v","middle");
widget_set_style_str(svg,"disabled:text_align_v","middle");
widget_set_style_str(svg,"focus:text_align_v","middle");
// 修改图标位置,auto/left/right/top/bottom/center
widget_set_style_str(svg,"normal:icon_at",way);
widget_set_style_str(svg,"over:icon_at",way);
widget_set_style_str(svg,"pressed:icon_at",way);
widget_set_style_str(svg,"disabled:icon_at",way);
widget_set_style_str(svg,"focus:icon_at",way);
// 修改图标名称
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(svg,"normal:icon",way);
widget_set_style_str(svg,"over:icon",way);
widget_set_style_str(svg,"pressed:icon",way);
widget_set_style_str(svg,"disabled:icon",way);
widget_set_style_str(svg,"focus:icon",way);
// 修改边距
widget_set_style_int(svg,"normal:margin",0);
widget_set_style_int(svg,"over:margin",0);
widget_set_style_int(svg,"pressed:margin",0);
widget_set_style_int(svg,"disabled:margin",0);
widget_set_style_int(svg,"focus:margin",0);
// 修改上边距
widget_set_style_int(svg,"normal:margin_top",0);
widget_set_style_int(svg,"over:margin_top",0);
widget_set_style_int(svg,"pressed:margin_top",0);
widget_set_style_int(svg,"disabled:margin_top",0);
widget_set_style_int(svg,"focus:margin_top",0);
// 修改下边距
widget_set_style_int(svg,"normal:margin_bottom",0);
widget_set_style_int(svg,"over:margin_bottom",0);
widget_set_style_int(svg,"pressed:margin_bottom",0);
widget_set_style_int(svg,"disabled:margin_bottom",0);
widget_set_style_int(svg,"focus:margin_bottom",0);
// 修改左边距
widget_set_style_int(svg,"normal:margin_left",0);
widget_set_style_int(svg,"over:margin_left",0);
widget_set_style_int(svg,"pressed:margin_left",0);
widget_set_style_int(svg,"disabled:margin_left",0);
widget_set_style_int(svg,"focus:margin_left",0);
// 修改右边距
widget_set_style_int(svg,"normal:margin_right",0);
widget_set_style_int(svg,"over:margin_right",0);
widget_set_style_int(svg,"pressed:margin_right",0);
widget_set_style_int(svg,"disabled:margin_right",0);
widget_set_style_int(svg,"focus:margin_right",0);
// 设置x方向的偏移量
widget_set_style_int(svg,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(svg,"y_offset",0);
// 设置间距
widget_set_style_int(svg,"spacer",2);
// 动画
// 值
// 设置图片名称
widget_set_prop_str(svg,"image","item");
// 控件在X方向上的缩放比例
widget_set_prop_int(svg,"scale_x",1);
// 控件在Y方向上的缩放比例
widget_set_prop_int(svg,"scale_y",1);
// 设置循环播放的次数
widget_set_prop_int(svg,"loop",);
// 锚点(0-1).0在控件左边,0.5在控件中间,1在控件右边
widget_set_prop_int(svg,"anchor_x",0.5);
// 锚点(0-1).0在控件上边,0.5在控件中间,1在控件下边
widget_set_prop_int(svg,"anchor_y",0.5);
// 控件的旋转角度
widget_set_prop_int(svg,"rotation",0);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(svg,TRUE);
// 是否接收用户事件
widget_set_sensitive(svg,TRUE);
// 是否支持焦点停留
widget_set_focusable(svg,TRUE);
// 是否支持焦点状态
widget_set_focus_state(svg,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(svg,4);
// 点击时,是否触发EVT_CLICK事件
widget_set_prop_bool(svg,"clickable",FALSE);
// 是否设置选中状态
widget_set_prop_bool(svg,"selectable",FALSE);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(svg,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(svg,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(svg,"opacity",255);
4.3图片动画
// 创建图片动画
widget_t* image_animation = image_animation_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
widget_set_state(image_animation,state);
// 布局
widget_set_children_layout(image_animation,params);// 无/单行/单列/网格
widget_set_enable(image_animation,TRUE);
widget_set_visible(image_animation,TRUE);
widget_set_floating(image_animation,TRUE);
widget_set_margin(image_animation,0);
// 样式
// 修改边框颜色
widget_set_style_str(image_animation,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(image_animation,"border","all");
// 设置控件宽度
widget_set_style_int(image_animation,"border_width",1);
// 设置圆角半径
widget_set_style_int(image_animation,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(image_animation,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(image_animation,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(image_animation,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(image_animation,"round_radius_bottom_right",0);
// 修改背景颜色
widget_set_style_str(image_animation,"normal:bg_color","#F4F4F4");
widget_set_style_str(image_animation,"disabled:bg_color","#F4F4F4");
widget_set_style_str(image_animation,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(image_animation,"normal:bg_image","item");
widget_set_style_str(image_animation,"disable:bg_image","item");
widget_set_style_str(image_animation,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(image_animation,"normal:bg_image_draw_type",way);
widget_set_style_str(image_animation,"disabled:bg_image_draw_type",way);
widget_set_style_str(image_animation,"focus:bg_image_draw_type",way);
// 设置x方向的偏移量
widget_set_style_int(image_animation,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(image_animation,"y_offset",0);
// 动画
// 值
// 设置图片名称
widget_set_prop_str(image_animation,"image","item");
// 设置播放的序列
widget_set_prop_int(image_animation,"sequence",1);
// 图片起始序数
widget_set_prop_int(image_animation,"start_index",0);
// 图片结束序数
widget_set_prop_int(image_animation,"end_index",9);
// 索引到图片名的转换格式
widget_set_prop_str(image_animation,"format","%s%d");
// 每张图片播放的时间(ms)
widget_set_prop_int(image_animation,"interval",16);
// 自动播放时延迟播放的时间(ms)
widget_set_prop_int(image_animation,"delay",0);
// 是否循环播放
widget_set_prop_bool(image_animation,"loop",TRUE);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(image_animation,TRUE);
// 是否接收用户事件
widget_set_sensitive(image_animation,TRUE);
// 是否支持焦点停留
widget_set_focusable(image_animation,TRUE);
// 是否支持焦点状态
widget_set_focus_state(image_animation,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(image_animation,4);
// 是否倒序播放
widget_set_prop_bool(image_animation,"reverse",FALSE);
// 是否自动播放
widget_set_prop_bool(image_animation,"auto_play",FALSE);
// 绘制完成后unload图片,以释放内存
widget_set_prop_bool(image_animation,"unload_after_paint",FALSE);
// 结束时是否极限显示最后一帧
widget_set_prop_bool(image_animation,"show_when_done",FALSE);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(image_animation,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(image_animation,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(image_animation,"opacity",255);
4.4图片值
// 创建图片值
widget_t* image_value = image_value_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
widget_set_state(image_value,state);
// 布局
widget_set_children_layout(image_value,params);// 无/单行/单列/网格
widget_set_enable(image_value,TRUE);
widget_set_visible(image_value,TRUE);
widget_set_floating(image_value,TRUE);
widget_set_margin(image_value,0);
// 样式
// 修改边框颜色
widget_set_style_str(image_value,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(image_value,"border","all");
// 设置控件宽度
widget_set_style_int(image_value,"border_width",1);
// 设置圆角半径
widget_set_style_int(image_value,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(image_value,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(image_value,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(image_value,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(image_value,"round_radius_bottom_right",0);
// 修改背景颜色
widget_set_style_str(image_value,"normal:bg_color","#F4F4F4");
widget_set_style_str(image_value,"disabled:bg_color","#F4F4F4");
widget_set_style_str(image_value,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(image_value,"normal:bg_image","item");
widget_set_style_str(image_value,"disable:bg_image","item");
widget_set_style_str(image_value,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(image_value,"normal:bg_image_draw_type",way);
widget_set_style_str(image_value,"disabled:bg_image_draw_type",way);
widget_set_style_str(image_value,"focus:bg_image_draw_type",way);
// 设置x方向的偏移量
widget_set_style_int(image_value,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(image_value,"y_offset",0);
// 动画
// 值
// 设置图片名称
widget_set_prop_str(image_value,"image","item");
// 最小值
widget_set_prop_int(image_value,"min",0);
// 最大值
widget_set_prop_int(image_value,"max",0);
// 值
widget_set_prop_int(image_value,"value",1.23);
// 索引到图片名的转换格式
widget_set_prop_str(image_value,"format","%s%d");
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(image_value,TRUE);
// 是否接收用户事件
widget_set_sensitive(image_value,TRUE);
// 是否支持焦点停留
widget_set_focusable(image_value,TRUE);
// 是否支持焦点状态
widget_set_focus_state(image_value,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(image_value,4);
// 是否倒序播放
widget_set_prop_int(image_value,"click_add_delta",0);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(image_value,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(image_value,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(image_value,"opacity",255);
4.5富文本
// 创建富文本
widget_t* rich_text = rich_text_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
widget_set_state(rich_text,state);
// 布局
widget_set_children_layout(rich_text,params);// 无/单行/单列/网格
widget_set_enable(rich_text,TRUE);
widget_set_visible(rich_text,TRUE);
widget_set_floating(rich_text,TRUE);
widget_set_margin(rich_text,0);
// 样式
// 修改边框颜色
widget_set_style_str(rich_text,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(rich_text,"border","all");
// 设置控件宽度
widget_set_style_int(rich_text,"border_width",1);
// 设置圆角半径
widget_set_style_int(rich_text,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(rich_text,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(rich_text,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(rich_text,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(rich_text,"round_radius_bottom_right",0);
// 修改文本颜色
widget_set_style_str(rich_text,"normal:text_color","#44444444");
widget_set_style_str(rich_text,"disabled:text_color","#44444444");
widget_set_style_str(rich_text,"focus:text_color","#44444444");
// 修改字体名称
widget_set_style(rich_text,"normal:font_name","font_name");
widget_set_style(rich_text,"disabled:font_name","font_name");
widget_set_style(rich_text,"focus:font_name","font_name");
// 修改字体大小
widget_set_style_int(rich_text,"normal:font_size",18);
widget_set_style_int(rich_text,"disabled:font_size",18);
widget_set_style_int(rich_text,"focus:font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style(rich_text,"normal:text_align_h","center");
widget_set_style(rich_text,"disabled:text_align_h","center");
widget_set_style(rich_text,"focus:text_align_h","center");
// 修改文本竖直对齐方式,none/middle/top/bottom
widget_set_style_str(rich_text,"normal:text_align_v","middle");
widget_set_style_str(rich_text,"disabled:text_align_v","middle");
widget_set_style_str(rich_text,"focus:text_align_v","middle");
// 修改背景颜色
widget_set_style_str(rich_text,"normal:bg_color","#F4F4F4");
widget_set_style_str(rich_text,"disabled:bg_color","#F4F4F4");
widget_set_style_str(rich_text,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(rich_text,"normal:bg_image","item");
widget_set_style_str(rich_text,"disable:bg_image","item");
widget_set_style_str(rich_text,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(rich_text,"normal:bg_image_draw_type",way);
widget_set_style_str(rich_text,"disabled:bg_image_draw_type",way);
widget_set_style_str(rich_text,"focus:bg_image_draw_type",way);
// 设置x方向的偏移量
widget_set_style_int(rich_text,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(rich_text,"y_offset",0);
// 动画
// 值
// 设置图片名称
widget_set_prop_str(rich_text,"image","item");
// 最小值
widget_set_prop_int(rich_text,"min",0);
// 最大值
widget_set_prop_int(rich_text,"max",0);
// 值
widget_set_prop_int(rich_text,"value",1.23);
// 索引到图片名的转换格式
widget_set_prop_str(rich_text,"format","%s%d");
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(rich_text,TRUE);
// 是否接收用户事件
widget_set_sensitive(rich_text,TRUE);
// 是否支持焦点停留
widget_set_focusable(rich_text,TRUE);
// 是否支持焦点状态
widget_set_focus_state(rich_text,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(rich_text,4);
// 是否倒序播放
widget_set_prop_int(rich_text,"click_add_delta",0);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(rich_text,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(rich_text,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(rich_text,"opacity",255);
4.6表盘
// 创建表盘
widget_t* gauge = gauge_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
widget_set_state(gauge,state);
// 布局
widget_set_children_layout(gauge,params);// 无/单行/单列/网格
widget_set_enable(gauge,TRUE);
widget_set_visible(gauge,TRUE);
widget_set_floating(gauge,TRUE);
widget_set_margin(gauge,0);
// 样式
// 修改边框颜色
widget_set_style_str(gauge,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(gauge,"border","all");
// 设置控件宽度
widget_set_style_int(gauge,"border_width",1);
// 设置圆角半径
widget_set_style_int(gauge,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(gauge,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(gauge,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(gauge,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(gauge,"round_radius_bottom_right",0);
// 修改文本颜色
widget_set_style_str(gauge,"normal:text_color","#44444444");
widget_set_style_str(gauge,"disabled:text_color","#44444444");
widget_set_style_str(gauge,"focus:text_color","#44444444");
// 修改字体名称
widget_set_style(gauge,"normal:font_name","font_name");
widget_set_style(gauge,"disabled:font_name","font_name");
widget_set_style(gauge,"focus:font_name","font_name");
// 修改背景颜色
widget_set_style_str(gauge,"normal:bg_color","#F4F4F4");
widget_set_style_str(gauge,"disabled:bg_color","#F4F4F4");
widget_set_style_str(gauge,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(gauge,"normal:bg_image","item");
widget_set_style_str(gauge,"disable:bg_image","item");
widget_set_style_str(gauge,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(gauge,"normal:bg_image_draw_type",way);
widget_set_style_str(gauge,"disabled:bg_image_draw_type",way);
widget_set_style_str(gauge,"focus:bg_image_draw_type",way);
// 设置x方向的偏移量
widget_set_style_int(gauge,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(gauge,"y_offset",0);
// 动画
// 值
// 设置图片名称
widget_set_prop_str(gauge,"image","gauge_bg");
// 索引到图片名的转换格式
widget_set_prop_str(gauge,"draw_type","center");
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(gauge,TRUE);
// 是否接收用户事件
widget_set_sensitive(gauge,TRUE);
// 是否支持焦点停留
widget_set_focusable(gauge,TRUE);
// 是否支持焦点状态
widget_set_focus_state(gauge,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(gauge,4);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(gauge,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(gauge,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(gauge,"opacity",255);
4.7表盘指针
// 创建表盘指针
widget_t* gauge_pointer = gauge_pointer_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
widget_set_state(gauge_pointer,state);
// 布局
widget_set_children_layout(gauge_pointer,params);// 无/单行/单列/网格
widget_set_enable(gauge_pointer,TRUE);
widget_set_visible(gauge_pointer,TRUE);
widget_set_floating(gauge_pointer,TRUE);
widget_set_margin(gauge_pointer,0);
// 样式
// 修改边框颜色
widget_set_style_str(gauge_pointer,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(gauge_pointer,"border","all");
// 设置控件宽度
widget_set_style_int(gauge_pointer,"border_width",1);
// 设置圆角半径
widget_set_style_int(gauge_pointer,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(gauge_pointer,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(gauge_pointer,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(gauge_pointer,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(gauge_pointer,"round_radius_bottom_right",0);
// 背景颜色
widget_set_style_color(guage_pointer,"bg_color",#00000000);
// 前景颜色
widget_set_style_color(guage_pointer,"fg_color",#00000000);
// 设置x方向的偏移量
widget_set_style_int(gauge_pointer,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(gauge_pointer,"y_offset",0);
// 动画
// 值
// 设置图片名称
widget_set_prop_str(gauge_pointer,"image","gauge_pointer");
// 图片旋转锚点x坐标
widget_set_prop_int(gauge_pointer,"anchor_x",0.5);
// 图片旋转锚点y坐标
widget_set_prop_int(gauge_pointer,"anchor_y",0.5);
// 指针角度
widget_set_prop_int(gauge_pointer,"angle",0);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(gauge_pointer,TRUE);
// 是否接收用户事件
widget_set_sensitive(gauge_pointer,TRUE);
// 是否支持焦点停留
widget_set_focusable(gauge_pointer,TRUE);
// 是否支持焦点状态
widget_set_focus_state(gauge_pointer,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(gauge_pointer,4);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(gauge_pointer,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(gauge_pointer,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(gauge_pointer,"opacity",255);
4.8环形进度条
// 创建环形进度条
widget_t* progress_circle = progress_circle_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
widget_set_state(progress_circle,state);
// 布局
widget_set_children_layout(progress_circle,params);// 无/单行/单列/网格
widget_set_enable(progress_circle,TRUE);
widget_set_visible(progress_circle,TRUE);
widget_set_floating(progress_circle,TRUE);
widget_set_margin(progress_circle,0);
// 样式
// 修改边框颜色
widget_set_style_str(progress_circle,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(progress_circle,"border","all");
// 设置控件宽度
widget_set_style_int(progress_circle,"border_width",1);
// 设置圆角半径
widget_set_style_int(progress_circle,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(progress_circle,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(progress_circle,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(progress_circle,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(progress_circle,"round_radius_bottom_right",0);
// 修改文本颜色
widget_set_style_str(progress_circle,"normal:text_color","#44444444");
widget_set_style_str(progress_circle,"disabled:text_color","#44444444");
widget_set_style_str(progress_circle,"focus:text_color","#44444444");
// 修改字体名称
widget_set_style(progress_circle,"normal:font_name","font_name");
widget_set_style(progress_circle,"disabled:font_name","font_name");
widget_set_style(progress_circle,"focus:font_name","font_name");
// 修改字体大小
widget_set_style_int(progress_circle,"normal:font_size",18);
widget_set_style_int(progress_circle,"disabled:font_size",18);
widget_set_style_int(progress_circle,"focus:font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style(progress_circle,"normal:text_align_h","center");
widget_set_style(progress_circle,"disabled:text_align_h","center");
widget_set_style(progress_circle,"focus:text_align_h","center");
// 修改文本竖直对齐方式,none/middle/top/bottom
widget_set_style_str(progress_circle,"normal:text_align_v","middle");
widget_set_style_str(progress_circle,"disabled:text_align_v","middle");
widget_set_style_str(progress_circle,"focus:text_align_v","middle");
// 修改背景颜色
widget_set_style_str(progress_circle,"normal:bg_color","#F4F4F4");
widget_set_style_str(progress_circle,"disabled:bg_color","#F4F4F4");
widget_set_style_str(progress_circle,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(progress_circle,"normal:bg_image","item");
widget_set_style_str(progress_circle,"disable:bg_image","item");
widget_set_style_str(progress_circle,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(progress_circle,"normal:bg_image_draw_type",way);
widget_set_style_str(progress_circle,"disabled:bg_image_draw_type",way);
widget_set_style_str(progress_circle,"focus:bg_image_draw_type",way);
// 修改图标位置,auto/left/right/top/bottom/center
widget_set_style_str(progress_circle,"normal:icon_at",way);
widget_set_style_str(progress_circle,"disabled:icon_at",way);
widget_set_style_str(progress_circle,"focus:icon_at",way);
// 修改图标名称
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(progress_circle,"normal:icon",way);
widget_set_style_str(progress_circle,"disabled:icon",way);
widget_set_style_str(progress_circle,"focus:icon",way);
// 修改边距
widget_set_style_int(progress_circle,"normal:margin",0);
widget_set_style_int(progress_circle,"disabled:margin",0);
widget_set_style_int(progress_circle,"focus:margin",0);
// 修改上边距
widget_set_style_int(progress_circle,"normal:margin_top",0);
widget_set_style_int(progress_circle,"disabled:margin_top",0);
widget_set_style_int(progress_circle,"focus:margin_top",0);
// 修改下边距
widget_set_style_int(progress_circle,"normal:margin_bottom",0);
widget_set_style_int(progress_circle,"disabled:margin_bottom",0);
widget_set_style_int(progress_circle,"focus:margin_bottom",0);
// 修改左边距
widget_set_style_int(progress_circle,"normal:margin_left",0);
widget_set_style_int(progress_circle,"disabled:margin_left",0);
widget_set_style_int(progress_circle,"focus:margin_left",0);
// 修改右边距
widget_set_style_int(progress_circle,"normal:margin_right",0);
widget_set_style_int(progress_circle,"disabled:margin_right",0);
widget_set_style_int(progress_circle,"focus:margin_right",0);
// 背景颜色
widget_set_style_color(guage_pointer,"bg_color",#00000000);
// 前景颜色
widget_set_style_color(guage_pointer,"fg_color",#00000000);
// 前景图片
widget_set_style_str(guage_pointer,"fg_image","");
// 设置x方向的偏移量
widget_set_style_int(progress_circle,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(progress_circle,"y_offset",0);
// 动画
// 值
// 最大值
widget_set_prop_int(progress_circle,"max",100);
// 值
widget_set_prop_int(progress_circle,"value",25);
// 数值到字符串转换时的格式,缺省为"%d"
widget_set_prop_str(progress_circle,"format",);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(progress_circle,TRUE);
// 是否接收用户事件
widget_set_sensitive(progress_circle,TRUE);
// 是否支持焦点停留
widget_set_focusable(progress_circle,TRUE);
// 是否支持焦点状态
widget_set_focus_state(progress_circle,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(progress_circle,4);
// 起始角度
widget_set_prop_int(progress_circle,"start_angle",-90);
// 环线的厚度
widget_set_prop_int(progress_circle,"line_width",8);
// 线帽类型,round/square,圆头/方头
widget_set_prop_str(progress_circle,"line_cap","round");
// 是否为逆时针反向
widget_set_prop_bool(progress_circle,"counter_clock_wise",FALSE);
// 是否显示文本
widget_set_prop_bool(progress_circle,"show_texy",TRUE);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,progress_circle,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(progress_circle,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(progress_circle,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(progress_circle,"opacity",255);
4.9模拟时钟
// 创建模拟时钟
widget_t* time_clock = time_clock_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
widget_set_state(time_clock,state);
// 布局
widget_set_children_layout(time_clock,params);// 无/单行/单列/网格
widget_set_enable(time_clock,TRUE);
widget_set_visible(time_clock,TRUE);
widget_set_floating(time_clock,TRUE);
widget_set_margin(time_clock,0);
// 样式
// 修改边框颜色
widget_set_style_str(time_clock,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(time_clock,"border","all");
// 设置控件宽度
widget_set_style_int(time_clock,"border_width",1);
// 设置圆角半径
widget_set_style_int(time_clock,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(time_clock,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(time_clock,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(time_clock,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(time_clock,"round_radius_bottom_right",0);
// 修改文本颜色
widget_set_style_str(time_clock,"normal:text_color","#44444444");
widget_set_style_str(time_clock,"disabled:text_color","#44444444");
widget_set_style_str(time_clock,"focus:text_color","#44444444");
// 修改字体名称
widget_set_style(time_clock,"normal:font_name","font_name");
widget_set_style(time_clock,"disabled:font_name","font_name");
widget_set_style(time_clock,"focus:font_name","font_name");
// 修改字体大小
widget_set_style_int(time_clock,"normal:font_size",18);
widget_set_style_int(time_clock,"disabled:font_size",18);
widget_set_style_int(time_clock,"focus:font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style(time_clock,"normal:text_align_h","center");
widget_set_style(time_clock,"disabled:text_align_h","center");
widget_set_style(time_clock,"focus:text_align_h","center");
// 修改文本竖直对齐方式,none/middle/top/bottom
widget_set_style_str(time_clock,"normal:text_align_v","middle");
widget_set_style_str(time_clock,"disabled:text_align_v","middle");
widget_set_style_str(time_clock,"focus:text_align_v","middle");
// 修改背景颜色
widget_set_style_str(time_clock,"normal:bg_color","#F4F4F4");
widget_set_style_str(time_clock,"disabled:bg_color","#F4F4F4");
widget_set_style_str(time_clock,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(time_clock,"normal:bg_image","item");
widget_set_style_str(time_clock,"disable:bg_image","item");
widget_set_style_str(time_clock,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(time_clock,"normal:bg_image_draw_type",way);
widget_set_style_str(time_clock,"disabled:bg_image_draw_type",way);
widget_set_style_str(time_clock,"focus:bg_image_draw_type",way);
// 设置x方向的偏移量
widget_set_style_int(time_clock,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(time_clock,"y_offset",0);
// 动画
// 值
widget_set_prop_str(time_clock,"image","");
widget_set_prop_str(time_clock,"bg_image","clock_ng");
widget_set_prop_str(time_clock,"hour_image","clock_hour");
widget_set_prop_int(time_clock,"hour_anchor_x",0.5);
widget_set_prop_int(time_clock,"hour_anchor_y",0.5);
widget_set_prop_str(time_clock,"minute_image","clock_minute");
widget_set_prop_int(time_clock,"minute_anchor_x",0.5);
widget_set_prop_int(time_clock,"minute_anchor_y",0.5);
widget_set_prop_str(time_clock,"second_image","clock_second");
widget_set_prop_int(time_clock,"second_anchor_x",0.5);
widget_set_prop_int(time_clock,"second_anchor_y",0.5);
// 数值到字符串转换时的格式,缺省为"%d"
widget_set_prop_str(time_clock,"format",);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(time_clock,TRUE);
// 是否接收用户事件
widget_set_sensitive(time_clock,TRUE);
// 是否支持焦点停留
widget_set_focusable(time_clock,TRUE);
// 是否支持焦点状态
widget_set_focus_state(time_clock,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(time_clock,4);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,time_clock,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(time_clock,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(time_clock,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(time_clock,"opacity",255);
4.10数字时钟
// 创建数字时钟
widget_t* digit_clock = digit_clock_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
widget_set_state(digit_clock,state);
// 布局
widget_set_children_layout(digit_clock,params);// 无/单行/单列/网格
widget_set_enable(digit_clock,TRUE);
widget_set_visible(digit_clock,TRUE);
widget_set_floating(digit_clock,TRUE);
widget_set_margin(digit_clock,0);
// 样式
// 修改边框颜色
widget_set_style_str(digit_clock,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(digit_clock,"border","all");
// 设置控件宽度
widget_set_style_int(digit_clock,"border_width",1);
// 设置圆角半径
widget_set_style_int(digit_clock,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(digit_clock,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(digit_clock,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(digit_clock,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(digit_clock,"round_radius_bottom_right",0);
// 修改文本颜色
widget_set_style_str(digit_clock,"normal:text_color","#44444444");
widget_set_style_str(digit_clock,"disabled:text_color","#44444444");
widget_set_style_str(digit_clock,"focus:text_color","#44444444");
// 修改字体名称
widget_set_style_str(digit_clock,"normal:font_name","font_name");
widget_set_style_str(digit_clock,"disabled:font_name","font_name");
widget_set_style_str(digit_clock,"focus:font_name","font_name");
// 修改字体大小
widget_set_style_int(digit_clock,"normal:font_size",18);
widget_set_style_int(digit_clock,"disabled:font_size",18);
widget_set_style_int(digit_clock,"focus:font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style(digit_clock,"normal:text_align_h","center");
widget_set_style(digit_clock,"disabled:text_align_h","center");
widget_set_style(digit_clock,"focus:text_align_h","center");
// 修改文本竖直对齐方式,none/middle/top/bottom
widget_set_style_str(digit_clock,"normal:text_align_v","middle");
widget_set_style_str(digit_clock,"disabled:text_align_v","middle");
widget_set_style_str(digit_clock,"focus:text_align_v","middle");
// 修改背景颜色
widget_set_style_str(digit_clock,"normal:bg_color","#F4F4F4");
widget_set_style_str(digit_clock,"disabled:bg_color","#F4F4F4");
widget_set_style_str(digit_clock,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(digit_clock,"normal:bg_image","item");
widget_set_style_str(digit_clock,"disable:bg_image","item");
widget_set_style_str(digit_clock,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(digit_clock,"normal:bg_image_draw_type",way);
widget_set_style_str(digit_clock,"disabled:bg_image_draw_type",way);
widget_set_style_str(digit_clock,"focus:bg_image_draw_type",way);
// 修改图标位置,auto/left/right/top/bottom/center
widget_set_style_str(digit_clock,"normal:icon_at",way);
widget_set_style_str(digit_clock,"disabled:icon_at",way);
widget_set_style_str(digit_clock,"focus:icon_at",way);
// 修改图标名称
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(digit_clock,"normal:icon",way);
widget_set_style_str(digit_clock,"disabled:icon",way);
widget_set_style_str(digit_clock,"focus:icon",way);
// 修改边距
widget_set_style_int(digit_clock,"normal:margin",0);
widget_set_style_int(digit_clock,"disabled:margin",0);
widget_set_style_int(digit_clock,"focus:margin",0);
// 修改上边距
widget_set_style_int(digit_clock,"normal:margin_top",0);
widget_set_style_int(digit_clock,"disabled:margin_top",0);
widget_set_style_int(digit_clock,"focus:margin_top",0);
// 修改下边距
widget_set_style_int(digit_clock,"normal:margin_bottom",0);
widget_set_style_int(digit_clock,"disabled:margin_bottom",0);
widget_set_style_int(digit_clock,"focus:margin_bottom",0);
// 修改左边距
widget_set_style_int(digit_clock,"normal:margin_left",0);
widget_set_style_int(digit_clock,"disabled:margin_left",0);
widget_set_style_int(digit_clock,"focus:margin_left",0);
// 修改右边距
widget_set_style_int(digit_clock,"normal:margin_right",0);
widget_set_style_int(digit_clock,"disabled:margin_right",0);
widget_set_style_int(digit_clock,"focus:margin_right",0);
// 设置x方向的偏移量
widget_set_style_int(digit_clock,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(digit_clock,"y_offset",0);
// 动画
// 值
/*
	Y年,M月,D日,h小时0-23,H小时0-11,m分,s秒,
	w星期0-6,W星期英文缩写,T代表AM/PM,
	YY年,MM月0-12,DD日1-31,hh时00-23,HH时00-11,mm分00-69,ss秒00-59,
	MMM月的英文缩写
*/
widget_set_prop_str(digit_clock,"format","DD hh:mm:ss");
// 数值到字符串转换时的格式,缺省为"%d"
widget_set_prop_str(digit_clock,"format",);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(digit_clock,TRUE);
// 是否接收用户事件
widget_set_sensitive(digit_clock,TRUE);
// 是否支持焦点停留
widget_set_focusable(digit_clock,TRUE);
// 是否支持焦点状态
widget_set_focus_state(digit_clock,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(digit_clock,4);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,digit_clock,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(digit_clock,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(digit_clock,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(digit_clock,"opacity",255);
4.11多行编辑器
// 创建多行编辑器
widget_t* mledit = mledit_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
// empty
// empty_focus
// over
// empty_over
// changed
widget_set_state(mledit,state);
// 布局
widget_set_children_layout(mledit,params);// 无/单行/单列/网格
widget_set_enable(mledit,TRUE);
widget_set_visible(mledit,TRUE);
widget_set_floating(mledit,TRUE);
widget_set_margin(mledit,0);
// 样式
// 修改边框颜色
widget_set_style_str(mledit,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(mledit,"border","all");
// 设置控件宽度
widget_set_style_int(mledit,"border_width",1);
// 设置圆角半径
widget_set_style_int(mledit,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(mledit,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(mledit,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(mledit,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(mledit,"round_radius_bottom_right",0);
// 修改文本颜色
widget_set_style_str(mledit,"normal:text_color","#44444444");
widget_set_style_str(mledit,"disabled:text_color","#44444444");
widget_set_style_str(mledit,"focus:text_color","#44444444");
// 修改字体名称
widget_set_style(mledit,"normal:font_name","font_name");
widget_set_style(mledit,"disabled:font_name","font_name");
widget_set_style(mledit,"focus:font_name","font_name");
// 修改字体大小
widget_set_style_int(mledit,"normal:font_size",18);
widget_set_style_int(mledit,"disabled:font_size",18);
widget_set_style_int(mledit,"focus:font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style(mledit,"normal:text_align_h","center");
widget_set_style(mledit,"disabled:text_align_h","center");
widget_set_style(mledit,"focus:text_align_h","center");
// 修改文本竖直对齐方式,none/middle/top/bottom
widget_set_style_str(mledit,"normal:text_align_v","middle");
widget_set_style_str(mledit,"disabled:text_align_v","middle");
widget_set_style_str(mledit,"focus:text_align_v","middle");
// 修改背景颜色
widget_set_style_str(mledit,"normal:bg_color","#F4F4F4");
widget_set_style_str(mledit,"disabled:bg_color","#F4F4F4");
widget_set_style_str(mledit,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(mledit,"normal:bg_image","item");
widget_set_style_str(mledit,"disable:bg_image","item");
widget_set_style_str(mledit,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(mledit,"normal:bg_image_draw_type",way);
widget_set_style_str(mledit,"disabled:bg_image_draw_type",way);
widget_set_style_str(mledit,"focus:bg_image_draw_type",way);
// 修改图标位置,auto/left/right/top/bottom/center
widget_set_style_str(mledit,"normal:icon_at",way);
widget_set_style_str(mledit,"disabled:icon_at",way);
widget_set_style_str(mledit,"focus:icon_at",way);
// 修改图标名称
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(mledit,"normal:icon",way);
widget_set_style_str(mledit,"disabled:icon",way);
widget_set_style_str(mledit,"focus:icon",way);
// 修改边距
widget_set_style_int(mledit,"normal:margin",0);
widget_set_style_int(mledit,"disabled:margin",0);
widget_set_style_int(mledit,"focus:margin",0);
// 修改上边距
widget_set_style_int(mledit,"normal:margin_top",0);
widget_set_style_int(mledit,"disabled:margin_top",0);
widget_set_style_int(mledit,"focus:margin_top",0);
// 修改下边距
widget_set_style_int(mledit,"normal:margin_bottom",0);
widget_set_style_int(mledit,"disabled:margin_bottom",0);
widget_set_style_int(mledit,"focus:margin_bottom",0);
// 修改左边距
widget_set_style_int(mledit,"normal:margin_left",0);
widget_set_style_int(mledit,"disabled:margin_left",0);
widget_set_style_int(mledit,"focus:margin_left",0);
// 修改右边距
widget_set_style_int(mledit,"normal:margin_right",0);
widget_set_style_int(mledit,"disabled:margin_right",0);
widget_set_style_int(mledit,"focus:margin_right",0);
// 设置x方向的偏移量
widget_set_style_int(mledit,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(mledit,"y_offset",0);
// 动画
// 值
widget_set_prop_str(mledit,"tips","");
widget_set_prop_str(mledit,"text","");
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(mledit,TRUE);
// 是否接收用户事件
widget_set_sensitive(mledit,TRUE);
// 是否支持焦点停留
widget_set_focusable(mledit,TRUE);
// 是否支持焦点状态
widget_set_focus_state(mledit,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(mledit,4);
// 自定义软键盘名称
widget_set_prop_str(mledit,"keyboard","");
// 最大行数
widget_set_prop_int(mledit,"max_lines",100);
// 最大字符数
widget_set_prop_int(mledit,"max_chars",0);
// 鼠标一次滚动行数
widget_set_prop_int(mledit,"scroll_line",100);
// 是否启用覆盖行
widget_set_prop_bool(mledit,"overwrite",FALSE);
// 是否自动拆行
widget_set_prop_bool(mledit,"wrap_word",TRUE);
// 编辑器是否为只读
widget_set_prop_bool(mledit,"readonly",FALSE);
// 是否支持撤销编辑
widget_set_prop_bool(mledit,"cancelable",FALSE);
// 获得焦点时打开输入法
widget_set_prop_bool(mledit,"open_im_when_focused",TRUE);
// 失去焦点时关闭输入法
widget_set_prop_bool(mledit,"clos_im_when_blurred",TRUE);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,mledit,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(mledit,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(mledit,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(mledit,"opacity",255);
4.12行号
// 创建行号
widget_t* line_number = line_number_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
widget_set_state(line_number,state);
// 布局
widget_set_children_layout(line_number,params);// 无/单行/单列/网格
widget_set_enable(line_number,TRUE);
widget_set_visible(line_number,TRUE);
widget_set_floating(line_number,TRUE);
widget_set_margin(line_number,0);
// 样式
// 修改边框颜色
widget_set_style_str(line_number,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(line_number,"border","all");
// 设置控件宽度
widget_set_style_int(line_number,"border_width",1);
// 设置圆角半径
widget_set_style_int(line_number,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(line_number,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(line_number,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(line_number,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(line_number,"round_radius_bottom_right",0);
// 修改文本颜色
widget_set_style_str(line_number,"normal:text_color","#44444444");
widget_set_style_str(line_number,"disabled:text_color","#44444444");
widget_set_style_str(line_number,"focus:text_color","#44444444");
// 修改字体名称
widget_set_style(line_number,"normal:font_name","font_name");
widget_set_style(line_number,"disabled:font_name","font_name");
widget_set_style(line_number,"focus:font_name","font_name");
// 修改字体大小
widget_set_style_int(line_number,"normal:font_size",18);
widget_set_style_int(line_number,"disabled:font_size",18);
widget_set_style_int(line_number,"focus:font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style(line_number,"normal:text_align_h","center");
widget_set_style(line_number,"disabled:text_align_h","center");
widget_set_style(line_number,"focus:text_align_h","center");
// 修改文本竖直对齐方式,none/middle/top/bottom
widget_set_style_str(line_number,"normal:text_align_v","middle");
widget_set_style_str(line_number,"disabled:text_align_v","middle");
widget_set_style_str(line_number,"focus:text_align_v","middle");
// 修改背景颜色
widget_set_style_str(line_number,"normal:bg_color","#F4F4F4");
widget_set_style_str(line_number,"disabled:bg_color","#F4F4F4");
widget_set_style_str(line_number,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(line_number,"normal:bg_image","item");
widget_set_style_str(line_number,"disable:bg_image","item");
widget_set_style_str(line_number,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(line_number,"normal:bg_image_draw_type",way);
widget_set_style_str(line_number,"disabled:bg_image_draw_type",way);
widget_set_style_str(line_number,"focus:bg_image_draw_type",way);
// 修改图标位置,auto/left/right/top/bottom/center
widget_set_style_str(line_number,"normal:icon_at",way);
widget_set_style_str(line_number,"disabled:icon_at",way);
widget_set_style_str(line_number,"focus:icon_at",way);
// 修改图标名称
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(line_number,"normal:icon",way);
widget_set_style_str(line_number,"disabled:icon",way);
widget_set_style_str(line_number,"focus:icon",way);
// 修改边距
widget_set_style_int(line_number,"normal:margin",0);
widget_set_style_int(line_number,"disabled:margin",0);
widget_set_style_int(line_number,"focus:margin",0);
// 修改上边距
widget_set_style_int(line_number,"normal:margin_top",0);
widget_set_style_int(line_number,"disabled:margin_top",0);
widget_set_style_int(line_number,"focus:margin_top",0);
// 修改下边距
widget_set_style_int(line_number,"normal:margin_bottom",0);
widget_set_style_int(line_number,"disabled:margin_bottom",0);
widget_set_style_int(line_number,"focus:margin_bottom",0);
// 修改左边距
widget_set_style_int(line_number,"normal:margin_left",0);
widget_set_style_int(line_number,"disabled:margin_left",0);
widget_set_style_int(line_number,"focus:margin_left",0);
// 修改右边距
widget_set_style_int(line_number,"normal:margin_right",0);
widget_set_style_int(line_number,"disabled:margin_right",0);
widget_set_style_int(line_number,"focus:margin_right",0);
// 设置x方向的偏移量
widget_set_style_int(line_number,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(line_number,"y_offset",0);
// 动画
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(line_number,TRUE);
// 是否接收用户事件
widget_set_sensitive(line_number,TRUE);
// 是否支持焦点停留
widget_set_focusable(line_number,TRUE);
// 是否支持焦点状态
widget_set_focus_state(line_number,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(line_number,4);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,line_number,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(line_number,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(line_number,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(line_number,"opacity",255);
4.13滚动文本
// 创建滚动文本
widget_t* line_number = line_number_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
widget_set_state(line_number,state);
// 布局
widget_set_children_layout(line_number,params);// 无/单行/单列/网格
widget_set_enable(line_number,TRUE);
widget_set_visible(line_number,TRUE);
widget_set_floating(line_number,TRUE);
widget_set_margin(line_number,0);
// 样式
// 修改边框颜色
widget_set_style_str(line_number,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(line_number,"border","all");
// 设置控件宽度
widget_set_style_int(line_number,"border_width",1);
// 设置圆角半径
widget_set_style_int(line_number,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(line_number,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(line_number,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(line_number,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(line_number,"round_radius_bottom_right",0);
// 修改文本颜色
widget_set_style_str(line_number,"normal:text_color","#44444444");
widget_set_style_str(line_number,"disabled:text_color","#44444444");
widget_set_style_str(line_number,"focus:text_color","#44444444");
// 修改字体名称
widget_set_style(line_number,"normal:font_name","font_name");
widget_set_style(line_number,"disabled:font_name","font_name");
widget_set_style(line_number,"focus:font_name","font_name");
// 修改字体大小
widget_set_style_int(line_number,"normal:font_size",18);
widget_set_style_int(line_number,"disabled:font_size",18);
widget_set_style_int(line_number,"focus:font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style(line_number,"normal:text_align_h","center");
widget_set_style(line_number,"disabled:text_align_h","center");
widget_set_style(line_number,"focus:text_align_h","center");
// 修改文本竖直对齐方式,none/middle/top/bottom
widget_set_style_str(line_number,"normal:text_align_v","middle");
widget_set_style_str(line_number,"disabled:text_align_v","middle");
widget_set_style_str(line_number,"focus:text_align_v","middle");
// 修改背景颜色
widget_set_style_str(line_number,"normal:bg_color","#F4F4F4");
widget_set_style_str(line_number,"disabled:bg_color","#F4F4F4");
widget_set_style_str(line_number,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(line_number,"normal:bg_image","item");
widget_set_style_str(line_number,"disable:bg_image","item");
widget_set_style_str(line_number,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(line_number,"normal:bg_image_draw_type",way);
widget_set_style_str(line_number,"disabled:bg_image_draw_type",way);
widget_set_style_str(line_number,"focus:bg_image_draw_type",way);
// 修改图标位置,auto/left/right/top/bottom/center
widget_set_style_str(line_number,"normal:icon_at",way);
widget_set_style_str(line_number,"disabled:icon_at",way);
widget_set_style_str(line_number,"focus:icon_at",way);
// 修改图标名称
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(line_number,"normal:icon",way);
widget_set_style_str(line_number,"disabled:icon",way);
widget_set_style_str(line_number,"focus:icon",way);
// 修改边距
widget_set_style_int(line_number,"normal:margin",0);
widget_set_style_int(line_number,"disabled:margin",0);
widget_set_style_int(line_number,"focus:margin",0);
// 修改上边距
widget_set_style_int(line_number,"normal:margin_top",0);
widget_set_style_int(line_number,"disabled:margin_top",0);
widget_set_style_int(line_number,"focus:margin_top",0);
// 修改下边距
widget_set_style_int(line_number,"normal:margin_bottom",0);
widget_set_style_int(line_number,"disabled:margin_bottom",0);
widget_set_style_int(line_number,"focus:margin_bottom",0);
// 修改左边距
widget_set_style_int(line_number,"normal:margin_left",0);
widget_set_style_int(line_number,"disabled:margin_left",0);
widget_set_style_int(line_number,"focus:margin_left",0);
// 修改右边距
widget_set_style_int(line_number,"normal:margin_right",0);
widget_set_style_int(line_number,"disabled:margin_right",0);
widget_set_style_int(line_number,"focus:margin_right",0);
// 设置x方向的偏移量
widget_set_style_int(line_number,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(line_number,"y_offset",0);
// 动画
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(line_number,TRUE);
// 是否接收用户事件
widget_set_sensitive(line_number,TRUE);
// 是否支持焦点停留
widget_set_focusable(line_number,TRUE);
// 是否支持焦点状态
widget_set_focus_state(line_number,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(line_number,4);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,line_number,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(line_number,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(line_number,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(line_number,"opacity",255);
5.选择器
5.1开关
// 创建开关
widget_t* swtich = swtich_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
widget_set_state(swtich,state);
// 布局
widget_set_children_layout(swtich,params);// 无/单行/单列/网格
widget_set_enable(swtich,TRUE);
widget_set_visible(swtich,TRUE);
widget_set_floating(swtich,TRUE);
widget_set_margin(swtich,0);
// 样式
// 修改边框颜色
widget_set_style_str(swtich,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(swtich,"border","all");
// 设置控件宽度
widget_set_style_int(swtich,"border_width",1);
// 设置圆角半径
widget_set_style_int(swtich,"round_radius",0);
// 修改背景颜色
widget_set_style_str(swtich,"normal:bg_color","#F4F4F4");
widget_set_style_str(swtich,"disabled:bg_color","#F4F4F4");
widget_set_style_str(swtich,"focus:bg_color","#F4F4F4");
// 修改背景颜色
widget_set_style_str(swtich,"normal:selected_bg_color","#F4F4F4");
widget_set_style_str(swtich,"disabled:selected_bg_color","#F4F4F4");
widget_set_style_str(swtich,"focus:selected_bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(swtich,"normal:bg_image","item");
widget_set_style_str(swtich,"disable:bg_image","item");
widget_set_style_str(swtich,"focus:bg_image","item");
widget_set_style_color(switch,"selected_fg_color",#00000000);
// 修改前景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(swtich,"normal:fg_image","item");
widget_set_style_str(swtich,"disable:fg_image","item");
widget_set_style_str(swtich,"focus:fg_image","item");
// 修改边距
widget_set_style_int(swtich,"normal:margin",0);
widget_set_style_int(swtich,"disabled:margin",0);
widget_set_style_int(swtich,"focus:margin",0);
// 修改上边距
widget_set_style_int(swtich,"normal:margin_top",0);
widget_set_style_int(swtich,"disabled:margin_top",0);
widget_set_style_int(swtich,"focus:margin_top",0);
// 修改下边距
widget_set_style_int(swtich,"normal:margin_bottom",0);
widget_set_style_int(swtich,"disabled:margin_bottom",0);
widget_set_style_int(swtich,"focus:margin_bottom",0);
// 修改左边距
widget_set_style_int(swtich,"normal:margin_left",0);
widget_set_style_int(swtich,"disabled:margin_left",0);
widget_set_style_int(swtich,"focus:margin_left",0);
// 修改右边距
widget_set_style_int(swtich,"normal:margin_right",0);
widget_set_style_int(swtich,"disabled:margin_right",0);
widget_set_style_int(swtich,"focus:margin_right",0);
// 设置x方向的偏移量
widget_set_style_int(swtich,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(swtich,"y_offset",0);
// 动画
// 值
widget_set_prop_bool(swtich,"value",FALSE);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(swtich,TRUE);
// 是否接收用户事件
widget_set_sensitive(swtich,TRUE);
// 是否支持焦点停留
widget_set_focusable(swtich,TRUE);
// 是否支持焦点状态
widget_set_focus_state(swtich,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(swtich,4);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,swtich,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(swtich,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(swtich,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(swtich,"opacity",255);
5.2文本选择器
// 创建文本选择器
widget_t* text_selector = text_selector_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
widget_set_state(text_selector,state);
// 布局
widget_set_children_layout(text_selector,params);// 无/单行/单列/网格
widget_set_enable(text_selector,TRUE);
widget_set_visible(text_selector,TRUE);
widget_set_floating(text_selector,TRUE);
widget_set_margin(text_selector,0);
// 样式
// 修改边框颜色
widget_set_style_str(text_selector,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(text_selector,"border","all");
// 设置控件宽度
widget_set_style_int(text_selector,"border_width",1);
// 设置圆角半径
widget_set_style_int(text_selector,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(text_selector,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(text_selector,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(text_selector,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(text_selector,"round_radius_bottom_right",0);
// 修改文本颜色
widget_set_style_str(text_selector,"normal:text_color","#44444444");
widget_set_style_str(text_selector,"disabled:text_color","#44444444");
widget_set_style_str(text_selector,"focus:text_color","#44444444");
// 修改文本颜色
widget_set_style_str(text_selector,"normal:highlight_text_color","#44444444");
widget_set_style_str(text_selector,"disabled:highlight_text_color","#44444444");
widget_set_style_str(text_selector,"focus:highlight_text_color","#44444444");
// 修改字体名称
widget_set_style(text_selector,"normal:font_name","font_name");
widget_set_style(text_selector,"disabled:font_name","font_name");
widget_set_style(text_selector,"focus:font_name","font_name");
// 修改字体名称
widget_set_style(text_selector,"normal:highlight_font_name","font_name");
widget_set_style(text_selector,"disabled:highlight_font_name","font_name");
widget_set_style(text_selector,"focus:highlight_font_name","font_name");
// 修改字体大小
widget_set_style_int(text_selector,"normal:font_size",18);
widget_set_style_int(text_selector,"disabled:font_size",18);
widget_set_style_int(text_selector,"focus:font_size",18);
// 修改字体大小
widget_set_style_int(text_selector,"normal:highlight_font_size",18);
widget_set_style_int(text_selector,"disabled:highlight_font_size",18);
widget_set_style_int(text_selector,"focus:highlight_font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style(text_selector,"normal:text_align_h","center");
widget_set_style(text_selector,"disabled:text_align_h","center");
widget_set_style(text_selector,"focus:text_align_h","center");
// 修改文本竖直对齐方式,none/middle/top/bottom
widget_set_style_str(text_selector,"normal:text_align_v","middle");
widget_set_style_str(text_selector,"disabled:text_align_v","middle");
widget_set_style_str(text_selector,"focus:text_align_v","middle");
// 修改背景颜色
widget_set_style_str(text_selector,"normal:bg_color","#F4F4F4");
widget_set_style_str(text_selector,"disabled:bg_color","#F4F4F4");
widget_set_style_str(text_selector,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(text_selector,"normal:bg_image","item");
widget_set_style_str(text_selector,"disable:bg_image","item");
widget_set_style_str(text_selector,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(text_selector,"normal:bg_image_draw_type",way);
widget_set_style_str(text_selector,"disabled:bg_image_draw_type",way);
widget_set_style_str(text_selector,"focus:bg_image_draw_type",way);
// 修改前景颜色
widget_set_style_str(text_selector,"normal:fg_color","#F4F4F4");
widget_set_style_str(text_selector,"disabled:fg_color","#F4F4F4");
widget_set_style_str(text_selector,"focus:fg_color","#F4F4F4");
// 修改前景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(text_selector,"normal:fg_image","item");
widget_set_style_str(text_selector,"disable:fg_image","item");
widget_set_style_str(text_selector,"focus:fg_image","item");
// 修改前景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(text_selector,"normal:fg_image_draw_type",way);
widget_set_style_str(text_selector,"disabled:fg_image_draw_type",way);
widget_set_style_str(text_selector,"focus:fg_image_draw_type",way);
// 设置x方向的偏移量
widget_set_style_int(text_selector,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(text_selector,"y_offset",0);
// 动画
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(text_selector,TRUE);
// 是否接收用户事件
widget_set_sensitive(text_selector,TRUE);
// 是否支持焦点停留
widget_set_focusable(text_selector,TRUE);
// 是否支持焦点状态
widget_set_focus_state(text_selector,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(text_selector,4);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,text_selector,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(text_selector,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(text_selector,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(text_selector,"opacity",255);
5.3滑动菜单
// 创建滑动菜单
widget_t* slide_menu = slide_menu_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
widget_set_state(slide_menu,state);
// 布局
widget_set_children_layout(slide_menu,params);// 无/单行/单列/网格
widget_set_enable(slide_menu,TRUE);
widget_set_visible(slide_menu,TRUE);
widget_set_floating(slide_menu,TRUE);
widget_set_margin(slide_menu,0);
// 样式
// 修改边框颜色
widget_set_style_str(slide_menu,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(slide_menu,"border","all");
// 设置控件宽度
widget_set_style_int(slide_menu,"border_width",1);
// 设置圆角半径
widget_set_style_int(slide_menu,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(slide_menu,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(slide_menu,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(slide_menu,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(slide_menu,"round_radius_bottom_right",0);
// 修改文本颜色
widget_set_style_str(slide_menu,"normal:text_color","#44444444");
widget_set_style_str(slide_menu,"disabled:text_color","#44444444");
widget_set_style_str(slide_menu,"focus:text_color","#44444444");
// 修改文本颜色
widget_set_style_str(slide_menu,"normal:highlight_text_color","#44444444");
widget_set_style_str(slide_menu,"disabled:highlight_text_color","#44444444");
widget_set_style_str(slide_menu,"focus:highlight_text_color","#44444444");
// 修改字体名称
widget_set_style(slide_menu,"normal:font_name","font_name");
widget_set_style(slide_menu,"disabled:font_name","font_name");
widget_set_style(slide_menu,"focus:font_name","font_name");
// 修改字体名称
widget_set_style(slide_menu,"normal:highlight_font_name","font_name");
widget_set_style(slide_menu,"disabled:highlight_font_name","font_name");
widget_set_style(slide_menu,"focus:highlight_font_name","font_name");
// 修改字体大小
widget_set_style_int(slide_menu,"normal:font_size",18);
widget_set_style_int(slide_menu,"disabled:font_size",18);
widget_set_style_int(slide_menu,"focus:font_size",18);
// 修改字体大小
widget_set_style_int(slide_menu,"normal:highlight_font_size",18);
widget_set_style_int(slide_menu,"disabled:highlight_font_size",18);
widget_set_style_int(slide_menu,"focus:highlight_font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style(slide_menu,"normal:text_align_h","center");
widget_set_style(slide_menu,"disabled:text_align_h","center");
widget_set_style(slide_menu,"focus:text_align_h","center");
// 修改文本竖直对齐方式,none/middle/top/bottom
widget_set_style_str(slide_menu,"normal:text_align_v","middle");
widget_set_style_str(slide_menu,"disabled:text_align_v","middle");
widget_set_style_str(slide_menu,"focus:text_align_v","middle");
// 修改背景颜色
widget_set_style_str(slide_menu,"normal:bg_color","#F4F4F4");
widget_set_style_str(slide_menu,"disabled:bg_color","#F4F4F4");
widget_set_style_str(slide_menu,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(slide_menu,"normal:bg_image","item");
widget_set_style_str(slide_menu,"disable:bg_image","item");
widget_set_style_str(slide_menu,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(slide_menu,"normal:bg_image_draw_type",way);
widget_set_style_str(slide_menu,"disabled:bg_image_draw_type",way);
widget_set_style_str(slide_menu,"focus:bg_image_draw_type",way);
// 设置蒙版颜色
widget_set_style_color(slide_menu,"mask_color",#00000000);
// 设置x方向的偏移量
widget_set_style_int(slide_menu,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(slide_menu,"y_offset",0);
// 动画
//
widget_set_prop_int(slide_menu,"value",1);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(slide_menu,TRUE);
// 是否接收用户事件
widget_set_sensitive(slide_menu,TRUE);
// 是否支持焦点停留
widget_set_focusable(slide_menu,TRUE);
// 是否支持焦点状态
widget_set_focus_state(slide_menu,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(slide_menu,4);
widget_set_prop_str(slide_menu,"align_v","bottom");
widget_set_prop_int(slide_menu,"min_scale",0.8);
widget_set_prop_int(slide_menu,"spacer",0);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,slide_menu,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(slide_menu,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(slide_menu,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(slide_menu,"opacity",255);
6.颜色
6.1颜色选择器
// 创建颜色选择器
widget_t* color_picker = color_picker_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
widget_set_state(color_picker,state);
// 布局
widget_set_children_layout(color_picker,params);// 无/单行/单列/网格
widget_set_enable(color_picker,TRUE);
widget_set_visible(color_picker,TRUE);
widget_set_floating(color_picker,TRUE);
widget_set_margin(color_picker,0);
// 样式
// 修改边框颜色
widget_set_style_str(color_picker,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(color_picker,"border","all");
// 设置控件宽度
widget_set_style_int(color_picker,"border_width",1);
// 设置圆角半径
widget_set_style_int(color_picker,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(color_picker,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(color_picker,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(color_picker,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(color_picker,"round_radius_bottom_right",0);
// 修改背景颜色
widget_set_style_str(color_picker,"normal:bg_color","#F4F4F4");
widget_set_style_str(color_picker,"disabled:bg_color","#F4F4F4");
widget_set_style_str(color_picker,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(color_picker,"normal:bg_image","item");
widget_set_style_str(color_picker,"disable:bg_image","item");
widget_set_style_str(color_picker,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(color_picker,"normal:bg_image_draw_type",way);
widget_set_style_str(color_picker,"disabled:bg_image_draw_type",way);
widget_set_style_str(color_picker,"focus:bg_image_draw_type",way);
// 设置蒙版颜色
widget_set_style_color(color_picker,"mask_color",#00000000);
// 设置x方向的偏移量
widget_set_style_int(color_picker,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(color_picker,"y_offset",0);
// 动画
// 值
widget_set_prop_color(color_picker,"value",#FFD700);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(color_picker,TRUE);
// 是否接收用户事件
widget_set_sensitive(color_picker,TRUE);
// 是否支持焦点停留
widget_set_focusable(color_picker,TRUE);
// 是否支持焦点状态
widget_set_focus_state(color_picker,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(color_picker,4);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,color_picker,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(color_picker,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(color_picker,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(color_picker,"opacity",255);
6.2颜色组件
// 创建颜色组件
widget_t* color_component = color_component_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
widget_set_state(color_component,state);
// 布局
widget_set_children_layout(color_component,params);// 无/单行/单列/网格
widget_set_enable(color_component,TRUE);
widget_set_visible(color_component,TRUE);
widget_set_floating(color_component,TRUE);
widget_set_margin(color_component,0);
// 样式
// 修改边框颜色
widget_set_style_str(color_component,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(color_component,"border","all");
// 设置控件宽度
widget_set_style_int(color_component,"border_width",1);
// 设置圆角半径
widget_set_style_int(color_component,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(color_component,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(color_component,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(color_component,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(color_component,"round_radius_bottom_right",0);
// 修改背景颜色
widget_set_style_str(color_component,"normal:bg_color","#F4F4F4");
widget_set_style_str(color_component,"disabled:bg_color","#F4F4F4");
widget_set_style_str(color_component,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(color_component,"normal:bg_image","item");
widget_set_style_str(color_component,"disable:bg_image","item");
widget_set_style_str(color_component,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(color_component,"normal:bg_image_draw_type",way);
widget_set_style_str(color_component,"disabled:bg_image_draw_type",way);
widget_set_style_str(color_component,"focus:bg_image_draw_type",way);
// 设置蒙版颜色
widget_set_style_color(color_component,"mask_color",#00000000);
// 设置x方向的偏移量
widget_set_style_int(color_component,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(color_component,"y_offset",0);
// 动画
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(color_component,TRUE);
// 是否接收用户事件
widget_set_sensitive(color_component,TRUE);
// 是否支持焦点停留
widget_set_focusable(color_component,TRUE);
// 是否支持焦点状态
widget_set_focus_state(color_component,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(color_component,4);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,color_component,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(color_component,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(color_component,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(color_component,"opacity",255);
6.3色块
// 创建色块
widget_t* color_tile = color_tile_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
widget_set_state(color_tile,state);
// 布局
widget_set_children_layout(color_tile,params);// 无/单行/单列/网格
widget_set_enable(color_tile,TRUE);
widget_set_visible(color_tile,TRUE);
widget_set_floating(color_tile,TRUE);
widget_set_margin(color_tile,0);
// 样式
// 修改边框颜色
widget_set_style_str(color_tile,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(color_tile,"border","all");
// 设置控件宽度
widget_set_style_int(color_tile,"border_width",1);
// 设置圆角半径
widget_set_style_int(color_tile,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(color_tile,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(color_tile,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(color_tile,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(color_tile,"round_radius_bottom_right",0);
// 修改背景颜色
widget_set_style_str(color_tile,"normal:bg_color","#F4F4F4");
widget_set_style_str(color_tile,"disabled:bg_color","#F4F4F4");
widget_set_style_str(color_tile,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(color_tile,"normal:bg_image","item");
widget_set_style_str(color_tile,"disable:bg_image","item");
widget_set_style_str(color_tile,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(color_tile,"normal:bg_image_draw_type",way);
widget_set_style_str(color_tile,"disabled:bg_image_draw_type",way);
widget_set_style_str(color_tile,"focus:bg_image_draw_type",way);
// 设置蒙版颜色
widget_set_style_color(color_tile,"mask_color",#00000000);
// 设置x方向的偏移量
widget_set_style_int(color_tile,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(color_tile,"y_offset",0);
// 动画
// 值
widget_set_prop_color(color_tile,"bg_color",#FF0000);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(color_tile,TRUE);
// 是否接收用户事件
widget_set_sensitive(color_tile,TRUE);
// 是否支持焦点停留
widget_set_focusable(color_tile,TRUE);
// 是否支持焦点状态
widget_set_focus_state(color_tile,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(color_tile,4);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,color_tile,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(color_tile,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(color_tile,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(color_tile,"opacity",255);
7.画布
7.1画布
// 创建画布
widget_t* canvas = canvas_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
widget_set_state(canvas,state);
// 布局
widget_set_children_layout(canvas,params);// 无/单行/单列/网格
widget_set_enable(canvas,TRUE);
widget_set_visible(canvas,TRUE);
widget_set_floating(canvas,TRUE);
widget_set_margin(canvas,0);
// 样式
// 修改边框颜色
widget_set_style_str(canvas,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(canvas,"border","all");
// 设置控件宽度
widget_set_style_int(canvas,"border_width",1);
// 设置圆角半径
widget_set_style_int(canvas,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(canvas,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(canvas,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(canvas,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(canvas,"round_radius_bottom_right",0);
// 修改背景颜色
widget_set_style_str(canvas,"normal:bg_color","#F4F4F4");
widget_set_style_str(canvas,"disabled:bg_color","#F4F4F4");
widget_set_style_str(canvas,"focus:bg_color","#F4F4F4");
// 修改背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(canvas,"normal:bg_image","item");
widget_set_style_str(canvas,"disable:bg_image","item");
widget_set_style_str(canvas,"focus:bg_image","item");
// 修改背景图片显示方式
// disable/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(canvas,"normal:bg_image_draw_type",way);
widget_set_style_str(canvas,"disabled:bg_image_draw_type",way);
widget_set_style_str(canvas,"focus:bg_image_draw_type",way);
// 设置蒙版颜色
widget_set_style_color(canvas,"mask_color",#00000000);
// 设置x方向的偏移量
widget_set_style_int(canvas,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(canvas,"y_offset",0);
// 动画
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(canvas,TRUE);
// 是否接收用户事件
widget_set_sensitive(canvas,TRUE);
// 是否支持焦点停留
widget_set_focusable(canvas,TRUE);
// 是否支持焦点状态
widget_set_focus_state(canvas,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(canvas,4);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,canvas,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(canvas,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(canvas,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(canvas,"opacity",255);
8.多媒体
8.1mutable图像
// 创建多媒体
widget_t* mutable_image = mutable_image_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
// selected,选择状态
// pressed,按下状态
widget_set_state(mutable_image,state);
// 布局
widget_set_children_layout(mutable_image,params);// 无/单行/单列/网格
widget_set_enable(mutable_image,TRUE);
widget_set_visible(mutable_image,TRUE);
widget_set_floating(mutable_image,TRUE);
widget_set_margin(mutable_image,0);
// 样式
// 修改边框颜色
widget_set_style_str(mutable_image,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(mutable_image,"border","all");
// 设置控件宽度
widget_set_style_int(mutable_image,"border_width",1);
// 设置圆角半径
widget_set_style_int(mutable_image,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(mutable_image,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(mutable_image,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(mutable_image,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(mutable_image,"round_radius_bottom_right",0);
// 设置x方向的偏移量
widget_set_style_int(mutable_image,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(mutable_image,"y_offset",0);
// 动画
widget_set_prop_int(mutable_image,"sacle_x",1);
widget_set_prop_int(mutable_image,"sacle_y",1);
widget_set_prop_int(mutable_image,"anchor_x",0.5);
widget_set_prop_int(mutable_image,"anchor_y",0.5);
widget_set_prop_int(mutable_image,"rotation",0);
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(mutable_image,TRUE);
// 是否接收用户事件
widget_set_sensitive(mutable_image,TRUE);
// 是否支持焦点停留
widget_set_focusable(mutable_image,TRUE);
// 是否支持焦点状态
widget_set_focus_state(mutable_image,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(mutable_image,4);
widget_set_prop_bool(mutable_image,"clickable",FALSE);
widget_set_prop_bool(mutable_image,"selectable",FALSE);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,mutable_image,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(mutable_image,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(mutable_image,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(mutable_image,"opacity",255);
9自定义
9.1占位控件
// 创建占位控件
widget_t* custom = custom_image_create(parent,x,y,w,h);
// 设置视图状态
// normal,正常状态
// disable,失效状态
// focused,聚焦状态
// selected,选择状态
// pressed,按下状态
widget_set_state(custom,state);
// 布局
widget_set_children_layout(custom,params);// 无/单行/单列/网格
widget_set_enable(custom,TRUE);
widget_set_visible(custom,TRUE);
widget_set_floating(custom,TRUE);
widget_set_margin(custom,0);
// 样式
// 修改边框颜色
widget_set_style_str(custom,"border_color","#00000000");
// 设置控件边框,left/right/top/bottom/all
widget_set_style(custom,"border","all");
// 设置控件宽度
widget_set_style_int(custom,"border_width",1);
// 设置圆角半径
widget_set_style_int(custom,"round_radius",0);
// 设置左上圆角半径
widget_set_style_int(custom,"round_radius_top_left",0);
// 设置右上圆角半径
widget_set_style_int(custom,"round_radius_top_right",0);
// 设置左下圆角半径
widget_set_style_int(custom,"round_radius_bottom_left",0);
// 设置右下圆角半径
widget_set_style_int(custom,"round_radius_bottom_right",0);
// 设置文本颜色
widget_set_style_color(custom,"text_color",#00000000);
// 编辑器中选中区域的文本颜色
widget_set_style_color(custom,"selected_text_color",#00000000);
// 提示文本颜色
widget_set_style_color(custom,"tips_text_color",#00000000);
// 高亮文本的文本颜色
widget_set_style_color(custom,"highlight_text_color",#00000000);
// 修改字体名称
widget_set_style(custom,"normal:font_name","font_name");
widget_set_style(custom,"disabled:font_name","font_name");
widget_set_style(custom,"focus:font_name","font_name");
// 修改高亮文本的字体名称
widget_set_style(custom,"normal:highlight_font_name","font_name");
widget_set_style(custom,"disabled:highlight_font_name","font_name");
widget_set_style(custom,"focus:highlight_font_name","font_name");
// 修改字体大小
widget_set_style_int(custom,"normal:font_size",18);
widget_set_style_int(custom,"disabled:font_size",18);
widget_set_style_int(custom,"focus:font_size",18);
// 修改高亮文本的字体大小
widget_set_style_int(custom,"normal:highlight_font_size",18);
widget_set_style_int(custom,"disabled:highlight_font_size",18);
widget_set_style_int(custom,"focus:highlight_font_size",18);
// 修改文本水平对齐方式,none/center/left/right
widget_set_style(custom,"normal:text_align_h","center");
widget_set_style(custom,"disabled:text_align_h","center");
widget_set_style(custom,"focus:text_align_h","center");
// 修改文本竖直对齐方式,none/middle/top/bottom
widget_set_style_str(custom,"normal:text_align_v","middle");
widget_set_style_str(custom,"disabled:text_align_v","middle");
widget_set_style_str(custom,"focus:text_align_v","middle");
// 修改背景颜色
widget_set_style_str(custom,"normal:bg_color","#F4F4F4");
widget_set_style_str(custom,"disabled:bg_color","#F4F4F4");
widget_set_style_str(custom,"focus:bg_color","#F4F4F4");
// 修改编辑器选中区域的背景颜色
widget_set_style_str(custom,"normal:selected_bg_color","#F4F4F4");
widget_set_style_str(custom,"disabled:selected_bg_color","#F4F4F4");
widget_set_style_str(custom,"focus:selected_bg_color","#F4F4F4");
// 设置背景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_style_str(custom,"bg_image","bg_image_name");
// 设置背景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(custom,"bg_image_draw_type","default");
// 设置前景颜色
widget_set_style_str(custom,"fg_color","#338FFF");
// 设置switch控件打开时的前景颜色
widget_set_style_str(custom,"selected_fg_color","#338FFF");
// 设置前景图片
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// custom_bg/fg,背景/前景滑动条
widget_set_style_str(custom,"fg_image","bg_image_name");
// 设置前景图片展示方式
// default/center/icon,默认:目标矩形左上角显示/居中:原大小居中显示/图标:根据屏幕密度调整大小,居中显示
// scale,缩放显示
// scale_auto/w/h,自动缩放/宽度/高度
// repeat,平铺
// repeat_x/y,平铺x/y反向平铺,另一方向缩放
// repeat_y_inverse,平铺y,从下到上缩放
// patch9,9宫格
// patch3_x/y,水平/垂直方向3宫格显示,另一方向居中显示
// patch3_x_scale_y,水平方向3宫格显示,垂直方向缩放显示
// patch3_y_scale_x,垂直方向3宫格显示,水平方向缩放显示
widget_set_style_str(custom,"fg_image_draw_type","default");
// 设置图标位置,auto/top/bottom/left/right/center
widget_set_style_str(custom,"icon_at","auto");
// 设置图标
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮5种状态,disable/normal/focused/over/pressed
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,gauge_pointer,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// custom_bg/fg,背景/前景滑动条
widget_set_style_str(custom,"icon","item");
// active图标的名称
widget_set_style_str(custom,"active_icon","");
// 设置蒙版颜色
widget_set_style_color(custom,"mask_color",#00000000);
// 设置x方向的偏移量
widget_set_style_int(custom,"x_offset",0);
// 设置y方向的偏移量
widget_set_style_int(custom,"y_offset",0);
// 设置间距
widget_set_style_int(custom,"spacer",2);
// 设置网格线颜色
widget_set_style_color(custom,"grid_color",#00000000);
// 设置偶数行背景颜色
widget_set_style_color(custom,"even_bg_color",#00000000);
// 设置奇数行背景颜色
widget_set_style_color(custom,"odd_bg_color",#00000000);
// 动画
// 值
widget_set_prop_str(custom,"text","");
// 杂项
// 是否启用按键音、触屏音和震动等反馈
widget_set_feedback(custom,TRUE);
// 是否接收用户事件
widget_set_sensitive(custom,TRUE);
// 是否支持焦点停留
widget_set_focusable(custom,TRUE);
// 是否支持焦点状态
widget_set_focus_state(custom,TRUE);
// 脏矩形超出控件本身大小的最大范围
widget_set_dirty_rect_tolerance(custom,4);
// 设置鼠标指针的图片名
// arrow_up/down/left/right_d/n/f/o/p,箭头4个方向,按钮3种状态,disable/normal/focused
// check_checked_d/n/f/o/p,五种状态的已选单选方框
// check_d/n/f/o/p,五种状态的单选方框
// clock_bg/hour/minute/second,钟表背景/时针/分针/秒针
// cross,gauge_bg,custom,num0~num9,numdot,十字,仪表盘,仪表指针,数字0~9,小数点
// radio_checked_d/n/f/o/p,五种状态的已选单选圆框
// radio_d/n/f/o/p,五种状态的单选圆框
// rounded_d/n/f/o/p,五种状态的圆点
// slider_bg/fg,背景/前景滑动条
widget_set_prop_str(custom,"pointer_cursor","name_cursor");
// 设置控件是否根据子控件和文本自动调整控件自身大小
widget_set_prop_bool(custom,"auto_adjust_size",TRUE);    
// 设置不透明度,0为不完全透明,255为完全透明
widget_set_prop_int(custom,"opacity",255);
 
                     
                    
                 
                    
                 
 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号