{
"ui":
{
"obj_id":"PAGN_UI",
// 文本标签 label
"label":
{
"id": "TEST_LABEL1", // ID
"type": "label", // 类型
"width": 100, // 宽
"height": 101, // 高
"x_pos": 102, // X坐标
"y_pos": 323, // Y坐标
"text_align": "LV_LABEL_ALIGN_LEFT", // 文本对齐方式
"long_modes": "LV_LABEL_LONG_SROLL_CIRC", // 长模式
"anim_speed": 30,
"text_sel_start": 1,
"text_sel_end": 10,
"text_recolor": "true", // 是否允许重新着色
"text": "Write a #ff0000 red# word" // 文本内容
},
// 弧 arc
"arc":
{
"id": "TEST_ARC", // ID
"type": "arc", // 类型
"width": 100, // 宽
"height": 101, // 高
"x_pos": 102, // X坐标
"y_pos": 323, // Y坐标
"start_angle": 0, // 指示器弧起始角度
"end_angle": 200, // 指示器弧结束角度
"bg_start_angle": 0, // 背景起始角度
"bg_end_angle": 200, // 背景结束角度
"rotation": 260, // 回转,到0度位置的偏移量 即旋转角度
"arc_type": "LV_ARC_TYPE_NORMAL", // 弧的类型
"range": 255, // 角度
"chg_rate": 120, //
"threshold": 50, // 增量阈值
"adjustable": "bool", // 圆弧是否具有可以拖动的按钮
"min": 0, // 圆弧的最小值
"max": 255 // 圆弧的最大值
},
// 进度条 bar
"bar":
{
"id": "TEST_BAR",
"type": "bar",
"width": 100,
"height": 101,
"x_pos": 102,
"y_pos": 323,
"value": "100@LV_ANIM_ON", // 进度条设置新值
"start_value": "90@LV_ANIM_ON", // 进度条设置新的起始值
"range": 360, // 进度条旋转角度
"min": 0, // 进度条的最小值
"max": 255, // 进度条的最大值
"bar_type": "LV_BAR_TYPE_NORMAL", // 进度条类型
"anim": "LV_ANIM_ON", // 动画设置值
"anim_time": 100 // 动画时间
},
// 按钮 btn
"btn":
{
"id": "TEST_BIN1",
"type": "btn",
"width": 100,
"height": 101,
"x_pos": 102,
"y_pos": 323,
"state": "LV_BTN_STATE_RELEASED",
"checkable": "true",
"layout": "LV_LAYOUT_CENTER",
"toggle": "none",
"fit4": "LV_FIT_TIGHT-LV_FIT_NONE-LV_FIT_MAX-LV_FIT_PARENT"
},
// 按钮矩阵 btnmatrix
"btnmatrix":
{
"obj_id": "TEST_BTNMATRIX",
"type": "btnmatrix",
"obj_width": "200",
"obj_height": "201",
"obj_x_pos": "102",
"obj_y_pos": "323",
"btnmatrix_map": "1-2-3-4-5-\n-6-7-8-9-0-\n-Action1-Action2- ",// 字符串数组指针,用于创建按钮矩阵
"btnmatrix_ctrl_map": "LV_BTNMATRIX_CTRL_NO_REPEAT-LV_BTNMATRIX_CTRL_CHECKABLE",// 控制字节数组指针,用于设置按钮控制图(影藏/禁用)
"btnmatrix_focused_btn": "3",// 要修改的按钮基于0的索引
"btnmatrix_btnmatrix_recolor": "true",// 是否允许按钮重新着色
"btnmatrix_btn_ctrl": "5@LV_BTNMATRIX_CTRL_NO_REPEAT-LV_BTNMATRIX_CTRL_CHECKABLE",// 矩阵按钮控制
"btnmatrix_clear_btn_ctrl": "1@LV_BTNMATRIX_CTRL_NO_REPEAT",// 清除按钮的某种控制状态
"btnmatrix_btn_ctrl_all": "LV_BTNMATRIX_CTRL_NO_REPEAT",// 控制按钮,如禁用/启用/切换状态
"btnmatrix_clear_btn_ctrl_all": "8",// 清楚按钮的索引
"btnmatrix_width": "3-100",// 与同一行中的按钮的相对宽度
"btnmatrix_one_check": "true",// 是否启用 one check 模式
"btnmatrix_align": "LV_LABEL_ALIGN_CENTER"// 对齐方式
},
// calendar
"calendar":
{
"obj_id": "TEST_CALENDAR",
"obj_width": "300",
"obj_height": "301",
"obj_x_pos": "102",
"obj_y_pos": "223",
"calendar_today_date": "2020-1-23",
"calendar_showed_date": "2020-1-24",
"calendar_highlighted_dates": "2020-1-24-1"
},
// canvas
"canvas":
{
"obj_id": "TEST_CANVS",
"type": "canvas",
"obj_width": "300",
"obj_height": "301",
"obj_x_pos": "102",
"obj_y_pos": "223",
"canvas_px": "200-150-0",// 像素
"canvas_palette": "1-0",// 调色板颜色
"buf": "",// 画布内容缓冲区
"canvas_w":"",// 画布宽度
"canvas_h":"",// 画布高度
"canvas_cf":"LV_IMG_CF_...",// 颜色格式
"canvas_x":"",// 要设置点x坐标
"canvas_y":"",// 要设置点y坐标
"canvas_color":""// 点的颜色
},
// 图表 chart
"chart":
{
"obj_id": "TEST_CHART",
"type":
"obj_width": "200",
"obj_height": "201",
"obj_x_pos": "102",
"obj_y_pos": "323",
"chart_div_line_count": "5-5",
"chart_y_range": "LV_CHART_AXIS_PRIMARY_Y@0-100",
"chart_type": "LV_CHART_TYPE_COLUMN",
"chart_point_count": "5",
"chart_init_points": "ff0000@1",
"chart_points": "0000ff@50-50-1",
"chart_next": "00ff00@80",
"chart_update_mode": "LV_CHART_UPDATE_MODE_CIRCULAR",
"chart_x_tick_length": "0-10",
"chart_y_tick_length": "0-10",
"chart_secondary_y_tick_length": "0-10",
"chart_x_tick_texts": "x@10@LV_CHART_AXIS_DRAW_LAST_TICK",
"chart_secondary_y_tick_texts": "YYYYY@10@LV_CHART_AXIS_DRAW_LAST_TICK",
"chart_y_tick_texts": "Y@10@LV_CHART_AXIS_DRAW_LAST_TICK",
"chart_x_start_point": "00ff00@15",
"chart_ext_array": "00ff00@110-110-2",
"chart_point_id": "00ff00@10-10",
"chart_series_axis": "LV_CHART_AXIS_SECONDARY_Y@00ff00"
},
// checkbox
"checkbox":
{
"obj_id": "TEST_CHECKBOX",
"obj_width": "300",
"obj_height": "301",
"obj_x_pos": "102",
"obj_y_pos": "223",
"checkbox_text": "test_text",
"checkbox_text_static": "test_text_static",
"checkbox_checked": "bool",
"checkbox_disable": "none",
"checkbox_state": "LV_BTN_STATE_RELEASED"
},
// cont
"cont":
{
"obj_id": "TEST_CONT",
"obj_width": "300",
"obj_height": "301",
"obj_x_pos": "102",
"obj_y_pos": "223",
"cont_set_layout": "LV_LAYOUT_OFF",
"cont_set_fit4": "LV_FIT_TIGHT-LV_FIT_NONE-LV_FIT_MAX-LV_FIT_PARENT",
"cont_set_fit2": "LV_FIT_MAX-LV_FIT_PARENT",
"cont_set_fit": "LV_FIT_MAX"
},
// cpicker
"cpicker":
{
"obj_id": "TEST_CPICKER",
"obj_width": "300",
"obj_height": "301",
"obj_x_pos": "102",
"obj_y_pos": "223",
"cpicker_type": "LV_CPICKER_TYPE_RECT",
"cpicker_hue": "100",
"cpicker_saturation": "55",
"cpicker_value": "10",
"cpicker_hsv": "10-12-13",
"cpicker_color": "0000ff",
"cpicker_color_mode": "LV_CPICKER_COLOR_MODE_HUE",
"cpicker_color_mode_fixed": "true",
"cpicker_knob_colored": "true"
},
// dropdown_copy TODO:
"dropdown_copy":
{
"obj_id": "TEST_DROPDOWN",
"obj_width": "300",
"obj_height": "301",
"obj_x_pos": "102",
"obj_y_pos": "223",
"dropdown_options": "One\nTwo\nThree\nFour",
"dropdown_add_option": "Five\n@1"
},
// dropdown
"dropdown":
{
"obj_id": "TEST_DROPDOWN",
"obj_width": "300",
"obj_height": "301",
"obj_x_pos": "102",
"obj_y_pos": "223",
"dropdown_options_static": "One\nTwo\nThree\nFour",
"dropdown_add_option": "Five\n@1",
"dropdown_dir": "LV_DROPDOWN_DIR_DOWN",
"dropdown_max_height": "70",
"dropdown_symbol": "SIX\n",
"dropdown_show_selected": "Two"
},
// gauge
"gauge":
{
"obj_id": "TEST_GAUGE",
"obj_width": "300",
"obj_height": "301",
"obj_x_pos": "102",
"obj_y_pos": "223",
"gauge_needle_count": "3@0000FF@0000FF@0000FF",
"gauge_set_value": "0-10",
"gauge_set_range": "0-100",
"gauge_critical_value": "20",
"gauge_set_scale": "300-5-20",
"gauge_angle_offset": "100",
"gauge_needle_img": "del",
"gauge_formatter_cb": "8"
},
// img
"img":
{
"obj_id": "TEST_IMG1",
"obj_width": "100",
"obj_height": "101",
"obj_x_pos": "102",
"obj_y_pos": "323",
"img_src": "testcar.bin",
"img_auto_size": "true",
"img_offset_x": "20",
"img_offset_y": "20",
"img_zoom": "512",
"img_angle": "20",
"img_pivot": "100-100",
"img_antialias": "true"
},
// imgbtn
"imgbtn":
{
"obj_id": "TEST_IMGBTN",
"obj_width": "100",
"obj_height": "101",
"obj_x_pos": "102",
"obj_y_pos": "323",
"imgbtn_src": "testcar.bin",
"imgbtn_checkable": "true",
"imgbtn_state": "LV_BTN_STATE_RELEASED",
"imgbtn_toggle": "none"
},
// keyboard
"keyboard":
{
"obj_id": "TEST_KEYBOARD",
"obj_width": "300",
"obj_height": "301",
"obj_x_pos": "102",
"obj_y_pos": "323",
"keyboard_textarea": "1",
"keyboard_mode": "LV_KEYBOARD_MODE_TEXT_LOWER",
"keyboard_cursor_manage": "true"
},
// led_copy TODO:
"led_copy":
{
"obj_id": "TEST_LED",
"obj_width": "300",
"obj_height": "301",
"obj_x_pos": "102",
"obj_y_pos": "323",
"led_bright": "100",
"led_off": "NONE",
"led_toggle": "NONE",
"led_get_bright": "NONE"
},
// led
"led":
{
"obj_id": "TEST_LED",
"obj_width": "300",
"obj_height": "301",
"obj_x_pos": "102",
"obj_y_pos": "323",
"led_bright": "100",
"led_on": "NONE",
"led_off": "3",
"led_toggle": "NONE",
"led_get_bright": "NONE"
},
// line
"line":
{
"obj_id": "TEST_LINE",
"line_points": "5-5-70-70-120-10-180-60-240-10-5",
"line_auto_size": "true",
"line_invert": "true"
},
"linemeter":
{
"obj_id": "TEST_LINEMETER",
"obj_width": "300",
"obj_height": "301",
"obj_x_pos": "102",
"obj_y_pos": "323",
"linemeter_value": "80",
"linemeter_range": "0-100",
"linemeter_scale": "240-21",
"linemeter_angle_offset": "10",
"linemeter_miror": "true"
},
// list
"list":
{
"obj_id": "TEST_list",
"obj_width": "300",
"obj_height": "301",
"obj_x_pos": "102",
"obj_y_pos": "323",
"list_focus_btn": "1",
"list_scrollbar_mode": "LV_SCROLLBAR_MODE_DRAG",
"list_scroll_propagation": "true",
"list_edge_flash": "true",
"list_anim_time": "50",
"list_layout": "60"
},
// msgbox_copy TODO:
"msgbox_copy":
{
"obj_id": "TEST_MSGBOX",
"obj_width": "300",
"obj_height": "301",
"obj_x_pos": "102",
"obj_y_pos": "323",
"msgbox_text": "hello",
"msgbox_anim_time": "20",
"msgbox_start_auto_close": "20",
"msgbox_stop_auto_close": "NONE",
"msgbox_recolor": "true"
},
// msgbox
"msgbox":
{
"obj_id": "TEST_MSGBOX",
"obj_width": "300",
"obj_height": "301",
"obj_x_pos": "102",
"obj_y_pos": "323",
"msgbox_text": "hello",
"msgbox_anim_time": "20",
"msgbox_start_auto_close": "20",
"msgbox_stop_auto_close": "NONE",
"msgbox_recolor": "true"
},
// objmask
"objmask":
{
"obj_id": "TEST_OBJMASK",
"obj_width": "300",
"obj_height": "301",
"obj_x_pos": "102",
"obj_y_pos": "323"
},
// page
"page":
{
"obj_id": "TEST_PAGE",
"obj_width": "300",
"obj_height": "301",
"obj_x_pos": "102",
"obj_y_pos": "323",
"page_scrollbar_mode": "LV_SCROLLBAR_MODE_DRAG",
"page_anim_time": "20",
"page_scroll_propagation": "true",
"page_edge_flash": "true",
"page_scrollable_fit4": "LV_FIT_TIGHT-LV_FIT_NONE-LV_FIT_MAX-LV_FIT_PARENT",
"page_scrollable_fit2": "LV_FIT_MAX-LV_FIT_PARENT",
"page_scrollable_fit": "LV_FIT_MAX",
"page_scrl_width": "80",
"page_scrl_height": "90",
"page_scrl_layout": "LV_LAYOUT_CENTER"
},
// roller
"roller":
{
"obj_id": "TEST_ROLLER",
"obj_width": "300",
"obj_height": "301",
"obj_x_pos": "102",
"obj_y_pos": "323",
"roller_option": "Option 1\nOption 2\nOption 3\nOption 4\nOption 5@LV_ROLLER_MODE_INIFINITE",
"roller_selected": "1@LV_ANIM_ON",
"roller_align": "LV_LABEL_ALIGN_CENTER",
"roller_visible_row_count": "3",
"roller_auto_fit": "true",
"roller_anim_time": "100"
},
// slider
"slider":
{
"obj_id": "TEST_SLIDER",
"slider_value": "20@LV_ANIM_ON",
"slider_left_value": "10@LV_ANIM_ON",
"slider_range": "0-50",
"slider_anim_time": "40",
"slider_type": "LV_SLIDER_TYPE_RANGE"
},
// spinbox
"spinbox":
{
"obj_id": "TEST_SPINBOX",
"spinbox_rollover": "true",
"spinbox_value": "20",
"spinbox_digit_format": "13-25",
"spinbox_step": "3",
"spinbox_range": "0-50",
"spinbox_padding_left": "6"
},
// spinner
"spinner":
{
"obj_id": "TEST_SPINNER",
"spinner_arc_length": "10",
"spinner_spin_time": "20",
"spinner_digit_format": "LV_SPINNER_TYPE_FILLSPIN_ARC",
"spinner_dir": "LV_SPINNER_DIR_FORWARD"
},
// switch
"switch":
{
"obj_id": "TEST_SWITCH",
"switch_on": "LV_ANIM_ON",
"switch_off": "LV_ANIM_ON",
"switch_toggle": "LV_ANIM_ON",
"switch_anim_time": "40"
},
// table
"table":
{
"obj_id": "TEST_TABLE",
"table_cell_value": "3-3@test",
"table_row_cnt": "4",
"table_col_cnt": "4",
"table_col_width": "1-6",
"table_cell_align": "3-3@LV_LABEL_ALIGN_CENTER",
"table_cell_type": "6-6-7",
"table_cell_crop": "7-7@true",
"table_cell_merge_right": "8-8@true"
},
// tabview
"tabview":
{
"obj_id": "TEST_TABVIEW",
"tabview_add": "test",
"tabview_clean_tab": "none",
"tabview_act": "1@LV_ANIM_ON",
"tabview_name": "2@test",
"tabview_anim_time": "30",
"tabview_btns_pos": "LV_TABVIEW_TAB_POS_BOTTOM"
},
// textarea
"textarea":
{
"obj_id": "TEST_TEXTAREA",
"textarea_text": "test_text",
"textarea_placeholder_text": "test_placeholder",
"textarea_cursor_pos": "1",
"textarea_cursor_hidden": "false",
"textarea_cursor_click_pos": "true",
"textarea_pwd_mode": "true",
"textarea_one_line": "true",
"textarea_text_align": "LV_LABEL_ALIGN_CENTER",
"textarea_accepted_chars": "chars",
"textarea_max_length": "30",
"textarea_insert_replace": "replace",
"textarea_scrollbar_mode": "LV_SCROLLBAR_MODE_DRAG",
"textarea_scroll_propagation": "true",
"textarea_edge_flash": "true",
"textarea_text_sel": "true",
"textarea_pwd_show_time": "15",
"textarea_cursor_blink_time": "16"
},
// tileview
"tileview":
{
"obj_id": "TEST_TILEVIEW",
"tileview_valid_positions": "0-0-0-1-1-1-3",
"tileview_tile_act": "3-3@LV_ANIM_ON",
"tileview_edge_flash": "true",
"tileview_anim_time": "40",
"tileview_add_element": "test"
},
// win
"win":
{
"obj_id": "TEST_WIN",
"win_close_event_cb": "LV_EVENT_PRESSING",
"win_title": "test_title",
"win_header_height": "30",
"win_btn_width": "10",
"win_content_size": "20-20",
"win_layout": "LV_LAYOUT_CENTER",
"win_scrollbar_mode": "LV_SCROLLBAR_MODE_ON",
"win_anim_time": "18",
"win_drag": "true"
}
}
}