pub struct InputText<'ui, 'p, L = String, H = String, T = PassthroughCallback> { /* private fields */ }Expand description
Builder for a text input widget
Implementations§
Source§impl<'ui, 'p, L, H, T> InputText<'ui, 'p, L, H, T>
impl<'ui, 'p, L, H, T> InputText<'ui, 'p, L, H, T>
Sourcepub fn flags(self, flags: InputTextFlags) -> Self
pub fn flags(self, flags: InputTextFlags) -> Self
Sets the flags for the input
Sourcepub fn capacity_hint(self, cap: usize) -> Self
pub fn capacity_hint(self, cap: usize) -> Self
Hint a minimum buffer capacity to reduce reallocations for large fields
Sourcepub fn callback<T2: InputTextCallbackHandler>(
self,
callback_handler: T2,
) -> InputText<'ui, 'p, L, H, T2>
pub fn callback<T2: InputTextCallbackHandler>( self, callback_handler: T2, ) -> InputText<'ui, 'p, L, H, T2>
Sets a callback handler for the input text
Sourcepub fn callback_flags(self, callback_flags: InputTextCallback) -> Self
pub fn callback_flags(self, callback_flags: InputTextCallback) -> Self
Sets callback flags for the input text
Sourcepub fn auto_select_all(self, auto_select: bool) -> Self
pub fn auto_select_all(self, auto_select: bool) -> Self
Enables auto-select all when first taking focus
Sourcepub fn enter_returns_true(self, enter_returns: bool) -> Self
pub fn enter_returns_true(self, enter_returns: bool) -> Self
Makes Enter key return true instead of adding new line
Sourcepub fn chars_decimal(self, decimal: bool) -> Self
pub fn chars_decimal(self, decimal: bool) -> Self
Allows only decimal characters (0123456789.+-*/)
Sourcepub fn chars_hexadecimal(self, hex: bool) -> Self
pub fn chars_hexadecimal(self, hex: bool) -> Self
Allows only hexadecimal characters (0123456789ABCDEFabcdef)
Sourcepub fn chars_uppercase(self, uppercase: bool) -> Self
pub fn chars_uppercase(self, uppercase: bool) -> Self
Turns a..z into A..Z
Sourcepub fn chars_no_blank(self, no_blank: bool) -> Self
pub fn chars_no_blank(self, no_blank: bool) -> Self
Filters out spaces and tabs
Auto Trait Implementations§
impl<'ui, 'p, L, H, T> Freeze for InputText<'ui, 'p, L, H, T>
impl<'ui, 'p, L = String, H = String, T = PassthroughCallback> !RefUnwindSafe for InputText<'ui, 'p, L, H, T>
impl<'ui, 'p, L = String, H = String, T = PassthroughCallback> !Send for InputText<'ui, 'p, L, H, T>
impl<'ui, 'p, L = String, H = String, T = PassthroughCallback> !Sync for InputText<'ui, 'p, L, H, T>
impl<'ui, 'p, L, H, T> Unpin for InputText<'ui, 'p, L, H, T>
impl<'ui, 'p, L = String, H = String, T = PassthroughCallback> !UnwindSafe for InputText<'ui, 'p, L, H, T>
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