Struct cosmic_text::Editor
source · pub struct Editor<'a> { /* private fields */ }
Expand description
A wrapper of Buffer
for easy editing
Implementations
Trait Implementations
sourceimpl<'a> Edit<'a> for Editor<'a>
impl<'a> Edit<'a> for Editor<'a>
sourcefn draw<F>(&self, cache: &mut SwashCache<'_>, color: Color, f: F)where
F: FnMut(i32, i32, u32, u32, Color),
fn draw<F>(&self, cache: &mut SwashCache<'_>, color: Color, f: F)where
F: FnMut(i32, i32, u32, u32, Color),
Draw the editor
sourcefn buffer_mut(&mut self) -> &mut Buffer<'a>
fn buffer_mut(&mut self) -> &mut Buffer<'a>
Get the internal
Buffer
, mutablysourcefn select_opt(&self) -> Option<Cursor>
fn select_opt(&self) -> Option<Cursor>
Get the current selection position
sourcefn shape_as_needed(&mut self)
fn shape_as_needed(&mut self)
Shape lines until scroll, after adjusting scroll if the cursor moved
sourcefn copy_selection(&mut self) -> Option<String>
fn copy_selection(&mut self) -> Option<String>
Copy selection
sourcefn delete_selection(&mut self) -> bool
fn delete_selection(&mut self) -> bool
Delete selection, adjusting cursor and returning true if there was a selection
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Editor<'a>
impl<'a> Send for Editor<'a>
impl<'a> Sync for Editor<'a>
impl<'a> Unpin for Editor<'a>
impl<'a> !UnwindSafe for Editor<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more