pub struct TextLayout { /* private fields */ }Implementations§
Source§impl TextLayout
impl TextLayout
pub fn id(&self) -> TextLayoutId
pub fn version(&self) -> TextLayoutVersion
pub fn metadata(&self) -> TextLayoutMetadata
pub fn text(&self) -> &str
pub fn document(&self) -> &TextDocument
pub fn style(&self) -> &TextStyle
pub fn box_size(&self) -> Size
pub fn measurement(&self) -> TextMeasurement
pub fn paragraphs(&self) -> &[TextParagraphLayout]
pub fn lines(&self) -> &[TextLine]
pub fn runs(&self) -> &[TextLayoutRun]
pub fn clusters(&self) -> &[TextCluster]
pub fn glyphs(&self) -> &[ShapedGlyph]
pub fn faces(&self) -> &[ResolvedTextFace]
pub fn view(&self) -> TextLayoutView<'_>
pub fn run_style(&self, run_index: usize) -> &TextStyle
pub fn run_face(&self, run_index: usize) -> &ResolvedTextFace
pub fn glyph_style(&self, glyph: &ShapedGlyph) -> &TextStyle
pub fn glyph_face(&self, glyph: &ShapedGlyph) -> &ResolvedTextFace
pub fn run_view(&self, run_index: usize) -> TextRunView<'_>
pub fn run_views(&self) -> impl ExactSizeIterator<Item = TextRunView<'_>> + '_
pub fn glyph_instance(&self, glyph_index: usize) -> TextGlyphInstance<'_>
pub fn glyph_instances( &self, ) -> impl ExactSizeIterator<Item = TextGlyphInstance<'_>> + '_
pub fn line_window(&self, line_range: Range<usize>) -> TextLineWindow<'_>
pub fn caret(&self, cursor: TextCursor) -> TextCaret
pub fn caret_rect(&self, utf8_offset: usize) -> Rect
pub fn hit_test_point(&self, point: Point) -> TextCursor
pub fn selection_geometry( &self, selection: &TextSelection, ) -> TextSelectionGeometry
pub fn selection_rects(&self, range: Range<usize>) -> Vec<Rect>
pub fn selection_bounds(&self, range: Range<usize>) -> Option<Rect>
Trait Implementations§
Source§impl AsRef<TextLayout> for PersistentTextLayout
impl AsRef<TextLayout> for PersistentTextLayout
Source§fn as_ref(&self) -> &TextLayout
fn as_ref(&self) -> &TextLayout
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for TextLayout
impl Clone for TextLayout
Source§impl Debug for TextLayout
impl Debug for TextLayout
Source§impl PartialEq for TextLayout
impl PartialEq for TextLayout
impl StructuralPartialEq for TextLayout
Auto Trait Implementations§
impl Freeze for TextLayout
impl RefUnwindSafe for TextLayout
impl Send for TextLayout
impl Sync for TextLayout
impl Unpin for TextLayout
impl UnsafeUnpin for TextLayout
impl UnwindSafe for TextLayout
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