pub struct Style { /* private fields */ }Expand description
RAII wrapper around lv_style_t. Calls lv_style_reset on drop.
Implementations§
Source§impl Style
impl Style
Sourcepub fn as_mut_ptr(&mut self) -> *mut lv_style_t
pub fn as_mut_ptr(&mut self) -> *mut lv_style_t
Return a raw mutable pointer for use with Styleable::add_style.
Sourcepub fn ptr(&self) -> *mut lv_style_t
pub fn ptr(&self) -> *mut lv_style_t
Return the raw pointer from a shared reference, for APIs where LVGL
only reads through the pointer (e.g. lv_obj_add_style,
lv_scale_section_set_style). LVGL conventionally does not mutate
styles once they’ve been applied.
Sourcepub fn bg_opa(self, opa: u8) -> Self
pub fn bg_opa(self, opa: u8) -> Self
Set the background opacity in this style (0 = transparent, 255 = opaque).
Sourcepub fn border_color(self, c: Color) -> Self
pub fn border_color(self, c: Color) -> Self
Set the border color in this style.
Sourcepub fn border_width(self, w: i32) -> Self
pub fn border_width(self, w: i32) -> Self
Set the border width in this style.
Sourcepub fn text_color(self, c: Color) -> Self
pub fn text_color(self, c: Color) -> Self
Set the text color in this style.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Unpin for Style
impl UnsafeUnpin for Style
impl UnwindSafe for Style
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more