pub struct BaseEditor<XMSG> { /* private fields */ }
Expand description
An editor with core functionality platform specific UI
Implementations§
Source§impl<XMSG> BaseEditor<XMSG>
impl<XMSG> BaseEditor<XMSG>
pub fn from_str(options: &BaseOptions, content: &str) -> Self
pub fn text_buffer(&self) -> &TextBuffer
pub fn set_selection(&mut self, start: Point2<i32>, end: Point2<i32>)
pub fn selection(&self) -> &Selection
pub fn selected_text(&self) -> Option<String>
pub fn cut_selected_text(&mut self) -> Option<String>
pub fn is_selected(&self, loc: Point2<i32>) -> bool
pub fn clear_selection(&mut self)
pub fn set_selection_start(&mut self, start: Point2<i32>)
pub fn set_selection_end(&mut self, end: Point2<i32>)
pub fn get_char(&self, loc: Point2<usize>) -> Option<char>
pub fn get_position(&self) -> Point2<usize>
pub fn get_content(&self) -> String
pub fn total_lines(&self) -> usize
Source§impl<XMSG> BaseEditor<XMSG>
impl<XMSG> BaseEditor<XMSG>
pub fn process_commands( &mut self, _commands: impl IntoIterator<Item = Command>, ) -> Vec<XMSG>
Sourcepub fn process_command(&mut self, command: Command) -> bool
pub fn process_command(&mut self, command: Command) -> bool
process the supplied command to text_edit
pub fn clear(&mut self)
pub fn numberline_wide(&self) -> usize
Trait Implementations§
Source§impl<XMSG> AsMut<TextEdit> for BaseEditor<XMSG>
impl<XMSG> AsMut<TextEdit> for BaseEditor<XMSG>
Source§impl<XMSG> AsRef<TextEdit> for BaseEditor<XMSG>
impl<XMSG> AsRef<TextEdit> for BaseEditor<XMSG>
Source§impl<XMSG> Clone for BaseEditor<XMSG>
impl<XMSG> Clone for BaseEditor<XMSG>
Auto Trait Implementations§
impl<XMSG> Freeze for BaseEditor<XMSG>
impl<XMSG> RefUnwindSafe for BaseEditor<XMSG>where
XMSG: RefUnwindSafe,
impl<XMSG> Send for BaseEditor<XMSG>where
XMSG: Send,
impl<XMSG> Sync for BaseEditor<XMSG>where
XMSG: Sync,
impl<XMSG> Unpin for BaseEditor<XMSG>where
XMSG: Unpin,
impl<XMSG> UnwindSafe for BaseEditor<XMSG>where
XMSG: UnwindSafe,
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<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.