Home
last modified time | relevance | path

Searched refs:ta (Results 1 – 25 of 25) sorted by relevance

/lvgl-3.7.0/src/widgets/
Dlv_textarea.c104 lv_textarea_t * ta = (lv_textarea_t *)obj; in lv_textarea_add_char() local
106 if(ta->one_line && (c == '\n' || c == '\r')) { in lv_textarea_add_char()
131 if(ta->pwd_mode) pwd_char_hider(obj); /*Make sure all the current text contains only '*'*/ in lv_textarea_add_char()
134 if(ta->placeholder_txt) { in lv_textarea_add_char()
135 const char * txt = lv_label_get_text(ta->label); in lv_textarea_add_char()
139 lv_label_ins_text(ta->label, ta->cursor.pos, letter_buf); /*Insert the character*/ in lv_textarea_add_char()
142 if(ta->pwd_mode) { in lv_textarea_add_char()
144 size_t realloc_size = strlen(ta->pwd_tmp) + strlen(letter_buf) + 1; in lv_textarea_add_char()
145 ta->pwd_tmp = lv_mem_realloc(ta->pwd_tmp, realloc_size); in lv_textarea_add_char()
146 LV_ASSERT_MALLOC(ta->pwd_tmp); in lv_textarea_add_char()
[all …]
/lvgl-3.7.0/examples/widgets/textarea/
Dlv_example_textarea_3.py2 ta = e.get_target()
3 txt = ta.get_text()
5 pos = ta.get_cursor_pos()
11 ta.del_char()
16 ta.del_char()
25 ta.set_cursor_pos(2)
26 ta.add_char(ord(':'))
36 ta = lv.textarea(lv.scr_act()) variable
37 ta.add_event_cb(ta_event_cb, lv.EVENT.VALUE_CHANGED, None)
38 ta.set_accepted_chars("0123456789:")
[all …]
Dlv_example_textarea_1.c6 lv_obj_t * ta = lv_event_get_target(e); in textarea_event_handler() local
7 LV_LOG_USER("Enter was pressed. The current text is: %s", lv_textarea_get_text(ta)); in textarea_event_handler()
13 lv_obj_t * ta = lv_event_get_user_data(e); in btnm_event_handler() local
16 if(strcmp(txt, LV_SYMBOL_BACKSPACE) == 0) lv_textarea_del_char(ta); in btnm_event_handler()
17 else if(strcmp(txt, LV_SYMBOL_NEW_LINE) == 0) lv_event_send(ta, LV_EVENT_READY, NULL); in btnm_event_handler()
18 else lv_textarea_add_text(ta, txt); in btnm_event_handler()
24 lv_obj_t * ta = lv_textarea_create(lv_scr_act()); in lv_example_textarea_1() local
25 lv_textarea_set_one_line(ta, true); in lv_example_textarea_1()
26 lv_obj_align(ta, LV_ALIGN_TOP_MID, 0, 10); in lv_example_textarea_1()
27 lv_obj_add_event_cb(ta, textarea_event_handler, LV_EVENT_READY, ta); in lv_example_textarea_1()
[all …]
Dlv_example_textarea_3.c15 lv_obj_t * ta = lv_textarea_create(lv_scr_act()); in lv_example_textarea_3() local
16 lv_obj_add_event_cb(ta, ta_event_cb, LV_EVENT_VALUE_CHANGED, NULL); in lv_example_textarea_3()
17 lv_textarea_set_accepted_chars(ta, "0123456789:"); in lv_example_textarea_3()
18 lv_textarea_set_max_length(ta, 5); in lv_example_textarea_3()
19 lv_textarea_set_one_line(ta, true); in lv_example_textarea_3()
20 lv_textarea_set_text(ta, ""); in lv_example_textarea_3()
26 lv_keyboard_set_textarea(kb, ta); in lv_example_textarea_3()
31 lv_obj_t * ta = lv_event_get_target(e); in ta_event_cb() local
32 const char * txt = lv_textarea_get_text(ta); in ta_event_cb()
36 lv_textarea_set_cursor_pos(ta, 2); in ta_event_cb()
[all …]
Dlv_example_textarea_1.py1 def textarea_event_handler(e, ta): argument
2 print("Enter was pressed. The current text is: " + ta.get_text())
5 def btnm_event_handler(e, ta): argument
9 ta.del_char()
11 lv.event_send(ta, lv.EVENT.READY, None)
13 ta.add_text(txt)
16 ta = lv.textarea(lv.scr_act()) variable
17 ta.set_one_line(True)
18 ta.align(lv.ALIGN.TOP_MID, 0, 10)
19 ta.add_event_cb(lambda e: textarea_event_handler(e, ta), lv.EVENT.READY, None)
[all …]
Dlv_example_textarea_2.c47 lv_obj_t * ta = lv_event_get_target(e); in ta_event_cb() local
50 if(kb != NULL) lv_keyboard_set_textarea(kb, ta); in ta_event_cb()
54 LV_LOG_USER("Ready, current text: %s", lv_textarea_get_text(ta)); in ta_event_cb()
Dlv_example_textarea_2.py3 ta = e.get_target()
7 kb.set_textarea(ta)
10 print("Ready, current text: " + ta.get_text())
/lvgl-3.7.0/examples/widgets/keyboard/
Dlv_example_keyboard_1.c7 lv_obj_t * ta = lv_event_get_target(e); in ta_event_cb() local
10 lv_keyboard_set_textarea(kb, ta); in ta_event_cb()
26 lv_obj_t * ta; in lv_example_keyboard_1() local
27 ta = lv_textarea_create(lv_scr_act()); in lv_example_keyboard_1()
28 lv_obj_align(ta, LV_ALIGN_TOP_LEFT, 10, 10); in lv_example_keyboard_1()
29 lv_obj_add_event_cb(ta, ta_event_cb, LV_EVENT_ALL, kb); in lv_example_keyboard_1()
30 lv_textarea_set_placeholder_text(ta, "Hello"); in lv_example_keyboard_1()
31 lv_obj_set_size(ta, 140, 80); in lv_example_keyboard_1()
33 ta = lv_textarea_create(lv_scr_act()); in lv_example_keyboard_1()
34 lv_obj_align(ta, LV_ALIGN_TOP_RIGHT, -10, 10); in lv_example_keyboard_1()
[all …]
Dlv_example_keyboard_1.py3 ta = e.get_target()
5 kb.set_textarea(ta)
16 ta = lv.textarea(lv.scr_act()) variable
17 ta.set_width(200)
18 ta.align(lv.ALIGN.TOP_LEFT, 10, 10)
19 ta.add_event_cb(lambda e: ta_event_cb(e,kb), lv.EVENT.ALL, None)
20 ta.set_placeholder_text("Hello")
22 ta = lv.textarea(lv.scr_act()) variable
23 ta.set_width(200)
24 ta.align(lv.ALIGN.TOP_RIGHT, -10, 10)
[all …]
/lvgl-3.7.0/demos/stress/
Dlv_demo_stress.c34 static lv_obj_t * ta; variable
151 ta = lv_textarea_create(lv_scr_act()); in obj_test_timer_cb()
152 lv_obj_align_to(ta, main_page, LV_ALIGN_OUT_RIGHT_TOP, 10, 10); in obj_test_timer_cb()
153 lv_obj_set_size(ta, LV_HOR_RES / 3, LV_VER_RES / 4); in obj_test_timer_cb()
154 lv_textarea_set_placeholder_text(ta, "The placeholder"); in obj_test_timer_cb()
172 lv_textarea_set_one_line(ta, true); in obj_test_timer_cb()
210 … lv_textarea_set_text(ta, "A very very long text which will should make the text area scrollable" in obj_test_timer_cb()
269 lv_textarea_set_one_line(ta, false); in obj_test_timer_cb()
320 lv_textarea_set_cursor_pos(ta, 10); in obj_test_timer_cb()
321 lv_textarea_set_text(ta, "__INSERTED TEXT" LV_SYMBOL_EDIT"__"); in obj_test_timer_cb()
[all …]
/lvgl-3.7.0/src/extra/widgets/keyboard/
Dlv_keyboard.c154 void lv_keyboard_set_textarea(lv_obj_t * obj, lv_obj_t * ta) in lv_keyboard_set_textarea() argument
156 if(ta) { in lv_keyboard_set_textarea()
157 LV_ASSERT_OBJ(ta, &lv_textarea_class); in lv_keyboard_set_textarea()
164 if(keyboard->ta) { in lv_keyboard_set_textarea()
168 keyboard->ta = ta; in lv_keyboard_set_textarea()
171 if(keyboard->ta) { in lv_keyboard_set_textarea()
236 return keyboard->ta; in lv_keyboard_get_textarea()
307 if(keyboard->ta) { in lv_keyboard_def_event_cb()
308 res = lv_event_send(keyboard->ta, LV_EVENT_CANCEL, NULL); in lv_keyboard_def_event_cb()
317 if(keyboard->ta) { in lv_keyboard_def_event_cb()
[all …]
Dlv_keyboard.h54 lv_obj_t * ta; /*Pointer to the assigned text area*/ member
81 void lv_keyboard_set_textarea(lv_obj_t * kb, lv_obj_t * ta);
/lvgl-3.7.0/examples/others/msg/
Dlv_example_msg_2.c25 lv_obj_t * ta = lv_textarea_create(lv_scr_act()); in lv_example_msg_2() local
26 lv_obj_set_pos(ta, 10, 10); in lv_example_msg_2()
27 lv_obj_set_width(ta, 200); in lv_example_msg_2()
28 lv_textarea_set_one_line(ta, true); in lv_example_msg_2()
29 lv_textarea_set_password_mode(ta, true); in lv_example_msg_2()
30 lv_textarea_set_placeholder_text(ta, "The password is: hello"); in lv_example_msg_2()
31 lv_obj_add_event_cb(ta, textarea_event_cb, LV_EVENT_ALL, NULL); in lv_example_msg_2()
32 lv_msg_subsribe_obj(MSG_LOGIN_ERROR, ta, NULL); in lv_example_msg_2()
33 lv_msg_subsribe_obj(MSG_LOGIN_OK, ta, NULL); in lv_example_msg_2()
34 lv_msg_subsribe_obj(MSG_LOG_OUT, ta, NULL); in lv_example_msg_2()
[all …]
/lvgl-3.7.0/examples/others/ime/
Dlv_example_ime_pinyin_1.c7 lv_obj_t * ta = lv_event_get_target(e); in ta_event_cb() local
12 lv_keyboard_set_textarea(kb, ta); in ta_event_cb()
18 lv_obj_clear_state(ta, LV_STATE_FOCUSED); in ta_event_cb()
19 lv_indev_reset(NULL, ta); /*To forget the last clicked object to make it focusable again*/ in ta_event_cb()
Dlv_example_ime_pinyin_2.c7 lv_obj_t * ta = lv_event_get_target(e); in ta_event_cb() local
12 lv_keyboard_set_textarea(kb, ta); in ta_event_cb()
18 lv_obj_clear_state(ta, LV_STATE_FOCUSED); in ta_event_cb()
19 lv_indev_reset(NULL, ta); /*To forget the last clicked object to make it focusable again*/ in ta_event_cb()
/lvgl-3.7.0/examples/others/gridnav/
Dlv_example_gridnav_1.c54 lv_obj_t * ta = lv_textarea_create(cont2); in lv_example_gridnav_1() local
55 lv_obj_set_size(ta, lv_pct(100), 80); in lv_example_gridnav_1()
56 lv_obj_set_pos(ta, 0, 80); in lv_example_gridnav_1()
57 lv_group_remove_obj(ta); /*Not needed, we use the gridnav instead*/ in lv_example_gridnav_1()
/lvgl-3.7.0/src/extra/others/ime/
Dlv_ime_pinyin.c651 lv_obj_t * ta = lv_keyboard_get_textarea(pinyin_ime->kb); in lv_ime_pinyin_kb_event() local
660 lv_textarea_del_char(ta); in lv_ime_pinyin_kb_event()
665 lv_textarea_add_text(ta, pinyin_ime->input_char); in lv_ime_pinyin_kb_event()
777 lv_obj_t * ta = lv_keyboard_get_textarea(pinyin_ime->kb); in lv_ime_pinyin_cand_panel_event() local
780 lv_textarea_del_char(ta); in lv_ime_pinyin_cand_panel_event()
782 lv_textarea_add_text(ta, txt); in lv_ime_pinyin_cand_panel_event()
1116 lv_obj_t * ta = lv_keyboard_get_textarea(pinyin_ime->kb); in pinyin_k9_fill_cand() local
1118 lv_textarea_del_char(ta); in pinyin_k9_fill_cand()
1121 lv_textarea_add_text(ta, pinyin_ime->input_char); in pinyin_k9_fill_cand()
1128 lv_obj_t * ta = lv_keyboard_get_textarea(pinyin_ime->kb); in pinyin_k9_cand_page_proc() local
[all …]
/lvgl-3.7.0/demos/widgets/
Dlv_demo_widgets.py214 ta = lv.textarea(h, None)
216 ta.set_text("")
217 ta.set_placeholder_text("E-mail address")
218 ta.set_one_line(True)
219 ta.set_cursor_hidden(True)
222 ta = lv.textarea(h, ta)
223 ta.set_pwd_mode(True)
224 ta.set_placeholder_text("Password")
226 ta = lv.textarea(h, None)
228 ta.set_text("")
[all …]
Dlv_demo_widgets.c1213 lv_obj_t * ta = lv_event_get_target(e); in ta_event_cb() local
1217 lv_keyboard_set_textarea(kb, ta); in ta_event_cb()
1222 lv_obj_scroll_to_view_recursive(ta, LV_ANIM_OFF); in ta_event_cb()
1229 lv_indev_reset(NULL, ta); in ta_event_cb()
1235 lv_obj_clear_state(ta, LV_STATE_FOCUSED); in ta_event_cb()
1236 lv_indev_reset(NULL, ta); /*To forget the last clicked object to make it focusable again*/ in ta_event_cb()
1243 lv_obj_t * ta = lv_event_get_target(e); in birthday_event_cb() local
1257 lv_obj_add_event_cb(calendar, calendar_event_cb, LV_EVENT_ALL, ta); in birthday_event_cb()
1268 lv_obj_t * ta = lv_event_get_user_data(e); in calendar_event_cb() local
1275 lv_textarea_set_text(ta, buf); in calendar_event_cb()
/lvgl-3.7.0/src/extra/widgets/spinbox/
Dlv_spinbox.c392 if(txt[spinbox->ta.cursor.pos] == '.') { in lv_spinbox_event()
395 else if(spinbox->ta.cursor.pos == (uint32_t)txt_len) { in lv_spinbox_event()
398 else if(spinbox->ta.cursor.pos == 0 && spinbox->range_min < 0) { in lv_spinbox_event()
403 uint16_t cp = spinbox->ta.cursor.pos; in lv_spinbox_event()
405 if(spinbox->ta.cursor.pos > spinbox->dec_point_pos && spinbox->dec_point_pos != 0) cp--; in lv_spinbox_event()
Dlv_spinbox.h36 lv_textarea_t ta; /*Ext. of ancestor*/ member
/lvgl-3.7.0/demos/keypad_encoder/
Dlv_demo_keypad_encoder.c211 lv_obj_t * ta = lv_event_get_target(e); in ta_event_cb() local
215 lv_keyboard_set_textarea(kb, ta); in ta_event_cb()
/lvgl-3.7.0/docs/widgets/core/
Dtextarea.md29 To add wide characters like `'á'`, `'ß'` or CJK characters use `lv_textarea_add_text(ta, "á")`.
31 `lv_textarea_set_text(ta, "New text")` changes the whole text.
35 …layed when the Text area is empty - with `lv_textarea_set_placeholder_text(ta, "Placeholder text")`
/lvgl-3.7.0/docs/widgets/extra/
Dkeyboard.md30 To assign the text area, use `lv_keyboard_set_textarea(kb, ta)`.
/lvgl-3.7.0/docs/
DCHANGELOG.md2058 - ta -> textarea