Struct Disclosure
pub struct Disclosure { /* private fields */ }Expand description
The coming and going of one band (a find bar, a banner) on the standard
expand/collapse motion (Disclose): its clip height opens from the
top and what follows it moves with the band’s edge, by transform.
The owner keeps its own shown state, which input acts on at once; this
only says how much of the band is drawn (Self::reveal). A change a
key or an action asked for lands on the next frame; one a pointer asked
for discloses. Reduced motion: the height lands and an arriving band’s
content fades in at fast.
Every motion it starts asks the frame pump for frames until it settles
(super::want_frames_until); at rest it asks for none and computes
nothing beyond its resting reveal.
Implementations§
§impl Disclosure
impl Disclosure
pub fn closed() -> Disclosure
pub fn closed() -> Disclosure
Not shown, at rest.
pub fn opened() -> Disclosure
pub fn opened() -> Disclosure
Shown, at rest: a band that is there from its first paint (first paint shows the resting state; motion explains changes).
pub fn show(&mut self, open: bool, motion: EffectiveMotion)
pub fn show(&mut self, open: bool, motion: EffectiveMotion)
Show or hide it as the last input asked (super::input_source):
Ctrl+F or Escape lands, a menu or a close button moves.
pub fn show_change(&mut self, open: bool, motion: EffectiveMotion)
pub fn show_change(&mut self, open: bool, motion: EffectiveMotion)
Show or hide it for a change the person may not have caused (a banner saying the window went offline): it discloses unless a key or an action just asked for it, which lands. A jump at the top of what the person looks at reads as the layout breaking, so an unprompted band moves too.
pub fn leave(&mut self, motion: EffectiveMotion)
pub fn leave(&mut self, motion: EffectiveMotion)
Let a band that is going for good (its view stopped building it)
leave as the last input asks: a key’s result lands; otherwise it
collapses, and under reduced motion its height lands and its paint
fades out at fast.
pub fn show_from(
&mut self,
open: bool,
motion: EffectiveMotion,
source: MotionSource,
)
pub fn show_from( &mut self, open: bool, motion: EffectiveMotion, source: MotionSource, )
Show or hide it for a change source asked for. Asking for the
state it is in or going to changes nothing; the other one mid-flight
reverses from where it is drawn.
pub fn is_sliding(&self) -> bool
pub fn is_sliding(&self) -> bool
Whether its height is on the way now (not reduced motion’s fade): while it is, the band stands out of its container’s layout, which keeps what follows where it is at the larger extent and moves it by transform; the layout takes the band in once, at rest.
pub fn settles_at(&self) -> Option<Instant>
pub fn settles_at(&self) -> Option<Instant>
When it rests; None at rest.
Trait Implementations§
§impl Clone for Disclosure
impl Clone for Disclosure
§fn clone(&self) -> Disclosure
fn clone(&self) -> Disclosure
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for Disclosure
impl Debug for Disclosure
§impl Default for Disclosure
impl Default for Disclosure
§fn default() -> Disclosure
fn default() -> Disclosure
impl Copy for Disclosure
Auto Trait Implementations§
impl Freeze for Disclosure
impl RefUnwindSafe for Disclosure
impl Send for Disclosure
impl Sync for Disclosure
impl Unpin for Disclosure
impl UnsafeUnpin for Disclosure
impl UnwindSafe for Disclosure
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