FluxDC/SquareLineProj/Export/components/ui_comp_button1.c

48 lines
1.6 KiB
C
Raw Normal View History

2025-03-28 10:13:22 +08:00
// This file was generated by SquareLine Studio
// SquareLine Studio version: SquareLine Studio 1.5.1
// LVGL version: 8.3.6
// Project name: ESP32S3_UI
#include "../ui.h"
void ui_event_comp_Button1_Button1(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
lv_obj_t ** comp_Button1 = lv_event_get_user_data(e);
if(event_code == LV_EVENT_CLICKED) {
on_buttonTimeUpdate_clicked(e);
}
}
// COMPONENT Button1
lv_obj_t * ui_Button1_create(lv_obj_t * comp_parent)
{
lv_obj_t * cui_Button1;
cui_Button1 = lv_btn_create(comp_parent);
lv_obj_set_width(cui_Button1, 140);
lv_obj_set_height(cui_Button1, 50);
lv_obj_set_x(cui_Button1, 2);
lv_obj_set_y(cui_Button1, -54);
lv_obj_set_align(cui_Button1, LV_ALIGN_CENTER);
lv_obj_t * cui_Label8;
cui_Label8 = lv_label_create(cui_Button1);
lv_obj_set_width(cui_Label8, LV_SIZE_CONTENT); /// 1
lv_obj_set_height(cui_Label8, LV_SIZE_CONTENT); /// 1
lv_obj_set_align(cui_Label8, LV_ALIGN_CENTER);
lv_label_set_text(cui_Label8, "Update");
lv_obj_t ** children = lv_mem_alloc(sizeof(lv_obj_t *) * _UI_COMP_BUTTON1_NUM);
children[UI_COMP_BUTTON1_BUTTON1] = cui_Button1;
children[UI_COMP_BUTTON1_LABEL8] = cui_Label8;
lv_obj_add_event_cb(cui_Button1, get_component_child_event_cb, LV_EVENT_GET_COMP_CHILD, children);
lv_obj_add_event_cb(cui_Button1, del_component_child_event_cb, LV_EVENT_DELETE, children);
lv_obj_add_event_cb(cui_Button1, ui_event_comp_Button1_Button1, LV_EVENT_ALL, children);
ui_comp_Button1_create_hook(cui_Button1);
return cui_Button1;
}