Struct Appearing
pub struct Appearing { /* private fields */ }Expand description
The coming and going of one surface on the standard Appear motion.
The owner keeps its own open state, which input acts on at once; this
only says how the surface is drawn. Self::follow (once a frame, from
the draw, and wherever the owner opens or closes it) picks up a change
and starts the motion from where it is drawn: a reopen mid-exit reverses,
repeated toggles never queue. What asked for the change is the input the
toolkit handled last (super::input_source): a key lands it at once, a
click moves it. A closing surface keeps being drawn until it has gone,
but takes no input (a click goes to whatever is under it).
Every motion it starts asks the frame pump for frames until it settles
(super::want_frames_until), so a menu an owner draws outside the
polled tree still moves, and nothing asks once it rests.
Implementations§
§impl Appearing
impl Appearing
pub fn opened() -> Appearing
pub fn opened() -> Appearing
Shown, at rest: a surface that is open from its first paint (first paint shows the resting state; motion explains changes).
pub fn follow(&mut self, open: bool, motion: EffectiveMotion)
pub fn follow(&mut self, open: bool, motion: EffectiveMotion)
Follow the owner’s open state with the motion the person allows
(theme.motion()), as the last input asked for it.
pub fn show(&mut self, open: bool)
pub fn show(&mut self, open: bool)
Open or close it with the motion it last drew with, as the last input
asked for it: what an owner’s open and close call, so a surface
whose owner stops drawing it once closed still arrives the next time.
pub fn show_from(&mut self, open: bool, source: MotionSource)
pub fn show_from(&mut self, open: bool, source: MotionSource)
Self::show for a change source asked for: a host that opens and
closes a surface of its own says what asked, since no input of the
app did.
pub fn follow_from(
&mut self,
open: bool,
motion: EffectiveMotion,
source: MotionSource,
)
pub fn follow_from( &mut self, open: bool, motion: EffectiveMotion, source: MotionSource, )
Self::follow for a change source asked for (a hover dwell is the
pointer’s, whatever was pressed last).
pub fn pose(&self, surface: Rect, anchor: Point) -> Pose
pub fn pose(&self, surface: Rect, anchor: Point) -> Pose
The pose of surface now, coming from anchor: the summoning
control’s centre, the caret, the pointer of a context menu, or the
surface’s own centre for a centred dialog. It comes from — or goes
back to — the point of the surface nearest the anchor, at 92 % and 8
px toward it arriving, 97 % and 8 px leaving (Appearing says which
of the two it is doing).
Trait Implementations§
impl Copy for Appearing
Auto Trait Implementations§
impl Freeze for Appearing
impl RefUnwindSafe for Appearing
impl Send for Appearing
impl Sync for Appearing
impl Unpin for Appearing
impl UnsafeUnpin for Appearing
impl UnwindSafe for Appearing
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