BORDER-BOX模型
API
void lv_obj_set_style_width(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_min_width(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_max_width(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_height(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_min_height(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_max_height(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_x(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_y(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_align(lv_obj_t * obj,
lv_align_t value,
lv_style_selector_t selector);
void lv_obj_set_style_transform_width(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_transform_height(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_translate_x(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_translate_y(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_transform_zoom(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_transform_angle(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_pad_top(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_pad_bottom(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_pad_left(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_pad_right(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_pad_row(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_pad_column(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_radius(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_clip_corner(lv_obj_t * obj,
bool value,
lv_style_selector_t selector);
void lv_obj_set_style_opa(lv_obj_t * obj,
lv_opa_t value,
lv_style_selector_t selector);
void lv_obj_set_style_color_filter_dsc(lv_obj_t * obj,
const lv_color_filter_dsc_t * value,
lv_style_selector_t selector);
void lv_obj_set_style_color_filter_opa(lv_obj_t * obj,
lv_opa_t value,
lv_style_selector_t selector);
void lv_obj_set_style_anim_time(lv_obj_t * obj,
uint32_t value,
lv_style_selector_t selector);
void lv_obj_set_style_anim_speed(lv_obj_t * obj,
uint32_t value,
lv_style_selector_t selector);
void lv_obj_set_style_transition(lv_obj_t * obj,
const lv_style_transition_dsc_t * value,
lv_style_selector_t selector);
void lv_obj_set_style_blend_mode(lv_obj_t * obj,
lv_blend_mode_t value,
lv_style_selector_t selector);
void lv_obj_set_style_layout(lv_obj_t * obj,
uint16_t value,
lv_style_selector_t selector);
void lv_obj_set_style_base_dir(lv_obj_t * obj,
lv_base_dir_t value,
lv_style_selector_t selector);
void lv_obj_set_style_bg_color(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_bg_color_filtered(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_bg_opa(lv_obj_t * obj,
lv_opa_t value,
lv_style_selector_t selector);
void lv_obj_set_style_bg_grad_color(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_bg_grad_color_filtered(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_bg_grad_dir(lv_obj_t * obj,
lv_grad_dir_t value,
lv_style_selector_t selector);
void lv_obj_set_style_bg_main_stop(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_bg_grad_stop(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_bg_img_src(lv_obj_t * obj,
const void * value,
lv_style_selector_t selector);
void lv_obj_set_style_bg_img_opa(lv_obj_t * obj,
lv_opa_t value,
lv_style_selector_t selector);
void lv_obj_set_style_bg_img_recolor(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_bg_img_recolor_filtered(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_bg_img_recolor_opa(lv_obj_t * obj,
lv_opa_t value,
lv_style_selector_t selector);
void lv_obj_set_style_bg_img_tiled(lv_obj_t * obj,
bool value,
lv_style_selector_t selector);
void lv_obj_set_style_border_color(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_border_color_filtered(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_border_opa(lv_obj_t * obj,
lv_opa_t value,
lv_style_selector_t selector);
void lv_obj_set_style_border_width(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_border_side(lv_obj_t * obj,
lv_border_side_t value,
lv_style_selector_t selector);
void lv_obj_set_style_border_post(lv_obj_t * obj,
bool value,
lv_style_selector_t selector);
void lv_obj_set_style_text_color(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_text_color_filtered(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_text_opa(lv_obj_t * obj,
lv_opa_t value,
lv_style_selector_t selector);
void lv_obj_set_style_text_font(lv_obj_t * obj,
const lv_font_t * value,
lv_style_selector_t selector);
void lv_obj_set_style_text_letter_space(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_text_line_space(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_text_decor(lv_obj_t * obj,
lv_text_decor_t value,
lv_style_selector_t selector);
void lv_obj_set_style_text_align(lv_obj_t * obj,
lv_text_align_t value,
lv_style_selector_t selector);
void lv_obj_set_style_img_opa(lv_obj_t * obj,
lv_opa_t value,
lv_style_selector_t selector);
void lv_obj_set_style_img_recolor(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_img_recolor_filtered(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_img_recolor_opa(lv_obj_t * obj,
lv_opa_t value,
lv_style_selector_t selector);
void lv_obj_set_style_outline_width(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_outline_color(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_outline_color_filtered(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_outline_opa(lv_obj_t * obj,
lv_opa_t value,
lv_style_selector_t selector);
void lv_obj_set_style_outline_pad(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_shadow_width(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_shadow_ofs_x(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_shadow_ofs_y(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_shadow_spread(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_shadow_color(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_shadow_color_filtered(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_shadow_opa(lv_obj_t * obj,
lv_opa_t value,
lv_style_selector_t selector);
void lv_obj_set_style_line_width(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_line_dash_width(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_line_dash_gap(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_line_rounded(lv_obj_t * obj,
bool value,
lv_style_selector_t selector);
void lv_obj_set_style_line_color(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_line_color_filtered(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_line_opa(lv_obj_t * obj,
lv_opa_t value,
lv_style_selector_t selector);
void lv_obj_set_style_arc_width(lv_obj_t * obj,
lv_coord_t value,
lv_style_selector_t selector);
void lv_obj_set_style_arc_rounded(lv_obj_t * obj,
bool value,
lv_style_selector_t selector);
void lv_obj_set_style_arc_color(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_arc_color_filtered(lv_obj_t * obj,
lv_color_t value,
lv_style_selector_t selector);
void lv_obj_set_style_arc_opa(lv_obj_t * obj,
lv_opa_t value,
lv_style_selector_t selector);
void lv_obj_set_style_arc_img_src(lv_obj_t * obj,
const void * value,
lv_style_selector_t selector);
/**
* 部件可能的部分
* 部件可以被视为小部件的内部构建块.
* 例如:滑块=背景+指示器+旋钮
* 注意,每个部件都使用每个部分
*/
enum {
LV_PART_MAIN = 0x000000, /**< 背景矩形 */
LV_PART_SCROLLBAR = 0x010000, /**< 滚动条 */
LV_PART_INDICATOR = 0x020000, /**< 指示器,例如用于滑块、条、开关或复选框中的勾选框 */
LV_PART_KNOB = 0x030000, /**< 类似抓手柄来调整值 */
LV_PART_SELECTED = 0x040000, /**< 表示当前选择的选项或部分 */
LV_PART_ITEMS = 0x050000, /**< 如果小部件有多个相似的元素(例如,表格单元格) */
LV_PART_TICKS = 0x060000, /**< 刻度上的刻度,例如图表或仪表 */
LV_PART_CURSOR = 0x070000, /**< 标记一个特定的位置,如文本区域的光标或图表上 */
LV_PART_CUSTOM_FIRST = 0x080000, /**< 可以从这里添加自定义部件 */
LV_PART_ANY = 0x0F0000, /**< 在某些函数中可以使用特殊值来针对所有部分 */
};
typedef uint32_t lv_part_t;