pub struct TextareaState {
pub lines: Vec<String>,
pub cursor_row: usize,
pub cursor_col: usize,
}Expand description
State for a multi-line text area widget.
Pass a mutable reference to Context::textarea each frame along with the
number of visible rows. The widget handles all keyboard events when focused.
Fields§
§lines: Vec<String>The lines of text, one entry per line.
cursor_row: usizeRow index of the cursor (0-based).
cursor_col: usizeColumn index of the cursor within the current row (character index).
Implementations§
Source§impl TextareaState
impl TextareaState
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextareaState
impl RefUnwindSafe for TextareaState
impl Send for TextareaState
impl Sync for TextareaState
impl Unpin for TextareaState
impl UnsafeUnpin for TextareaState
impl UnwindSafe for TextareaState
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