pub struct CodeSession { /* private fields */ }
Implementations§
Source§impl CodeSession
impl CodeSession
pub fn new(document: CodeDocument) -> Self
pub fn id(&self) -> SessionId
pub fn settings(&self) -> &Rc<Settings>
pub fn document(&self) -> &CodeDocument
pub fn layout(&self) -> Layout<'_>
pub fn wrap_column(&self) -> Option<usize>
pub fn selections(&self) -> Ref<'_, [Selection]>
pub fn last_added_selection_index(&self) -> Option<usize>
pub fn highlighted_delimiter_positions(&self) -> Ref<'_, HashSet<Position>>
pub fn set_wrap_column(&self, wrap_column: Option<usize>)
pub fn fold(&self)
pub fn unfold(&self)
pub fn update_folds(&self) -> bool
pub fn set_selection( &self, position: Position, affinity: Affinity, mode: SelectionMode, new_group: NewGroup, )
pub fn clamp_position(&self, position: Position) -> Position
pub fn add_selection( &self, position: Position, affinity: Affinity, mode: SelectionMode, )
pub fn move_to( &self, position: Position, affinity: Affinity, new_group: NewGroup, )
pub fn move_left(&self, reset_anchor: bool)
pub fn move_right(&self, reset_anchor: bool)
pub fn move_up(&self, reset_anchor: bool)
pub fn move_down(&self, reset_anchor: bool)
pub fn home(&self, reset_anchor: bool)
pub fn end(&self, reset_anchor: bool)
pub fn insert(&self, text: Text)
pub fn paste(&self, text: Text)
pub fn paste_grouped(&self, text: Text, group: u64)
pub fn enter(&self)
pub fn delete(&self)
pub fn backspace(&self)
pub fn indent(&self)
pub fn outdent(&self)
pub fn copy(&self) -> String
pub fn undo(&self) -> bool
pub fn redo(&self) -> bool
Sourcepub fn word_at_cursor(&self) -> Option<String>
pub fn word_at_cursor(&self) -> Option<String>
Returns the word at the main cursor position as a String.
pub fn handle_changes(&mut self)
pub fn set_cursor_at_file_end(&self)
Trait Implementations§
Source§impl Debug for CodeSession
impl Debug for CodeSession
Auto Trait Implementations§
impl !Freeze for CodeSession
impl !RefUnwindSafe for CodeSession
impl !Send for CodeSession
impl !Sync for CodeSession
impl Unpin for CodeSession
impl !UnwindSafe for CodeSession
Blanket Implementations§
Source§impl<T> ActionTrait for T
impl<T> ActionTrait for T
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