/lvgl-latest/tests/src/test_cases/widgets/ |
D | test_btnmatrix.c | 8 static lv_obj_t * btnm; variable 15 btnm = lv_buttonmatrix_create(active_screen); in setUp() 16 TEST_ASSERT_NOT_NULL(btnm); in setUp() 31 map = lv_buttonmatrix_get_map(btnm); in test_button_matrix_creation() 45 lv_buttonmatrix_set_map(btnm, exp_map); in test_button_matrix_set_map_works() 47 ret_map = lv_buttonmatrix_get_map(btnm); in test_button_matrix_set_map_works() 61 lv_buttonmatrix_set_map(btnm, btn_map); in test_button_matrix_render_2() 62 lv_buttonmatrix_set_button_ctrl_all(btnm, LV_BUTTONMATRIX_CTRL_CHECKABLE); in test_button_matrix_render_2() 63 lv_buttonmatrix_set_button_ctrl(btnm, 0, LV_BUTTONMATRIX_CTRL_CHECKED); in test_button_matrix_render_2() 64 lv_buttonmatrix_set_button_ctrl(btnm, 3, LV_BUTTONMATRIX_CTRL_CHECKED); in test_button_matrix_render_2() [all …]
|
D | test_calendar.c | 207 lv_obj_t * btnm = lv_calendar_get_btnmatrix(g_calendar); in test_calendar_get_btnmatrix() local 209 TEST_ASSERT_NOT_NULL(btnm); in test_calendar_get_btnmatrix()
|
/lvgl-latest/src/widgets/buttonmatrix/ |
D | lv_buttonmatrix.c | 105 lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj; in lv_buttonmatrix_set_map() local 109 btnm->map_p = map; in lv_buttonmatrix_set_map() 123 int32_t max_h_no_gap = max_h - (prow * (btnm->row_cnt - 1)); in lv_buttonmatrix_set_map() 133 for(row = 0; row < btnm->row_cnt; row++) { in lv_buttonmatrix_set_map() 138 unit_cnt += get_button_width(btnm->ctrl_bits[btn_tot_i + btn_cnt]); in lv_buttonmatrix_set_map() 148 int32_t row_y1 = stop + (max_h_no_gap * row) / btnm->row_cnt + row * prow; in lv_buttonmatrix_set_map() 149 int32_t row_y2 = stop + (max_h_no_gap * (row + 1)) / btnm->row_cnt + row * prow - 1; in lv_buttonmatrix_set_map() 158 uint32_t btn_u = get_button_width(btnm->ctrl_bits[btn_tot_i]); in lv_buttonmatrix_set_map() 176 lv_area_set(&btnm->button_areas[btn_tot_i], btn_x1, row_y1, btn_x2, row_y2); in lv_buttonmatrix_set_map() 195 lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj; in lv_buttonmatrix_set_ctrl_map() local [all …]
|
D | lv_buttonmatrix.h | 49 typedef bool (*lv_buttonmatrix_button_draw_cb_t)(lv_obj_t * btnm, uint32_t btn_id, const lv_area_t …
|
/lvgl-latest/examples/widgets/buttonmatrix/ |
D | lv_example_buttonmatrix_3.c | 48 lv_obj_t * btnm = lv_buttonmatrix_create(lv_screen_active()); in lv_example_buttonmatrix_3() local 49 lv_buttonmatrix_set_map(btnm, map); in lv_example_buttonmatrix_3() 50 lv_obj_add_style(btnm, &style_bg, 0); in lv_example_buttonmatrix_3() 51 lv_obj_add_style(btnm, &style_btn, LV_PART_ITEMS); in lv_example_buttonmatrix_3() 52 lv_obj_add_event_cb(btnm, event_cb, LV_EVENT_VALUE_CHANGED, NULL); in lv_example_buttonmatrix_3() 53 lv_obj_set_size(btnm, 225, 35); in lv_example_buttonmatrix_3() 56 lv_buttonmatrix_set_button_ctrl_all(btnm, LV_BUTTONMATRIX_CTRL_CHECKABLE); in lv_example_buttonmatrix_3() 57 lv_buttonmatrix_clear_button_ctrl(btnm, 0, LV_BUTTONMATRIX_CTRL_CHECKABLE); in lv_example_buttonmatrix_3() 58 lv_buttonmatrix_clear_button_ctrl(btnm, 6, LV_BUTTONMATRIX_CTRL_CHECKABLE); in lv_example_buttonmatrix_3() 60 lv_buttonmatrix_set_one_checked(btnm, true); in lv_example_buttonmatrix_3() [all …]
|
D | lv_example_buttonmatrix_2.c | 83 lv_obj_t * btnm = lv_buttonmatrix_create(lv_screen_active()); in lv_example_buttonmatrix_2() local 84 lv_obj_add_event_cb(btnm, event_cb, LV_EVENT_DRAW_TASK_ADDED, NULL); in lv_example_buttonmatrix_2() 85 lv_obj_add_flag(btnm, LV_OBJ_FLAG_SEND_DRAW_TASK_EVENTS); in lv_example_buttonmatrix_2() 86 lv_obj_center(btnm); in lv_example_buttonmatrix_2()
|
/lvgl-latest/examples/widgets/textarea/ |
D | lv_example_textarea_1.c | 37 lv_obj_t * btnm = lv_buttonmatrix_create(lv_screen_active()); in lv_example_textarea_1() local 38 lv_obj_set_size(btnm, 200, 150); in lv_example_textarea_1() 39 lv_obj_align(btnm, LV_ALIGN_BOTTOM_MID, 0, -10); in lv_example_textarea_1() 40 lv_obj_add_event_cb(btnm, btnm_event_handler, LV_EVENT_VALUE_CHANGED, ta); in lv_example_textarea_1() 41 …lv_obj_remove_flag(btnm, LV_OBJ_FLAG_CLICK_FOCUSABLE); /*To keep the text area focused on button c… in lv_example_textarea_1() 42 lv_buttonmatrix_set_map(btnm, btnm_map); in lv_example_textarea_1()
|
/lvgl-latest/src/widgets/calendar/ |
D | lv_calendar.c | 137 lv_buttonmatrix_clear_button_ctrl_all(calendar->btnm, LV_BUTTONMATRIX_CTRL_DISABLED); in lv_calendar_set_month_shown() 139 lv_buttonmatrix_set_button_ctrl(calendar->btnm, i, LV_BUTTONMATRIX_CTRL_DISABLED); in lv_calendar_set_month_shown() 177 lv_buttonmatrix_set_button_ctrl(calendar->btnm, i + 7, LV_BUTTONMATRIX_CTRL_DISABLED); in lv_calendar_set_month_shown() 193 lv_buttonmatrix_set_button_ctrl(calendar->btnm, i + 7, LV_BUTTONMATRIX_CTRL_DISABLED); in lv_calendar_set_month_shown() 199 if(lv_buttonmatrix_get_selected_button(calendar->btnm) != LV_BUTTONMATRIX_BUTTON_NONE) { in lv_calendar_set_month_shown() 200 lv_buttonmatrix_set_selected_button(calendar->btnm, day_first + 7); in lv_calendar_set_month_shown() 210 if(child == calendar->btnm) continue; in lv_calendar_set_month_shown() 223 return calendar->btnm; in lv_calendar_get_btnmatrix() 263 uint32_t d = lv_buttonmatrix_get_selected_button(calendar->btnm); in lv_calendar_get_pressed_date() 271 …txt = lv_buttonmatrix_get_button_text(calendar->btnm, lv_buttonmatrix_get_selected_button(calendar… in lv_calendar_get_pressed_date() [all …]
|
D | lv_calendar_private.h | 34 lv_obj_t * btnm; member
|
/lvgl-latest/demos/ebike/ |
D | lv_demo_ebike_stats.c | 138 lv_obj_t * btnm = lv_event_get_target(e); in tabs_click_event_cb() local 139 lv_subject_set_int(&subject_mode, lv_buttonmatrix_get_selected_button(btnm)); in tabs_click_event_cb() 144 lv_obj_t * btnm = lv_buttonmatrix_create(parent); in tabs_create() local 146 lv_obj_set_size(btnm, lv_pct(100), 40); in tabs_create() 148 lv_obj_set_size(btnm, lv_pct(100), 24); in tabs_create() 150 lv_obj_set_style_bg_opa(btnm, 0, 0); in tabs_create() 151 lv_obj_set_style_bg_opa(btnm, 0, LV_PART_ITEMS); in tabs_create() 152 lv_obj_set_style_border_width(btnm, 1, LV_PART_ITEMS); in tabs_create() 153 lv_obj_set_style_border_width(btnm, 2, LV_PART_ITEMS | LV_STATE_FOCUSED); in tabs_create() 154 lv_obj_set_style_border_side(btnm, LV_BORDER_SIDE_BOTTOM, LV_PART_ITEMS); in tabs_create() [all …]
|
/lvgl-latest/src/widgets/keyboard/ |
D | lv_keyboard_private.h | 32 lv_buttonmatrix_t btnm; member
|
D | lv_keyboard.c | 474 lv_buttonmatrix_t * btnm = (lv_buttonmatrix_t *)obj; in lv_keyboard_update_ctrl_map() local 475 … lv_buttonmatrix_ctrl_t * ctrl_map = lv_malloc(btnm->btn_cnt * sizeof(lv_buttonmatrix_ctrl_t)); in lv_keyboard_update_ctrl_map() 476 … lv_memcpy(ctrl_map, kb_ctrl[keyboard->mode], sizeof(lv_buttonmatrix_ctrl_t) * btnm->btn_cnt); in lv_keyboard_update_ctrl_map() 480 for(i = 0; i < btnm->btn_cnt; i++) { in lv_keyboard_update_ctrl_map()
|