1. {
    2. "ui":
    3. {
    4. "obj_id":"PAGN_UI",
    5. // 文本标签 label
    6. "label":
    7. {
    8. "id": "TEST_LABEL1", // ID
    9. "type": "label", // 类型
    10. "width": 100, //
    11. "height": 101, //
    12. "x_pos": 102, // X坐标
    13. "y_pos": 323, // Y坐标
    14. "text_align": "LV_LABEL_ALIGN_LEFT", // 文本对齐方式
    15. "long_modes": "LV_LABEL_LONG_SROLL_CIRC", // 长模式
    16. "anim_speed": 30,
    17. "text_sel_start": 1,
    18. "text_sel_end": 10,
    19. "text_recolor": "true", // 是否允许重新着色
    20. "text": "Write a #ff0000 red# word" // 文本内容
    21. },
    22. // arc
    23. "arc":
    24. {
    25. "id": "TEST_ARC", // ID
    26. "type": "arc", // 类型
    27. "width": 100, //
    28. "height": 101, //
    29. "x_pos": 102, // X坐标
    30. "y_pos": 323, // Y坐标
    31. "start_angle": 0, // 指示器弧起始角度
    32. "end_angle": 200, // 指示器弧结束角度
    33. "bg_start_angle": 0, // 背景起始角度
    34. "bg_end_angle": 200, // 背景结束角度
    35. "rotation": 260, // 回转,到0度位置的偏移量 即旋转角度
    36. "arc_type": "LV_ARC_TYPE_NORMAL", // 弧的类型
    37. "range": 255, // 角度
    38. "chg_rate": 120, //
    39. "threshold": 50, // 增量阈值
    40. "adjustable": "bool", // 圆弧是否具有可以拖动的按钮
    41. "min": 0, // 圆弧的最小值
    42. "max": 255 // 圆弧的最大值
    43. },
    44. // 进度条 bar
    45. "bar":
    46. {
    47. "id": "TEST_BAR",
    48. "type": "bar",
    49. "width": 100,
    50. "height": 101,
    51. "x_pos": 102,
    52. "y_pos": 323,
    53. "value": "100@LV_ANIM_ON", // 进度条设置新值
    54. "start_value": "90@LV_ANIM_ON", // 进度条设置新的起始值
    55. "range": 360, // 进度条旋转角度
    56. "min": 0, // 进度条的最小值
    57. "max": 255, // 进度条的最大值
    58. "bar_type": "LV_BAR_TYPE_NORMAL", // 进度条类型
    59. "anim": "LV_ANIM_ON", // 动画设置值
    60. "anim_time": 100 // 动画时间
    61. },
    62. // 按钮 btn
    63. "btn":
    64. {
    65. "id": "TEST_BIN1",
    66. "type": "btn",
    67. "width": 100,
    68. "height": 101,
    69. "x_pos": 102,
    70. "y_pos": 323,
    71. "state": "LV_BTN_STATE_RELEASED",
    72. "checkable": "true",
    73. "layout": "LV_LAYOUT_CENTER",
    74. "toggle": "none",
    75. "fit4": "LV_FIT_TIGHT-LV_FIT_NONE-LV_FIT_MAX-LV_FIT_PARENT"
    76. },
    77. // 按钮矩阵 btnmatrix
    78. "btnmatrix":
    79. {
    80. "obj_id": "TEST_BTNMATRIX",
    81. "type": "btnmatrix",
    82. "obj_width": "200",
    83. "obj_height": "201",
    84. "obj_x_pos": "102",
    85. "obj_y_pos": "323",
    86. "btnmatrix_map": "1-2-3-4-5-\n-6-7-8-9-0-\n-Action1-Action2- ",// 字符串数组指针,用于创建按钮矩阵
    87. "btnmatrix_ctrl_map": "LV_BTNMATRIX_CTRL_NO_REPEAT-LV_BTNMATRIX_CTRL_CHECKABLE",// 控制字节数组指针,用于设置按钮控制图(影藏/禁用)
    88. "btnmatrix_focused_btn": "3",// 要修改的按钮基于0的索引
    89. "btnmatrix_btnmatrix_recolor": "true",// 是否允许按钮重新着色
    90. "btnmatrix_btn_ctrl": "5@LV_BTNMATRIX_CTRL_NO_REPEAT-LV_BTNMATRIX_CTRL_CHECKABLE",// 矩阵按钮控制
    91. "btnmatrix_clear_btn_ctrl": "1@LV_BTNMATRIX_CTRL_NO_REPEAT",// 清除按钮的某种控制状态
    92. "btnmatrix_btn_ctrl_all": "LV_BTNMATRIX_CTRL_NO_REPEAT",// 控制按钮,如禁用/启用/切换状态
    93. "btnmatrix_clear_btn_ctrl_all": "8",// 清楚按钮的索引
    94. "btnmatrix_width": "3-100",// 与同一行中的按钮的相对宽度
    95. "btnmatrix_one_check": "true",// 是否启用 one check 模式
    96. "btnmatrix_align": "LV_LABEL_ALIGN_CENTER"// 对齐方式
    97. },
    98. // calendar
    99. "calendar":
    100. {
    101. "obj_id": "TEST_CALENDAR",
    102. "obj_width": "300",
    103. "obj_height": "301",
    104. "obj_x_pos": "102",
    105. "obj_y_pos": "223",
    106. "calendar_today_date": "2020-1-23",
    107. "calendar_showed_date": "2020-1-24",
    108. "calendar_highlighted_dates": "2020-1-24-1"
    109. },
    110. // canvas
    111. "canvas":
    112. {
    113. "obj_id": "TEST_CANVS",
    114. "type": "canvas",
    115. "obj_width": "300",
    116. "obj_height": "301",
    117. "obj_x_pos": "102",
    118. "obj_y_pos": "223",
    119. "canvas_px": "200-150-0",// 像素
    120. "canvas_palette": "1-0",// 调色板颜色
    121. "buf": "",// 画布内容缓冲区
    122. "canvas_w":"",// 画布宽度
    123. "canvas_h":"",// 画布高度
    124. "canvas_cf":"LV_IMG_CF_...",// 颜色格式
    125. "canvas_x":"",// 要设置点x坐标
    126. "canvas_y":"",// 要设置点y坐标
    127. "canvas_color":""// 点的颜色
    128. },
    129. // 图表 chart
    130. "chart":
    131. {
    132. "obj_id": "TEST_CHART",
    133. "type":
    134. "obj_width": "200",
    135. "obj_height": "201",
    136. "obj_x_pos": "102",
    137. "obj_y_pos": "323",
    138. "chart_div_line_count": "5-5",
    139. "chart_y_range": "LV_CHART_AXIS_PRIMARY_Y@0-100",
    140. "chart_type": "LV_CHART_TYPE_COLUMN",
    141. "chart_point_count": "5",
    142. "chart_init_points": "ff0000@1",
    143. "chart_points": "0000ff@50-50-1",
    144. "chart_next": "00ff00@80",
    145. "chart_update_mode": "LV_CHART_UPDATE_MODE_CIRCULAR",
    146. "chart_x_tick_length": "0-10",
    147. "chart_y_tick_length": "0-10",
    148. "chart_secondary_y_tick_length": "0-10",
    149. "chart_x_tick_texts": "x@10@LV_CHART_AXIS_DRAW_LAST_TICK",
    150. "chart_secondary_y_tick_texts": "YYYYY@10@LV_CHART_AXIS_DRAW_LAST_TICK",
    151. "chart_y_tick_texts": "Y@10@LV_CHART_AXIS_DRAW_LAST_TICK",
    152. "chart_x_start_point": "00ff00@15",
    153. "chart_ext_array": "00ff00@110-110-2",
    154. "chart_point_id": "00ff00@10-10",
    155. "chart_series_axis": "LV_CHART_AXIS_SECONDARY_Y@00ff00"
    156. },
    157. // checkbox
    158. "checkbox":
    159. {
    160. "obj_id": "TEST_CHECKBOX",
    161. "obj_width": "300",
    162. "obj_height": "301",
    163. "obj_x_pos": "102",
    164. "obj_y_pos": "223",
    165. "checkbox_text": "test_text",
    166. "checkbox_text_static": "test_text_static",
    167. "checkbox_checked": "bool",
    168. "checkbox_disable": "none",
    169. "checkbox_state": "LV_BTN_STATE_RELEASED"
    170. },
    171. // cont
    172. "cont":
    173. {
    174. "obj_id": "TEST_CONT",
    175. "obj_width": "300",
    176. "obj_height": "301",
    177. "obj_x_pos": "102",
    178. "obj_y_pos": "223",
    179. "cont_set_layout": "LV_LAYOUT_OFF",
    180. "cont_set_fit4": "LV_FIT_TIGHT-LV_FIT_NONE-LV_FIT_MAX-LV_FIT_PARENT",
    181. "cont_set_fit2": "LV_FIT_MAX-LV_FIT_PARENT",
    182. "cont_set_fit": "LV_FIT_MAX"
    183. },
    184. // cpicker
    185. "cpicker":
    186. {
    187. "obj_id": "TEST_CPICKER",
    188. "obj_width": "300",
    189. "obj_height": "301",
    190. "obj_x_pos": "102",
    191. "obj_y_pos": "223",
    192. "cpicker_type": "LV_CPICKER_TYPE_RECT",
    193. "cpicker_hue": "100",
    194. "cpicker_saturation": "55",
    195. "cpicker_value": "10",
    196. "cpicker_hsv": "10-12-13",
    197. "cpicker_color": "0000ff",
    198. "cpicker_color_mode": "LV_CPICKER_COLOR_MODE_HUE",
    199. "cpicker_color_mode_fixed": "true",
    200. "cpicker_knob_colored": "true"
    201. },
    202. // dropdown_copy TODO:
    203. "dropdown_copy":
    204. {
    205. "obj_id": "TEST_DROPDOWN",
    206. "obj_width": "300",
    207. "obj_height": "301",
    208. "obj_x_pos": "102",
    209. "obj_y_pos": "223",
    210. "dropdown_options": "One\nTwo\nThree\nFour",
    211. "dropdown_add_option": "Five\n@1"
    212. },
    213. // dropdown
    214. "dropdown":
    215. {
    216. "obj_id": "TEST_DROPDOWN",
    217. "obj_width": "300",
    218. "obj_height": "301",
    219. "obj_x_pos": "102",
    220. "obj_y_pos": "223",
    221. "dropdown_options_static": "One\nTwo\nThree\nFour",
    222. "dropdown_add_option": "Five\n@1",
    223. "dropdown_dir": "LV_DROPDOWN_DIR_DOWN",
    224. "dropdown_max_height": "70",
    225. "dropdown_symbol": "SIX\n",
    226. "dropdown_show_selected": "Two"
    227. },
    228. // gauge
    229. "gauge":
    230. {
    231. "obj_id": "TEST_GAUGE",
    232. "obj_width": "300",
    233. "obj_height": "301",
    234. "obj_x_pos": "102",
    235. "obj_y_pos": "223",
    236. "gauge_needle_count": "3@0000FF@0000FF@0000FF",
    237. "gauge_set_value": "0-10",
    238. "gauge_set_range": "0-100",
    239. "gauge_critical_value": "20",
    240. "gauge_set_scale": "300-5-20",
    241. "gauge_angle_offset": "100",
    242. "gauge_needle_img": "del",
    243. "gauge_formatter_cb": "8"
    244. },
    245. // img
    246. "img":
    247. {
    248. "obj_id": "TEST_IMG1",
    249. "obj_width": "100",
    250. "obj_height": "101",
    251. "obj_x_pos": "102",
    252. "obj_y_pos": "323",
    253. "img_src": "testcar.bin",
    254. "img_auto_size": "true",
    255. "img_offset_x": "20",
    256. "img_offset_y": "20",
    257. "img_zoom": "512",
    258. "img_angle": "20",
    259. "img_pivot": "100-100",
    260. "img_antialias": "true"
    261. },
    262. // imgbtn
    263. "imgbtn":
    264. {
    265. "obj_id": "TEST_IMGBTN",
    266. "obj_width": "100",
    267. "obj_height": "101",
    268. "obj_x_pos": "102",
    269. "obj_y_pos": "323",
    270. "imgbtn_src": "testcar.bin",
    271. "imgbtn_checkable": "true",
    272. "imgbtn_state": "LV_BTN_STATE_RELEASED",
    273. "imgbtn_toggle": "none"
    274. },
    275. // keyboard
    276. "keyboard":
    277. {
    278. "obj_id": "TEST_KEYBOARD",
    279. "obj_width": "300",
    280. "obj_height": "301",
    281. "obj_x_pos": "102",
    282. "obj_y_pos": "323",
    283. "keyboard_textarea": "1",
    284. "keyboard_mode": "LV_KEYBOARD_MODE_TEXT_LOWER",
    285. "keyboard_cursor_manage": "true"
    286. },
    287. // led_copy TODO:
    288. "led_copy":
    289. {
    290. "obj_id": "TEST_LED",
    291. "obj_width": "300",
    292. "obj_height": "301",
    293. "obj_x_pos": "102",
    294. "obj_y_pos": "323",
    295. "led_bright": "100",
    296. "led_off": "NONE",
    297. "led_toggle": "NONE",
    298. "led_get_bright": "NONE"
    299. },
    300. // led
    301. "led":
    302. {
    303. "obj_id": "TEST_LED",
    304. "obj_width": "300",
    305. "obj_height": "301",
    306. "obj_x_pos": "102",
    307. "obj_y_pos": "323",
    308. "led_bright": "100",
    309. "led_on": "NONE",
    310. "led_off": "3",
    311. "led_toggle": "NONE",
    312. "led_get_bright": "NONE"
    313. },
    314. // line
    315. "line":
    316. {
    317. "obj_id": "TEST_LINE",
    318. "line_points": "5-5-70-70-120-10-180-60-240-10-5",
    319. "line_auto_size": "true",
    320. "line_invert": "true"
    321. },
    322. "linemeter":
    323. {
    324. "obj_id": "TEST_LINEMETER",
    325. "obj_width": "300",
    326. "obj_height": "301",
    327. "obj_x_pos": "102",
    328. "obj_y_pos": "323",
    329. "linemeter_value": "80",
    330. "linemeter_range": "0-100",
    331. "linemeter_scale": "240-21",
    332. "linemeter_angle_offset": "10",
    333. "linemeter_miror": "true"
    334. },
    335. // list
    336. "list":
    337. {
    338. "obj_id": "TEST_list",
    339. "obj_width": "300",
    340. "obj_height": "301",
    341. "obj_x_pos": "102",
    342. "obj_y_pos": "323",
    343. "list_focus_btn": "1",
    344. "list_scrollbar_mode": "LV_SCROLLBAR_MODE_DRAG",
    345. "list_scroll_propagation": "true",
    346. "list_edge_flash": "true",
    347. "list_anim_time": "50",
    348. "list_layout": "60"
    349. },
    350. // msgbox_copy TODO:
    351. "msgbox_copy":
    352. {
    353. "obj_id": "TEST_MSGBOX",
    354. "obj_width": "300",
    355. "obj_height": "301",
    356. "obj_x_pos": "102",
    357. "obj_y_pos": "323",
    358. "msgbox_text": "hello",
    359. "msgbox_anim_time": "20",
    360. "msgbox_start_auto_close": "20",
    361. "msgbox_stop_auto_close": "NONE",
    362. "msgbox_recolor": "true"
    363. },
    364. // msgbox
    365. "msgbox":
    366. {
    367. "obj_id": "TEST_MSGBOX",
    368. "obj_width": "300",
    369. "obj_height": "301",
    370. "obj_x_pos": "102",
    371. "obj_y_pos": "323",
    372. "msgbox_text": "hello",
    373. "msgbox_anim_time": "20",
    374. "msgbox_start_auto_close": "20",
    375. "msgbox_stop_auto_close": "NONE",
    376. "msgbox_recolor": "true"
    377. },
    378. // objmask
    379. "objmask":
    380. {
    381. "obj_id": "TEST_OBJMASK",
    382. "obj_width": "300",
    383. "obj_height": "301",
    384. "obj_x_pos": "102",
    385. "obj_y_pos": "323"
    386. },
    387. // page
    388. "page":
    389. {
    390. "obj_id": "TEST_PAGE",
    391. "obj_width": "300",
    392. "obj_height": "301",
    393. "obj_x_pos": "102",
    394. "obj_y_pos": "323",
    395. "page_scrollbar_mode": "LV_SCROLLBAR_MODE_DRAG",
    396. "page_anim_time": "20",
    397. "page_scroll_propagation": "true",
    398. "page_edge_flash": "true",
    399. "page_scrollable_fit4": "LV_FIT_TIGHT-LV_FIT_NONE-LV_FIT_MAX-LV_FIT_PARENT",
    400. "page_scrollable_fit2": "LV_FIT_MAX-LV_FIT_PARENT",
    401. "page_scrollable_fit": "LV_FIT_MAX",
    402. "page_scrl_width": "80",
    403. "page_scrl_height": "90",
    404. "page_scrl_layout": "LV_LAYOUT_CENTER"
    405. },
    406. // roller
    407. "roller":
    408. {
    409. "obj_id": "TEST_ROLLER",
    410. "obj_width": "300",
    411. "obj_height": "301",
    412. "obj_x_pos": "102",
    413. "obj_y_pos": "323",
    414. "roller_option": "Option 1\nOption 2\nOption 3\nOption 4\nOption 5@LV_ROLLER_MODE_INIFINITE",
    415. "roller_selected": "1@LV_ANIM_ON",
    416. "roller_align": "LV_LABEL_ALIGN_CENTER",
    417. "roller_visible_row_count": "3",
    418. "roller_auto_fit": "true",
    419. "roller_anim_time": "100"
    420. },
    421. // slider
    422. "slider":
    423. {
    424. "obj_id": "TEST_SLIDER",
    425. "slider_value": "20@LV_ANIM_ON",
    426. "slider_left_value": "10@LV_ANIM_ON",
    427. "slider_range": "0-50",
    428. "slider_anim_time": "40",
    429. "slider_type": "LV_SLIDER_TYPE_RANGE"
    430. },
    431. // spinbox
    432. "spinbox":
    433. {
    434. "obj_id": "TEST_SPINBOX",
    435. "spinbox_rollover": "true",
    436. "spinbox_value": "20",
    437. "spinbox_digit_format": "13-25",
    438. "spinbox_step": "3",
    439. "spinbox_range": "0-50",
    440. "spinbox_padding_left": "6"
    441. },
    442. // spinner
    443. "spinner":
    444. {
    445. "obj_id": "TEST_SPINNER",
    446. "spinner_arc_length": "10",
    447. "spinner_spin_time": "20",
    448. "spinner_digit_format": "LV_SPINNER_TYPE_FILLSPIN_ARC",
    449. "spinner_dir": "LV_SPINNER_DIR_FORWARD"
    450. },
    451. // switch
    452. "switch":
    453. {
    454. "obj_id": "TEST_SWITCH",
    455. "switch_on": "LV_ANIM_ON",
    456. "switch_off": "LV_ANIM_ON",
    457. "switch_toggle": "LV_ANIM_ON",
    458. "switch_anim_time": "40"
    459. },
    460. // table
    461. "table":
    462. {
    463. "obj_id": "TEST_TABLE",
    464. "table_cell_value": "3-3@test",
    465. "table_row_cnt": "4",
    466. "table_col_cnt": "4",
    467. "table_col_width": "1-6",
    468. "table_cell_align": "3-3@LV_LABEL_ALIGN_CENTER",
    469. "table_cell_type": "6-6-7",
    470. "table_cell_crop": "7-7@true",
    471. "table_cell_merge_right": "8-8@true"
    472. },
    473. // tabview
    474. "tabview":
    475. {
    476. "obj_id": "TEST_TABVIEW",
    477. "tabview_add": "test",
    478. "tabview_clean_tab": "none",
    479. "tabview_act": "1@LV_ANIM_ON",
    480. "tabview_name": "2@test",
    481. "tabview_anim_time": "30",
    482. "tabview_btns_pos": "LV_TABVIEW_TAB_POS_BOTTOM"
    483. },
    484. // textarea
    485. "textarea":
    486. {
    487. "obj_id": "TEST_TEXTAREA",
    488. "textarea_text": "test_text",
    489. "textarea_placeholder_text": "test_placeholder",
    490. "textarea_cursor_pos": "1",
    491. "textarea_cursor_hidden": "false",
    492. "textarea_cursor_click_pos": "true",
    493. "textarea_pwd_mode": "true",
    494. "textarea_one_line": "true",
    495. "textarea_text_align": "LV_LABEL_ALIGN_CENTER",
    496. "textarea_accepted_chars": "chars",
    497. "textarea_max_length": "30",
    498. "textarea_insert_replace": "replace",
    499. "textarea_scrollbar_mode": "LV_SCROLLBAR_MODE_DRAG",
    500. "textarea_scroll_propagation": "true",
    501. "textarea_edge_flash": "true",
    502. "textarea_text_sel": "true",
    503. "textarea_pwd_show_time": "15",
    504. "textarea_cursor_blink_time": "16"
    505. },
    506. // tileview
    507. "tileview":
    508. {
    509. "obj_id": "TEST_TILEVIEW",
    510. "tileview_valid_positions": "0-0-0-1-1-1-3",
    511. "tileview_tile_act": "3-3@LV_ANIM_ON",
    512. "tileview_edge_flash": "true",
    513. "tileview_anim_time": "40",
    514. "tileview_add_element": "test"
    515. },
    516. // win
    517. "win":
    518. {
    519. "obj_id": "TEST_WIN",
    520. "win_close_event_cb": "LV_EVENT_PRESSING",
    521. "win_title": "test_title",
    522. "win_header_height": "30",
    523. "win_btn_width": "10",
    524. "win_content_size": "20-20",
    525. "win_layout": "LV_LAYOUT_CENTER",
    526. "win_scrollbar_mode": "LV_SCROLLBAR_MODE_ON",
    527. "win_anim_time": "18",
    528. "win_drag": "true"
    529. }
    530. }
    531. }