Lines Matching refs:cont
55 static void flex_update(lv_obj_t * cont, void * user_data);
56 static int32_t find_track_end(lv_obj_t * cont, flex_t * f, int32_t item_start_id, lv_coord_t max_ma…
58 static void children_repos(lv_obj_t * cont, flex_t * f, int32_t item_first_id, int32_t item_last_id…
62 static lv_obj_t * get_next_item(lv_obj_t * cont, bool rev, int32_t * item_id);
206 static void flex_update(lv_obj_t * cont, void * user_data) in flex_update() argument
208 LV_LOG_INFO("update %p container", (void *)cont); in flex_update()
212 lv_flex_flow_t flow = lv_obj_get_style_flex_flow(cont, LV_PART_MAIN); in flex_update()
216 f.main_place = lv_obj_get_style_flex_main_place(cont, LV_PART_MAIN); in flex_update()
217 f.cross_place = lv_obj_get_style_flex_cross_place(cont, LV_PART_MAIN); in flex_update()
218 f.track_place = lv_obj_get_style_flex_track_place(cont, LV_PART_MAIN); in flex_update()
220 bool rtl = lv_obj_get_style_base_dir(cont, LV_PART_MAIN) == LV_BASE_DIR_RTL ? true : false; in flex_update()
221 …t track_gap = !f.row ? lv_obj_get_style_pad_column(cont, LV_PART_MAIN) : lv_obj_get_style_pad_row(… in flex_update()
223 …d_t item_gap = f.row ? lv_obj_get_style_pad_column(cont, LV_PART_MAIN) : lv_obj_get_style_pad_row(… in flex_update()
225 …coord_t max_main_size = (f.row ? lv_obj_get_content_width(cont) : lv_obj_get_content_height(cont)); in flex_update()
226 lv_coord_t border_width = lv_obj_get_style_border_width(cont, LV_PART_MAIN); in flex_update()
227 lv_coord_t abs_y = cont->coords.y1 + lv_obj_get_style_pad_top(cont, in flex_update()
228 … LV_PART_MAIN) + border_width - lv_obj_get_scroll_y(cont); in flex_update()
229 lv_coord_t abs_x = cont->coords.x1 + lv_obj_get_style_pad_left(cont, in flex_update()
230 … LV_PART_MAIN) + border_width - lv_obj_get_scroll_x(cont); in flex_update()
235 lv_coord_t w_set = lv_obj_get_style_width(cont, LV_PART_MAIN); in flex_update()
236 lv_coord_t h_set = lv_obj_get_style_height(cont, LV_PART_MAIN); in flex_update()
239 if((f.row && h_set == LV_SIZE_CONTENT && cont->h_layout == 0) || in flex_update()
240 (!f.row && w_set == LV_SIZE_CONTENT && cont->w_layout == 0)) { in flex_update()
256 track_first_item = f.rev ? cont->spec_attr->child_cnt - 1 : 0; in flex_update()
258 while(track_first_item < (int32_t)cont->spec_attr->child_cnt && track_first_item >= 0) { in flex_update()
261 … next_track_first_item = find_track_end(cont, &f, track_first_item, max_main_size, item_gap, &t); in flex_update()
270 …oord_t max_cross_size = (f.row ? lv_obj_get_content_height(cont) : lv_obj_get_content_width(cont)); in flex_update()
274 track_first_item = f.rev ? cont->spec_attr->child_cnt - 1 : 0; in flex_update()
280 while(track_first_item < (int32_t)cont->spec_attr->child_cnt && track_first_item >= 0) { in flex_update()
284 … next_track_first_item = find_track_end(cont, &f, track_first_item, max_main_size, item_gap, &t); in flex_update()
289 …children_repos(cont, &f, track_first_item, next_track_first_item, abs_x, abs_y, max_main_size, ite… in flex_update()
303 lv_obj_refr_size(cont); in flex_update()
306 lv_event_send(cont, LV_EVENT_LAYOUT_CHANGED, NULL); in flex_update()
314 static int32_t find_track_end(lv_obj_t * cont, flex_t * f, int32_t item_start_id, lv_coord_t max_ma… in find_track_end() argument
317 lv_coord_t w_set = lv_obj_get_style_width(cont, LV_PART_MAIN); in find_track_end()
318 lv_coord_t h_set = lv_obj_get_style_height(cont, LV_PART_MAIN); in find_track_end()
336 lv_obj_t * item = lv_obj_get_child(cont, item_id); in find_track_end()
376 item = lv_obj_get_child(cont, item_id); in find_track_end()
386 item = cont->spec_attr->children[item_id]; in find_track_end()
387 get_next_item(cont, f->rev, &item_id); in find_track_end()
401 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
443 bool rtl = lv_obj_get_style_base_dir(cont, LV_PART_MAIN) == LV_BASE_DIR_RTL ? true : false; in children_repos()
449 if(f->row && rtl) main_pos += lv_obj_get_content_width(cont); in children_repos()
451 lv_obj_t * item = lv_obj_get_child(cont, item_first_id); in children_repos()
455 item = get_next_item(cont, f->rev, &item_first_id); in children_repos()
535 item = get_next_item(cont, f->rev, &item_first_id); in children_repos()
582 static lv_obj_t * get_next_item(lv_obj_t * cont, bool rev, int32_t * item_id) in get_next_item() argument
586 if(*item_id >= 0) return cont->spec_attr->children[*item_id]; in get_next_item()
591 … if((*item_id) < (int32_t)cont->spec_attr->child_cnt) return cont->spec_attr->children[*item_id]; in get_next_item()