pub struct HitTestResult {
pub position: usize,
pub block_id: usize,
pub offset_in_block: usize,
pub region: HitRegion,
pub tooltip: Option<String>,
pub table_id: Option<usize>,
}Expand description
Result of crate::Typesetter::hit_test - maps a screen-space point to a
document position.
Fields§
§position: usizeAbsolute character position in the document.
block_id: usizeWhich block (paragraph) was hit, identified by stable block ID.
offset_in_block: usizeCharacter offset within the block (0 = start of block).
region: HitRegionWhat region of the layout was hit.
tooltip: Option<String>Tooltip text if the hit position has a tooltip. None otherwise.
table_id: Option<usize>When non-None, the hit position is inside a table cell. Identifies the table by its stable table ID. None for hits on top-level blocks, frame blocks, or outside any table.
Auto Trait Implementations§
impl Freeze for HitTestResult
impl RefUnwindSafe for HitTestResult
impl Send for HitTestResult
impl Sync for HitTestResult
impl Unpin for HitTestResult
impl UnsafeUnpin for HitTestResult
impl UnwindSafe for HitTestResult
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