/lvgl-3.7.0/examples/styles/ |
D | lv_example_style_15.c | 9 lv_obj_t * btn; in lv_example_style_15() local 13 btn = lv_btn_create(lv_scr_act()); in lv_example_style_15() 14 lv_obj_set_size(btn, 100, 40); in lv_example_style_15() 15 lv_obj_align(btn, LV_ALIGN_CENTER, 0, -70); in lv_example_style_15() 17 label = lv_label_create(btn); in lv_example_style_15() 23 btn = lv_btn_create(lv_scr_act()); in lv_example_style_15() 24 lv_obj_set_size(btn, 100, 40); in lv_example_style_15() 25 lv_obj_set_style_opa(btn, LV_OPA_50, 0); in lv_example_style_15() 26 lv_obj_align(btn, LV_ALIGN_CENTER, 0, 0); in lv_example_style_15() 28 label = lv_label_create(btn); in lv_example_style_15() [all …]
|
D | lv_example_style_14.c | 43 lv_obj_t * btn; in lv_example_style_14() local 46 btn = lv_btn_create(lv_scr_act()); in lv_example_style_14() 47 lv_obj_align(btn, LV_ALIGN_TOP_MID, 0, 20); in lv_example_style_14() 49 label = lv_label_create(btn); in lv_example_style_14() 54 btn = lv_btn_create(lv_scr_act()); in lv_example_style_14() 55 lv_obj_align(btn, LV_ALIGN_BOTTOM_MID, 0, -20); in lv_example_style_14() 57 label = lv_label_create(btn); in lv_example_style_14()
|
D | lv_example_style_14.py | 28 btn = lv.btn(lv.scr_act()) 29 btn.align(lv.ALIGN.TOP_MID, 0, 20) 31 label = lv.label(btn) 36 btn = lv.btn(lv.scr_act()) 37 btn.align(lv.ALIGN.BOTTOM_MID, 0, -20) 39 label = lv.label(btn)
|
/lvgl-3.7.0/examples/widgets/list/ |
D | lv_example_list_1.c | 22 lv_obj_t * btn; in lv_example_list_1() local 25 btn = lv_list_add_btn(list1, LV_SYMBOL_FILE, "New"); in lv_example_list_1() 26 lv_obj_add_event_cb(btn, event_handler, LV_EVENT_CLICKED, NULL); in lv_example_list_1() 27 btn = lv_list_add_btn(list1, LV_SYMBOL_DIRECTORY, "Open"); in lv_example_list_1() 28 lv_obj_add_event_cb(btn, event_handler, LV_EVENT_CLICKED, NULL); in lv_example_list_1() 29 btn = lv_list_add_btn(list1, LV_SYMBOL_SAVE, "Save"); in lv_example_list_1() 30 lv_obj_add_event_cb(btn, event_handler, LV_EVENT_CLICKED, NULL); in lv_example_list_1() 31 btn = lv_list_add_btn(list1, LV_SYMBOL_CLOSE, "Delete"); in lv_example_list_1() 32 lv_obj_add_event_cb(btn, event_handler, LV_EVENT_CLICKED, NULL); in lv_example_list_1() 33 btn = lv_list_add_btn(list1, LV_SYMBOL_EDIT, "Edit"); in lv_example_list_1() [all …]
|
D | lv_example_list_2.c | 122 lv_obj_t * btn; in lv_example_list_2() local 125 btn = lv_btn_create(list1); in lv_example_list_2() 126 lv_obj_set_width(btn, lv_pct(50)); in lv_example_list_2() 127 lv_obj_add_event_cb(btn, event_handler, LV_EVENT_CLICKED, NULL); in lv_example_list_2() 129 lv_obj_t * lab = lv_label_create(btn); in lv_example_list_2() 143 btn = lv_list_add_btn(list2, NULL, "Top"); in lv_example_list_2() 144 lv_obj_add_event_cb(btn, event_handler_top, LV_EVENT_ALL, NULL); in lv_example_list_2() 145 lv_group_remove_obj(btn); in lv_example_list_2() 147 btn = lv_list_add_btn(list2, LV_SYMBOL_UP, "Up"); in lv_example_list_2() 148 lv_obj_add_event_cb(btn, event_handler_up, LV_EVENT_ALL, NULL); in lv_example_list_2() [all …]
|
D | lv_example_list_2.py | 99 btn = lv.btn(list1) variable 100 btn.set_width(lv.pct(100)) 101 btn.add_event_cb( event_handler, lv.EVENT.CLICKED, None) 102 lab = lv.label(btn) 115 btn = list2.add_btn(None, "Top") variable 116 btn.add_event_cb(event_handler_top, lv.EVENT.ALL, None) 117 lv.group_remove_obj(btn) 119 btn = list2.add_btn(lv.SYMBOL.UP, "Up") variable 120 btn.add_event_cb(event_handler_up, lv.EVENT.ALL, None) 121 lv.group_remove_obj(btn) [all …]
|
/lvgl-3.7.0/examples/widgets/spinbox/ |
D | lv_example_spinbox_1.py | 20 btn = lv.btn(lv.scr_act()) variable 21 btn.set_size(h, h) 22 btn.align_to(spinbox, lv.ALIGN.OUT_RIGHT_MID, 5, 0) 23 btn.set_style_bg_img_src(lv.SYMBOL.PLUS, 0) 24 btn.add_event_cb(increment_event_cb, lv.EVENT.ALL, None) 26 btn = lv.btn(lv.scr_act()) variable 27 btn.set_size(h, h) 28 btn.align_to(spinbox, lv.ALIGN.OUT_LEFT_MID, -5, 0) 29 btn.set_style_bg_img_src(lv.SYMBOL.MINUS, 0) 30 btn.add_event_cb(decrement_event_cb, lv.EVENT.ALL, None)
|
D | lv_example_spinbox_1.c | 33 lv_obj_t * btn = lv_btn_create(lv_scr_act()); in lv_example_spinbox_1() local 34 lv_obj_set_size(btn, h, h); in lv_example_spinbox_1() 35 lv_obj_align_to(btn, spinbox, LV_ALIGN_OUT_RIGHT_MID, 5, 0); in lv_example_spinbox_1() 36 lv_obj_set_style_bg_img_src(btn, LV_SYMBOL_PLUS, 0); in lv_example_spinbox_1() 37 lv_obj_add_event_cb(btn, lv_spinbox_increment_event_cb, LV_EVENT_ALL, NULL); in lv_example_spinbox_1() 39 btn = lv_btn_create(lv_scr_act()); in lv_example_spinbox_1() 40 lv_obj_set_size(btn, h, h); in lv_example_spinbox_1() 41 lv_obj_align_to(btn, spinbox, LV_ALIGN_OUT_LEFT_MID, -5, 0); in lv_example_spinbox_1() 42 lv_obj_set_style_bg_img_src(btn, LV_SYMBOL_MINUS, 0); in lv_example_spinbox_1() 43 lv_obj_add_event_cb(btn, lv_spinbox_decrement_event_cb, LV_EVENT_ALL, NULL); in lv_example_spinbox_1()
|
/lvgl-3.7.0/examples/others/msg/ |
D | lv_example_msg_2.c | 39 lv_obj_t * btn; in lv_example_msg_2() local 43 btn = lv_btn_create(lv_scr_act()); in lv_example_msg_2() 44 lv_obj_set_pos(btn, 240, 10); in lv_example_msg_2() 45 lv_obj_add_event_cb(btn, log_out_event_cb, LV_EVENT_ALL, NULL); in lv_example_msg_2() 46 lv_msg_subsribe_obj(MSG_LOGIN_OK, btn, NULL); in lv_example_msg_2() 47 lv_msg_subsribe_obj(MSG_LOG_OUT, btn, NULL); in lv_example_msg_2() 49 label = lv_label_create(btn); in lv_example_msg_2() 62 btn = lv_btn_create(lv_scr_act()); in lv_example_msg_2() 63 lv_obj_set_pos(btn, 10, 80); in lv_example_msg_2() 64 lv_obj_add_event_cb(btn, start_engine_msg_event_cb, LV_EVENT_MSG_RECEIVED, NULL); in lv_example_msg_2() [all …]
|
D | lv_example_msg_3.c | 38 lv_obj_t * btn; in lv_example_msg_3() local 42 btn = lv_btn_create(panel); in lv_example_msg_3() 43 lv_obj_set_flex_grow(btn, 1); in lv_example_msg_3() 44 lv_obj_add_event_cb(btn, btn_event_cb, LV_EVENT_ALL, NULL); in lv_example_msg_3() 45 label = lv_label_create(btn); in lv_example_msg_3() 58 btn = lv_btn_create(panel); in lv_example_msg_3() 59 lv_obj_set_flex_grow(btn, 1); in lv_example_msg_3() 60 lv_obj_add_event_cb(btn, btn_event_cb, LV_EVENT_ALL, NULL); in lv_example_msg_3() 61 label = lv_label_create(btn); in lv_example_msg_3() 109 lv_obj_t * btn = lv_event_get_target(e); in btn_event_cb() local [all …]
|
/lvgl-3.7.0/demos/music/ |
D | lv_demo_music_list.c | 147 lv_obj_t * btn = lv_obj_get_child(list, track_id); in _lv_demo_music_list_btn_check() local 148 lv_obj_t * icon = lv_obj_get_child(btn, 0); in _lv_demo_music_list_btn_check() 151 lv_obj_add_state(btn, LV_STATE_CHECKED); in _lv_demo_music_list_btn_check() 153 lv_obj_scroll_to_view(btn, LV_ANIM_ON); in _lv_demo_music_list_btn_check() 156 lv_obj_clear_state(btn, LV_STATE_CHECKED); in _lv_demo_music_list_btn_check() 173 lv_obj_t * btn = lv_obj_create(parent); in add_list_btn() local 174 lv_obj_remove_style_all(btn); in add_list_btn() 176 lv_obj_set_size(btn, lv_pct(100), 110); in add_list_btn() 178 lv_obj_set_size(btn, lv_pct(100), 60); in add_list_btn() 181 lv_obj_add_style(btn, &style_btn, 0); in add_list_btn() [all …]
|
/lvgl-3.7.0/examples/get_started/ |
D | lv_example_get_started_1.py | 8 btn = lv.btn(lv.scr_act()) # Add a button the current screen 9 btn.set_pos(10, 10) # Set its position 10 btn.set_size(120, 50) # Set its size 11 btn.align(lv.ALIGN.CENTER,0,0) 12 btn.add_event_cb(self.btn_event_cb, lv.EVENT.ALL, None) # Assign a callback to the button 13 label = lv.label(btn) # Add a label to the button 19 btn = evt.get_target() 24 label = btn.get_child(0)
|
D | lv_example_get_started_1.c | 7 lv_obj_t * btn = lv_event_get_target(e); in btn_event_cb() local 13 lv_obj_t * label = lv_obj_get_child(btn, 0); in btn_event_cb() 23 lv_obj_t * btn = lv_btn_create(lv_scr_act()); /*Add a button the current screen*/ in lv_example_get_started_1() local 24 lv_obj_set_pos(btn, 10, 10); /*Set its position*/ in lv_example_get_started_1() 25 lv_obj_set_size(btn, 120, 50); /*Set its size*/ in lv_example_get_started_1() 26 …lv_obj_add_event_cb(btn, btn_event_cb, LV_EVENT_ALL, NULL); /*Assign a callback to the b… in lv_example_get_started_1() 28 lv_obj_t * label = lv_label_create(btn); /*Add a label to the button*/ in lv_example_get_started_1()
|
D | lv_example_get_started_2.py | 35 btn = lv.btn(lv.scr_act()) # Add a button the current screen variable 39 btn.remove_style_all() # Remove the styles coming from the theme 40 btn.set_pos(10, 10) # Set its position 41 btn.set_size(120, 50) # Set its size 42 btn.add_style(style_btn, 0) 43 btn.add_style(style_btn_pressed, lv.STATE.PRESSED) 45 label = lv.label(btn) # Add a label to the button 50 btn2 = lv.btn(lv.scr_act())
|
D | lv_example_get_started_2.c | 53 lv_obj_t * btn = lv_btn_create(lv_scr_act()); in lv_example_get_started_2() local 57 lv_obj_remove_style_all(btn); in lv_example_get_started_2() 58 lv_obj_set_pos(btn, 10, 10); in lv_example_get_started_2() 59 lv_obj_set_size(btn, 120, 50); in lv_example_get_started_2() 60 lv_obj_add_style(btn, &style_btn, 0); in lv_example_get_started_2() 61 lv_obj_add_style(btn, &style_btn_pressed, LV_STATE_PRESSED); in lv_example_get_started_2() 64 lv_obj_t * label = lv_label_create(btn); in lv_example_get_started_2()
|
/lvgl-3.7.0/examples/others/gridnav/ |
D | lv_example_gridnav_3.c | 36 lv_obj_t * btn; in lv_example_gridnav_3() local 39 btn = lv_btn_create(cont_main); in lv_example_gridnav_3() 40 lv_group_remove_obj(btn); in lv_example_gridnav_3() 41 label = lv_label_create(btn); in lv_example_gridnav_3() 44 btn = lv_btn_create(cont_main); in lv_example_gridnav_3() 45 lv_group_remove_obj(btn); in lv_example_gridnav_3() 46 label = lv_label_create(btn); in lv_example_gridnav_3() 85 btn = lv_btn_create(cont_sub2); in lv_example_gridnav_3() 86 lv_group_remove_obj(btn); in lv_example_gridnav_3() 87 label = lv_label_create(btn); in lv_example_gridnav_3() [all …]
|
/lvgl-3.7.0/examples/event/ |
D | lv_example_event_1.py | 8 btn = lv.btn(lv.scr_act()) 9 btn.set_size(100, 50) 10 btn.center() 11 btn.add_event_cb(self.event_cb, lv.EVENT.CLICKED, None) 13 label = lv.label(btn) 20 btn = e.get_target() 21 label = btn.get_child(0)
|
D | lv_example_event_1.c | 9 lv_obj_t * btn = lv_event_get_target(e); in event_cb() local 10 lv_obj_t * label = lv_obj_get_child(btn, 0); in event_cb() 20 lv_obj_t * btn = lv_btn_create(lv_scr_act()); in lv_example_event_1() local 21 lv_obj_set_size(btn, 100, 50); in lv_example_event_1() 22 lv_obj_center(btn); in lv_example_event_1() 23 lv_obj_add_event_cb(btn, event_cb, LV_EVENT_CLICKED, NULL); in lv_example_event_1() 25 lv_obj_t * label = lv_label_create(btn); in lv_example_event_1()
|
D | lv_example_event_2.py | 11 btn = lv.btn(lv.scr_act()) variable 12 btn.set_size(100, 50) 13 btn.center() 15 btn_label = lv.label(btn) 22 btn.add_event_cb(lambda e: event_cb(e,info_label), lv.EVENT.ALL, None)
|
D | lv_example_event_3.py | 8 if type(target) != type(lv.btn()): 24 btn = lv.btn(cont) variable 25 btn.set_size(80, 50) 26 btn.add_flag(lv.obj.FLAG.EVENT_BUBBLE) 28 label = lv.label(btn)
|
D | lv_example_event_2.c | 32 lv_obj_t * btn = lv_btn_create(lv_scr_act()); in lv_example_event_2() local 33 lv_obj_set_size(btn, 100, 50); in lv_example_event_2() 34 lv_obj_center(btn); in lv_example_event_2() 36 lv_obj_t * btn_label = lv_label_create(btn); in lv_example_event_2() 43 lv_obj_add_event_cb(btn, event_cb, LV_EVENT_ALL, info_label); in lv_example_event_2()
|
D | lv_example_event_3.c | 32 lv_obj_t * btn = lv_btn_create(cont); in lv_example_event_3() local 33 lv_obj_set_size(btn, 80, 50); in lv_example_event_3() 34 lv_obj_add_flag(btn, LV_OBJ_FLAG_EVENT_BUBBLE); in lv_example_event_3() 36 lv_obj_t * label = lv_label_create(btn); in lv_example_event_3()
|
/lvgl-3.7.0/examples/widgets/win/ |
D | lv_example_win_1.c | 13 lv_obj_t * btn; in lv_example_win_1() local 14 btn = lv_win_add_btn(win, LV_SYMBOL_LEFT, 40); in lv_example_win_1() 15 lv_obj_add_event_cb(btn, event_handler, LV_EVENT_CLICKED, NULL); in lv_example_win_1() 19 btn = lv_win_add_btn(win, LV_SYMBOL_RIGHT, 40); in lv_example_win_1() 20 lv_obj_add_event_cb(btn, event_handler, LV_EVENT_CLICKED, NULL); in lv_example_win_1() 22 btn = lv_win_add_btn(win, LV_SYMBOL_CLOSE, 60); in lv_example_win_1() 23 lv_obj_add_event_cb(btn, event_handler, LV_EVENT_CLICKED, NULL); in lv_example_win_1()
|
/lvgl-3.7.0/examples/widgets/tileview/ |
D | lv_example_tileview_1.py | 17 btn = lv.btn(tile2) variable 19 label = lv.label(btn) 22 btn.set_size(lv.SIZE.CONTENT, lv.SIZE.CONTENT) 23 btn.center()
|
/lvgl-3.7.0/docs/widgets/extra/ |
D | menu.md | 10 - Back btn: [lv_btn](/widgets/core/btn) 11 - Back btn icon: [lv_img](/widgets/core/img) 15 - Back btn: [lv_btn](/widgets/core/btn) 16 - Back btn icon: [lv_img](/widgets/core/img) 50 For instance, you have created a btn obj in the main page. When you click the btn obj, you want it … 65 - `LV_EVENT_CLICKED` Sent when a back btn in a header from either main or sidebar is clicked. `LV_O… 66 - `lv_menu_back_btn_is_root(menu, btn)` to check if btn is root back btn
|