// This file was generated by SquareLine Studio // SquareLine Studio version: SquareLine Studio 1.4.2 // LVGL version: 9.1.0 // Project name: JC3248W535CIY #include "../ui.h" // COMPONENT omgLabelContainer lv_obj_t *ui_omgLabelContainer_create(lv_obj_t *comp_parent) { lv_obj_t *cui_omgLabelContainer; cui_omgLabelContainer = lv_obj_create(comp_parent); lv_obj_remove_style_all(cui_omgLabelContainer); lv_obj_set_width( cui_omgLabelContainer, 300); lv_obj_set_height( cui_omgLabelContainer, LV_SIZE_CONTENT); /// 1 lv_obj_set_align( cui_omgLabelContainer, LV_ALIGN_CENTER ); lv_obj_set_flex_flow(cui_omgLabelContainer,LV_FLEX_FLOW_COLUMN); lv_obj_set_flex_align(cui_omgLabelContainer, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START); lv_obj_remove_flag( cui_omgLabelContainer, LV_OBJ_FLAG_CLICKABLE | LV_OBJ_FLAG_SCROLLABLE ); /// Flags lv_obj_set_style_bg_color(cui_omgLabelContainer, lv_color_hex(0x929191), LV_PART_MAIN | LV_STATE_DEFAULT ); lv_obj_set_style_bg_opa(cui_omgLabelContainer, 255, LV_PART_MAIN| LV_STATE_DEFAULT); lv_obj_set_style_pad_left(cui_omgLabelContainer, 5, LV_PART_MAIN| LV_STATE_DEFAULT); lv_obj_set_style_pad_right(cui_omgLabelContainer, 5, LV_PART_MAIN| LV_STATE_DEFAULT); lv_obj_set_style_pad_top(cui_omgLabelContainer, 5, LV_PART_MAIN| LV_STATE_DEFAULT); lv_obj_set_style_pad_bottom(cui_omgLabelContainer, 5, LV_PART_MAIN| LV_STATE_DEFAULT); lv_obj_set_style_text_font(cui_omgLabelContainer, &lv_font_montserrat_16, LV_PART_MAIN| LV_STATE_DEFAULT); lv_obj_t *cui_omgTitle; cui_omgTitle = lv_label_create(cui_omgLabelContainer); lv_obj_set_width( cui_omgTitle, LV_SIZE_CONTENT); /// 1 lv_obj_set_height( cui_omgTitle, LV_SIZE_CONTENT); /// 1 lv_obj_set_align( cui_omgTitle, LV_ALIGN_LEFT_MID ); lv_label_set_long_mode(cui_omgTitle,LV_LABEL_LONG_DOT); lv_label_set_text(cui_omgTitle,"Title"); lv_obj_set_style_border_width(cui_omgTitle, 2, LV_PART_MAIN| LV_STATE_DEFAULT); lv_obj_set_style_border_side(cui_omgTitle, LV_BORDER_SIDE_BOTTOM, LV_PART_MAIN| LV_STATE_DEFAULT); lv_obj_t *cui_omgLine1; cui_omgLine1 = lv_label_create(cui_omgLabelContainer); lv_obj_set_width( cui_omgLine1, LV_SIZE_CONTENT); /// 1 lv_obj_set_height( cui_omgLine1, LV_SIZE_CONTENT); /// 1 lv_obj_set_align( cui_omgLine1, LV_ALIGN_LEFT_MID ); lv_label_set_long_mode(cui_omgLine1,LV_LABEL_LONG_DOT); lv_label_set_text(cui_omgLine1,"Line1"); lv_obj_t *cui_omgLine2; cui_omgLine2 = lv_label_create(cui_omgLabelContainer); lv_obj_set_width( cui_omgLine2, LV_SIZE_CONTENT); /// 1 lv_obj_set_height( cui_omgLine2, LV_SIZE_CONTENT); /// 1 lv_obj_set_align( cui_omgLine2, LV_ALIGN_LEFT_MID ); lv_label_set_long_mode(cui_omgLine2,LV_LABEL_LONG_DOT); lv_label_set_text(cui_omgLine2,"Line2"); lv_obj_t *cui_omgLine3; cui_omgLine3 = lv_label_create(cui_omgLabelContainer); lv_obj_set_width( cui_omgLine3, LV_SIZE_CONTENT); /// 1 lv_obj_set_height( cui_omgLine3, LV_SIZE_CONTENT); /// 1 lv_obj_set_align( cui_omgLine3, LV_ALIGN_LEFT_MID ); lv_label_set_long_mode(cui_omgLine3,LV_LABEL_LONG_DOT); lv_label_set_text(cui_omgLine3,"Line3"); lv_obj_t *cui_omgLine4; cui_omgLine4 = lv_label_create(cui_omgLabelContainer); lv_obj_set_width( cui_omgLine4, LV_SIZE_CONTENT); /// 1 lv_obj_set_height( cui_omgLine4, LV_SIZE_CONTENT); /// 1 lv_obj_set_align( cui_omgLine4, LV_ALIGN_LEFT_MID ); lv_label_set_long_mode(cui_omgLine4,LV_LABEL_LONG_DOT); lv_label_set_text(cui_omgLine4,"Line4"); lv_obj_t ** children = lv_malloc(sizeof(lv_obj_t *) * _UI_COMP_OMGLABELCONTAINER_NUM); children[UI_COMP_OMGLABELCONTAINER_OMGLABELCONTAINER] = cui_omgLabelContainer; children[UI_COMP_OMGLABELCONTAINER_OMGTITLE] = cui_omgTitle; children[UI_COMP_OMGLABELCONTAINER_OMGLINE1] = cui_omgLine1; children[UI_COMP_OMGLABELCONTAINER_OMGLINE2] = cui_omgLine2; children[UI_COMP_OMGLABELCONTAINER_OMGLINE3] = cui_omgLine3; children[UI_COMP_OMGLABELCONTAINER_OMGLINE4] = cui_omgLine4; lv_obj_add_event_cb(cui_omgLabelContainer, get_component_child_event_cb, LV_EVENT_GET_COMP_CHILD, children); lv_obj_add_event_cb(cui_omgLabelContainer, del_component_child_event_cb, LV_EVENT_DELETE, children); ui_comp_omgLabelContainer_create_hook(cui_omgLabelContainer); return cui_omgLabelContainer; }