pub struct State<P: Paragraph> { /* private fields */ }Expand description
The state of a TextInput.
Implementations§
Source§impl<P: Paragraph> State<P>
impl<P: Paragraph> State<P>
Sourcepub fn is_focused(&self) -> bool
pub fn is_focused(&self) -> bool
Returns whether the TextInput is currently focused or not.
Sourcepub fn move_cursor_to_front(&mut self)
pub fn move_cursor_to_front(&mut self)
Sourcepub fn move_cursor_to_end(&mut self)
pub fn move_cursor_to_end(&mut self)
Sourcepub fn move_cursor_to(&mut self, position: usize)
pub fn move_cursor_to(&mut self, position: usize)
Sourcepub fn select_all(&mut self)
pub fn select_all(&mut self)
Selects all the content of the TextInput.
Sourcepub fn select_range(&mut self, start: usize, end: usize)
pub fn select_range(&mut self, start: usize, end: usize)
Selects the given range of the content of the TextInput.
Trait Implementations§
Source§impl<P: Paragraph> TextInput for State<P>
impl<P: Paragraph> TextInput for State<P>
Source§fn move_cursor_to_front(&mut self)
fn move_cursor_to_front(&mut self)
Moves the cursor of the text input to the front of the input text.
Source§fn move_cursor_to_end(&mut self)
fn move_cursor_to_end(&mut self)
Moves the cursor of the text input to the end of the input text.
Source§fn move_cursor_to(&mut self, position: usize)
fn move_cursor_to(&mut self, position: usize)
Moves the cursor of the text input to an arbitrary location.
Source§fn select_all(&mut self)
fn select_all(&mut self)
Selects all the content of the text input.
Source§fn select_range(&mut self, start: usize, end: usize)
fn select_range(&mut self, start: usize, end: usize)
Selects the given content range of the text input.
Auto Trait Implementations§
impl<P> Freeze for State<P>where
P: Freeze,
impl<P> RefUnwindSafe for State<P>where
P: RefUnwindSafe,
impl<P> Send for State<P>where
P: Send,
impl<P> Sync for State<P>where
P: Sync,
impl<P> Unpin for State<P>where
P: Unpin,
impl<P> UnsafeUnpin for State<P>where
P: UnsafeUnpin,
impl<P> UnwindSafe for State<P>where
P: UnwindSafe,
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