pub struct TextSelection { /* private fields */ }Expand description
Selected range of a Text node, drawn by the layout engine behind the
glyphs the way Compose’s SelectionController draws from a
TextLayoutResult.
A range with start > end is reversed (the anchor sits at end);
painting normalizes it.
Implementations§
Source§impl TextSelection
impl TextSelection
pub fn range(&self) -> Option<TextRange>
pub fn set_range(&self, range: Option<TextRange>)
pub fn geometry(&self) -> TextLayoutGeometry
Sourcepub fn set_geometry(&self, geometry: TextLayoutGeometry)
pub fn set_geometry(&self, geometry: TextLayoutGeometry)
Called by the layout engine after measuring the node.
Trait Implementations§
Source§impl Clone for TextSelection
impl Clone for TextSelection
Source§impl Debug for TextSelection
impl Debug for TextSelection
Auto Trait Implementations§
impl !RefUnwindSafe for TextSelection
impl !Send for TextSelection
impl !Sync for TextSelection
impl !UnwindSafe for TextSelection
impl Freeze for TextSelection
impl Unpin for TextSelection
impl UnsafeUnpin for TextSelection
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