Struct Placed
pub struct Placed { /* private fields */ }Expand description
One surface’s arrival, departure and movement, sampled once per drawn frame.
Implementations§
§impl Placed
impl Placed
pub fn follow(
&mut self,
rect: Rect,
open: bool,
motion: EffectiveMotion,
source: MotionSource,
now: Instant,
)
pub fn follow( &mut self, rect: Rect, open: bool, motion: EffectiveMotion, source: MotionSource, now: Instant, )
Where it is drawn this frame, its motion advanced to now: laid out at rect, up
(open) or going, with motion the person allows and source what asked for the change.
Call it once a frame, where the widget draws or lays out, so every read in that frame sees the same value.
pub fn rect(&self, now: Instant) -> Rect
pub fn rect(&self, now: Instant) -> Rect
Where it is drawn at now, whatever the last frame laid out: the rectangle the move has
reached, or the one it stands at once it has arrived.
pub fn is_visible(&self, now: Instant) -> bool
pub fn is_visible(&self, now: Instant) -> bool
Whether anything of it is drawn at now: up, coming or leaving.
pub fn is_moving(&self, now: Instant) -> bool
pub fn is_moving(&self, now: Instant) -> bool
Whether it is still moving at now (its owner asks for frames).
pub fn settles_at(&self) -> Option<Instant>
pub fn settles_at(&self) -> Option<Instant>
When it arrives or rests; None while it is still.
pub fn pose(&self, rest: Rect, now: Instant) -> Pose
pub fn pose(&self, rest: Rect, now: Instant) -> Pose
The pose it is drawn under at now, in a surface laid out at rest: its content’s
arrival, and the transform carrying it from where it stood toward where it is laid out.
A surface that is coming or going scales and fades about its own centre
(WindowMotion::content_pose); one that only moves is drawn at its place plus the
offset the move has still to cover.
pub fn snap(&mut self, rect: Rect, open: bool)
pub fn snap(&mut self, rect: Rect, open: bool)
Jump to rect and open, at rest: a capture or a test posing a surface where it stands.
pub fn centre(&self, now: Instant) -> Point
pub fn centre(&self, now: Instant) -> Point
The centre of where it is drawn at now, for a caller that anchors something to it.
pub fn movement(&self) -> &MotionValue<Rect>
pub fn movement(&self) -> &MotionValue<Rect>
The move’s value, for a capture or a test that poses it at a chosen point of its run
(MotionValue::sampled_after). Never for a live frame, which reads Self::rect at
the frame’s instant.
pub fn openness(&self) -> &Presence
pub fn openness(&self) -> &Presence
The coming or going, for a capture or a test posing it (Presence::progress at a chosen
instant). Never for a live frame, which reads Self::progress.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Placed
impl RefUnwindSafe for Placed
impl Send for Placed
impl Sync for Placed
impl Unpin for Placed
impl UnsafeUnpin for Placed
impl UnwindSafe for Placed
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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