pub struct FocusEntry {
pub node_id: NodeId,
pub rect: Rect,
}Expand description
One focus target, with the bounds layout gave it.
Fields§
§node_id: NodeIdId of the layout node that takes focus.
rect: RectBounds of the node in root coordinates, in logical pixels.
Implementations§
Source§impl FocusEntry
impl FocusEntry
Sourcepub fn center(&self) -> (f32, f32)
pub fn center(&self) -> (f32, f32)
Returns the center point of Self::rect in root coordinates, in logical pixels.
Trait Implementations§
Source§impl Clone for FocusEntry
impl Clone for FocusEntry
impl Copy for FocusEntry
Source§impl Debug for FocusEntry
impl Debug for FocusEntry
Source§impl PartialEq for FocusEntry
impl PartialEq for FocusEntry
impl StructuralPartialEq for FocusEntry
Auto Trait Implementations§
impl Freeze for FocusEntry
impl RefUnwindSafe for FocusEntry
impl Send for FocusEntry
impl Sync for FocusEntry
impl Unpin for FocusEntry
impl UnsafeUnpin for FocusEntry
impl UnwindSafe for FocusEntry
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
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