pub struct TextInputPopup<'a> { /* private fields */ }Expand description
Popup que envuelve un TextInput para capturar texto del usuario.
Compone un Popup (chrome) con un TextInput (campo de texto centrado).
Hereda la configuración del TextInput a través de builders delegados.
El popup se auto-dimensiona según el alto requerido por el TextInput,
y centra verticalmente el campo dentro del área disponible.
Implementations§
Source§impl<'a> TextInputPopup<'a>
impl<'a> TextInputPopup<'a>
Sourcepub fn new() -> Self
pub fn new() -> Self
Crea un TextInputPopup con valores predeterminados.
Por defecto: Popup con borde redondeado y padding 0,
TextInput con borders invisibles (Borders::NONE)
y BorderType::None (la entrada se renderiza sin borde propio).
pub fn title(self, title: &'a str) -> Self
pub fn cursor_style(self, style: Style) -> Self
pub fn text_style(self, style: Style) -> Self
pub fn border_style(self, style: Style) -> Self
pub fn borders(self, borders: Borders) -> Self
Sourcepub fn input_bg_color(self, color: Color) -> Self
pub fn input_bg_color(self, color: Color) -> Self
Background color for the inner TextInput content area.
Use bg_color for the popup’s background instead.
Sourcepub fn bg_color(self, color: Color) -> Self
pub fn bg_color(self, color: Color) -> Self
Background color for the entire popup area (including border).
Delegates to Popup::bg_color. See input_bg_color for the
inner text input background.
pub fn scroll_padding(self, padding: u16) -> Self
pub fn scroll_reserve(self, reserve: u16) -> Self
pub fn rows(self, rows: u16) -> Self
pub fn placeholder(self, placeholder: &'a str) -> Self
pub fn border_color(self, color: Color) -> Self
pub fn border_type(self, bt: BorderType) -> Self
pub fn width(self, w: PopupSize) -> Self
pub fn height(self, h: PopupSize) -> Self
pub fn position(self, x: u16, y: u16) -> Self
pub fn origin(self, x: u16, y: u16) -> Self
pub fn header(self) -> Self
pub fn no_background(self) -> Self
pub fn background_dots(self, color: Color, symbol: &str, density: u16) -> Self
pub fn background_pattern(self, pattern: DotPattern) -> Self
pub fn background_spacing(self, density_x: u16, density_y: u16) -> Self
pub fn badges(self, badges: BadgeStack<'a>) -> Self
Source§impl<'a> TextInputPopup<'a>
impl<'a> TextInputPopup<'a>
Sourcepub fn resolve_rect(&self, area: Rect, state: &TextInputState) -> Rect
pub fn resolve_rect(&self, area: Rect, state: &TextInputState) -> Rect
Resolves the final Rect for this popup within the given area,
using the text input state for Auto-height resolution.
Trait Implementations§
Source§impl AutoSized for TextInputPopup<'_>
impl AutoSized for TextInputPopup<'_>
type State = TextInputState
Source§impl<'a> Clone for TextInputPopup<'a>
impl<'a> Clone for TextInputPopup<'a>
Source§fn clone(&self) -> TextInputPopup<'a>
fn clone(&self) -> TextInputPopup<'a>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl StatefulWidget for TextInputPopup<'_>
impl StatefulWidget for TextInputPopup<'_>
Auto Trait Implementations§
impl<'a> Freeze for TextInputPopup<'a>
impl<'a> RefUnwindSafe for TextInputPopup<'a>
impl<'a> Send for TextInputPopup<'a>
impl<'a> Sync for TextInputPopup<'a>
impl<'a> Unpin for TextInputPopup<'a>
impl<'a> UnsafeUnpin for TextInputPopup<'a>
impl<'a> UnwindSafe for TextInputPopup<'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
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>
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>
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