Struct floem_cosmic_text::Editor
source · pub struct Editor { /* private fields */ }
Expand description
A wrapper of [Buffer
] for easy editing
Implementations§
Trait Implementations§
source§impl Edit for Editor
impl Edit for Editor
source§fn draw<F>(&self, cache: &mut SwashCache, color: Color, f: F)
fn draw<F>(&self, cache: &mut SwashCache, color: Color, f: F)
Draw the editor
source§fn buffer(&self) -> &TextLayout
fn buffer(&self) -> &TextLayout
Get the internal [
Buffer
]source§fn buffer_mut(&mut self) -> &mut TextLayout
fn buffer_mut(&mut self) -> &mut TextLayout
Get the internal [
Buffer
], mutablysource§fn select_opt(&self) -> Option<Cursor>
fn select_opt(&self) -> Option<Cursor>
Get the current selection position
source§fn set_select_opt(&mut self, select_opt: Option<Cursor>)
fn set_select_opt(&mut self, select_opt: Option<Cursor>)
Set the current selection position
source§fn shape_as_needed(&mut self)
fn shape_as_needed(&mut self)
Shape lines until scroll, after adjusting scroll if the cursor moved
source§fn copy_selection(&mut self) -> Option<String>
fn copy_selection(&mut self) -> Option<String>
Copy selection
source§fn 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 Freeze for Editor
impl RefUnwindSafe for Editor
impl Send for Editor
impl Sync for Editor
impl Unpin for Editor
impl UnwindSafe for Editor
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