/lvgl-3.7.0/src/widgets/ |
D | lv_btnmatrix.c | 98 lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj; in lv_btnmatrix_set_map() local 102 btnm->map_p = map; in lv_btnmatrix_set_map() 116 lv_coord_t max_h_no_gap = max_h - (prow * (btnm->row_cnt - 1)); in lv_btnmatrix_set_map() 126 for(row = 0; row < btnm->row_cnt; row++) { in lv_btnmatrix_set_map() 131 unit_cnt += get_button_width(btnm->ctrl_bits[btn_tot_i + btn_cnt]); in lv_btnmatrix_set_map() 141 lv_coord_t row_y1 = ptop + (max_h_no_gap * row) / btnm->row_cnt + row * prow; in lv_btnmatrix_set_map() 142 lv_coord_t row_y2 = ptop + (max_h_no_gap * (row + 1)) / btnm->row_cnt + row * prow - 1; in lv_btnmatrix_set_map() 151 uint32_t btn_u = get_button_width(btnm->ctrl_bits[btn_tot_i]); in lv_btnmatrix_set_map() 169 lv_area_set(&btnm->button_areas[btn_tot_i], btn_x1, row_y1, btn_x2, row_y2); in lv_btnmatrix_set_map() 188 lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj; in lv_btnmatrix_set_ctrl_map() local [all …]
|
D | lv_btnmatrix.h | 52 typedef bool (*lv_btnmatrix_btn_draw_cb_t)(lv_obj_t * btnm, uint32_t btn_id, const lv_area_t * draw…
|
/lvgl-3.7.0/examples/widgets/btnmatrix/ |
D | lv_example_btnmatrix_3.c | 48 lv_obj_t * btnm = lv_btnmatrix_create(lv_scr_act()); in lv_example_btnmatrix_3() local 49 lv_btnmatrix_set_map(btnm, map); in lv_example_btnmatrix_3() 50 lv_obj_add_style(btnm, &style_bg, 0); in lv_example_btnmatrix_3() 51 lv_obj_add_style(btnm, &style_btn, LV_PART_ITEMS); in lv_example_btnmatrix_3() 52 lv_obj_add_event_cb(btnm, event_cb, LV_EVENT_VALUE_CHANGED, NULL); in lv_example_btnmatrix_3() 53 lv_obj_set_size(btnm, 225, 35); in lv_example_btnmatrix_3() 56 lv_btnmatrix_set_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_CHECKABLE); in lv_example_btnmatrix_3() 57 lv_btnmatrix_clear_btn_ctrl(btnm, 0, LV_BTNMATRIX_CTRL_CHECKABLE); in lv_example_btnmatrix_3() 58 lv_btnmatrix_clear_btn_ctrl(btnm, 6, LV_BTNMATRIX_CTRL_CHECKABLE); in lv_example_btnmatrix_3() 60 lv_btnmatrix_set_one_checked(btnm, true); in lv_example_btnmatrix_3() [all …]
|
D | lv_example_btnmatrix_3.py | 48 btnm = lv.btnmatrix(lv.scr_act()) variable 49 btnm.set_map(map) 50 btnm.add_style(style_bg, 0) 51 btnm.add_style(style_btn, lv.PART.ITEMS) 52 btnm.add_event_cb(event_cb, lv.EVENT.VALUE_CHANGED, None) 53 btnm.set_size(225, 35) 56 btnm.set_btn_ctrl_all(lv.btnmatrix.CTRL.CHECKABLE) 57 btnm.clear_btn_ctrl(0, lv.btnmatrix.CTRL.CHECKABLE) 58 btnm.clear_btn_ctrl(6, lv.btnmatrix.CTRL.CHECKABLE) 60 btnm.set_one_checked(True) [all …]
|
D | lv_example_btnmatrix_2.c | 72 lv_obj_t * btnm = lv_btnmatrix_create(lv_scr_act()); in lv_example_btnmatrix_2() local 73 lv_obj_add_event_cb(btnm, event_cb, LV_EVENT_ALL, NULL); in lv_example_btnmatrix_2() 74 lv_obj_center(btnm); in lv_example_btnmatrix_2()
|
D | lv_example_btnmatrix_2.py | 78 btnm = lv.btnmatrix(lv.scr_act()) variable 79 btnm.add_event_cb(event_cb, lv.EVENT.ALL, None) 80 btnm.center()
|
/lvgl-3.7.0/examples/widgets/textarea/ |
D | lv_example_textarea_1.c | 36 lv_obj_t * btnm = lv_btnmatrix_create(lv_scr_act()); in lv_example_textarea_1() local 37 lv_obj_set_size(btnm, 200, 150); in lv_example_textarea_1() 38 lv_obj_align(btnm, LV_ALIGN_BOTTOM_MID, 0, -10); in lv_example_textarea_1() 39 lv_obj_add_event_cb(btnm, btnm_event_handler, LV_EVENT_VALUE_CHANGED, ta); in lv_example_textarea_1() 40 …lv_obj_clear_flag(btnm, LV_OBJ_FLAG_CLICK_FOCUSABLE); /*To keep the text area focused on button cl… in lv_example_textarea_1() 41 lv_btnmatrix_set_map(btnm, btnm_map); in lv_example_textarea_1()
|
D | lv_example_textarea_1.py | 27 btnm = lv.btnmatrix(lv.scr_act()) variable 28 btnm.set_size(200, 150) 29 btnm.align(lv.ALIGN.BOTTOM_MID, 0, -10) 30 btnm.add_event_cb(lambda e: btnm_event_handler(e, ta), lv.EVENT.VALUE_CHANGED, None) 31 btnm.clear_flag(lv.obj.FLAG.CLICK_FOCUSABLE) # To keep the text area focused on button clicks 32 btnm.set_map(btnm_map)
|
/lvgl-3.7.0/src/extra/widgets/calendar/ |
D | lv_calendar.c | 126 lv_btnmatrix_clear_btn_ctrl_all(calendar->btnm, LV_BTNMATRIX_CTRL_DISABLED); in lv_calendar_set_showed_date() 128 lv_btnmatrix_set_btn_ctrl(calendar->btnm, i, LV_BTNMATRIX_CTRL_DISABLED); in lv_calendar_set_showed_date() 141 lv_btnmatrix_set_btn_ctrl(calendar->btnm, i + 7, LV_BTNMATRIX_CTRL_DISABLED); in lv_calendar_set_showed_date() 146 lv_btnmatrix_set_btn_ctrl(calendar->btnm, i + 7, LV_BTNMATRIX_CTRL_DISABLED); in lv_calendar_set_showed_date() 152 if(lv_btnmatrix_get_selected_btn(calendar->btnm) != LV_BTNMATRIX_BTN_NONE) { in lv_calendar_set_showed_date() 153 lv_btnmatrix_set_selected_btn(calendar->btnm, day_first + 7); in lv_calendar_set_showed_date() 163 if(child == calendar->btnm) continue; in lv_calendar_set_showed_date() 176 return calendar->btnm; in lv_calendar_get_btnmatrix() 216 uint16_t d = lv_btnmatrix_get_selected_btn(calendar->btnm); in lv_calendar_get_pressed_date() 224 …t char * txt = lv_btnmatrix_get_btn_text(calendar->btnm, lv_btnmatrix_get_selected_btn(calendar->b… in lv_calendar_get_pressed_date() [all …]
|
D | lv_calendar.h | 40 lv_obj_t * btnm; member
|
/lvgl-3.7.0/src/extra/widgets/tabview/ |
D | lv_tabview.c | 222 lv_obj_t * btnm; in lv_tabview_constructor() local 225 btnm = lv_btnmatrix_create(obj); in lv_tabview_constructor() 228 lv_btnmatrix_set_one_checked(btnm, true); in lv_tabview_constructor() 231 lv_btnmatrix_set_map(btnm, (const char **)tabview->map); in lv_tabview_constructor() 232 lv_obj_add_event_cb(btnm, btns_value_changed_event_cb, LV_EVENT_VALUE_CHANGED, NULL); in lv_tabview_constructor() 233 lv_obj_add_flag(btnm, LV_OBJ_FLAG_EVENT_BUBBLE); in lv_tabview_constructor() 241 lv_obj_set_size(btnm, LV_PCT(100), tabsize_create); in lv_tabview_constructor() 247 lv_obj_set_size(btnm, tabsize_create, LV_PCT(100)); in lv_tabview_constructor() 254 if(g) lv_group_add_obj(g, btnm); in lv_tabview_constructor()
|
/lvgl-3.7.0/docs/widgets/core/ |
D | btnmatrix.md | 17 The map can be set with `lv_btnmatrix_set_map(btnm, my_map)`. 25 …relative to the other button in the same row with `lv_btnmatrix_set_btn_width(btnm, btn_id, width)` 44 To set or clear a button's control attribute, use `lv_btnmatrix_set_btn_ctrl(btnm, btn_id, LV_BTNM_… 45 `lv_btnmatrix_clear_btn_ctrl(btnm, btn_id, LV_BTNMATRIX_CTRL_...)` respectively. More `LV_BTNM_CTRL… 47 …te for all buttons of a button matrix, use `lv_btnmatrix_set_btn_ctrl_all(btnm, LV_BTNM_CTRL_...)`… 48 `lv_btnmatrix_clear_btn_ctrl_all(btnm, LV_BTNMATRIX_CTRL_...)`. 50 …button matrix (similarly to the map for the text), use `lv_btnmatrix_set_ctrl_map(btnm, ctrl_map)`. 55 The "One check" feature can be enabled with `lv_btnmatrix_set_one_checked(btnm, true)` to allow onl… 68 `lv_btnmatrix_get_selected_btn(btnm)` returns the index of the most recently released or focused bu… 70 `lv_btnmatrix_get_btn_text(btnm, btn_id)` returns a pointer to the text of `btn_id`th button.
|
/lvgl-3.7.0/src/extra/widgets/msgbox/ |
D | lv_msgbox.c | 178 lv_obj_t * btnm = lv_msgbox_get_btns(mbox); in lv_msgbox_get_active_btn() local 179 return lv_btnmatrix_get_selected_btn(btnm); in lv_msgbox_get_active_btn() 184 lv_obj_t * btnm = lv_msgbox_get_btns(mbox); in lv_msgbox_get_active_btn_text() local 185 return lv_btnmatrix_get_btn_text(btnm, lv_btnmatrix_get_selected_btn(btnm)); in lv_msgbox_get_active_btn_text()
|
/lvgl-3.7.0/src/extra/widgets/keyboard/ |
D | lv_keyboard.c | 415 lv_btnmatrix_t * btnm = (lv_btnmatrix_t *)obj; in lv_keyboard_update_ctrl_map() local 416 lv_btnmatrix_ctrl_t * ctrl_map = lv_mem_alloc(btnm->btn_cnt * sizeof(lv_btnmatrix_ctrl_t)); in lv_keyboard_update_ctrl_map() 417 lv_memcpy(ctrl_map, kb_ctrl[keyboard->mode], sizeof(lv_btnmatrix_ctrl_t) * btnm->btn_cnt); in lv_keyboard_update_ctrl_map() 420 for(uint16_t i = 0; i < btnm->btn_cnt; i++) { in lv_keyboard_update_ctrl_map()
|
D | lv_keyboard.h | 53 lv_btnmatrix_t btnm; member
|
/lvgl-3.7.0/demos/widgets/ |
D | lv_demo_widgets.py | 139 btnm = lv.btnmatrix.__cast__(m.get_btnmatrix()) 141 btnm.set_btn_ctrl(1, lv.btnmatrix.CTRL.CHECK_STATE)
|
/lvgl-3.7.0/docs/ |
D | CHANGELOG.md | 2063 - btnm -> btnmatrix
|