Lines Matching refs:row

40 static void refr_cell_size(lv_obj_t * obj, uint32_t row, uint32_t col);
41 static lv_res_t get_pressed_cell(lv_obj_t * obj, uint16_t * row, uint16_t * col);
44 static void get_cell_area(lv_obj_t * obj, uint16_t row, uint16_t col, lv_area_t * area);
86 void lv_table_set_cell_value(lv_obj_t * obj, uint16_t row, uint16_t col, const char * txt) in lv_table_set_cell_value() argument
95 if(row >= table->row_cnt) lv_table_set_row_cnt(obj, row + 1); in lv_table_set_cell_value()
97 uint32_t cell = row * table->col_cnt + col; in lv_table_set_cell_value()
122 refr_cell_size(obj, row, col); in lv_table_set_cell_value()
125 void lv_table_set_cell_value_fmt(lv_obj_t * obj, uint16_t row, uint16_t col, const char * fmt, ...) in lv_table_set_cell_value_fmt() argument
136 if(row >= table->row_cnt) { in lv_table_set_cell_value_fmt()
137 lv_table_set_row_cnt(obj, row + 1); in lv_table_set_cell_value_fmt()
140 uint32_t cell = row * table->col_cnt + col; in lv_table_set_cell_value_fmt()
203 refr_cell_size(obj, row, col); in lv_table_set_cell_value_fmt()
273 uint32_t row; in lv_table_set_col_cnt() local
274 for(row = 0; row < table->row_cnt; row++) { in lv_table_set_col_cnt()
275 old_col_start = row * old_col_cnt; in lv_table_set_col_cnt()
276 new_col_start = row * col_cnt; in lv_table_set_col_cnt()
325 void lv_table_add_cell_ctrl(lv_obj_t * obj, uint16_t row, uint16_t col, lv_table_cell_ctrl_t ctrl) in lv_table_add_cell_ctrl() argument
333 if(row >= table->row_cnt) lv_table_set_row_cnt(obj, row + 1); in lv_table_add_cell_ctrl()
335 uint32_t cell = row * table->col_cnt + col; in lv_table_add_cell_ctrl()
352 void lv_table_clear_cell_ctrl(lv_obj_t * obj, uint16_t row, uint16_t col, lv_table_cell_ctrl_t ctrl) in lv_table_clear_cell_ctrl() argument
360 if(row >= table->row_cnt) lv_table_set_row_cnt(obj, row + 1); in lv_table_clear_cell_ctrl()
362 uint32_t cell = row * table->col_cnt + col; in lv_table_clear_cell_ctrl()
380 void lv_table_set_cell_user_data(lv_obj_t * obj, uint16_t row, uint16_t col, void * user_data) in lv_table_set_cell_user_data() argument
388 if(row >= table->row_cnt) lv_table_set_row_cnt(obj, row + 1); in lv_table_set_cell_user_data()
390 uint32_t cell = row * table->col_cnt + col; in lv_table_set_cell_user_data()
414 const char * lv_table_get_cell_value(lv_obj_t * obj, uint16_t row, uint16_t col) in lv_table_get_cell_value() argument
419 if(row >= table->row_cnt || col >= table->col_cnt) { in lv_table_get_cell_value()
423 uint32_t cell = row * table->col_cnt + col; in lv_table_get_cell_value()
460 bool lv_table_has_cell_ctrl(lv_obj_t * obj, uint16_t row, uint16_t col, lv_table_cell_ctrl_t ctrl) in lv_table_has_cell_ctrl() argument
465 if(row >= table->row_cnt || col >= table->col_cnt) { in lv_table_has_cell_ctrl()
469 uint32_t cell = row * table->col_cnt + col; in lv_table_has_cell_ctrl()
475 void lv_table_get_selected_cell(lv_obj_t * obj, uint16_t * row, uint16_t * col) in lv_table_get_selected_cell() argument
478 *row = table->row_act; in lv_table_get_selected_cell()
483 void * lv_table_get_cell_user_data(lv_obj_t * obj, uint16_t row, uint16_t col) in lv_table_get_cell_user_data() argument
488 if(row >= table->row_cnt || col >= table->col_cnt) { in lv_table_get_cell_user_data()
492 uint32_t cell = row * table->col_cnt + col; in lv_table_get_cell_user_data()
578 uint16_t row; in lv_table_event() local
579 lv_res_t pr_res = get_pressed_cell(obj, &row, &col); in lv_table_event()
581 if(pr_res == LV_RES_OK && (table->col_act != col || table->row_act != row)) { in lv_table_event()
583 table->row_act = row; in lv_table_event()
608 int32_t row = table->row_act; in lv_table_event() local
609 if(col == LV_TABLE_CELL_NONE || row == LV_TABLE_CELL_NONE) { in lv_table_event()
618 if(row >= table->row_cnt) row = 0; in lv_table_event()
622 else if(c == LV_KEY_UP) row--; in lv_table_event()
623 else if(c == LV_KEY_DOWN) row++; in lv_table_event()
627 if(row < table->row_cnt - 1) { in lv_table_event()
629 row++; in lv_table_event()
636 if(row != 0) { in lv_table_event()
638 row--; in lv_table_event()
645 if(row >= table->row_cnt) { in lv_table_event()
646 row = table->row_cnt - 1; in lv_table_event()
648 else if(row < 0) { in lv_table_event()
649 row = 0; in lv_table_event()
652 if(table->col_act != col || table->row_act != row) { in lv_table_event()
654 table->row_act = row; in lv_table_event()
704 uint16_t row; in draw_main() local
720 for(row = 0; row < table->row_cnt; row++) { in draw_main()
721 lv_coord_t h_row = table->row_h[row]; in draw_main()
786 if(row == table->row_act && col == table->col_act) { in draw_main()
811 part_draw_dsc.id = row * table->col_cnt + col; in draw_main()
890 static void refr_cell_size(lv_obj_t * obj, uint32_t row, uint32_t col) in refr_cell_size() argument
905 lv_coord_t calculated_height = get_row_height(obj, row, font, letter_space, line_space, in refr_cell_size()
908 lv_coord_t prev_row_size = table->row_h[row]; in refr_cell_size()
909 table->row_h[row] = LV_CLAMP(minh, calculated_height, maxh); in refr_cell_size()
912 if(prev_row_size == table->row_h[row]) { in refr_cell_size()
914 get_cell_area(obj, row, col, &cell_area); in refr_cell_size()
989 static lv_res_t get_pressed_cell(lv_obj_t * obj, uint16_t * row, uint16_t * col) in get_pressed_cell() argument
996 if(row) *row = LV_TABLE_CELL_NONE; in get_pressed_cell()
1023 if(row) { in get_pressed_cell()
1028 *row = 0; in get_pressed_cell()
1031 for(*row = 0; *row < table->row_cnt; (*row)++) { in get_pressed_cell()
1032 tmp += table->row_h[*row]; in get_pressed_cell()
1064 static void get_cell_area(lv_obj_t * obj, uint16_t row, uint16_t col, lv_area_t * area) in get_cell_area() argument
1089 for(r = 0; r < row; r++) { in get_cell_area()
1095 area->y2 = area->y1 + table->row_h[row] - 1; in get_cell_area()