pub struct SelectionRect {
pub position: i32,
pub bounds: Rect,
pub direction: TextDirection,
}Expand description
Represents a selection rect for a character and it’s position in the text.
This is used to report the current text selection rect and position data to the engine for Scribble support on iPadOS 14.
Fields§
§position: i32The position of this selection rect within the text String.
bounds: RectThe rectangle representing the bounds of this selection rect within the
currently focused RenderEditable’s coordinate space.
direction: TextDirectionThe direction text flows within this selection rect.
Implementations§
Source§impl SelectionRect
impl SelectionRect
Sourcepub const fn new(
position: i32,
bounds: Rect,
direction: TextDirection,
) -> SelectionRect
pub const fn new( position: i32, bounds: Rect, direction: TextDirection, ) -> SelectionRect
Constructor for creating a SelectionRect from a text position and
bounds.
Trait Implementations§
Source§impl Clone for SelectionRect
impl Clone for SelectionRect
impl Copy for SelectionRect
Source§impl Debug for SelectionRect
impl Debug for SelectionRect
Source§impl Display for SelectionRect
impl Display for SelectionRect
Source§impl PartialEq for SelectionRect
impl PartialEq for SelectionRect
impl StructuralPartialEq for SelectionRect
Auto Trait Implementations§
impl Freeze for SelectionRect
impl RefUnwindSafe for SelectionRect
impl Send for SelectionRect
impl Sync for SelectionRect
impl Unpin for SelectionRect
impl UnsafeUnpin for SelectionRect
impl UnwindSafe for SelectionRect
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