Struct editor2::display_map::DisplayMap
source · pub struct DisplayMap {
pub clip_at_line_ends: bool,
/* private fields */
}
Fields§
§clip_at_line_ends: bool
Implementations§
source§impl DisplayMap
impl DisplayMap
pub fn new( buffer: Model<MultiBuffer>, font: Font, font_size: Pixels, wrap_width: Option<Pixels>, buffer_header_height: u8, excerpt_header_height: u8, cx: &mut ModelContext<'_, Self> ) -> Self
pub fn snapshot(&mut self, cx: &mut ModelContext<'_, Self>) -> DisplaySnapshot
pub fn set_state( &mut self, other: &DisplaySnapshot, cx: &mut ModelContext<'_, Self> )
pub fn fold<T: ToOffset>( &mut self, ranges: impl IntoIterator<Item = Range<T>>, cx: &mut ModelContext<'_, Self> )
pub fn unfold<T: ToOffset>( &mut self, ranges: impl IntoIterator<Item = Range<T>>, inclusive: bool, cx: &mut ModelContext<'_, Self> )
pub fn insert_blocks( &mut self, blocks: impl IntoIterator<Item = BlockProperties<Anchor>>, cx: &mut ModelContext<'_, Self> ) -> Vec<BlockId>
pub fn replace_blocks(&mut self, styles: HashMap<BlockId, RenderBlock>)
pub fn remove_blocks( &mut self, ids: HashSet<BlockId>, cx: &mut ModelContext<'_, Self> )
pub fn highlight_text( &mut self, type_id: TypeId, ranges: Vec<Range<Anchor>>, style: HighlightStyle )
pub fn highlight_inlays( &mut self, type_id: TypeId, highlights: Vec<InlayHighlight>, style: HighlightStyle )
pub fn text_highlights( &self, type_id: TypeId ) -> Option<(HighlightStyle, &[Range<Anchor>])>
pub fn clear_highlights(&mut self, type_id: TypeId) -> bool
pub fn set_font( &self, font: Font, font_size: Pixels, cx: &mut ModelContext<'_, Self> ) -> bool
pub fn set_fold_ellipses_color(&mut self, color: Hsla) -> bool
pub fn set_wrap_width( &self, width: Option<Pixels>, cx: &mut ModelContext<'_, Self> ) -> bool
pub fn current_inlays(&self) -> impl Iterator<Item = &Inlay>
pub fn splice_inlays( &mut self, to_remove: Vec<InlayId>, to_insert: Vec<Inlay>, cx: &mut ModelContext<'_, Self> )
Auto Trait Implementations§
impl !RefUnwindSafe for DisplayMap
impl !Send for DisplayMap
impl !Sync for DisplayMap
impl Unpin for DisplayMap
impl !UnwindSafe for DisplayMap
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