pub struct SelectionHandleGeometry {
pub kind: SelectionHandleKind,
pub offset: usize,
pub document_len: usize,
pub side: Option<HorizontalSide>,
pub caret: Rect,
pub anchor: Point,
pub visual: Rect,
pub hit: Rect,
}Expand description
The painted and hittable geometry of one selection handle.
Fields§
§kind: SelectionHandleKindWhich handle this is, in logical order.
offset: usizeThe text offset this handle marks — the slider value assistive technology reads and writes.
document_len: usizeThe largest offset the surface has, so the slider node has a maximum.
side: Option<HorizontalSide>Which physical side of the selection it is on, resolved once through
SelectionHandleKind::side so a mirror can never be applied twice.
None for the caret handle, which has no side.
caret: RectThe caret rectangle this handle marks.
anchor: PointCentre of the painted disc.
visual: RectThe painted disc’s bounding square.
hit: RectThe square that accepts the press. Never smaller than the disc, and nudged so as much of it as possible lies inside the viewport.
Trait Implementations§
Source§impl Clone for SelectionHandleGeometry
impl Clone for SelectionHandleGeometry
impl Copy for SelectionHandleGeometry
Source§impl Debug for SelectionHandleGeometry
impl Debug for SelectionHandleGeometry
Source§impl PartialEq for SelectionHandleGeometry
impl PartialEq for SelectionHandleGeometry
impl StructuralPartialEq for SelectionHandleGeometry
Auto Trait Implementations§
impl Freeze for SelectionHandleGeometry
impl RefUnwindSafe for SelectionHandleGeometry
impl Send for SelectionHandleGeometry
impl Sync for SelectionHandleGeometry
impl Unpin for SelectionHandleGeometry
impl UnsafeUnpin for SelectionHandleGeometry
impl UnwindSafe for SelectionHandleGeometry
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