pub struct MagnifierInfo {
pub global_gesture_position: Offset,
pub current_line_boundaries: Rect,
pub caret_rect: Rect,
pub field_bounds: Rect,
}Expand description
A data class that contains the geometry information of text layouts and selection gestures, used to position magnifiers.
Fields§
§global_gesture_position: OffsetThe offset of the gesture position that the magnifier should be shown at.
current_line_boundaries: RectThe rect of the current line the magnifier should be shown at, without taking into account any padding of the field; only the position of the first and last character.
caret_rect: RectThe rect of the handle that the magnifier should follow.
field_bounds: RectThe bounds of the entire text field that the magnifier is bound to.
Implementations§
Source§impl MagnifierInfo
impl MagnifierInfo
Sourcepub const EMPTY: MagnifierInfo
pub const EMPTY: MagnifierInfo
Const MagnifierInfo with all values set to 0.
Sourcepub const fn new(
global_gesture_position: Offset,
caret_rect: Rect,
field_bounds: Rect,
current_line_boundaries: Rect,
) -> MagnifierInfo
pub const fn new( global_gesture_position: Offset, caret_rect: Rect, field_bounds: Rect, current_line_boundaries: Rect, ) -> MagnifierInfo
Constructs a MagnifierInfo from provided geometry values.
Trait Implementations§
Source§impl Clone for MagnifierInfo
impl Clone for MagnifierInfo
impl Copy for MagnifierInfo
Source§impl Debug for MagnifierInfo
impl Debug for MagnifierInfo
Source§impl PartialEq for MagnifierInfo
impl PartialEq for MagnifierInfo
impl StructuralPartialEq for MagnifierInfo
Auto Trait Implementations§
impl Forget for MagnifierInfo
impl Freeze for MagnifierInfo
impl Move for MagnifierInfo
impl RefUnwindSafe for MagnifierInfo
impl Send for MagnifierInfo
impl Sync for MagnifierInfo
impl Unpin for MagnifierInfo
impl UnsafeUnpin for MagnifierInfo
impl UnwindSafe for MagnifierInfo
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