Struct makepad_code_editor::document::Document
source · pub struct Document(/* private fields */);
Implementations§
source§impl Document
impl Document
pub fn new(text: Text, decorations: DecorationSet) -> Self
pub fn as_text(&self) -> Ref<'_, Text>
pub fn layout(&self) -> Ref<'_, DocumentLayout>
pub fn decorations(&self) -> Ref<'_, [Decoration]>
pub fn edit_selections( &self, session_id: SessionId, kind: EditKind, selections: &SelectionSet, settings: &Settings, f: impl FnMut(Editor<'_>, Position, Length) )
pub fn edit_linewise( &self, origin_id: SessionId, kind: EditKind, selections: &SelectionSet, f: impl FnMut(Editor<'_>, usize) )
pub fn add_decoration(&mut self, decoration: Decoration)
pub fn clear_decorations(&mut self)
pub fn add_session( &mut self, session_id: SessionId, edit_sender: Sender<(Option<SelectionSet>, Vec<Edit>)> )
pub fn remove_session(&mut self, session_id: SessionId)
pub fn force_new_group(&mut self)
pub fn undo(&mut self, origin_id: SessionId, selections: &SelectionSet) -> bool
pub fn redo(&mut self, origin_id: SessionId, selections: &SelectionSet) -> bool
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Document
impl !Send for Document
impl !Sync for Document
impl Unpin for Document
impl !UnwindSafe for Document
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