Skip to main content

UiElement

Struct UiElement 

Source
pub struct UiElement {
Show 28 fields pub id: u32, pub parent_id: Option<u32>, pub role: String, pub semantic_role: Option<&'static str>, pub name: Option<String>, pub text: Option<String>, pub hidden: bool, pub disabled: bool, pub focused: bool, pub clickable: bool, pub checked: Option<bool>, pub bounds: (i32, i32, i32, i32), pub visible: bool, pub clipped_bounds: Option<(i32, i32, i32, i32)>, pub layer: &'static str, pub redacted: bool, pub text_truncated: bool, pub name_truncated: bool, pub state: u32, pub scroll: (i32, i32), pub value: Option<i32>, pub range: Option<(i32, i32)>, pub selected: Option<u32>, pub selected_text: Option<String>, pub selected_text_truncated: bool, pub style: UiStyle, pub buttons: Vec<UiButton>, pub buttons_truncated: bool,
}
Expand description

A bounded, pointer-free description of one LVGL object.

Fields§

§id: u32

Position in the depth-first snapshot, valid only for that snapshot.

§parent_id: Option<u32>§role: String

LVGL class name, retained for compatibility and custom widgets.

§semantic_role: Option<&'static str>

Semantic role for supported widgets; absent for unknown classes.

§name: Option<String>

Direct label or placeholder, capped to 128 input bytes.

§text: Option<String>

Raw text from labels and text areas, as in the original snapshot API.

§hidden: bool

The object or an ancestor is marked hidden (independent of clipping).

§disabled: bool

The object is marked disabled by LVGL.

§focused: bool§clickable: bool

LVGL clickable flag, not a guarantee that the object can be hit.

§checked: Option<bool>§bounds: (i32, i32, i32, i32)

Inclusive screen coordinates (x1, y1, x2, y2).

§visible: bool

Geometry/hidden/opacity visibility, not a promise of being unoccluded.

§clipped_bounds: Option<(i32, i32, i32, i32)>§layer: &'static str§redacted: bool§text_truncated: bool§name_truncated: bool§state: u32§scroll: (i32, i32)§value: Option<i32>§range: Option<(i32, i32)>§selected: Option<u32>§selected_text: Option<String>§selected_text_truncated: bool§style: UiStyle§buttons: Vec<UiButton>§buttons_truncated: bool

Trait Implementations§

Source§

impl Clone for UiElement

Source§

fn clone(&self) -> UiElement

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for UiElement

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for UiElement

Source§

fn eq(&self, other: &UiElement) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for UiElement

Source§

impl StructuralPartialEq for UiElement

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.