pub struct SelectionWidget<'a, const MAX_CELLS: usize = 6> {
pub cell_texts: [&'a str; MAX_CELLS],
pub cell_count: usize,
pub selected_cell: usize,
pub is_active: bool,
pub bump_offset_y: i8,
pub slide_offset_x: i8,
pub active_bg_color: Rgb565,
pub active_text_color: Rgb565,
pub inactive_bg_color: Rgb565,
pub inactive_text_color: Rgb565,
}Expand description
Segmented multi-cell selection control (digits, PIN, time/date).
Fields§
§cell_texts: [&'a str; MAX_CELLS]§cell_count: usize§selected_cell: usize§is_active: bool§bump_offset_y: i8§slide_offset_x: i8§active_bg_color: Rgb565§active_text_color: Rgb565§inactive_bg_color: Rgb565§inactive_text_color: Rgb565Implementations§
Source§impl<'a, const MAX_CELLS: usize> SelectionWidget<'a, MAX_CELLS>
impl<'a, const MAX_CELLS: usize> SelectionWidget<'a, MAX_CELLS>
Trait Implementations§
Source§impl<'a, const MAX_CELLS: usize> Clone for SelectionWidget<'a, MAX_CELLS>
impl<'a, const MAX_CELLS: usize> Clone for SelectionWidget<'a, MAX_CELLS>
Source§fn clone(&self) -> SelectionWidget<'a, MAX_CELLS>
fn clone(&self) -> SelectionWidget<'a, MAX_CELLS>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a, const MAX_CELLS: usize> Copy for SelectionWidget<'a, MAX_CELLS>
Source§impl<'a, const MAX_CELLS: usize> Debug for SelectionWidget<'a, MAX_CELLS>
impl<'a, const MAX_CELLS: usize> Debug for SelectionWidget<'a, MAX_CELLS>
Source§impl<'a, const MAX_CELLS: usize> PartialEq for SelectionWidget<'a, MAX_CELLS>
impl<'a, const MAX_CELLS: usize> PartialEq for SelectionWidget<'a, MAX_CELLS>
impl<'a, const MAX_CELLS: usize> StructuralPartialEq for SelectionWidget<'a, MAX_CELLS>
Source§impl<'a, const MAX_CELLS: usize> Widget for SelectionWidget<'a, MAX_CELLS>
impl<'a, const MAX_CELLS: usize> Widget for SelectionWidget<'a, MAX_CELLS>
fn render_widget_bounds(&self, _bounds: Rect, _style: &Style)
fn get_property(&self, key: PropertyKey) -> Option<PropertyValue<'_>>
fn handle_widget_event( &mut self, _event: &UiEvent, _ctx: &mut EventContext, ) -> EventPolicy
fn set_property<'a>( &mut self, _key: PropertyKey, _val: PropertyValue<'a>, ) -> Result<(), PropertyError>
Auto Trait Implementations§
impl<'a, const MAX_CELLS: usize> Freeze for SelectionWidget<'a, MAX_CELLS>
impl<'a, const MAX_CELLS: usize> RefUnwindSafe for SelectionWidget<'a, MAX_CELLS>
impl<'a, const MAX_CELLS: usize> Send for SelectionWidget<'a, MAX_CELLS>
impl<'a, const MAX_CELLS: usize> Sync for SelectionWidget<'a, MAX_CELLS>
impl<'a, const MAX_CELLS: usize> Unpin for SelectionWidget<'a, MAX_CELLS>
impl<'a, const MAX_CELLS: usize> UnsafeUnpin for SelectionWidget<'a, MAX_CELLS>
impl<'a, const MAX_CELLS: usize> UnwindSafe for SelectionWidget<'a, MAX_CELLS>
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.