pub struct TimePickerWidget {
pub hour: u8,
pub minute: u8,
pub is_pm: bool,
pub format: TimeFormat,
pub focused_field: TimePickerField,
pub background_color: Rgb565,
pub text_color: Rgb565,
pub focus_color: Rgb565,
pub focus_bg_color: Rgb565,
pub bump_offset_y: i8,
}Expand description
Time Picker Widget for wearable time entry.
Fields§
§hour: u8Hour value (1..12 in 12h mode, 0..23 in 24h mode).
minute: u8Minute value (0..59).
is_pm: boolIs PM active (only used in 12h mode).
format: TimeFormatTime format mode.
focused_field: TimePickerFieldCurrently focused field.
background_color: Rgb565Background card color.
text_color: Rgb565Inactive text/cell color.
focus_color: Rgb565Active highlight focus color.
focus_bg_color: Rgb565Active focus background halo color.
bump_offset_y: i8Bump animation vertical offset in pixels for tactile feedback.
Implementations§
Source§impl TimePickerWidget
impl TimePickerWidget
Sourcepub fn new_12h(hour: u8, minute: u8, is_pm: bool) -> Self
pub fn new_12h(hour: u8, minute: u8, is_pm: bool) -> Self
Creates a new time picker in 12-hour format.
Sourcepub fn increment_focused(&mut self)
pub fn increment_focused(&mut self)
Increments the currently focused field value.
Sourcepub fn decrement_focused(&mut self)
pub fn decrement_focused(&mut self)
Decrements the currently focused field value.
Sourcepub fn next_field(&mut self)
pub fn next_field(&mut self)
Cycles focus to the next field to the right.
Sourcepub fn prev_field(&mut self)
pub fn prev_field(&mut self)
Cycles focus to the previous field to the left.
Trait Implementations§
Source§impl Clone for TimePickerWidget
impl Clone for TimePickerWidget
Source§fn clone(&self) -> TimePickerWidget
fn clone(&self) -> TimePickerWidget
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 moreSource§impl Debug for TimePickerWidget
impl Debug for TimePickerWidget
Auto Trait Implementations§
impl Freeze for TimePickerWidget
impl RefUnwindSafe for TimePickerWidget
impl Send for TimePickerWidget
impl Sync for TimePickerWidget
impl Unpin for TimePickerWidget
impl UnsafeUnpin for TimePickerWidget
impl UnwindSafe for TimePickerWidget
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.