pub struct TextSelectionRegistration { /* private fields */ }Expand description
Per-frame geometry reported by a TextSelectionHandle participant.
Implementations§
Source§impl TextSelectionRegistration
impl TextSelectionRegistration
Sourcepub fn new(hitbox: Hitbox, bounds: Bounds<Pixels>) -> Self
pub fn new(hitbox: Hitbox, bounds: Bounds<Pixels>) -> Self
Creates a registration with default scope, order, and scroll offset.
Sourcepub fn with_scroll_offset(self, scroll_offset: Point<Pixels>) -> Self
pub fn with_scroll_offset(self, scroll_offset: Point<Pixels>) -> Self
Sets the participant’s content scroll offset.
Sourcepub fn with_scope(self, scope: TextSelectionScopeId) -> Self
pub fn with_scope(self, scope: TextSelectionScopeId) -> Self
Sets the opaque selection scope.
Sourcepub fn with_document_order(self, document_order: u64) -> Self
pub fn with_document_order(self, document_order: u64) -> Self
Sets the stable logical document order.
Sourcepub fn with_text_bounds(self, text_bounds: Vec<Bounds<Pixels>>) -> Self
pub fn with_text_bounds(self, text_bounds: Vec<Bounds<Pixels>>) -> Self
Sets the glyph-bearing bounds used to reject blank-only gestures.
Sourcepub const fn bounds(&self) -> Bounds<Pixels>
pub const fn bounds(&self) -> Bounds<Pixels>
Returns the participant’s window-coordinate bounds.
Sourcepub const fn scroll_offset(&self) -> Point<Pixels>
pub const fn scroll_offset(&self) -> Point<Pixels>
Returns the participant’s content scroll offset.
Sourcepub const fn scope(&self) -> TextSelectionScopeId
pub const fn scope(&self) -> TextSelectionScopeId
Returns the opaque selection scope.
Sourcepub const fn document_order(&self) -> u64
pub const fn document_order(&self) -> u64
Returns the stable logical document order.
Sourcepub fn text_bounds(&self) -> &[Bounds<Pixels>]
pub fn text_bounds(&self) -> &[Bounds<Pixels>]
Returns the glyph-bearing bounds used to reject blank-only gestures.
Auto Trait Implementations§
impl Freeze for TextSelectionRegistration
impl RefUnwindSafe for TextSelectionRegistration
impl Send for TextSelectionRegistration
impl Sync for TextSelectionRegistration
impl Unpin for TextSelectionRegistration
impl UnsafeUnpin for TextSelectionRegistration
impl UnwindSafe for TextSelectionRegistration
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more