pub struct TextHitTestResult { /* private fields */ }Expand description
Holds a hit test result from a text layout.
Implementations§
Source§impl TextHitTestResult
impl TextHitTestResult
pub const fn new( character_hit: CharacterHit, text_position: i32, is_inside: bool, is_trailing: bool, ) -> Self
Sourcepub const fn character_hit(&self) -> CharacterHit
pub const fn character_hit(&self) -> CharacterHit
Gets the character hit of the hit test result.
Sourcepub const fn is_inside(&self) -> bool
pub const fn is_inside(&self) -> bool
Gets a value indicating whether the point is inside the bounds of the text layout.
Sourcepub const fn text_position(&self) -> i32
pub const fn text_position(&self) -> i32
Gets the index of the hit character in the text.
Sourcepub const fn is_trailing(&self) -> bool
pub const fn is_trailing(&self) -> bool
Gets a value indicating whether the hit is on the trailing edge of the character.
Trait Implementations§
Source§impl Clone for TextHitTestResult
impl Clone for TextHitTestResult
impl Copy for TextHitTestResult
Source§impl Debug for TextHitTestResult
impl Debug for TextHitTestResult
Source§impl Default for TextHitTestResult
impl Default for TextHitTestResult
impl Eq for TextHitTestResult
Source§impl Hash for TextHitTestResult
impl Hash for TextHitTestResult
Source§impl PartialEq for TextHitTestResult
impl PartialEq for TextHitTestResult
impl StructuralPartialEq for TextHitTestResult
Auto Trait Implementations§
impl Freeze for TextHitTestResult
impl RefUnwindSafe for TextHitTestResult
impl Send for TextHitTestResult
impl Sync for TextHitTestResult
impl Unpin for TextHitTestResult
impl UnsafeUnpin for TextHitTestResult
impl UnwindSafe for TextHitTestResult
Blanket Implementations§
Source§impl<T> AnyValue for Twhere
T: PartialEq + 'static,
impl<T> AnyValue for Twhere
T: PartialEq + 'static,
fn any_value_as_any(&self) -> &(dyn Any + 'static)
fn any_value_eq(&self, other: &(dyn AnyValue + 'static)) -> bool
fn any_value_type_name(&self) -> &'static str
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more