Lines Matching refs:f

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…
131 flex_t f; in flex_update() local
133 f.row = flow & LV_FLEX_COLUMN ? 0 : 1; in flex_update()
134 f.wrap = flow & LV_FLEX_WRAP ? 1 : 0; in flex_update()
135 f.rev = flow & LV_FLEX_REVERSE ? 1 : 0; 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()
141 …int32_t track_gap = !f.row ? lv_obj_get_style_pad_column(cont, LV_PART_MAIN) : lv_obj_get_style_pa… in flex_update()
143 …int32_t item_gap = f.row ? lv_obj_get_style_pad_column(cont, LV_PART_MAIN) : lv_obj_get_style_pad_… 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()
151 lv_flex_align_t track_cross_place = f.track_place; in flex_update()
152 int32_t * cross_pos = (f.row ? &abs_y : &abs_x); 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()
163 if(rtl && !f.row) { in flex_update()
175 track_first_item = f.rev ? cont->spec_attr->child_cnt - 1 : 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 …int32_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()
195 if(rtl && !f.row) { 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()
205 if(rtl && !f.row) { 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()
212 if(rtl && !f.row) { 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
240 if(f->wrap && ((f->row && w_set == LV_SIZE_CONTENT) || (!f->row && h_set == LV_SIZE_CONTENT))) { in find_track_end()
241 f->wrap = false; in find_track_end()
243 …int32_t(*get_main_size)(const lv_obj_t *) = (f->row ? lv_obj_get_width_with_margin : lv_obj_get_he… in find_track_end()
244 int32_t(*get_cross_size)(const lv_obj_t *) = (!f->row ? lv_obj_get_width_with_margin : in find_track_end()
263 int32_t min_size = f->row ? lv_obj_get_style_min_width(item, LV_PART_MAIN) in find_track_end()
270 … if(f->wrap && t->track_fix_main_size + grow_min_size_sum + req_size > max_main_size) break; in find_track_end()
286 … new_dsc[t->grow_item_cnt - 1].min_size = f->row ? lv_obj_get_style_min_width(item, LV_PART_MAIN) in find_track_end()
288 … new_dsc[t->grow_item_cnt - 1].max_size = f->row ? lv_obj_get_style_max_width(item, LV_PART_MAIN) in find_track_end()
300 … if(f->wrap && t->track_fix_main_size + grow_min_size_sum + req_size > max_main_size) break; in find_track_end()
308 item_id += f->rev ? -1 : +1; 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
336 …void (*area_set_main_size)(lv_area_t *, int32_t) = (f->row ? lv_area_set_width : lv_area_set_heigh… in children_repos()
337 …int32_t (*area_get_main_size)(const lv_area_t *) = (f->row ? lv_area_get_width : lv_area_get_heigh… in children_repos()
338 …int32_t (*area_get_cross_size)(const lv_area_t *) = (!f->row ? lv_area_get_width : lv_area_get_hei… in children_repos()
341 …margin_func_t get_margin_main_start = (f->row ? lv_obj_get_style_margin_left : lv_obj_get_style_ma… in children_repos()
342 …margin_func_t get_margin_main_end = (f->row ? lv_obj_get_style_margin_right : lv_obj_get_style_mar… in children_repos()
343 …margin_func_t get_margin_cross_start = (!f->row ? lv_obj_get_style_margin_left : lv_obj_get_style_… in children_repos()
344 …margin_func_t get_margin_cross_end = (!f->row ? lv_obj_get_style_margin_right : lv_obj_get_style_m… in children_repos()
386 …place_content(f->main_place, max_main_size, t->track_main_size, t->item_cnt, &main_pos, &place_gap… in children_repos()
387 if(f->row && rtl) main_pos += lv_obj_get_content_width(cont); in children_repos()
393 item = get_next_item(cont, f->rev, &item_first_id); in children_repos()
406 if(f->row) { in children_repos()
432 switch(f->cross_place) { in children_repos()
448 if(f->row && rtl) main_pos -= area_get_main_size(&item->coords); in children_repos()
460 diff_x += f->row ? main_pos + get_margin_main_start(item, LV_PART_MAIN) : cross_pos; in children_repos()
461 diff_y += f->row ? cross_pos : main_pos + get_margin_main_start(item, LV_PART_MAIN); in children_repos()
473 if(!(f->row && rtl)) main_pos += area_get_main_size(&item->coords) + item_gap + place_gap in children_repos()
478 item = get_next_item(cont, f->rev, &item_first_id); in children_repos()