pub struct TextBox<'a> {
pub single_line_mode: bool,
/* private fields */
}Fields§
§single_line_mode: boolImplementations§
Source§impl<'a> TextBox<'a>
impl<'a> TextBox<'a>
pub fn new(lines: Vec<String>, single_line_mode: bool) -> Self
pub fn from_list_of_strings(lines: Vec<String>, single_line_mode: bool) -> Self
pub fn from_list_of_str(lines: Vec<&'a str>, single_line_mode: bool) -> Self
pub fn from_string_with_newline_sep(s: String, single_line_mode: bool) -> Self
pub fn reset(&mut self)
pub fn get_joined_lines(&self) -> String
pub fn get_num_lines(&self) -> usize
pub fn set_placeholder_text(&mut self, placeholder: impl Into<String>)
pub fn set_mask_char(&mut self, mask: char)
pub fn clear_mask_char(&mut self)
pub fn disable_cursor(&mut self)
pub fn enable_cursor(&mut self, cursor_style: Style)
pub fn input(&mut self, input: Key) -> bool
pub fn input_without_shortcuts(&mut self, input: Key) -> bool
pub fn set_selection_style(&mut self, style: Style)
pub fn copy(&mut self)
pub fn cut(&mut self) -> bool
pub fn paste(&mut self) -> bool
pub fn insert_char(&mut self, c: char)
pub fn insert_str<S: AsRef<str>>(&mut self, s: S) -> bool
pub fn delete_str(&mut self, chars: usize) -> bool
pub fn insert_tab(&mut self) -> bool
pub fn insert_newline(&mut self)
pub fn delete_newline(&mut self) -> bool
pub fn delete_char(&mut self) -> bool
pub fn delete_next_char(&mut self) -> bool
pub fn delete_line_by_end(&mut self) -> bool
pub fn delete_line_by_head(&mut self) -> bool
pub fn delete_word(&mut self) -> bool
pub fn delete_next_word(&mut self) -> bool
pub fn select_all(&mut self)
pub fn move_cursor(&mut self, m: CursorMove)
pub fn undo(&mut self) -> bool
pub fn redo(&mut self) -> bool
pub fn widget(&'a self) -> impl Widget + 'a
pub fn style(&self) -> Style
pub fn set_block(&mut self, block: Block<'a>)
pub fn block<'s>(&'s self) -> Option<&'s Block<'a>>
pub fn set_line_number_style(&mut self, style: Style)
pub fn remove_line_number(&mut self)
pub fn lines(&'a self) -> &'a [String]
pub fn cursor(&self) -> (usize, usize)
pub fn set_alignment(&mut self, alignment: Alignment)
pub fn alignment(&self) -> Alignment
pub fn is_empty(&self) -> bool
pub fn scroll(&mut self, scrolling: impl Into<TextBoxScroll>)
pub fn start_selection(&mut self)
pub fn cancel_selection(&mut self)
pub fn get_non_ascii_aware_cursor_x_pos(&self) -> usize
Trait Implementations§
Auto Trait Implementations§
impl<'a> !Freeze for TextBox<'a>
impl<'a> RefUnwindSafe for TextBox<'a>
impl<'a> Send for TextBox<'a>
impl<'a> Sync for TextBox<'a>
impl<'a> Unpin for TextBox<'a>
impl<'a> UnwindSafe for TextBox<'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> 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