Lines Matching refs:item

55 static void item_repos(lv_obj_t * item, _lv_grid_calc_t * c, item_repos_hint_t * hint);
362 lv_obj_t * item = cont->spec_attr->children[i]; in grid_update() local
363 item_repos(item, &c, &hint); in grid_update()
443 lv_obj_t * item = lv_obj_get_child(cont, ci); in calc_cols() local
444 …if(lv_obj_has_flag_any(item, LV_OBJ_FLAG_IGNORE_LAYOUT | LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_FLOATING… in calc_cols()
445 uint32_t col_span = get_col_span(item); in calc_cols()
448 uint32_t col_pos = get_col_pos(item); in calc_cols()
451 size = LV_MAX(size, lv_obj_get_width(item)); in calc_cols()
512 lv_obj_t * item = lv_obj_get_child(cont, ci); in calc_rows() local
513 …if(lv_obj_has_flag_any(item, LV_OBJ_FLAG_IGNORE_LAYOUT | LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_FLOATING… in calc_rows()
514 uint32_t row_span = get_row_span(item); in calc_rows()
517 uint32_t row_pos = get_row_pos(item); in calc_rows()
520 size = LV_MAX(size, lv_obj_get_height(item)); in calc_rows()
574 static void item_repos(lv_obj_t * item, _lv_grid_calc_t * c, item_repos_hint_t * hint) in item_repos() argument
576 …if(lv_obj_has_flag_any(item, LV_OBJ_FLAG_IGNORE_LAYOUT | LV_OBJ_FLAG_HIDDEN | LV_OBJ_FLAG_FLOATING… in item_repos()
577 uint32_t col_span = get_col_span(item); in item_repos()
578 uint32_t row_span = get_row_span(item); in item_repos()
581 uint32_t col_pos = get_col_pos(item); in item_repos()
582 uint32_t row_pos = get_row_pos(item); in item_repos()
583 lv_grid_align_t col_align = get_cell_col_align(item); in item_repos()
584 lv_grid_align_t row_align = get_cell_row_align(item); in item_repos()
595 if(lv_obj_get_style_base_dir(item, LV_PART_MAIN) == LV_BASE_DIR_RTL) { in item_repos()
602 lv_coord_t item_w = lv_area_get_width(&item->coords); in item_repos()
603 lv_coord_t item_h = lv_area_get_height(&item->coords); in item_repos()
609 item->w_layout = 0; in item_repos()
614 item->w_layout = 1; in item_repos()
618 item->w_layout = 0; in item_repos()
621 x = c->x[col_pos] + col_w - lv_obj_get_width(item); in item_repos()
622 item->w_layout = 0; in item_repos()
630 item->h_layout = 0; in item_repos()
635 item->h_layout = 1; in item_repos()
639 item->h_layout = 0; in item_repos()
642 y = c->y[row_pos] + row_h - lv_obj_get_height(item); in item_repos()
643 item->h_layout = 0; in item_repos()
648 if(lv_obj_get_width(item) != item_w || lv_obj_get_height(item) != item_h) { in item_repos()
650 lv_area_copy(&old_coords, &item->coords); in item_repos()
651 lv_obj_invalidate(item); in item_repos()
652 lv_area_set_width(&item->coords, item_w); in item_repos()
653 lv_area_set_height(&item->coords, item_h); in item_repos()
654 lv_obj_invalidate(item); in item_repos()
655 lv_event_send(item, LV_EVENT_SIZE_CHANGED, &old_coords); in item_repos()
656 lv_event_send(lv_obj_get_parent(item), LV_EVENT_CHILD_CHANGED, item); in item_repos()
661 lv_coord_t tr_x = lv_obj_get_style_translate_x(item, LV_PART_MAIN); in item_repos()
662 lv_coord_t tr_y = lv_obj_get_style_translate_y(item, LV_PART_MAIN); in item_repos()
663 lv_coord_t w = lv_obj_get_width(item); in item_repos()
664 lv_coord_t h = lv_obj_get_height(item); in item_repos()
671 lv_coord_t diff_x = hint->grid_abs.x + x - item->coords.x1; in item_repos()
672 lv_coord_t diff_y = hint->grid_abs.y + y - item->coords.y1; in item_repos()
674 lv_obj_invalidate(item); in item_repos()
675 item->coords.x1 += diff_x; in item_repos()
676 item->coords.x2 += diff_x; in item_repos()
677 item->coords.y1 += diff_y; in item_repos()
678 item->coords.y2 += diff_y; in item_repos()
679 lv_obj_invalidate(item); in item_repos()
680 lv_obj_move_children_by(item, diff_x, diff_y, false); in item_repos()