pub struct TimePicker { /* private fields */ }Expand description
A Material clock-dial time picker.
Implementations§
Source§impl TimePicker
impl TimePicker
pub fn new(value: SimpleTime) -> Self
Sourcepub fn editing(self, u: TimeUnit) -> Self
pub fn editing(self, u: TimeUnit) -> Self
Which unit the dial edits (controlled; pair with .on_unit_change).
Sourcepub fn use_24h(self) -> Self
pub fn use_24h(self) -> Self
24-hour clock: two concentric rings (00–11 outer, 12–23 inner), no AM/PM. The distance of a tap from the centre picks the ring.
pub fn minute_step(self, s: u8) -> Self
pub fn accent(self, c: Color) -> Self
Sourcepub fn dial_color(self, c: Color) -> Self
pub fn dial_color(self, c: Color) -> Self
Dial face fill (default: a faint surface_variant).
Sourcepub fn hand_color(self, c: Color) -> Self
pub fn hand_color(self, c: Color) -> Self
The hand line color (default: accent).
Sourcepub fn thumb_color(self, c: Color) -> Self
pub fn thumb_color(self, c: Color) -> Self
The thumb disc at the hand’s tip (default: accent).
Sourcepub fn number_color(self, c: Color) -> Self
pub fn number_color(self, c: Color) -> Self
Unselected number color (default: on_surface).
Sourcepub fn selected_number_color(self, c: Color) -> Self
pub fn selected_number_color(self, c: Color) -> Self
The number sitting on the thumb (default: bright/on_primary).
pub fn on_change(self, f: impl Fn(SimpleTime) + Send + Sync + 'static) -> Self
pub fn on_unit_change( self, f: impl Fn(TimeUnit) + Send + Sync + 'static, ) -> Self
Trait Implementations§
Source§impl Widget for TimePicker
impl Widget for TimePicker
Source§fn layout(&self, _ctx: &LayoutCtx<'_>) -> Size
fn layout(&self, _ctx: &LayoutCtx<'_>) -> Size
Measure under
ctx.constraints and return a size within them. Read moreSource§fn children(&self) -> Children<'_>
fn children(&self) -> Children<'_>
Declare this widget’s children. Drives every default below.
Source§fn flex_factor(&self) -> f32
fn flex_factor(&self) -> f32
Flex weight inside Row/Column. Wrappers are transparent by default.
Auto Trait Implementations§
impl !RefUnwindSafe for TimePicker
impl !UnwindSafe for TimePicker
impl Freeze for TimePicker
impl Send for TimePicker
impl Sync for TimePicker
impl Unpin for TimePicker
impl UnsafeUnpin for TimePicker
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<W> FocusApi for W
impl<W> FocusApi for W
Source§fn focus_node(self, node: FocusNode) -> WithFocus<Self>
fn focus_node(self, node: FocusNode) -> WithFocus<Self>
Attach a focus node. This enables focus-ring rendering and explicit
neighbor wiring.