pub struct NumberInput<'a> { /* private fields */ }Expand description
NumberInput with format_num_pattern backend. A bit similar to javas DecimalFormat.
§Stateful
This widget implements StatefulWidget, you can use it with
NumberInputState to handle common actions.
Implementations§
Source§impl<'a> NumberInput<'a>
impl<'a> NumberInput<'a>
pub fn new() -> Self
Sourcepub fn compact(self, compact: bool) -> Self
pub fn compact(self, compact: bool) -> Self
Show the compact form, if the focus is not with this widget.
Sourcepub fn focus_style(self, style: impl Into<Style>) -> Self
pub fn focus_style(self, style: impl Into<Style>) -> Self
Style when focused.
Sourcepub fn select_style(self, style: impl Into<Style>) -> Self
pub fn select_style(self, style: impl Into<Style>) -> Self
Style for selection
Sourcepub fn invalid_style(self, style: impl Into<Style>) -> Self
pub fn invalid_style(self, style: impl Into<Style>) -> Self
Style for the invalid indicator.
pub fn block(self, block: Block<'a>) -> Self
Sourcepub fn on_focus_gained(self, of: TextFocusGained) -> Self
pub fn on_focus_gained(self, of: TextFocusGained) -> Self
Focus behaviour
Sourcepub fn on_focus_lost(self, of: TextFocusLost) -> Self
pub fn on_focus_lost(self, of: TextFocusLost) -> Self
Focus behaviour
Trait Implementations§
Source§impl<'a> Clone for NumberInput<'a>
impl<'a> Clone for NumberInput<'a>
Source§fn clone(&self) -> NumberInput<'a>
fn clone(&self) -> NumberInput<'a>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'a> Debug for NumberInput<'a>
impl<'a> Debug for NumberInput<'a>
Source§impl<'a> Default for NumberInput<'a>
impl<'a> Default for NumberInput<'a>
Source§fn default() -> NumberInput<'a>
fn default() -> NumberInput<'a>
Returns the “default value” for a type. Read more
Source§impl StatefulWidget for NumberInput<'_>
impl StatefulWidget for NumberInput<'_>
Auto Trait Implementations§
impl<'a> Freeze for NumberInput<'a>
impl<'a> RefUnwindSafe for NumberInput<'a>
impl<'a> Send for NumberInput<'a>
impl<'a> Sync for NumberInput<'a>
impl<'a> Unpin for NumberInput<'a>
impl<'a> UnwindSafe for NumberInput<'a>
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more