pub struct SingleLineInput { /* private fields */ }
Expand description
Single-line input manager wrapping tui_input::Input
Implementations§
Trait Implementations§
Source§impl InputManager for SingleLineInput
impl InputManager for SingleLineInput
Source§fn get_cursor_position(&self) -> usize
fn get_cursor_position(&self) -> usize
Get the current cursor position (char offset from start)
Source§fn set_cursor_position(&mut self, position: usize)
fn set_cursor_position(&mut self, position: usize)
Set the cursor position (char offset from start)
Source§fn handle_key_event(&mut self, event: KeyEvent) -> bool
fn handle_key_event(&mut self, event: KeyEvent) -> bool
Handle a key event
Source§fn get_visual_cursor(&self) -> (u16, u16)
fn get_visual_cursor(&self) -> (u16, u16)
Get the visual cursor position for rendering (row, col)
Source§fn is_multiline(&self) -> bool
fn is_multiline(&self) -> bool
Check if this is a multi-line input
Source§fn line_count(&self) -> usize
fn line_count(&self) -> usize
Get line count (1 for single-line)
Source§fn clone_box(&self) -> Box<dyn InputManager>
fn clone_box(&self) -> Box<dyn InputManager>
Clone the input manager (for undo/redo)
Source§fn set_history(&mut self, history: Vec<String>)
fn set_history(&mut self, history: Vec<String>)
Set the history entries for navigation
Source§fn history_previous(&mut self) -> bool
fn history_previous(&mut self) -> bool
Navigate to previous history entry (returns true if navigation occurred)
Source§fn history_next(&mut self) -> bool
fn history_next(&mut self) -> bool
Navigate to next history entry (returns true if navigation occurred)
Source§fn get_history_index(&self) -> Option<usize>
fn get_history_index(&self) -> Option<usize>
Get current history index (None if not navigating history)
Source§fn reset_history_position(&mut self)
fn reset_history_position(&mut self)
Reset history navigation (go back to user input)
Auto Trait Implementations§
impl Freeze for SingleLineInput
impl RefUnwindSafe for SingleLineInput
impl Send for SingleLineInput
impl Sync for SingleLineInput
impl Unpin for SingleLineInput
impl UnwindSafe for SingleLineInput
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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