Lines Matching refs:lv
17 col_dsc = [lv.grid_fr(1), 200, lv.grid_fr(1), lv.GRID_TEMPLATE.LAST]
18 row_dsc = [30, 10, 10, lv.grid_fr(1),lv.GRID_TEMPLATE.LAST]
22 self.cont = lv.obj(lv.scr_act())
23 self.cont.set_style_pad_all(2, lv.PART.MAIN)
24 self.cont.set_style_pad_column(10, lv.PART.MAIN)
25 self.cont.set_style_pad_row(10, lv.PART.MAIN)
31 self.a = lv.anim_t()
34 … end = self.cont.get_style_width(lv.PART.MAIN) - self.anim_obj.get_style_width(lv.PART.MAIN) - 10
42 self.anim_obj = lv.obj(par)
44 self.anim_obj.set_align(lv.ALIGN.TOP_LEFT)
45 self.anim_obj.clear_flag(lv.obj.FLAG.SCROLLABLE)
46 self.anim_obj.set_style_bg_color(lv.palette_main(lv.PALETTE.RED), lv.PART.MAIN)
47 self.anim_obj.set_grid_cell(lv.GRID_ALIGN.START, 0, 1,lv.GRID_ALIGN.START, 0, 1)
49 self.p1_label = lv.label(par)
50 self.p2_label = lv.label(par)
53 self.p1_label.set_grid_cell(lv.GRID_ALIGN.START, 0, 1,lv.GRID_ALIGN.START, 1, 1)
54 self.p2_label.set_grid_cell(lv.GRID_ALIGN.START, 0, 1,lv.GRID_ALIGN.START, 2, 1)
56 self.p1_slider = lv.slider(par)
57 self.p2_slider = lv.slider(par)
60 self.p1_slider.set_style_pad_all(2, lv.PART.KNOB)
61 self.p2_slider.set_style_pad_all(2, lv.PART.KNOB)
62 self.p1_slider.add_event_cb(self.slider_event_cb, lv.EVENT.VALUE_CHANGED, None)
63 self.p2_slider.add_event_cb(self.slider_event_cb, lv.EVENT.VALUE_CHANGED, None)
64 self.p1_slider.set_grid_cell(lv.GRID_ALIGN.STRETCH, 1, 1,lv.GRID_ALIGN.START, 1, 1)
65 self.p2_slider.set_grid_cell(lv.GRID_ALIGN.STRETCH, 1, 1,lv.GRID_ALIGN.START, 2, 1)
67 self.run_btn = lv.btn(par)
68 self.run_btn.add_event_cb(self.run_btn_event_handler, lv.EVENT.CLICKED, None)
69 btn_label = lv.label(self.run_btn)
70 btn_label.set_text(lv.SYMBOL.PLAY)
72 self.run_btn.set_grid_cell(lv.GRID_ALIGN.STRETCH, 2, 1,lv.GRID_ALIGN.STRETCH, 1, 2)
74 self.chart = lv.chart(par)
75 self.chart.set_style_pad_all(0, lv.PART.MAIN)
76 self.chart.set_style_size(0, lv.PART.INDICATOR)
77 self.chart.set_type(lv.chart.TYPE.SCATTER)
78 self.ser1 = self.chart.add_series(lv.palette_main(lv.PALETTE.RED), lv.chart.AXIS.PRIMARY_Y)
79 self.chart.set_range(lv.chart.AXIS.PRIMARY_Y, 0, 1024)
80 self.chart.set_range(lv.chart.AXIS.PRIMARY_X, 0, 1024)
82 self.chart.set_grid_cell(lv.GRID_ALIGN.STRETCH, 0, 3,lv.GRID_ALIGN.STRETCH, 3, 1)
87 step = lv.bezier3(t, 0, self.p1, self.p2, 1024)
109 if code == lv.EVENT.CLICKED:
110 lv.anim_t.start(self.a)
113 var.set_style_translate_x(v, lv.PART.MAIN)
116 t = lv.map(a.act_time, 0, a.time, 0, 1024)
117 step = lv.bezier3(t, 0, self.p1, self.p2, 1024)