Lines Matching refs:cont

59 static void flex_update(lv_obj_t * cont, void * user_data);
60 static int32_t find_track_end(lv_obj_t * cont, flex_t * f, int32_t item_start_id, int32_t max_main_…
62 static void children_repos(lv_obj_t * cont, flex_t * f, int32_t item_first_id, int32_t item_last_id…
66 static lv_obj_t * get_next_item(lv_obj_t * cont, bool rev, int32_t * item_id);
126 static void flex_update(lv_obj_t * cont, void * user_data) in flex_update() argument
128 LV_LOG_INFO("update %p container", (void *)cont); in flex_update()
132 lv_flex_flow_t flow = lv_obj_get_style_flex_flow(cont, LV_PART_MAIN); in flex_update()
136 f.main_place = lv_obj_get_style_flex_main_place(cont, LV_PART_MAIN); in flex_update()
137 f.cross_place = lv_obj_get_style_flex_cross_place(cont, LV_PART_MAIN); in flex_update()
138 f.track_place = lv_obj_get_style_flex_track_place(cont, LV_PART_MAIN); in flex_update()
140 bool rtl = lv_obj_get_style_base_dir(cont, LV_PART_MAIN) == LV_BASE_DIR_RTL; in flex_update()
141 …t track_gap = !f.row ? lv_obj_get_style_pad_column(cont, LV_PART_MAIN) : lv_obj_get_style_pad_row( in flex_update()
143 …2_t item_gap = f.row ? lv_obj_get_style_pad_column(cont, LV_PART_MAIN) : lv_obj_get_style_pad_row( in flex_update()
145 …int32_t max_main_size = (f.row ? lv_obj_get_content_width(cont) : lv_obj_get_content_height(cont)); in flex_update()
146 int32_t abs_y = cont->coords.y1 + lv_obj_get_style_space_top(cont, in flex_update()
147 … LV_PART_MAIN) - lv_obj_get_scroll_y(cont); in flex_update()
148 int32_t abs_x = cont->coords.x1 + lv_obj_get_style_space_left(cont, in flex_update()
149 … LV_PART_MAIN) - lv_obj_get_scroll_x(cont); in flex_update()
154 int32_t w_set = lv_obj_get_style_width(cont, LV_PART_MAIN); in flex_update()
155 int32_t h_set = lv_obj_get_style_height(cont, LV_PART_MAIN); in flex_update()
158 if((f.row && h_set == LV_SIZE_CONTENT && cont->h_layout == 0) || in flex_update()
159 (!f.row && w_set == LV_SIZE_CONTENT && cont->w_layout == 0)) { in flex_update()
175 track_first_item = f.rev ? cont->spec_attr->child_cnt - 1 : 0; in flex_update()
177 while(track_first_item < (int32_t)cont->spec_attr->child_cnt && track_first_item >= 0) { in flex_update()
180 … next_track_first_item = find_track_end(cont, &f, track_first_item, max_main_size, item_gap, &t); in flex_update()
189 …nt32_t max_cross_size = (f.row ? lv_obj_get_content_height(cont) : lv_obj_get_content_width(cont)); in flex_update()
193 track_first_item = f.rev ? cont->spec_attr->child_cnt - 1 : 0; in flex_update()
199 while(track_first_item < (int32_t)cont->spec_attr->child_cnt && track_first_item >= 0) { in flex_update()
203 … next_track_first_item = find_track_end(cont, &f, track_first_item, max_main_size, item_gap, &t); in flex_update()
208 …children_repos(cont, &f, track_first_item, next_track_first_item, abs_x, abs_y, max_main_size, ite… in flex_update()
222 lv_obj_refr_size(cont); in flex_update()
225 lv_obj_send_event(cont, LV_EVENT_LAYOUT_CHANGED, NULL); in flex_update()
233 static int32_t find_track_end(lv_obj_t * cont, flex_t * f, int32_t item_start_id, int32_t max_main_… in find_track_end() argument
236 int32_t w_set = lv_obj_get_style_width(cont, LV_PART_MAIN); in find_track_end()
237 int32_t h_set = lv_obj_get_style_height(cont, LV_PART_MAIN); in find_track_end()
256 lv_obj_t * item = lv_obj_get_child(cont, item_id); in find_track_end()
310 item = lv_obj_get_child(cont, item_id); in find_track_end()
318 item = cont->spec_attr->children[item_id]; in find_track_end()
319 get_next_item(cont, f->rev, &item_id); in find_track_end()
333 static void children_repos(lv_obj_t * cont, flex_t * f, int32_t item_first_id, int32_t item_last_id… in children_repos() argument
381 bool rtl = lv_obj_get_style_base_dir(cont, LV_PART_MAIN) == LV_BASE_DIR_RTL; in children_repos()
387 if(f->row && rtl) main_pos += lv_obj_get_content_width(cont); in children_repos()
389 lv_obj_t * item = lv_obj_get_child(cont, item_first_id); in children_repos()
393 item = get_next_item(cont, f->rev, &item_first_id); in children_repos()
478 item = get_next_item(cont, f->rev, &item_first_id); in children_repos()
524 static lv_obj_t * get_next_item(lv_obj_t * cont, bool rev, int32_t * item_id) in get_next_item() argument
528 if(*item_id >= 0) return cont->spec_attr->children[*item_id]; in get_next_item()
533 … if((*item_id) < (int32_t)cont->spec_attr->child_cnt) return cont->spec_attr->children[*item_id]; in get_next_item()