Lines Matching refs:ext
81 lv_msgbox_ext_t * ext = lv_obj_allocate_ext_attr(mbox, sizeof(lv_msgbox_ext_t)); in lv_msgbox_create() local
82 LV_ASSERT_MEM(ext); in lv_msgbox_create()
83 if(ext == NULL) { in lv_msgbox_create()
88 ext->text = NULL; in lv_msgbox_create()
89 ext->btnm = NULL; in lv_msgbox_create()
91 ext->anim_time = LV_MSGBOX_CLOSE_ANIM_TIME; in lv_msgbox_create()
99 ext->text = lv_label_create(mbox, NULL); in lv_msgbox_create()
100 lv_label_set_align(ext->text, LV_LABEL_ALIGN_CENTER); in lv_msgbox_create()
101 lv_label_set_long_mode(ext->text, LV_LABEL_LONG_BREAK); in lv_msgbox_create()
102 lv_label_set_text(ext->text, "Message"); in lv_msgbox_create()
124 ext->text = lv_label_create(mbox, copy_ext->text); in lv_msgbox_create()
127 if(copy_ext->btnm) ext->btnm = lv_btnmatrix_create(mbox, copy_ext->btnm); in lv_msgbox_create()
153 lv_msgbox_ext_t * ext = lv_obj_get_ext_attr(mbox); in lv_msgbox_add_btns() local
156 if(ext->btnm == NULL) { in lv_msgbox_add_btns()
157 ext->btnm = lv_btnmatrix_create(mbox, NULL); in lv_msgbox_add_btns()
162 lv_btnmatrix_set_map(ext->btnm, btn_map); in lv_msgbox_add_btns()
163 …lv_btnmatrix_set_btn_ctrl_all(ext->btnm, LV_BTNMATRIX_CTRL_CLICK_TRIG | LV_BTNMATRIX_CTRL_NO_REPEA… in lv_msgbox_add_btns()
164 lv_obj_set_event_cb(ext->btnm, lv_msgbox_btnm_event_cb); in lv_msgbox_add_btns()
169 lv_obj_set_state(ext->btnm, LV_STATE_FOCUSED | LV_STATE_EDITED); in lv_msgbox_add_btns()
172 lv_obj_set_state(ext->btnm, LV_STATE_FOCUSED); in lv_msgbox_add_btns()
175 lv_btnmatrix_set_focused_btn(ext->btnm, 0); in lv_msgbox_add_btns()
195 lv_msgbox_ext_t * ext = lv_obj_get_ext_attr(mbox); in lv_msgbox_set_text() local
196 lv_label_set_text(ext->text, txt); in lv_msgbox_set_text()
211 lv_msgbox_ext_t * ext = lv_obj_get_ext_attr(mbox); in lv_msgbox_set_anim_time() local
213 ext->anim_time = anim_time; in lv_msgbox_set_anim_time()
291 lv_msgbox_ext_t * ext = lv_obj_get_ext_attr(mbox); in lv_msgbox_set_recolor() local
293 if(ext->btnm) lv_btnmatrix_set_recolor(ext->btnm, en); in lv_msgbox_set_recolor()
309 lv_msgbox_ext_t * ext = lv_obj_get_ext_attr(mbox); in lv_msgbox_get_text() local
311 return lv_label_get_text(ext->text); in lv_msgbox_get_text()
324 lv_msgbox_ext_t * ext = lv_obj_get_ext_attr(mbox); in lv_msgbox_get_active_btn() local
325 if(ext->btnm == NULL) return LV_BTNMATRIX_BTN_NONE; in lv_msgbox_get_active_btn()
327 uint16_t id = lv_btnmatrix_get_active_btn(ext->btnm); in lv_msgbox_get_active_btn()
329 id = lv_btnmatrix_get_focused_btn(ext->btnm); in lv_msgbox_get_active_btn()
345 lv_msgbox_ext_t * ext = lv_obj_get_ext_attr(mbox); in lv_msgbox_get_active_btn_text() local
346 if(ext->btnm) in lv_msgbox_get_active_btn_text()
347 return lv_btnmatrix_get_active_btn_text(ext->btnm); in lv_msgbox_get_active_btn_text()
362 lv_msgbox_ext_t * ext = lv_obj_get_ext_attr(mbox); in lv_msgbox_get_anim_time() local
363 return ext->anim_time; in lv_msgbox_get_anim_time()
379 lv_msgbox_ext_t * ext = lv_obj_get_ext_attr(mbox); in lv_msgbox_get_recolor() local
381 if(!ext->btnm) return false; in lv_msgbox_get_recolor()
383 return lv_btnmatrix_get_recolor(ext->btnm); in lv_msgbox_get_recolor()
396 lv_msgbox_ext_t * ext = lv_obj_get_ext_attr(mbox); in lv_msgbox_get_btnmatrix() local
397 return ext->btnm; in lv_msgbox_get_btnmatrix()
435 lv_msgbox_ext_t * ext = lv_obj_get_ext_attr(mbox); in lv_msgbox_signal() local
436 if(ext->btnm && info->part == LV_MSGBOX_PART_BTN_BG) { in lv_msgbox_signal()
437 info->result = lv_obj_get_state(ext->btnm, LV_BTNMATRIX_PART_BG); in lv_msgbox_signal()
439 else if(ext->btnm && info->part == LV_MSGBOX_PART_BTN) { in lv_msgbox_signal()
440 info->result = lv_obj_get_state(ext->btnm, LV_BTNMATRIX_PART_BTN); in lv_msgbox_signal()
450 lv_msgbox_ext_t * ext = lv_obj_get_ext_attr(mbox); in lv_msgbox_signal() local
460 if(ext->btnm) { in lv_msgbox_signal()
461 uint32_t btn_id = lv_btnmatrix_get_focused_btn(ext->btnm); in lv_msgbox_signal()
470 if(ext->btnm) { in lv_msgbox_signal()
471 ext->btnm->signal_cb(ext->btnm, sign, param); in lv_msgbox_signal()
482 … if(lv_group_get_editing(lv_obj_get_group(mbox))) lv_btnmatrix_set_focused_btn(ext->btnm, 0); in lv_msgbox_signal()
483 else lv_btnmatrix_set_focused_btn(ext->btnm, LV_BTNMATRIX_BTN_NONE); in lv_msgbox_signal()
487 if(ext->btnm && (sign == LV_SIGNAL_FOCUS || sign == LV_SIGNAL_DEFOCUS)) { in lv_msgbox_signal()
490 lv_obj_set_state(ext->btnm, LV_STATE_FOCUSED); in lv_msgbox_signal()
493 lv_obj_clear_state(ext->btnm, LV_STATE_FOCUSED); in lv_msgbox_signal()
497 lv_obj_set_state(ext->btnm, LV_STATE_EDITED); in lv_msgbox_signal()
500 lv_obj_clear_state(ext->btnm, LV_STATE_EDITED); in lv_msgbox_signal()
520 lv_msgbox_ext_t * ext = lv_obj_get_ext_attr(mbox); in lv_msgbox_get_style() local
528 style_dsc_p = ext->btnm ? lv_obj_get_style_list(ext->btnm, LV_BTNMATRIX_PART_BG) : NULL; in lv_msgbox_get_style()
531 … style_dsc_p = ext->btnm ? lv_obj_get_style_list(ext->btnm, LV_BTNMATRIX_PART_BTN) : NULL; in lv_msgbox_get_style()
546 lv_msgbox_ext_t * ext = lv_obj_get_ext_attr(mbox); in mbox_realign() local
550 if(ext->text) { in mbox_realign()
551 lv_obj_set_width(ext->text, w); in mbox_realign()
554 if(ext->btnm) { in mbox_realign()
563 const char ** btnm_map = lv_btnmatrix_get_map_array(ext->btnm); in mbox_realign()
571 …lv_obj_set_size(ext->btnm, w, btn_h * btnm_lines + bg_inner * (btnm_lines - 1) + bg_top + bg_botto… in mbox_realign()